Package com.amazon.orders.client
Class AmazonOrdersClient
java.lang.Object
com.amazon.orders.client.AmazonOrdersClient
- All Implemented Interfaces:
AmazonOrders
Fake OrderCreationClient for creating orders based on wishlist items.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.amazon.orders.client.AmazonOrders
AmazonOrders.CreateOrderException -
Constructor Summary
ConstructorsConstructorDescriptionAmazonOrdersClient(String serverUrl) Constructs the OrderCreationClient with the provided API key. -
Method Summary
Modifier and TypeMethodDescriptioncreateOrder(AmazonItemDetails[] itemsDetails) Creates an order for the given wishlist item details.
-
Constructor Details
-
AmazonOrdersClient
Constructs the OrderCreationClient with the provided API key.- Parameters:
serverUrl- The server url
-
-
Method Details
-
createOrder
public String createOrder(AmazonItemDetails[] itemsDetails) throws AmazonOrders.CreateOrderException, IOException Creates an order for the given wishlist item details.- Specified by:
createOrderin interfaceAmazonOrders- Parameters:
itemsDetails- The items you want to order- Returns:
- The order ID if the order is successfully created, otherwise null.
- Throws:
AmazonOrders.CreateOrderException- If there is an error while creating the order.IOException
-