Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Merge 9b1b182 into ab7b55d
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephDev committed Feb 13, 2017
2 parents ab7b55d + 9b1b182 commit af6de82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion paypalrestsdk/invoices.py
Expand Up @@ -63,8 +63,9 @@ def next_invoice_number(cls, api=None):
def search(cls, params=None, api=None):
api = api or default_api()
params = params or {}
path = "v1/invoicing"

url = util.join_url(cls.path, 'search')
url = util.join_url(path, 'search')

return Resource(api.post(url, params), api=api)

Expand Down
6 changes: 6 additions & 0 deletions samples/invoice/create.py
Expand Up @@ -51,6 +51,12 @@
"postal_code": "97216",
"country_code": "US"
}
},
"shipping_cost": {
"amount": {
"currency": "USD",
"value": 10
}
}
})

Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/invoices_test.py
Expand Up @@ -112,7 +112,7 @@ def test_search(self, mock):
history = paypal.Invoice.search(search_attributes)

mock.assert_called_once_with(
self.invoice.api, 'v1/invoicing/invoices/search', search_attributes)
self.invoice.api, 'v1/invoicing/search', search_attributes)
self.assertEqual(history.total_count, 1)
self.assertTrue(isinstance(history.invoices[0], paypal.Invoice))

Expand Down

0 comments on commit af6de82

Please sign in to comment.