-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to Orders API for issued_to (#61)
- Loading branch information
Showing
20 changed files
with
547 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,9 +82,17 @@ project_id = 'pro_test_1234' # Pass in the project's ID | |
patch.orders.create_order(project_id=project_id, amount=amount, unit=unit) | ||
|
||
## Orders also accept a metadata field (optional) | ||
metadata = {user: "john doe"} | ||
metadata = {"user": "john doe"} | ||
patch.orders.create_order(metadata=metadata, amount=amount, unit=unit) | ||
|
||
## Orders also accept a metadata field (optional) | ||
metadata = {"user": "john doe"} | ||
patch.orders.create_order(metadata=metadata, amount=amount, unit=unit) | ||
|
||
## Orders also accept an issued_to field (optional) | ||
issued_to = {"name": "Company A", "email": "[email protected]"} | ||
patch.orders.create_order(issued_to=issued_to, amount=amount, unit=unit) | ||
|
||
# Retrieve an order | ||
order_id = 'ord_test_1234' # Pass in the order's id | ||
patch.orders.retrieve_order(id=order_id) | ||
|
@@ -93,6 +101,10 @@ patch.orders.retrieve_order(id=order_id) | |
order_id = 'ord_test_1234' # Pass in the order's id | ||
patch.orders.place_order(id=order_id) | ||
|
||
## Placing an order on behalf of another party | ||
issued_to = {"name": "Company A", "email": "[email protected]"} | ||
patch.orders.place_order(id=order_id, issued_to=issued_to) | ||
|
||
# Cancel an order | ||
order_id = 'ord_test_1234' # Pass in the order's id | ||
patch.orders.cancel_order(id=order_id) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.