PPRetailInvoice Class Reference

Inherits from PPRetailObject : NSObject
Declared in PPRetailInvoice.h

Overview

Invoice is the fundamental transaction record for retail payments. It contains header data, such as buyer and seller information and {@link InvoiceItem line items} with unit prices, quantities, etc.

  currency

The currency for all amounts on this invoice

@property (nonatomic, strong, nullable) NSString *currency

Discussion

The currency for all amounts on this invoice

Declared In

PPRetailInvoice.h

  invoiceDate

The date the invoice was ‘enabled’. Can be set by user.

@property (nonatomic, strong, nullable) NSString *invoiceDate

Discussion

The date the invoice was ‘enabled’. Can be set by user.

Declared In

PPRetailInvoice.h

  payPalId

The id assigned by PayPal for this invoice (if it has been saved to PayPal at some point) @readonly

@property (nonatomic, strong, nullable, readonly) NSString *payPalId

Discussion

The id assigned by PayPal for this invoice (if it has been saved to PayPal at some point) @readonly

Declared In

PPRetailInvoice.h

  number

The unique order number that can be assigned by you (you must ensure uniqueness) or automatically generated by PayPal

@property (nonatomic, strong, nullable) NSString *number

Discussion

The unique order number that can be assigned by you (you must ensure uniqueness) or automatically generated by PayPal

Declared In

PPRetailInvoice.h

  status

The current status of the invoice @readonly

@property (nonatomic, assign, readonly) PPRetailInvoiceStatus status

Discussion

The current status of the invoice @readonly

Declared In

PPRetailInvoice.h

  reference

Reference data such as PO Number to be added to invoice. 60 characters max.

@property (nonatomic, strong, nullable) NSString *reference

Discussion

Reference data such as PO Number to be added to invoice. 60 characters max.

Declared In

PPRetailInvoice.h

  merchantInfo

Merchant email address and contact information (email defaults to a PayPal no-reply address)

@property (nonatomic, strong, nullable) PPRetailInvoiceMerchantInfo *merchantInfo

Discussion

Merchant email address and contact information (email defaults to a PayPal no-reply address)

Declared In

PPRetailInvoice.h

  billingInfo

Information about the payer or intended payer of the invoice

@property (nonatomic, strong, nullable) PPRetailInvoiceBillingInfo *billingInfo

Discussion

Information about the payer or intended payer of the invoice

Declared In

PPRetailInvoice.h

  shippingInfo

The shipping address for this invoice (usually blank in retail use cases)

@property (nonatomic, strong, nullable) PPRetailInvoiceShippingInfo *shippingInfo

Discussion

The shipping address for this invoice (usually blank in retail use cases)

Declared In

PPRetailInvoice.h

  taxInclusive

Prices for items on this invoice are INCLUSIVE of tax - defaults to false.

@property (nonatomic, assign) BOOL taxInclusive

Discussion

Prices for items on this invoice are INCLUSIVE of tax - defaults to false.

Declared In

PPRetailInvoice.h

  taxCalculatedAfterDiscount

Taxes for line items are calculated after any discounts - defaults to false

@property (nonatomic, assign) BOOL taxCalculatedAfterDiscount

Discussion

Taxes for line items are calculated after any discounts - defaults to false

Declared In

PPRetailInvoice.h

  items

The list of items on this invoice

@property (nonatomic, strong, nullable) NSArray *items

Discussion

The list of items on this invoice

Declared In

PPRetailInvoice.h

  itemCount

Get the number of items on this invoice @readonly

@property (nonatomic, assign, readonly) int itemCount

Discussion

Get the number of items on this invoice @readonly

Declared In

PPRetailInvoice.h

  paymentTerms

Describes when payment is expected on the invoice (defaults to DueOnReceipt)

@property (nonatomic, strong, nullable) PPRetailInvoicePaymentTerm *paymentTerms

Discussion

Describes when payment is expected on the invoice (defaults to DueOnReceipt)

Declared In

