Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.paypal.api.payments;
  
  import java.util.HashMap;
  
 
 public class PayoutItem extends PayPalResource {

The type of identification for the payment receiver. If this field is provided, the payout items without a `recipient_type` will use the provided value. If this field is not provided, each payout item must include a value for the `recipient_type`.
 
 	private String recipientType;

The amount of money to pay a receiver.
 
 	private Currency amount;

Note for notifications. The note is provided by the payment sender. This note can be any string. 4000 characters max.
 
 	private String note;

The receiver of the payment. In a call response, the format of this value corresponds to the `recipient_type` specified in the request. 127 characters max.
 
 	private String receiver;

A sender-specific ID number, used in an accounting system for tracking purposes. 30 characters max.
 
 	private String senderItemId;

Default Constructor
 
 	public PayoutItem() {
 	}

Parameterized Constructor
 
 	public PayoutItem(Currency amountString receiver) {
 		this. = amount;
 		this. = receiver;
 	}

Setter for recipientType
 
 	public PayoutItem setRecipientType(String recipientType) {
 		this. = recipientType;
 		return this;
 	}

Getter for recipientType
 
 	public String getRecipientType() {
 		return this.;
 	}

Setter for amount
 
 	public PayoutItem setAmount(Currency amount) {
 		this. = amount;
 		return this;
 	}

Getter for amount
 
 	public Currency getAmount() {
 		return this.;
 	}

Setter for note
 
 	public PayoutItem setNote(String note) {
 		this. = note;
 		return this;
 	}

Getter for note
	public String getNote() {
		return this.;
	}

Setter for receiver
	public PayoutItem setReceiver(String receiver) {
		this. = receiver;
		return this;
	}

Getter for receiver
	public String getReceiver() {
		return this.;
	}

Setter for senderItemId
	public PayoutItem setSenderItemId(String senderItemId) {
		this. = senderItemId;
		return this;
	}

Getter for senderItemId
	public String getSenderItemId() {
		return this.;
	}

Obtain the status of a payout item by passing the item ID to the request URI.

Parameters:
accessToken Access Token used for the API call.
payoutItemId String
Returns:
PayoutItemDetails
Throws:
com.paypal.base.rest.PayPalRESTException
	public static PayoutItemDetails get(String accessTokenString payoutItemId)
		APIContext apiContext = new APIContext(accessToken);
		return get(apiContextpayoutItemId);
	}

Obtain the status of a payout item by passing the item ID to the request URI.

Parameters:
apiContext com.paypal.base.rest.APIContext used for the API call.
payoutItemId String
Returns:
PayoutItemDetails
Throws:
com.paypal.base.rest.PayPalRESTException
	public static PayoutItemDetails get(APIContext apiContext,
			String payoutItemIdthrows PayPalRESTException {
		if (apiContext == null) {
			throw new IllegalArgumentException("APIContext cannot be null");
		}
		if (apiContext.getAccessToken() == null
				|| apiContext.getAccessToken().trim().length() <= 0) {
					"AccessToken cannot be null or empty");
		}
		if (apiContext.getHTTPHeaders() == null) {
			apiContext.setHTTPHeaders(new HashMap<StringString>());
		}
		apiContext.setSdkVersion(new SDKVersionImpl());
		if (payoutItemId == null) {
			throw new IllegalArgumentException("payoutItemId cannot be null");
		}
		Object[] parameters = new Object[] { payoutItemId };
		String pattern = "v1/payments/payouts-item/{0}";
		String resourcePath = RESTUtil.formatURIPath(patternparameters);
		String payLoad = "";
		return configureAndExecute(apiContext.,
				resourcePathpayLoadPayoutItemDetails.class);
	}

Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.

Parameters:
accessToken Access Token used for the API call.
payoutItemId String
Returns:
PayoutItemDetails
Throws:
com.paypal.base.rest.PayPalRESTException
	public static PayoutItemDetails cancel(String accessToken,
			String payoutItemIdthrows PayPalRESTException {
		APIContext apiContext = new APIContext(accessToken);
		return cancel(apiContextpayoutItemId);
	}

Cancels the unclaimed payment using the items id passed in the request URI. If an unclaimed item is not claimed within 30 days, the funds will be automatically returned to the sender. This call can be used to cancel the unclaimed item prior to the automatic 30-day return.

Parameters:
apiContext com.paypal.base.rest.APIContext used for the API call.
payoutItemId String
Returns:
PayoutItemDetails
Throws:
com.paypal.base.rest.PayPalRESTException
	public static PayoutItemDetails cancel(APIContext apiContext,
			String payoutItemIdthrows PayPalRESTException {
		if (apiContext == null) {
			throw new IllegalArgumentException("APIContext cannot be null");
		}
		if (apiContext.getAccessToken() == null
				|| apiContext.getAccessToken().trim().length() <= 0) {
					"AccessToken cannot be null or empty");
		}
		if (apiContext.getHTTPHeaders() == null) {
			apiContext.setHTTPHeaders(new HashMap<StringString>());
		}
		apiContext.setSdkVersion(new SDKVersionImpl());
		if (payoutItemId == null) {
			throw new IllegalArgumentException("payoutItemId cannot be null");
		}
		Object[] parameters = new Object[] { payoutItemId };
		String pattern = "v1/payments/payouts-item/{0}/cancel";
		String resourcePath = RESTUtil.formatURIPath(patternparameters);
		String payLoad = "";
		return configureAndExecute(apiContext.,
				resourcePathpayLoadPayoutItemDetails.class);
	}
New to GrepCode? Check out our FAQ X