Skip to content

Commit

Permalink
feat(area-mail): remove areas and routes resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Lee committed Jun 28, 2018
1 parent 0d7e823 commit be447dd
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 106 deletions.
11 changes: 0 additions & 11 deletions README.md
Expand Up @@ -26,7 +26,6 @@ Here's a general overview of the Lob services available, click through to read m
- [Postcards API](https://lob.com/services/postcards)
- [Letters API](https://lob.com/services/letters)
- [Checks API](https://lob.com/services/checks)
- [Area Mail API](https://lob.com/services/area)
- [Address Verification API](https://lob.com/services/verifications)

Please read through the official [API Documentation](#api-documentation) to get a complete sense of what to expect from each endpoint.
Expand Down Expand Up @@ -126,16 +125,6 @@ There are simple scripts to demonstrate how to create all the core Lob objects (
- [Delete a Bank Account](https://lob.com/docs/python#bankaccounts_delete)
- [Verify a Bank Account](https://lob.com/docs/python#bankaccounts_verify)
- [List all Bank Accounts](https://lob.com/docs/python#bankaccounts_list)
- **Area Mail API**
- [Areas](https://lob.com/docs/python#areas)
- [The Area Object](https://lob.com/docs/python#areas_object)
- [Create an Area Mailing](https://lob.com/docs/python#areas_create)
- [Retrieve an Area Mailing](https://lob.com/docs/python#areas_retrieve)
- [List all Area Mailings](https://lob.com/docs/python#areas_list)
- [Routes](https://lob.com/docs/python#routes)
- [The Routes Object](https://lob.com/docs/python#routes_object)
- [Retrieve Routes](https://lob.com/docs/python#routes_retrieve)
- [List all Routes](https://lob.com/docs/python#routes_list)
- **Appendix**
- [API Changelog](https://lob.com/docs/python#changelog)
- [The Tracking Event Object](https://lob.com/docs/python#tracking_event_object)
Expand Down
4 changes: 2 additions & 2 deletions lob/__init__.py
@@ -1,6 +1,6 @@
# Resources
from lob.resource import (Address, Area, BankAccount, Check, Letter, Postcard,
Route, USAutocompletion, USVerification, USZipLookup,
from lob.resource import (Address, BankAccount, Check, Letter, Postcard,
USAutocompletion, USVerification, USZipLookup,
IntlVerification)

from lob.version import VERSION
Expand Down
20 changes: 0 additions & 20 deletions lob/resource.py
Expand Up @@ -9,7 +9,6 @@
def lob_format(resp):
types = {
'address': Address,
'area': Area,
'bank_account': BankAccount,
'check': Check,
'letter': Letter,
Expand Down Expand Up @@ -135,21 +134,6 @@ class Address(ListableAPIResource, DeleteableAPIResource, CreateableAPIResource)
endpoint = '/addresses'


class Area(ListableAPIResource, CreateableAPIResource):
endpoint = '/areas'

@classmethod
def create(cls, **params):
if isinstance(params, dict):
if 'routes' in params:
if isinstance(params['routes'], LobObject):
routes = []
for r in params['routes'].data[0]['routes']:
routes.append(params['routes'].data[0]['zip_code'] + '-' + r["route"])
params['routes'] = routes
return super(Area, cls).create(**params)


class BankAccount(ListableAPIResource, DeleteableAPIResource, CreateableAPIResource, VerifiableAPIResource):
endpoint = '/bank_accounts'

Expand Down Expand Up @@ -199,10 +183,6 @@ def create(cls, **params):
return super(Postcard, cls).create(**params)


class Route(ListableAPIResource):
endpoint = '/routes'


class USAutocompletion(CreateableAPIResource):
endpoint = '/us_autocompletions'

Expand Down
Binary file removed tests/areaback.pdf
Binary file not shown.
Binary file removed tests/areafront.pdf
Binary file not shown.
61 changes: 0 additions & 61 deletions tests/test_area.py

This file was deleted.

12 changes: 0 additions & 12 deletions tests/test_route.py

This file was deleted.

0 comments on commit be447dd

Please sign in to comment.