PPRetailInvoice.h

  gratuityAmount

The amount of gratuity to be applied to the invoice, if any

@property (nonatomic, strong, nullable) NSDecimalNumber *gratuityAmount

Discussion

The amount of gratuity to be applied to the invoice, if any

Declared In

PPRetailInvoice.h

  discountAmount

Discount amount applied to the invoice

@property (nonatomic, strong, nullable) NSDecimalNumber *discountAmount

Discussion

Discount amount applied to the invoice

Declared In

PPRetailInvoice.h

  minimumAmountDue

Base object for all financial value related fields (balance, payment due, etc.)

@property (nonatomic, strong, nullable) NSDecimalNumber *minimumAmountDue

Discussion

Base object for all financial value related fields (balance, payment due, etc.)

Declared In

PPRetailInvoice.h

  discountPercentage

Discount percentage applied to the invoice

@property (nonatomic, strong, nullable) NSDecimalNumber *discountPercentage

Discussion

Discount percentage applied to the invoice

Declared In

PPRetailInvoice.h

  note

A note to the customer

@property (nonatomic, strong, nullable) NSString *note

Discussion

A note to the customer

Declared In

PPRetailInvoice.h

  shippingAmount

The shipping cost to be applied to the invoice, if any

@property (nonatomic, strong, nullable) NSDecimalNumber *shippingAmount

Discussion

The shipping cost to be applied to the invoice, if any

Declared In

PPRetailInvoice.h

  shippingTaxRate

The shipping tax rate, as percent of the total shipping amount.

@property (nonatomic, strong, nullable) NSDecimalNumber *shippingTaxRate

Discussion

The shipping tax rate, as percent of the total shipping amount.

Declared In

PPRetailInvoice.h

  shippingTaxName

The name of the shipping tax.

@property (nonatomic, strong, nullable) NSString *shippingTaxName

Discussion

The name of the shipping tax.

Declared In

PPRetailInvoice.h

  termsAndConditions

General terms of the invoice. 4000 characters max.

@property (nonatomic, strong, nullable) NSString *termsAndConditions

Discussion

General terms of the invoice. 4000 characters max.

Declared In

PPRetailInvoice.h

  merchantMemo

Bookkeeping memo that is private to the merchant. 150 characters max.

@property (nonatomic, strong, nullable) NSString *merchantMemo

Discussion

Bookkeeping memo that is private to the merchant. 150 characters max.

Declared In

PPRetailInvoice.h

  isDirtyFromServer

Has this invoice changed since the last time it was saved to the server? @readonly

@property (nonatomic, assign, readonly) BOOL isDirtyFromServer

Discussion

Has this invoice changed since the last time it was saved to the server? @readonly

Declared In

PPRetailInvoice.h

  hasDetails

If false, this invoice doesn’t know what items are in its item list. This can happen when only “summary” information has been fetched from the server (typically as the result of a search). You can get the total, but items and subtotals totals aren’t available until you call getDetails. @readonly

@property (nonatomic, assign, readonly) BOOL hasDetails

Discussion

If false, this invoice doesn’t know what items are in its item list. This can happen when only “summary” information has been fetched from the server (typically as the result of a search). You can get the total, but items and subtotals totals aren’t available until you call getDetails. @readonly

Declared In

PPRetailInvoice.h

  total

The total amount due on the invoice @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *total

Discussion

The total amount due on the invoice @readonly

Declared In

PPRetailInvoice.h

  subTotal

The subtotal of the items on the invoice @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *subTotal

Discussion

The subtotal of the items on the invoice @readonly

Declared In

PPRetailInvoice.h

  itemTax

The total tax on the items (as opposed to the shipping tax, for example) @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *itemTax

Discussion

The total tax on the items (as opposed to the shipping tax, for example) @readonly

Declared In

PPRetailInvoice.h

  itemDiscounts

The total of all item discounts @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *itemDiscounts

Discussion

The total of all item discounts @readonly

Declared In

PPRetailInvoice.h

  discountPrice

