-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the page cookbook in the documentation
- Loading branch information
1 parent
ad7d825
commit 6a3f7d2
Showing
2 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
.. cookbook: | ||
======== | ||
Cookbook | ||
======== | ||
|
||
------ | ||
Orders | ||
------ | ||
|
||
We'll assume there is an order with one order line with the following parameters and values: | ||
|
||
================ ============ | ||
Parameter Value | ||
================ ============ | ||
OrderNumber ORDER_NUMBER | ||
SellerProductId SKU | ||
ProductCondition AverageState | ||
================ ============ | ||
|
||
Accept the order | ||
---------------- | ||
|
||
:: | ||
|
||
accepted_by_seller = {'CarrierName': 'Colissimo', | ||
'OrderState': 'AcceptedBySeller', | ||
'OrderNumber': 'ORDER_NUMBER', | ||
'OrderLineList': [{ | ||
'AcceptationState': 'AcceptedBySeller', | ||
'SellerProductId': 'SKU', | ||
'ProductCondition': 'AverageState'}]} | ||
validations = api.orders.prepare_validations([accepted_by_seller]) | ||
response = api.orders.validate_order_list(**validations) | ||
|
||
|
||
Refuse the shipment of an order | ||
------------------------------- | ||
|
||
After the order is accepted, if for some reason, you can't ship it to your | ||
customer, you can refuse the shipment. | ||
|
||
:: | ||
|
||
shipment_refused_by_seller = {'OrderNumber': 'ORDER_NUMBER', | ||
'OrderState': 'ShipmentRefusedBySeller', | ||
'OrderLineList': [{ | ||
'AcceptationState': 'ShipmentRefusedBySeller', | ||
'SellerProductId': 'SKU', | ||
'ProductCondition': 'AverageState'}]} | ||
|
||
validations = api.orders.prepare_validations([shipment_refused_by_seller]) | ||
response = api.orders.validate_order_list(**validations) |
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 |
---|---|---|
|
@@ -11,6 +11,7 @@ Welcome to CdiscountAPI's documentation! | |
|
||
quickstart | ||
advanced_usage | ||
cookbook | ||
api | ||
CHANGELOG | ||
|
||
|