com.ebay.sdk.call.AddOrderCall Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ebaysdkcore Show documentation
Show all versions of ebaysdkcore Show documentation
This SDK enables you to use Java to make API calls in the eBay Trading API, which is an XML API.
This maven build is provided by tonicsoft for convenience and is an exact copy of version 981 of
the project distributed by eBay via the official eBay SDK website.
The newest version!
/*
Copyright (c) 2013 eBay, Inc.
This program is licensed under the terms of the eBay Common Development and
Distribution License (CDDL) Version 1.0 (the "License") and any subsequent version
thereof released by eBay. The then-current version of the License can be found
at http://www.opensource.org/licenses/cddl1.php and in the eBaySDKLicense file that
is under the root directory at /LICENSE.txt.
*/
package com.ebay.sdk.call;
import java.util.Calendar;
import com.ebay.sdk.*;
import com.ebay.soap.eBLBaseComponents.*;
/**
* Wrapper class of the AddOrder call of eBay SOAP API.
*
* Title: SOAP API wrapper library.
* Description: Contains wrapper classes for eBay SOAP APIs.
* Copyright: Copyright (c) 2009
* Company: eBay Inc.
*
Input property: Order
- The root container of the AddOrder request. In this
* call, the seller identifies two or more unpaid order line items from the same buyer
* through the TransactionArray container, specifies one or
* more accepted payment methods through the PaymentMethods
* field(s), and specifies available shipping services and other shipping details
* through the ShippingDetails container.
*
Output property: ReturnedOrderID
- The unique identifier for the Combined Invoice order. This value is created by eBay upon a successful AddOrder call. This value can be used as an input filter in GetOrders and GetOrderTransactions to retrieve the order.
*
Output property: ReturnedCreatedTime
- Timestamp that indicates the date and time that the Combined Invoice order was created.
*
* @author Ron Murphy
* @version 1.0
*/
public class AddOrderCall extends com.ebay.sdk.ApiCall
{
private OrderType order = null;
private String returnedOrderID=null;
private Calendar returnedCreatedTime=null;
/**
* Constructor.
*/
public AddOrderCall() {
}
/**
* Constructor.
* @param apiContext The ApiContext object to be used to make the call.
*/
public AddOrderCall(ApiContext apiContext) {
super(apiContext);
}
/**
* The AddOrder call can be used by a seller to combine two or more unpaid, single line item orders from the same buyer into one 'Combined Invoice' order with multiple line items. Once multiple line items are combined into one order, the buyer can make one single payment for each line item in the order. If possible and agreed to, the seller can then ship multiple line items in the same shipping package, saving on shipping costs, and possibly passing that savings down to the buyer through Combined Shipping Discount rules set up in My eBay.
*
*
* @throws ApiException
* @throws SdkException
* @throws Exception
* @return The AddOrderResponseType object.
*/
public AddOrderResponseType addOrder()
throws com.ebay.sdk.ApiException, com.ebay.sdk.SdkException, java.lang.Exception
{
AddOrderRequestType req;
req = new AddOrderRequestType();
if (this.order != null)
req.setOrder(this.order);
AddOrderResponseType resp = (AddOrderResponseType) execute(req);
this.returnedOrderID = resp.getOrderID();
this.returnedCreatedTime = resp.getCreatedTime();
return resp;
}
/**
* Gets the AddOrderRequestType.order.
* @return OrderType
*/
public OrderType getOrder()
{
return this.order;
}
/**
* Sets the AddOrderRequestType.order.
* @param order OrderType
*/
public void setOrder(OrderType order)
{
this.order = order;
}
/**
* Valid after executing the API.
* Gets the returned AddOrderResponseType.returnedCreatedTime.
*
* @return Calendar
*/
public Calendar getReturnedCreatedTime()
{
return this.returnedCreatedTime;
}
/**
* Valid after executing the API.
* Gets the returned AddOrderResponseType.returnedOrderID.
*
* @return String
*/
public String getReturnedOrderID()
{
return this.returnedOrderID;
}
}