The total dollar value of the invoice discount @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *discountPrice

Discussion

The total dollar value of the invoice discount @readonly

Declared In

PPRetailInvoice.h

  totalDiscount

The total amount of discounts applied to the invoice items and overall invoice @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *totalDiscount

Discussion

The total amount of discounts applied to the invoice items and overall invoice @readonly

Declared In

PPRetailInvoice.h

  taxBreakdown

An associative array of tax rate names to the total tax on the invoice from that rate @readonly

@property (nonatomic, strong, nullable, readonly) NSDictionary *taxBreakdown

Discussion

An associative array of tax rate names to the total tax on the invoice from that rate @readonly

Declared In

PPRetailInvoice.h

  allowPartialPayment

Indicates if a partial payment is allowed over the invoice. defaults to false

@property (nonatomic, assign) BOOL allowPartialPayment

Discussion

Indicates if a partial payment is allowed over the invoice. defaults to false

Declared In

PPRetailInvoice.h

  CCInfo

an array of CCInfo Email addresses which should be marked as Carbon Copy (CC) while the invoice is sent via email. Only email address under participant is currently supported.

@property (nonatomic, strong, nullable) NSArray *CCInfo

Discussion

an array of CCInfo Email addresses which should be marked as Carbon Copy (CC) while the invoice is sent via email. Only email address under participant is currently supported.

Declared In

PPRetailInvoice.h

  payments

an array of payment objects @readonly

@property (nonatomic, strong, nullable, readonly) NSArray *payments

Discussion

an array of payment objects @readonly

Declared In

PPRetailInvoice.h

  refunds

an array of refund objects @readonly

@property (nonatomic, strong, nullable, readonly) NSArray *refunds

Discussion

an array of refund objects @readonly

Declared In

PPRetailInvoice.h

  paidAmount

Total paid amount @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *paidAmount

Discussion

Total paid amount @readonly

Declared In

PPRetailInvoice.h

  paidAmountPayPal

The amount paid through PayPal @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *paidAmountPayPal

Discussion

The amount paid through PayPal @readonly

Declared In

PPRetailInvoice.h

  paidAmountOther

The amount paid through external means @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *paidAmountOther

Discussion

The amount paid through external means @readonly

Declared In

PPRetailInvoice.h

  refundedAmount

Total refunded amount @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *refundedAmount

Discussion

Total refunded amount @readonly

Declared In

PPRetailInvoice.h

  refundedAmountPayPal

The amount refunded through PayPal @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *refundedAmountPayPal

Discussion

The amount refunded through PayPal @readonly

Declared In

PPRetailInvoice.h

  refundedAmountOther

The amount refunded through external means @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *refundedAmountOther

Discussion

The amount refunded through external means @readonly

Declared In

PPRetailInvoice.h

  remainingAmount

The amount remaining on the invoice. @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *remainingAmount

Discussion

The amount remaining on the invoice. @readonly

Declared In

PPRetailInvoice.h

  amountPaidNet

total payments net of any refunds. @readonly

@property (nonatomic, strong, nullable, readonly) NSDecimalNumber *amountPaidNet

Discussion

total payments net of any refunds. @readonly

Declared In

PPRetailInvoice.h

  hasBeenPaid

If true, this invoice has been fully paid or marked as fully paid. Does not include partially paid. @readonly

@property (nonatomic, assign, readonly) BOOL hasBeenPaid

Discussion

If true, this invoice has been fully paid or marked as fully paid. Does not include partially paid. @readonly

Declared In

PPRetailInvoice.h

  uri

URI of the invoice resource.

@property (nonatomic, strong, nullable) NSString *uri

Discussion

URI of the invoice resource.

Declared In

PPRetailInvoice.h

  logoURL

Full URL of an external image to use as the logo. 4000 characters max. Non HTTPS URLs will be ignored when calling toJSON on this invoice.

@property (nonatomic, strong, nullable) NSString *logoURL

Discussion

