All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ebay.sdk.call.EndItemCall Maven / Gradle / Ivy

Go to download

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.lang.String;
import java.util.Calendar;

import com.ebay.sdk.*;
import com.ebay.soap.eBLBaseComponents.*;
/**
 * Wrapper class of the EndItem 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: ItemID - Unique item ID that identifies the item listing to end. *

* For Half.com listings, you can either specify ItemID or * SellerInventoryID. *

* Applicable to Half.com. *
Input property: EndingReason - Indicates the seller's reason for ending the listing early. * This field is required if the seller is ending the item early and * the item did not successfully sell. *

* Applicable to Half.com. *
Input property: SellerInventoryID - Unique identifier that the seller specified when they listed the * Half.com item. For Half.com items, you can either specify ItemID or * SellerInventoryID. If you specify both ItemID and SellerInventoryID, * they must be for the same item (otherwise an error will occur). *

* Applicable only to Half.com. *
Output property: ReturnedEndTime - Indicates the date and time (returned in GMT) the specified item listing * was ended. * Also applicable to Half.com. * * @author Ron Murphy * @version 1.0 */ public class EndItemCall extends com.ebay.sdk.ApiCall { private String itemID = null; private EndReasonCodeType endingReason = null; private String sellerInventoryID = null; private Calendar returnedEndTime=null; /** * Constructor. */ public EndItemCall() { } /** * Constructor. * @param apiContext The ApiContext object to be used to make the call. */ public EndItemCall(ApiContext apiContext) { super(apiContext); } /** * Ends the specified item listing before the date and time at which it would normally end per the listing duration. Also for Half.com. * *
* @throws ApiException * @throws SdkException * @throws Exception * @return The Calendar object. */ public Calendar endItem() throws com.ebay.sdk.ApiException, com.ebay.sdk.SdkException, java.lang.Exception { EndItemRequestType req; req = new EndItemRequestType(); if( this.itemID == null && this.sellerInventoryID == null) throw new SdkException("Please set ItemID or sellerInventoryID (for Half items) to be ended."); if( this.itemID != null && this.sellerInventoryID != null) throw new SdkException("Please set either an ItemID or a sellerInventoryID (for Half items) to be ended."); if (this.itemID != null) req.setItemID(this.itemID); if (this.endingReason != null) req.setEndingReason(this.endingReason); if (this.sellerInventoryID != null) req.setSellerInventoryID(this.sellerInventoryID); EndItemResponseType resp = (EndItemResponseType) execute(req); this.returnedEndTime = resp.getEndTime(); return this.getReturnedEndTime(); } /** * Gets the EndItemRequestType.endingReason. * @return EndReasonCodeType */ public EndReasonCodeType getEndingReason() { return this.endingReason; } /** * Sets the EndItemRequestType.endingReason. * @param endingReason EndReasonCodeType */ public void setEndingReason(EndReasonCodeType endingReason) { this.endingReason = endingReason; } /** * Gets the EndItemRequestType.itemID. * @return String */ public String getItemID() { return this.itemID; } /** * Sets the EndItemRequestType.itemID. * @param itemID String */ public void setItemID(String itemID) { this.itemID = itemID; } /** * Gets the EndItemRequestType.sellerInventoryID. * @return String */ public String getSellerInventoryID() { return this.sellerInventoryID; } /** * Sets the EndItemRequestType.sellerInventoryID. * @param sellerInventoryID String */ public void setSellerInventoryID(String sellerInventoryID) { this.sellerInventoryID = sellerInventoryID; } /** * Valid after executing the API. * Gets the returned EndItemResponseType.returnedEndTime. * * @return Calendar */ public Calendar getReturnedEndTime() { return this.returnedEndTime; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy