public class Invoice extends PayPalResource
| Constructor and Description |
|---|
Invoice()
Default Constructor
|
Invoice(MerchantInfo merchantInfo)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(APIContext apiContext,
CancelNotification cancelNotification)
Cancels an invoice.
|
void |
cancel(String accessToken,
CancelNotification cancelNotification)
Cancels an invoice.
|
Invoice |
create(APIContext apiContext)
Creates a new invoice Resource.
|
Invoice |
create(String accessToken)
Creates a new invoice Resource.
|
void |
delete(APIContext apiContext)
Delete invoice resource for the given identifier.
|
void |
delete(String accessToken)
Delete invoice resource for the given identifier.
|
static Invoice |
get(APIContext apiContext,
String invoiceId)
Get the invoice resource for the given identifier.
|
static Invoice |
get(String accessToken,
String invoiceId)
Get the invoice resource for the given identifier.
|
static Invoices |
getAll(APIContext apiContext)
Get all invoices of a merchant.
|
static Invoices |
getAll(String accessToken)
Get all invoices of a merchant.
|
List<BillingInfo> |
getBillingInfo()
Getter for billingInfo
|
CustomAmount |
getCustom()
Getter for custom
|
Cost |
getDiscount()
Getter for discount
|
String |
getId()
Getter for id
|
String |
getInvoiceDate()
Getter for invoiceDate
|
List<InvoiceItem> |
getItems()
Getter for items
|
String |
getLogoUrl()
Getter for logoUrl
|
MerchantInfo |
getMerchantInfo()
Getter for merchantInfo
|
String |
getMerchantMemo()
Getter for merchantMemo
|
Metadata |
getMetadata()
Getter for metadata
|
String |
getNote()
Getter for note
|
String |
getNumber()
Getter for number
|
List<PaymentDetail> |
getPaymentDetails()
Getter for paymentDetails
|
PaymentTerm |
getPaymentTerm()
Getter for paymentTerm
|
List<RefundDetail> |
getRefundDetails()
Getter for refundDetails
|
ShippingCost |
getShippingCost()
Getter for shippingCost
|
ShippingInfo |
getShippingInfo()
Getter for shippingInfo
|
String |
getStatus()
Getter for status
|
Boolean |
getTaxCalculatedAfterDiscount()
Getter for taxCalculatedAfterDiscount
|
Boolean |
getTaxInclusive()
Getter for taxInclusive
|
String |
getTerms()
Getter for terms
|
Currency |
getTotalAmount()
Getter for totalAmount
|
String |
getUri()
Getter for uri
|
void |
recordPayment(APIContext apiContext,
PaymentDetail paymentDetail)
Mark the status of the invoice as paid.
|
void |
recordPayment(String accessToken,
PaymentDetail paymentDetail)
Mark the status of the invoice as paid.
|
void |
recordRefund(APIContext apiContext,
RefundDetail refundDetail)
Mark the status of the invoice as refunded.
|
void |
recordRefund(String accessToken,
RefundDetail refundDetail)
Mark the status of the invoice as refunded.
|
void |
remind(APIContext apiContext,
Notification notification)
Reminds the payer to pay the invoice.
|
void |
remind(String accessToken,
Notification notification)
Reminds the payer to pay the invoice.
|
Invoices |
search(APIContext apiContext,
Search search)
Search for invoice resources.
|
Invoices |
search(String accessToken,
Search search)
Search for invoice resources.
|
void |
send(APIContext apiContext)
Sends a legitimate invoice to the payer.
|
void |
send(String accessToken)
Sends a legitimate invoice to the payer.
|
Invoice |
setBillingInfo(List<BillingInfo> billingInfo)
Setter for billingInfo
|
Invoice |
setCustom(CustomAmount custom)
Setter for custom
|
Invoice |
setDiscount(Cost discount)
Setter for discount
|
Invoice |
setId(String id)
Setter for id
|
Invoice |
setInvoiceDate(String invoiceDate)
Setter for invoiceDate
|
Invoice |
setItems(List<InvoiceItem> items)
Setter for items
|
Invoice |
setLogoUrl(String logoUrl)
Setter for logoUrl
|
Invoice |
setMerchantInfo(MerchantInfo merchantInfo)
Setter for merchantInfo
|
Invoice |
setMerchantMemo(String merchantMemo)
Setter for merchantMemo
|
Invoice |
setMetadata(Metadata metadata)
Setter for metadata
|
Invoice |
setNote(String note)
Setter for note
|
Invoice |
setNumber(String number)
Setter for number
|
Invoice |
setPaymentDetails(List<PaymentDetail> paymentDetails)
Setter for paymentDetails
|
Invoice |
setPaymentTerm(PaymentTerm paymentTerm)
Setter for paymentTerm
|
Invoice |
setRefundDetails(List<RefundDetail> refundDetails)
Setter for refundDetails
|
Invoice |
setShippingCost(ShippingCost shippingCost)
Setter for shippingCost
|
Invoice |
setShippingInfo(ShippingInfo shippingInfo)
Setter for shippingInfo
|
Invoice |
setStatus(String status)
Setter for status
|
Invoice |
setTaxCalculatedAfterDiscount(Boolean taxCalculatedAfterDiscount)
Setter for taxCalculatedAfterDiscount
|
Invoice |
setTaxInclusive(Boolean taxInclusive)
Setter for taxInclusive
|
Invoice |
setTerms(String terms)
Setter for terms
|
Invoice |
setTotalAmount(Currency totalAmount)
Setter for totalAmount
|
Invoice |
setUri(String uri)
Setter for uri
|
Invoice |
update(APIContext apiContext)
Full update of the invoice resource for the given identifier.
|
Invoice |
update(String accessToken)
Full update of the invoice resource for the given identifier.
|
configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientID, getClientSecret, getConfigurations, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaultequals, hashCode, toJSON, toStringpublic Invoice()
public Invoice(MerchantInfo merchantInfo)
public String getId()
public String getNumber()
public String getUri()
public String getStatus()
public Invoice setMerchantInfo(MerchantInfo merchantInfo)
public MerchantInfo getMerchantInfo()
public Invoice setBillingInfo(List<BillingInfo> billingInfo)
public List<BillingInfo> getBillingInfo()
public Invoice setShippingInfo(ShippingInfo shippingInfo)
public ShippingInfo getShippingInfo()
public Invoice setItems(List<InvoiceItem> items)
public List<InvoiceItem> getItems()
public String getInvoiceDate()
public Invoice setPaymentTerm(PaymentTerm paymentTerm)
public PaymentTerm getPaymentTerm()
public Cost getDiscount()
public Invoice setShippingCost(ShippingCost shippingCost)
public ShippingCost getShippingCost()
public Invoice setCustom(CustomAmount custom)
public CustomAmount getCustom()
public Invoice setTaxCalculatedAfterDiscount(Boolean taxCalculatedAfterDiscount)
public Boolean getTaxCalculatedAfterDiscount()
public Boolean getTaxInclusive()
public String getTerms()
public String getNote()
public String getMerchantMemo()
public String getLogoUrl()
public Currency getTotalAmount()
public Invoice setPaymentDetails(List<PaymentDetail> paymentDetails)
public List<PaymentDetail> getPaymentDetails()
public Invoice setRefundDetails(List<RefundDetail> refundDetails)
public List<RefundDetail> getRefundDetails()
public Metadata getMetadata()
public Invoice create(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic Invoice create(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic Invoices search(String accessToken, Search search) throws PayPalRESTException
accessToken - Access Token used for the API call.search - SearchPayPalRESTExceptionpublic Invoices search(APIContext apiContext, Search search) throws PayPalRESTException
apiContext - APIContext used for the API call.search - SearchPayPalRESTExceptionpublic void send(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic void send(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic void remind(String accessToken, Notification notification) throws PayPalRESTException
accessToken - Access Token used for the API call.notification - NotificationPayPalRESTExceptionpublic void remind(APIContext apiContext, Notification notification) throws PayPalRESTException
apiContext - APIContext used for the API call.notification - NotificationPayPalRESTExceptionpublic void cancel(String accessToken, CancelNotification cancelNotification) throws PayPalRESTException
accessToken - Access Token used for the API call.cancelNotification - CancelNotificationPayPalRESTExceptionpublic void cancel(APIContext apiContext, CancelNotification cancelNotification) throws PayPalRESTException
apiContext - APIContext used for the API call.cancelNotification - CancelNotificationPayPalRESTExceptionpublic void recordPayment(String accessToken, PaymentDetail paymentDetail) throws PayPalRESTException
accessToken - Access Token used for the API call.paymentDetail - PaymentDetailPayPalRESTExceptionpublic void recordPayment(APIContext apiContext, PaymentDetail paymentDetail) throws PayPalRESTException
apiContext - APIContext used for the API call.paymentDetail - PaymentDetailPayPalRESTExceptionpublic void recordRefund(String accessToken, RefundDetail refundDetail) throws PayPalRESTException
accessToken - Access Token used for the API call.refundDetail - RefundDetailPayPalRESTExceptionpublic void recordRefund(APIContext apiContext, RefundDetail refundDetail) throws PayPalRESTException
apiContext - APIContext used for the API call.refundDetail - RefundDetailPayPalRESTExceptionpublic static Invoice get(String accessToken, String invoiceId) throws PayPalRESTException
accessToken - Access Token used for the API call.invoiceId - StringPayPalRESTExceptionpublic static Invoice get(APIContext apiContext, String invoiceId) throws PayPalRESTException
apiContext - APIContext used for the API call.invoiceId - StringPayPalRESTExceptionpublic static Invoices getAll(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic static Invoices getAll(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic Invoice update(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic Invoice update(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic void delete(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic void delete(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionCopyright © 2015. All Rights Reserved.