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, by ID.
|
void |
cancel(java.lang.String accessToken,
CancelNotification cancelNotification)
Deprecated.
Please use
cancel(APIContext, CancelNotification) instead. |
protected boolean |
canEqual(java.lang.Object other) |
Invoice |
create(APIContext apiContext)
Creates an invoice.
|
Invoice |
create(java.lang.String accessToken)
Deprecated.
Please use
create(APIContext) instead. |
void |
delete(APIContext apiContext)
Delete a particular invoice by passing the invoice ID to the request URI.
|
void |
delete(java.lang.String accessToken)
Deprecated.
Please use
delete(APIContext) instead. |
void |
deleteExternalPayment(APIContext apiContext)
Delete external payment.
|
void |
deleteExternalRefund(APIContext apiContext)
Delete external refund.
|
boolean |
equals(java.lang.Object o) |
static java.lang.String |
fetchRefreshToken(APIContext context,
java.lang.String authorizationCode)
Fetches long lived refresh token from authorization code, for third party merchant invoicing use.
|
InvoiceNumber |
generateNumber(APIContext apiContext)
Generates the next invoice number.
|
static Invoice |
get(APIContext apiContext,
java.lang.String invoiceId)
Gets the details for a specified invoice, by ID.
|
static Invoice |
get(java.lang.String accessToken,
java.lang.String invoiceId)
Deprecated.
Please use
get(APIContext, String) instead. |
java.lang.String |
getAdditionalData()
Any miscellaneous invoice data.
|
static Invoices |
getAll(APIContext apiContext)
Lists some or all merchant invoices.
|
static Invoices |
getAll(APIContext apiContext,
java.util.Map<java.lang.String,java.lang.String> options)
Lists some or all merchant invoices.
|
static Invoices |
getAll(java.lang.String accessToken)
Deprecated.
Please use
getAll(APIContext) instead. |
java.lang.Boolean |
getAllowPartialPayment()
Indicates whether the invoice allows a partial payment.
|
java.util.List<FileAttachment> |
getAttachments()
List of files attached to the invoice.
|
java.util.List<BillingInfo> |
getBillingInfo()
The required invoice recipient email address and any optional billing information.
|
java.util.List<Participant> |
getCcInfo()
For invoices sent by email, one or more email addresses to which to send a Cc: copy of the notification.
|
CustomAmount |
getCustom()
The custom amount to apply on an invoice.
|
Cost |
getDiscount()
The invoice level discount, as a percent or an amount value.
|
Currency |
getGratuity()
Gratuity to include with the invoice.
|
java.lang.String |
getId()
The unique invoice resource identifier.
|
java.lang.String |
getInvoiceDate()
The date when the invoice was enabled.
|
java.util.List<InvoiceItem> |
getItems()
The list of items to include in the invoice.
|
java.util.List<Links> |
getLinks()
HATEOS links representing all the actions over the invoice resource based on the current invoice status.
|
java.lang.String |
getLogoUrl()
Full URL of an external image to use as the logo.
|
MerchantInfo |
getMerchantInfo()
Information about the merchant who is sending the invoice.
|
java.lang.String |
getMerchantMemo()
A private bookkeeping memo for the merchant.
|
Metadata |
getMetadata()
Audit information for the invoice.
|
Currency |
getMinimumAmountDue()
If `allow_partial_payment` is set to `true`, the minimum amount allowed for a partial payment.
|
java.lang.String |
getNote()
Note to the payer.
|
java.lang.String |
getNumber()
Unique number that appears on the invoice.
|
PaymentSummary |
getPaidAmount()
Payment summary of the invoice including amount paid through PayPal and other sources.
|
java.util.List<PaymentDetail> |
getPaymentDetails()
Deprecated.
Please use
getPayments() instead. |
java.util.List<PaymentDetail> |
getPayments()
List of payment details for the invoice.
|
PaymentTerm |
getPaymentTerm()
Optional.
|
java.lang.String |
getReference()
Reference data, such as PO number, to add to the invoice.
|
java.util.List<RefundDetail> |
getRefundDetails()
Deprecated.
Please use
getRefunds() instead. |
PaymentSummary |
getRefundedAmount()
Payment summary of the invoice including amount refunded through PayPal and other sources.
|
java.util.List<RefundDetail> |
getRefunds()
List of refund details for the invoice.
|
ShippingCost |
getShippingCost()
The shipping cost, as a percent or an amount value.
|
ShippingInfo |
getShippingInfo()
The shipping information for entities to whom items are being shipped.
|
java.lang.String |
getStatus()
Status of the invoice.
|
java.lang.Boolean |
getTaxCalculatedAfterDiscount()
Indicates whether tax is calculated before or after a discount.
|
java.lang.Boolean |
getTaxInclusive()
Indicates whether the unit price includes tax.
|
java.lang.String |
getTemplateId()
The template ID used for the invoice.
|
java.lang.String |
getTerms()
General terms of the invoice.
|
Currency |
getTotalAmount()
The total amount of the invoice.
|
java.lang.String |
getUri()
URI of the invoice resource.
|
int |
hashCode() |
static Image |
qrCode(APIContext apiContext,
java.lang.String invoiceId)
Deprecated.
Please use
qrCode(APIContext, String, Map) instead. |
static Image |
qrCode(APIContext apiContext,
java.lang.String invoiceId,
java.util.Map<java.lang.String,java.lang.String> options)
Generates a QR code for an invoice, by ID.
|
void |
recordPayment(APIContext apiContext,
PaymentDetail paymentDetail)
Marks the status of a specified invoice, by ID, as paid.
|
void |
recordPayment(java.lang.String accessToken,
PaymentDetail paymentDetail)
Deprecated.
Please use
recordPayment(APIContext, PaymentDetail) instead. |
void |
recordRefund(APIContext apiContext,
RefundDetail refundDetail)
Marks the status of a specified invoice, by ID, as refunded.
|
void |
recordRefund(java.lang.String accessToken,
RefundDetail refundDetail)
Deprecated.
Please use
recordRefund(APIContext, RefundDetail) instead. |
void |
remind(APIContext apiContext,
Notification notification)
Sends a reminder about a specific invoice, by ID, to a recipient.
|
void |
remind(java.lang.String accessToken,
Notification notification)
Deprecated.
Please use
remind(APIContext, Notification) instead. |
Invoices |
search(APIContext apiContext,
Search search)
Searches for an invoice or invoices.
|
Invoices |
search(java.lang.String accessToken,
Search search)
Deprecated.
Please use
search(APIContext, Search) instead. |
void |
send(APIContext apiContext)
Sends an invoice, by ID, to a recipient.
|
void |
send(java.lang.String accessToken)
Deprecated.
Please use
send(APIContext) instead. |
Invoice |
setAdditionalData(java.lang.String additionalData)
Any miscellaneous invoice data.
|
Invoice |
setAllowPartialPayment(java.lang.Boolean allowPartialPayment)
Indicates whether the invoice allows a partial payment.
|
Invoice |
setAttachments(java.util.List<FileAttachment> attachments)
List of files attached to the invoice.
|
Invoice |
setBillingInfo(java.util.List<BillingInfo> billingInfo)
The required invoice recipient email address and any optional billing information.
|
Invoice |
setCcInfo(java.util.List<Participant> ccInfo)
For invoices sent by email, one or more email addresses to which to send a Cc: copy of the notification.
|
Invoice |
setCustom(CustomAmount custom)
The custom amount to apply on an invoice.
|
Invoice |
setDiscount(Cost discount)
The invoice level discount, as a percent or an amount value.
|
Invoice |
setGratuity(Currency gratuity)
Gratuity to include with the invoice.
|
Invoice |
setId(java.lang.String id)
The unique invoice resource identifier.
|
Invoice |
setInvoiceDate(java.lang.String invoiceDate)
The date when the invoice was enabled.
|
Invoice |
setItems(java.util.List<InvoiceItem> items)
The list of items to include in the invoice.
|
Invoice |
setLinks(java.util.List<Links> links)
HATEOS links representing all the actions over the invoice resource based on the current invoice status.
|
Invoice |
setLogoUrl(java.lang.String logoUrl)
Full URL of an external image to use as the logo.
|
Invoice |
setMerchantInfo(MerchantInfo merchantInfo)
Information about the merchant who is sending the invoice.
|
Invoice |
setMerchantMemo(java.lang.String merchantMemo)
A private bookkeeping memo for the merchant.
|
Invoice |
setMetadata(Metadata metadata)
Audit information for the invoice.
|
Invoice |
setMinimumAmountDue(Currency minimumAmountDue)
If `allow_partial_payment` is set to `true`, the minimum amount allowed for a partial payment.
|
Invoice |
setNote(java.lang.String note)
Note to the payer.
|
Invoice |
setNumber(java.lang.String number)
Unique number that appears on the invoice.
|
Invoice |
setPaidAmount(PaymentSummary paidAmount)
Payment summary of the invoice including amount paid through PayPal and other sources.
|
Invoice |
setPaymentDetails(java.util.List<PaymentDetail> details)
Deprecated.
Please use
setPayments(List) instead. |
Invoice |
setPayments(java.util.List<PaymentDetail> payments)
List of payment details for the invoice.
|
Invoice |
setPaymentTerm(PaymentTerm paymentTerm)
Optional.
|
Invoice |
setReference(java.lang.String reference)
Reference data, such as PO number, to add to the invoice.
|
Invoice |
setRefundDetails(java.util.List<RefundDetail> details)
Deprecated.
Please use
setRefunds(List) instead. |
Invoice |
setRefundedAmount(PaymentSummary refundedAmount)
Payment summary of the invoice including amount refunded through PayPal and other sources.
|
Invoice |
setRefunds(java.util.List<RefundDetail> refunds)
List of refund details for the invoice.
|
Invoice |
setShippingCost(ShippingCost shippingCost)
The shipping cost, as a percent or an amount value.
|
Invoice |
setShippingInfo(ShippingInfo shippingInfo)
The shipping information for entities to whom items are being shipped.
|
Invoice |
setStatus(java.lang.String status)
Status of the invoice.
|
Invoice |
setTaxCalculatedAfterDiscount(java.lang.Boolean taxCalculatedAfterDiscount)
Indicates whether tax is calculated before or after a discount.
|
Invoice |
setTaxInclusive(java.lang.Boolean taxInclusive)
Indicates whether the unit price includes tax.
|
Invoice |
setTemplateId(java.lang.String templateId)
The template ID used for the invoice.
|
Invoice |
setTerms(java.lang.String terms)
General terms of the invoice.
|
Invoice |
setTotalAmount(Currency totalAmount)
The total amount of the invoice.
|
Invoice |
setUri(java.lang.String uri)
URI of the invoice resource.
|
Invoice |
update(APIContext apiContext)
Fully updates an invoice by passing the invoice ID to the request URI.
|
Invoice |
update(java.lang.String accessToken)
Deprecated.
Please use
update(APIContext) instead. |
configureAndExecute, configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientCredential, getClientID, getClientSecret, getConfigurations, getCredential, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaulttoJSON, toStringpublic Invoice()
public Invoice(MerchantInfo merchantInfo)
public java.util.List<PaymentDetail> getPaymentDetails()
getPayments() instead.List of PaymentDetailpublic Invoice setPaymentDetails(java.util.List<PaymentDetail> details)
setPayments(List) instead.details - Invoicepublic java.util.List<RefundDetail> getRefundDetails()
getRefunds() instead.List of RefundDetailpublic Invoice setRefundDetails(java.util.List<RefundDetail> details)
setRefunds(List) instead.details - Invoicepublic Invoice create(java.lang.String accessToken) throws PayPalRESTException
create(APIContext) instead.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(java.lang.String accessToken, Search search) throws PayPalRESTException
search(APIContext, Search) instead.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(java.lang.String accessToken)
throws PayPalRESTException
send(APIContext) instead.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(java.lang.String accessToken,
Notification notification)
throws PayPalRESTException
remind(APIContext, Notification) instead.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(java.lang.String accessToken,
CancelNotification cancelNotification)
throws PayPalRESTException
cancel(APIContext, CancelNotification) instead.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(java.lang.String accessToken,
PaymentDetail paymentDetail)
throws PayPalRESTException
recordPayment(APIContext, PaymentDetail) instead.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(java.lang.String accessToken,
RefundDetail refundDetail)
throws PayPalRESTException
recordRefund(APIContext, RefundDetail) instead.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(java.lang.String accessToken, java.lang.String invoiceId) throws PayPalRESTException
get(APIContext, String) instead.accessToken - Access Token used for the API call.invoiceId - StringPayPalRESTExceptionpublic static Invoice get(APIContext apiContext, java.lang.String invoiceId) throws PayPalRESTException
apiContext - APIContext used for the API call.invoiceId - StringPayPalRESTExceptionpublic static Invoices getAll(java.lang.String accessToken) throws PayPalRESTException
getAll(APIContext) instead.accessToken - Access Token used for the API call.PayPalRESTExceptionpublic static Invoices getAll(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic static Invoices getAll(APIContext apiContext, java.util.Map<java.lang.String,java.lang.String> options) throws PayPalRESTException
apiContext - APIContext used for the API call.options - Map of query parameters. Allowed options: page, page_size, total_count_required.PayPalRESTExceptionpublic Invoice update(java.lang.String accessToken) throws PayPalRESTException
update(APIContext) instead.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(java.lang.String accessToken)
throws PayPalRESTException
delete(APIContext) instead.accessToken - Access Token used for the API call.PayPalRESTExceptionpublic void delete(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic void deleteExternalPayment(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic void deleteExternalRefund(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic static Image qrCode(APIContext apiContext, java.lang.String invoiceId) throws PayPalRESTException
qrCode(APIContext, String, Map) instead.apiContext - APIContext used for the API call.invoiceId - StringPayPalRESTExceptionpublic static Image qrCode(APIContext apiContext, java.lang.String invoiceId, java.util.Map<java.lang.String,java.lang.String> options) throws PayPalRESTException
apiContext - APIContext used for the API call.invoiceId - Stringoptions - Map of options. Valid values are: width, height, action.PayPalRESTExceptionpublic InvoiceNumber generateNumber(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic static java.lang.String fetchRefreshToken(APIContext context, java.lang.String authorizationCode) throws PayPalRESTException
context - contextauthorizationCode - authorization codeString Refresh TokenPayPalRESTExceptionpublic java.lang.String getId()
public java.lang.String getNumber()
public java.lang.String getTemplateId()
public java.lang.String getUri()
public java.lang.String getStatus()
public MerchantInfo getMerchantInfo()
public java.util.List<BillingInfo> getBillingInfo()
public java.util.List<Participant> getCcInfo()
public ShippingInfo getShippingInfo()
public java.util.List<InvoiceItem> getItems()
public java.lang.String getInvoiceDate()
public PaymentTerm getPaymentTerm()
public java.lang.String getReference()
public Cost getDiscount()
public ShippingCost getShippingCost()
public CustomAmount getCustom()
public java.lang.Boolean getAllowPartialPayment()
public Currency getMinimumAmountDue()
public java.lang.Boolean getTaxCalculatedAfterDiscount()
public java.lang.Boolean getTaxInclusive()
public java.lang.String getTerms()
public java.lang.String getNote()
public java.lang.String getMerchantMemo()
public java.lang.String getLogoUrl()
public Currency getTotalAmount()
public java.util.List<PaymentDetail> getPayments()
public java.util.List<RefundDetail> getRefunds()
public Metadata getMetadata()
public java.lang.String getAdditionalData()
public Currency getGratuity()
public PaymentSummary getPaidAmount()
public PaymentSummary getRefundedAmount()
public java.util.List<FileAttachment> getAttachments()
public java.util.List<Links> getLinks()
public Invoice setId(java.lang.String id)
public Invoice setNumber(java.lang.String number)
public Invoice setTemplateId(java.lang.String templateId)
public Invoice setUri(java.lang.String uri)
public Invoice setStatus(java.lang.String status)
public Invoice setMerchantInfo(MerchantInfo merchantInfo)
public Invoice setBillingInfo(java.util.List<BillingInfo> billingInfo)
public Invoice setCcInfo(java.util.List<Participant> ccInfo)
public Invoice setShippingInfo(ShippingInfo shippingInfo)
public Invoice setItems(java.util.List<InvoiceItem> items)
public Invoice setInvoiceDate(java.lang.String invoiceDate)
public Invoice setPaymentTerm(PaymentTerm paymentTerm)
public Invoice setReference(java.lang.String reference)
public Invoice setDiscount(Cost discount)
public Invoice setShippingCost(ShippingCost shippingCost)
public Invoice setCustom(CustomAmount custom)
public Invoice setAllowPartialPayment(java.lang.Boolean allowPartialPayment)
public Invoice setMinimumAmountDue(Currency minimumAmountDue)
public Invoice setTaxCalculatedAfterDiscount(java.lang.Boolean taxCalculatedAfterDiscount)
public Invoice setTaxInclusive(java.lang.Boolean taxInclusive)
public Invoice setTerms(java.lang.String terms)
public Invoice setNote(java.lang.String note)
public Invoice setMerchantMemo(java.lang.String merchantMemo)
public Invoice setLogoUrl(java.lang.String logoUrl)
public Invoice setTotalAmount(Currency totalAmount)
public Invoice setPayments(java.util.List<PaymentDetail> payments)
public Invoice setRefunds(java.util.List<RefundDetail> refunds)
public Invoice setMetadata(Metadata metadata)
public Invoice setAdditionalData(java.lang.String additionalData)
public Invoice setGratuity(Currency gratuity)
public Invoice setPaidAmount(PaymentSummary paidAmount)
public Invoice setRefundedAmount(PaymentSummary refundedAmount)
public Invoice setAttachments(java.util.List<FileAttachment> attachments)
public Invoice setLinks(java.util.List<Links> links)
public boolean equals(java.lang.Object o)
equals in class PayPalModelprotected boolean canEqual(java.lang.Object other)
canEqual in class PayPalModelpublic int hashCode()
hashCode in class PayPalModel