public class Invoice extends PaymentsObject
authentication
Modifier | Constructor and Description |
---|---|
protected |
Invoice() |
protected |
Invoice(java.util.Map m) |
protected |
Invoice(PaymentsObject o) |
Modifier and Type | Method and Description |
---|---|
static Invoice |
create(Authentication auth,
java.util.Map map)
Creates an
Invoice object |
static Invoice |
create(java.util.Map map)
Creates an
Invoice object using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively. |
static Invoice |
create(java.lang.String publicKey,
java.lang.String privateKey,
java.util.Map map)
Deprecated.
As of release 1.1, replaced by
create(Authentication, Map) |
Invoice |
delete()
Deletes an
Invoice object. |
static Invoice |
find(Authentication auth,
java.lang.String id)
Retrieve a
Invoice object. |
static Invoice |
find(java.lang.String id)
Retrieve a
Invoice object using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively. |
static Invoice |
find(java.lang.String publicKey,
java.lang.String privateKey,
java.lang.String id)
Deprecated.
As of release 1.1, replaced by
find(Authentication, String) |
protected java.lang.String |
getObjectType() |
static ResourceList<Invoice> |
list()
Retrieve
Invoice objects using the static properties PaymentsApi.PUBLIC_KEY and
PaymentsApi.PRIVATE_KEY as the default public and private API keys respectively and the default
criteria (max 20, offset 0, default sorting and no filtering). |
static ResourceList<Invoice> |
list(Authentication auth)
Retrieve
Invoice objects using the default criteria (max 20, offset 0, default sorting and no filtering). |
static ResourceList<Invoice> |
list(Authentication auth,
java.util.Map criteria)
Retrieve
Invoice objects using the specified criteria. |
static ResourceList<Invoice> |
list(java.util.Map criteria)
Retrieve
Invoice objects using the specified criteria and using the static properties
PaymentsApi.PUBLIC_KEY and PaymentsApi.PRIVATE_KEY as the default public and private
API keys respectively. |
static ResourceList<Invoice> |
list(java.lang.String publicKey,
java.lang.String privateKey)
Deprecated.
As of release 1.1, replaced by
list(Authentication) |
static ResourceList<Invoice> |
list(java.lang.String publicKey,
java.lang.String privateKey,
java.util.Map criteria)
Deprecated.
As of release 1.1, replaced by
list(Authentication, Map) |
Invoice |
update()
Updates an
Invoice object. |
createObject, deleteObject, findObject, getAuthentication, listObjects, listObjects, updateObject
containsKey, get, normalize, put, remove, set
clear, containsValue, entrySet, forEach, getOrDefault, keySet, removeEldestEntry, replaceAll, values
clone, compute, computeIfAbsent, computeIfPresent, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, size
protected Invoice()
protected Invoice(PaymentsObject o)
protected Invoice(java.util.Map m)
protected java.lang.String getObjectType()
getObjectType
in class PaymentsObject
public static Invoice create(java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
object using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively.map
- a map of parameters, valid keys and types:payments.command.api.APIAddressCommand billingAddress
java.lang.String billingAddress.city
java.lang.String billingAddress.country
java.lang.String billingAddress.line1
java.lang.String billingAddress.line2
java.lang.String billingAddress.name
java.lang.String billingAddress.state
java.lang.String billingAddress.zip
payments.command.api.APIAddressCommand businessAddress
java.lang.String businessAddress.city
java.lang.String businessAddress.country
java.lang.String businessAddress.line1
java.lang.String businessAddress.line2
java.lang.String businessAddress.name
java.lang.String businessAddress.state
java.lang.String businessAddress.zip
java.lang.String currency
java.lang.String customer
java.lang.String customerTaxNo
java.lang.String discountRate
java.lang.Long dueDate
java.lang.String email
java.lang.String invoiceId
java.lang.String invoiceLanguage
java.lang.String invoiceToCopy
payments.command.api.APIInvoiceItemCreateCommand items
java.lang.Long items.amount
java.lang.String items.description
java.lang.String items.invoice
java.lang.String items.product
java.lang.Long items.quantity
java.lang.String items.reference
java.lang.String items.tax
java.lang.Long lateFee
java.lang.String memo
java.lang.String name
java.lang.String note
java.lang.String reference
payments.command.api.APIAddressCommand shippingAddress
java.lang.String shippingAddress.city
java.lang.String shippingAddress.country
java.lang.String shippingAddress.line1
java.lang.String shippingAddress.line2
java.lang.String shippingAddress.name
java.lang.String shippingAddress.state
java.lang.String shippingAddress.zip
java.lang.Long suppliedDate
java.lang.String taxNo
java.lang.String type
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
@Deprecated public static Invoice create(java.lang.String publicKey, java.lang.String privateKey, java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
create(Authentication, Map)
Invoice
objectpublicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedmap
- a map of parameters, valid keys and types:payments.command.api.APIAddressCommand billingAddress
java.lang.String billingAddress.city
java.lang.String billingAddress.country
java.lang.String billingAddress.line1
java.lang.String billingAddress.line2
java.lang.String billingAddress.name
java.lang.String billingAddress.state
java.lang.String billingAddress.zip
payments.command.api.APIAddressCommand businessAddress
java.lang.String businessAddress.city
java.lang.String businessAddress.country
java.lang.String businessAddress.line1
java.lang.String businessAddress.line2
java.lang.String businessAddress.name
java.lang.String businessAddress.state
java.lang.String businessAddress.zip
java.lang.String currency
java.lang.String customer
java.lang.String customerTaxNo
java.lang.String discountRate
java.lang.Long dueDate
java.lang.String email
java.lang.String invoiceId
java.lang.String invoiceLanguage
java.lang.String invoiceToCopy
payments.command.api.APIInvoiceItemCreateCommand items
java.lang.Long items.amount
java.lang.String items.description
java.lang.String items.invoice
java.lang.String items.product
java.lang.Long items.quantity
java.lang.String items.reference
java.lang.String items.tax
java.lang.Long lateFee
java.lang.String memo
java.lang.String name
java.lang.String note
java.lang.String reference
payments.command.api.APIAddressCommand shippingAddress
java.lang.String shippingAddress.city
java.lang.String shippingAddress.country
java.lang.String shippingAddress.line1
java.lang.String shippingAddress.line2
java.lang.String shippingAddress.name
java.lang.String shippingAddress.state
java.lang.String shippingAddress.zip
java.lang.Long suppliedDate
java.lang.String taxNo
java.lang.String type
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
public static Invoice create(Authentication auth, java.util.Map map) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
objectauth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.privateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedmap
- a map of parameters, valid keys and types: payments.command.api.APIAddressCommand billingAddress
java.lang.String billingAddress.city
java.lang.String billingAddress.country
java.lang.String billingAddress.line1
java.lang.String billingAddress.line2
java.lang.String billingAddress.name
java.lang.String billingAddress.state
java.lang.String billingAddress.zip
payments.command.api.APIAddressCommand businessAddress
java.lang.String businessAddress.city
java.lang.String businessAddress.country
java.lang.String businessAddress.line1
java.lang.String businessAddress.line2
java.lang.String businessAddress.name
java.lang.String businessAddress.state
java.lang.String businessAddress.zip
java.lang.String currency
java.lang.String customer
java.lang.String customerTaxNo
java.lang.String discountRate
java.lang.Long dueDate
java.lang.String email
java.lang.String invoiceId
java.lang.String invoiceLanguage
java.lang.String invoiceToCopy
payments.command.api.APIInvoiceItemCreateCommand items
java.lang.Long items.amount
java.lang.String items.description
java.lang.String items.invoice
java.lang.String items.product
java.lang.Long items.quantity
java.lang.String items.reference
java.lang.String items.tax
java.lang.Long lateFee
java.lang.String memo
java.lang.String name
java.lang.String note
java.lang.String reference
payments.command.api.APIAddressCommand shippingAddress
java.lang.String shippingAddress.city
java.lang.String shippingAddress.country
java.lang.String shippingAddress.line1
java.lang.String shippingAddress.line2
java.lang.String shippingAddress.name
java.lang.String shippingAddress.state
java.lang.String shippingAddress.zip
java.lang.Long suppliedDate
java.lang.String taxNo
java.lang.String type
ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
public Invoice delete() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Invoice
object.ApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public static ResourceList<Invoice> list() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
objects using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively and the default
criteria (max 20, offset 0, default sorting and no filtering).ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
@Deprecated public static ResourceList<Invoice> list(java.lang.String publicKey, java.lang.String privateKey) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
list(Authentication)
Invoice
objects using the default criteria (max 20, offset 0, default sorting and no filtering).publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Invoice> list(Authentication auth) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
objects using the default criteria (max 20, offset 0, default sorting and no filtering).auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Invoice> list(java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
objects using the specified criteria and using the static properties
PaymentsApi.PUBLIC_KEY
and PaymentsApi.PRIVATE_KEY
as the default public and private
API keys respectively.criteria
- a map of parameters; valid keys and types are:java.util.Map filter
filter.id | Filter by the invoice Id |
filter.amount | Filter by the invoice amount (in the smallest unit of your currency) |
filter.text | Filter by the name of the invoice |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.datePaidMin* | Filter by the minimum invoice paid date you are searching for - Date in UTC millis |
filter.datePaidMax* | Filter by the maximum invoice paid date you are searching for - Date in UTC millis |
filter.status | Filter by the status of the invoice |
filter.statuses | Filter by multiple statuses of different invoices |
filter.customer | Filter using the Id of the customer linked to the invoice |
filter.type | Filter by the invoice type |
filter.types | Filter by multiple invoice types |
filter.invoiceId | Filter by the user defined invoice id |
filter.reference | Filter by the invoice reference text |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: id
invoiceDate
dueDate
datePaid
customer
status
dateCreated
.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Invoice> list(java.lang.String publicKey, java.lang.String privateKey, java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
list(Authentication, Map)
Invoice
objects using the specified criteria.criteria
- a map of parameters; valid keys and types are:java.util.Map filter
filter.id | Filter by the invoice Id |
filter.amount | Filter by the invoice amount (in the smallest unit of your currency) |
filter.text | Filter by the name of the invoice |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.datePaidMin* | Filter by the minimum invoice paid date you are searching for - Date in UTC millis |
filter.datePaidMax* | Filter by the maximum invoice paid date you are searching for - Date in UTC millis |
filter.status | Filter by the status of the invoice |
filter.statuses | Filter by multiple statuses of different invoices |
filter.customer | Filter using the Id of the customer linked to the invoice |
filter.type | Filter by the invoice type |
filter.types | Filter by multiple invoice types |
filter.invoiceId | Filter by the user defined invoice id |
filter.reference | Filter by the invoice reference text |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: id
invoiceDate
dueDate
datePaid
customer
status
dateCreated
.publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static ResourceList<Invoice> list(Authentication auth, java.util.Map criteria) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, NotAllowedException, SystemException
Invoice
objects using the specified criteria.auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.criteria
- a map of parameters; valid keys and types are: java.util.Map filter
filter.id | Filter by the invoice Id |
filter.amount | Filter by the invoice amount (in the smallest unit of your currency) |
filter.text | Filter by the name of the invoice |
filter.dateCreatedMin* | Filter by the minimum created date you are searching for - Date in UTC millis |
filter.dateCreatedMax* | Filter by the maximum created date you are searching for - Date in UTC millis |
filter.datePaidMin* | Filter by the minimum invoice paid date you are searching for - Date in UTC millis |
filter.datePaidMax* | Filter by the maximum invoice paid date you are searching for - Date in UTC millis |
filter.status | Filter by the status of the invoice |
filter.statuses | Filter by multiple statuses of different invoices |
filter.customer | Filter using the Id of the customer linked to the invoice |
filter.type | Filter by the invoice type |
filter.types | Filter by multiple invoice types |
filter.invoiceId | Filter by the user defined invoice id |
filter.reference | Filter by the invoice reference text |
java.lang.Integer max
java.lang.Integer offset
java.util.Map sorting
asc
for ascending or desc
for descending). Sortable properties are: id
invoiceDate
dueDate
datePaid
customer
status
dateCreated
.ApiCommunicationException
AuthenticationException
InvalidRequestException
NotAllowedException
SystemException
ResourceList
public static Invoice find(java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Invoice
object using the static properties PaymentsApi.PUBLIC_KEY
and
PaymentsApi.PRIVATE_KEY
as the default public and private API keys respectively.id
- the id of the Invoice object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
@Deprecated public static Invoice find(java.lang.String publicKey, java.lang.String privateKey, java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
find(Authentication, String)
Invoice
object.publicKey
- Public API key. If null, the value of static PaymentsApi.PUBLIC_KEY
will be usedprivateKey
- Private API key. If null, the value of static PaymentsApi.PRIVATE_KEY
will be usedid
- the id of the Invoice
object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public static Invoice find(Authentication auth, java.lang.String id) throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Invoice
object.auth
- Authentication object representing overrides for PaymentsApi.PRIVATE_KEY
and PaymentsApi.PUBLIC_KEY
and/or passing an access token in for operations using OAuth.id
- the id of the Invoice
object to retrieveApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException
public Invoice update() throws ApiCommunicationException, AuthenticationException, InvalidRequestException, ObjectNotFoundException, NotAllowedException, SystemException
Invoice
object.
The properties that can be updated:
ApiCommunicationException
AuthenticationException
InvalidRequestException
ObjectNotFoundException
NotAllowedException
SystemException