Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ lob.Job.create(
},
objects = {
'name': 'Test Object',
'file': 'https://www.lob.com/test.pdf',
'file': 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
'setting_id': '201'
}
)
Expand All @@ -194,11 +194,11 @@ lob.Job.create(
},
objects = [{
'name': 'Test Object 1',
'file': 'https://www.lob.com/test.pdf',
'file': 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
'setting_id': '201'
}, {
'name': 'Test Object 2',
'file': 'https://www.lob.com/test.pdf',
'file': 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
'setting_id': '201'
}]
)
Expand Down Expand Up @@ -285,7 +285,7 @@ lob.Object.retrieve(<id>)
#Create an Object using a URL
lob.Object.create(
name='Joe Smith',
file='https://www.lob.com/test.pdf',
file='https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
setting_id='201',
quantity=1,
double_sided=1
Expand Down Expand Up @@ -381,8 +381,8 @@ lob.Postcard.retrieve(<id>)
lob.Postcard.create(
to_address=<address_id>,
from_address=<address_id>,
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)

#Create a Postcard Using Lob Python Objects
Expand All @@ -392,8 +392,8 @@ from_addr = addresses[1]
lob.Postcard.create(
to_address = to_addr,
from_address = from_addr,
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)

#Create Postcard Using Inline Addresses
Expand All @@ -416,8 +416,8 @@ lob.Postcard.create(
'address_zip': '94107',
'address_country': 'US'
},
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)

#Create Postcard Using Inline Addresses and Local File
Expand Down Expand Up @@ -610,8 +610,8 @@ lob.Area.retrieve(<id>)
#Basic Area Create with Zip Codes
lob.Area.create(
name='Lob',
front = 'https://www.lob.com/areafront.pdf',
back = 'https://www.lob.com/areaback.pdf',
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/areafront.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/areaback.pdf',
routes = ['94158','60031'],
target_type = 'all',
full_bleed = '1'
Expand All @@ -621,17 +621,17 @@ lob.Area.create(
var routes = lob.Route.list(zip_codes=[94158,60031])
lob.Area.create(
name='Lob',
front = 'https://www.lob.com/areafront.pdf',
back = 'https://www.lob.com/areaback.pdf',
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/areafront.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/areaback.pdf',
routes = routes,
target_type = 'all',
full_bleed = '1'
)

#Create Area with Optional Parameters
lob.Area.create(
front = 'https://www.lob.com/areafront.pdf',
back = 'https://www.lob.com/areaback.pdf',
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/areafront.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/areaback.pdf',
routes = '94158',
)
```
Expand Down
2 changes: 1 addition & 1 deletion examples/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

example_object = lob.Object.create(
name = 'Example Object',
file = 'https://www.lob.com/test.pdf',
file = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
setting_id = '201',
quantity = 1,
double_sided = 1
Expand Down
4 changes: 2 additions & 2 deletions examples/postcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
example_postcard = lob.Postcard.create(
to_address = example_address,
from_address = example_address,
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)

print "Postcard Response"
Expand Down
8 changes: 4 additions & 4 deletions tests/test_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ def setUp(self):
def test_create_area_with_zip(self):
area = lob.Area.create(
name = 'area_test_zip',
front = 'https://www.lob.com/areafront.pdf',
back = 'https://www.lob.com/areaback.pdf',
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/areafront.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/areaback.pdf',
routes = ['94158','60031'],
target_type = 'all',
full_bleed = '1'
Expand All @@ -23,8 +23,8 @@ def test_create_area_with_zip(self):
def test_create_area_with_route(self):
area = lob.Area.create(
name = 'area_test_route',
front = 'https://www.lob.com/areafront.pdf',
back = 'https://www.lob.com/areaback.pdf',
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/areafront.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/areaback.pdf',
routes = self.route,
target_type = 'all',
full_bleed = '1'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_create_job_inline(self):
},
objects = {
'name': 'Object1',
'file': 'https://www.lob.com/test.pdf',
'file': 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
'setting_id': '201'
}
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_list_objects_fail(self):
def test_create_object_remote(self):
object = lob.Object.create(
name = 'Test Object',
file = 'https://www.lob.com/test.pdf',
file = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
setting_id = 201
)

Expand All @@ -52,7 +52,7 @@ def test_create_object_local(self):
self.assertTrue(isinstance(object, lob.Object))
self.assertEqual(object.name, 'Test Object Inline')
self.assertRaises(AttributeError, lambda: object.nonexistent_key)

object.name = "something new"
self.assertEqual(object.name, "something new")

Expand Down
8 changes: 4 additions & 4 deletions tests/test_postcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def test_create_postcard(self):
postcard = lob.Postcard.create(
to_address = self.addr.id,
from_address = self.addr.id,
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)
self.assertEqual(postcard.to_address.id, self.addr.id)
self.assertEqual(postcard.from_address.id, self.addr.id)
Expand All @@ -37,8 +37,8 @@ def test_create_postcard_lob_obj(self):
postcard = lob.Postcard.create(
to_address = self.addr,
from_address = self.addr,
front = 'https://www.lob.com/test.pdf',
back = 'https://www.lob.com/test.pdf'
front = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf',
back = 'https://s3-us-west-2.amazonaws.com/lob-assets/test.pdf'
)
self.assertEqual(postcard.to_address.id, self.addr.id)
self.assertEqual(postcard.from_address.id, self.addr.id)
Expand Down