Full URL of an external image to use as the logo. 4000 characters max. Non HTTPS URLs will be ignored when calling toJSON on this invoice.

Declared In

PPRetailInvoice.h

  additionalData

Any miscellaneous invoice data. 4000 characters max.

@property (nonatomic, strong, nullable) NSString *additionalData

Discussion

Any miscellaneous invoice data. 4000 characters max.

Declared In

PPRetailInvoice.h

  custom

Custom amount applied on an invoice. If a label is included then the amount cannot be empty.

@property (nonatomic, strong, nullable) PPRetailInvoiceCustomAmount *custom

Discussion

Custom amount applied on an invoice. If a label is included then the amount cannot be empty.

Declared In

PPRetailInvoice.h

  metadata

Audit information of the resource. @readonly

@property (nonatomic, strong, nullable, readonly) PPRetailInvoiceMetaData *metadata

Discussion

Audit information of the resource. @readonly

Declared In

PPRetailInvoice.h

  wasDeleted

If true, this invoice was deleted from the server.

@property (nonatomic, assign) BOOL wasDeleted

Discussion

If true, this invoice was deleted from the server.

Declared In

PPRetailInvoice.h

  attachments

List of files attached to the invoice.

@property (nonatomic, strong, nullable) NSArray *attachments

Discussion

List of files attached to the invoice.

Declared In

PPRetailInvoice.h

  templateID

Unique identifier id of the template.

@property (nonatomic, strong, nullable) NSString *templateID

Discussion

Unique identifier id of the template.

Declared In

PPRetailInvoice.h

  isPastDue

If true, this invoice is past due date. @readonly

@property (nonatomic, assign, readonly) BOOL isPastDue

Discussion

If true, this invoice is past due date. @readonly

Declared In

PPRetailInvoice.h

  payerViewUrl

url for the paypal view for share @readonly

@property (nonatomic, strong, nullable, readonly) NSString *payerViewUrl

Discussion

url for the paypal view for share @readonly

Declared In

PPRetailInvoice.h

  allowTip

Indicates if customers can tip against an invoice. defaults to false

@property (nonatomic, assign) BOOL allowTip

Discussion

Indicates if customers can tip against an invoice. defaults to false

Declared In

PPRetailInvoice.h

+ withInvoice:

Create a new invoice based on an existing invoice as a template.

+ (PPRetailInvoice *_Nullable)withInvoice:(PPRetailInvoice *_Nullable)invoice

Discussion

Create a new invoice based on an existing invoice as a template.

Declared In

PPRetailInvoice.h

+ supportedCurrencies

Returns a list of currencies supported by the Invoicing API

+ (NSArray *_Nullable)supportedCurrencies

Discussion

Returns a list of currencies supported by the Invoicing API

Declared In

PPRetailInvoice.h

– duplicate

Create a true copy / duplicate of an invoice. This is named duplicate instead of copy to avoid code gen issues on iOS

- (PPRetailInvoice *_Nullable)duplicate

Discussion

Create a true copy / duplicate of an invoice. This is named duplicate instead of copy to avoid code gen issues on iOS

Declared In

PPRetailInvoice.h

– addAttachment:

Adds the specified attachment to the invoice.

- (NSArray *_Nullable)addAttachment:(PPRetailInvoiceAttachment *_Nullable)attachment

Discussion

Adds the specified attachment to the invoice.

Declared In

PPRetailInvoice.h

– removeAttachment:

Remove an attachment by instance

- (BOOL)removeAttachment:(PPRetailInvoiceAttachment *_Nullable)attachment

Discussion

Remove an attachment by instance

Declared In

PPRetailInvoice.h

– addItem:quantity:unitPrice:itemId:detailId:

Adds the specified item to the invoice. If there is an existing matching item on the invoice, we will increment the quantity by the quantity argument. You may pass a negative quantity value to decrement the quantity of an existing item.

- (PPRetailInvoiceItem *_Nullable)addItem:(NSString *_Nullable)name quantity:(NSDecimalNumber *_Nullable)quantity unitPrice:(NSDecimalNumber *_Nullable)unitPrice itemId:(int)itemId detailId:(NSString *_Nullable)detailId

Discussion

Adds the specified item to the invoice. If there is an existing matching item on the invoice, we will increment the quantity by the quantity argument. You may pass a negative quantity value to decrement the quantity of an existing item.

Declared In

PPRetailInvoice.h

– addInvoiceItem:

Adds the specified item to the invoice. If there is an existing matching item on the invoice, we will increment the quantity of the item.

- (PPRetailInvoiceItem *_Nullable)addInvoiceItem:(PPRetailInvoiceItem *_Nullable)item

Discussion

Adds the specified item to the invoice. If there is an existing matching item on the invoice, we will increment the quantity of the item.

Declared In

PPRetailInvoice.h

– deepEqual:

Checks for equality on all fields recursively

- (BOOL)deepEqual:(PPRetailInvoice *_Nullable)invoice

Discussion

Checks for equality on all fields recursively

Declared In

PPRetailInvoice.h

– removeAllItems

Remove all items on the invoice

- (void)removeAllItems

Discussion

Remove all items on the invoice

Declared In

PPRetailInvoice.h

– removeItem:

Remove an item by instance

- (BOOL)removeItem:(PPRetailInvoiceItem *_Nullable)item

Discussion

Remove an item by instance

Declared In

PPRetailInvoice.h

– findItem:detailId:

Find the InvoiceItem with the specified id and/or detailId

- (PPRetailInvoiceItem *_Nullable)findItem:(int)itemId detailId:(NSString *_Nullable)detailId

Discussion

Find the InvoiceItem with the specified id and/or detailId

Declared In

PPRetailInvoice.h

– getItem:

Get an item by 0-based index

- (PPRetailInvoiceItem *_Nullable)getItem:(int)itemIndex

Discussion

Get an item by 0-based index

Declared In

PPRetailInvoice.h

– getDetails:

Update the full invoice from the server, based on its payPalId.

- (void)getDetails:(PPRetailInvoiceGotDetailsHandler _Nullable)callback

Discussion

Update the full invoice from the server, based on its payPalId.

Declared In

PPRetailInvoice.h

– save:

Save the invoice to the PayPal servers.

- (void)save:(PPRetailInvoiceSavedHandler _Nullable)callback

Discussion

Save the invoice to the PayPal servers.

Declared In

PPRetailInvoice.h

– update:shouldNotifyCustomer:callback:

Update the invoice on the PayPal servers.

- (void)update:(BOOL)shouldNotifyMerchant shouldNotifyCustomer:(BOOL)shouldNotifyCustomer callback:(PPRetailInvoiceSavedHandler _Nullable)callback

Discussion

Update the invoice on the PayPal servers.

Declared In

PPRetailInvoice.h

– send:callback:

Send the invoice. It must have already been saved to the server.

- (void)send:(BOOL)shouldNotifyMerchant callback:(PPRetailInvoiceSentHandler _Nullable)callback

Discussion

Send the invoice. It must have already been saved to the server.

Declared In

PPRetailInvoice.h

– deleteFromServer:

Delete the invoice from the server. It must have already been saved to the server.

- (void)deleteFromServer:(PPRetailInvoiceDeletedHandler _Nullable)callback

Discussion

Delete the invoice from the server. It must have already been saved to the server.

Declared In

PPRetailInvoice.h

– remind:callback:

Send a reminder about this invoice to its intended recipient

- (void)remind:(PPRetailInvoiceNotification *_Nullable)notification callback:(PPRetailInvoiceRemindedHandler _Nullable)callback

Discussion

Send a reminder about this invoice to its intended recipient

Declared In

PPRetailInvoice.h

– cancel:callback:

Cancel this invoice

- (void)cancel:(PPRetailInvoiceNotification *_Nullable)notification callback:(PPRetailInvoiceCancelledHandler _Nullable)callback

Discussion

Cancel this invoice

Declared In

PPRetailInvoice.h