Package com.xero.models.accounting
Class PurchaseOrder
- java.lang.Object
-
- com.xero.models.accounting.PurchaseOrder
-
public class PurchaseOrder extends Object
PurchaseOrder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPurchaseOrder.StatusEnumSee Purchase Order Status Codes
-
Constructor Summary
Constructors Constructor Description PurchaseOrder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PurchaseOrderaddAttachmentsItem(Attachment attachmentsItem)Displays array of attachments from the APIPurchaseOrderaddLineItemsItem(LineItem lineItemsItem)See LineItemsPurchaseOrderaddValidationErrorsItem(ValidationError validationErrorsItem)Displays array of validation error messages from the APIPurchaseOrderaddWarningsItem(ValidationError warningsItem)Displays array of warning messages from the APIPurchaseOrderattachments(List<Attachment> attachments)Displays array of attachments from the APIPurchaseOrderattentionTo(String attentionTo)The person that the delivery is going toPurchaseOrderbrandingThemeID(UUID brandingThemeID)See BrandingThemesPurchaseOrdercontact(Contact contact)contactPurchaseOrdercurrencyCode(CurrencyCode currencyCode)currencyCodePurchaseOrdercurrencyRate(Double currencyRate)The currency rate for a multicurrency purchase order.PurchaseOrderdate(String date)Date purchase order was issued – YYYY-MM-DD.PurchaseOrderdeliveryAddress(String deliveryAddress)The address the goods are to be delivered toPurchaseOrderdeliveryDate(String deliveryDate)Date the goods are to be delivered – YYYY-MM-DDPurchaseOrderdeliveryInstructions(String deliveryInstructions)A free text feild for instructions (500 characters max)booleanequals(Object o)PurchaseOrderexpectedArrivalDate(String expectedArrivalDate)The date the goods are expected to arrive.List<Attachment>getAttachments()Displays array of attachments from the APIStringgetAttentionTo()The person that the delivery is going toUUIDgetBrandingThemeID()See BrandingThemesContactgetContact()Get contactCurrencyCodegetCurrencyCode()Get currencyCodeDoublegetCurrencyRate()The currency rate for a multicurrency purchase order.StringgetDate()Date purchase order was issued – YYYY-MM-DD.org.threeten.bp.LocalDategetDateAsDate()Date purchase order was issued – YYYY-MM-DD.StringgetDeliveryAddress()The address the goods are to be delivered toStringgetDeliveryDate()Date the goods are to be delivered – YYYY-MM-DDorg.threeten.bp.LocalDategetDeliveryDateAsDate()Date the goods are to be delivered – YYYY-MM-DDStringgetDeliveryInstructions()A free text feild for instructions (500 characters max)StringgetExpectedArrivalDate()The date the goods are expected to arrive.org.threeten.bp.LocalDategetExpectedArrivalDateAsDate()The date the goods are expected to arrive.BooleangetHasAttachments()boolean to indicate if a purchase order has an attachmentLineAmountTypesgetLineAmountTypes()Get lineAmountTypesList<LineItem>getLineItems()See LineItemsUUIDgetPurchaseOrderID()Xero generated unique identifier for purchase orderStringgetPurchaseOrderNumber()Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)StringgetReference()Additional reference numberBooleangetSentToContact()Boolean to set whether the purchase order should be marked as “sent”.PurchaseOrder.StatusEnumgetStatus()See Purchase Order Status CodesStringgetStatusAttributeString()A string to indicate if a invoice statusDoublegetSubTotal()Total of purchase order excluding taxesStringgetTelephone()The phone number for the person accepting the deliveryDoublegetTotal()Total of Purchase Order tax inclusive (i.e.DoublegetTotalDiscount()Total of discounts applied on the purchase order line itemsDoublegetTotalTax()Total tax on purchase orderStringgetUpdatedDateUTC()Last modified date UTC formatorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()Last modified date UTC formatList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIList<ValidationError>getWarnings()Displays array of warning messages from the APIinthashCode()PurchaseOrderlineAmountTypes(LineAmountTypes lineAmountTypes)lineAmountTypesPurchaseOrderlineItems(List<LineItem> lineItems)See LineItemsPurchaseOrderpurchaseOrderID(UUID purchaseOrderID)Xero generated unique identifier for purchase orderPurchaseOrderpurchaseOrderNumber(String purchaseOrderNumber)Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)PurchaseOrderreference(String reference)Additional reference numberPurchaseOrdersentToContact(Boolean sentToContact)Boolean to set whether the purchase order should be marked as “sent”.voidsetAttachments(List<Attachment> attachments)Displays array of attachments from the APIvoidsetAttentionTo(String attentionTo)The person that the delivery is going tovoidsetBrandingThemeID(UUID brandingThemeID)See BrandingThemesvoidsetContact(Contact contact)contactvoidsetCurrencyCode(CurrencyCode currencyCode)currencyCodevoidsetCurrencyRate(Double currencyRate)The currency rate for a multicurrency purchase order.voidsetDate(String date)Date purchase order was issued – YYYY-MM-DD.voidsetDate(org.threeten.bp.LocalDate date)Date purchase order was issued – YYYY-MM-DD.voidsetDeliveryAddress(String deliveryAddress)The address the goods are to be delivered tovoidsetDeliveryDate(String deliveryDate)Date the goods are to be delivered – YYYY-MM-DDvoidsetDeliveryDate(org.threeten.bp.LocalDate deliveryDate)Date the goods are to be delivered – YYYY-MM-DDvoidsetDeliveryInstructions(String deliveryInstructions)A free text feild for instructions (500 characters max)voidsetExpectedArrivalDate(String expectedArrivalDate)The date the goods are expected to arrive.voidsetExpectedArrivalDate(org.threeten.bp.LocalDate expectedArrivalDate)The date the goods are expected to arrive.voidsetLineAmountTypes(LineAmountTypes lineAmountTypes)lineAmountTypesvoidsetLineItems(List<LineItem> lineItems)See LineItemsvoidsetPurchaseOrderID(UUID purchaseOrderID)Xero generated unique identifier for purchase ordervoidsetPurchaseOrderNumber(String purchaseOrderNumber)Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)voidsetReference(String reference)Additional reference numbervoidsetSentToContact(Boolean sentToContact)Boolean to set whether the purchase order should be marked as “sent”.voidsetStatus(PurchaseOrder.StatusEnum status)See Purchase Order Status CodesvoidsetStatusAttributeString(String statusAttributeString)A string to indicate if a invoice statusvoidsetTelephone(String telephone)The phone number for the person accepting the deliveryvoidsetValidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APIvoidsetWarnings(List<ValidationError> warnings)Displays array of warning messages from the APIPurchaseOrderstatus(PurchaseOrder.StatusEnum status)See Purchase Order Status CodesPurchaseOrderstatusAttributeString(String statusAttributeString)A string to indicate if a invoice statusPurchaseOrdertelephone(String telephone)The phone number for the person accepting the deliveryStringtoString()PurchaseOrdervalidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APIPurchaseOrderwarnings(List<ValidationError> warnings)Displays array of warning messages from the API
-
-
-
Method Detail
-
contact
public PurchaseOrder contact(Contact contact)
contact- Parameters:
contact- Contact- Returns:
- PurchaseOrder
-
getContact
public Contact getContact()
Get contact- Returns:
- contact
-
setContact
public void setContact(Contact contact)
contact- Parameters:
contact- Contact
-
lineItems
public PurchaseOrder lineItems(List<LineItem> lineItems)
See LineItems- Parameters:
lineItems- List<LineItem>- Returns:
- PurchaseOrder
-
addLineItemsItem
public PurchaseOrder addLineItemsItem(LineItem lineItemsItem)
See LineItems- Parameters:
lineItemsItem- LineItem- Returns:
- PurchaseOrder
-
setLineItems
public void setLineItems(List<LineItem> lineItems)
See LineItems- Parameters:
lineItems- List<LineItem>
-
date
public PurchaseOrder date(String date)
Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation- Parameters:
date- String- Returns:
- PurchaseOrder
-
getDate
public String getDate()
Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation- Returns:
- date
-
getDateAsDate
public org.threeten.bp.LocalDate getDateAsDate()
Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation- Returns:
- LocalDate
-
setDate
public void setDate(String date)
Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation- Parameters:
date- String
-
setDate
public void setDate(org.threeten.bp.LocalDate date)
Date purchase order was issued – YYYY-MM-DD. If the Date element is not specified then it will default to the current date based on the timezone setting of the organisation- Parameters:
date- LocalDateTime
-
deliveryDate
public PurchaseOrder deliveryDate(String deliveryDate)
Date the goods are to be delivered – YYYY-MM-DD- Parameters:
deliveryDate- String- Returns:
- PurchaseOrder
-
getDeliveryDate
public String getDeliveryDate()
Date the goods are to be delivered – YYYY-MM-DD- Returns:
- deliveryDate
-
getDeliveryDateAsDate
public org.threeten.bp.LocalDate getDeliveryDateAsDate()
Date the goods are to be delivered – YYYY-MM-DD- Returns:
- LocalDate
-
setDeliveryDate
public void setDeliveryDate(String deliveryDate)
Date the goods are to be delivered – YYYY-MM-DD- Parameters:
deliveryDate- String
-
setDeliveryDate
public void setDeliveryDate(org.threeten.bp.LocalDate deliveryDate)
Date the goods are to be delivered – YYYY-MM-DD- Parameters:
deliveryDate- LocalDateTime
-
lineAmountTypes
public PurchaseOrder lineAmountTypes(LineAmountTypes lineAmountTypes)
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes- Returns:
- PurchaseOrder
-
getLineAmountTypes
public LineAmountTypes getLineAmountTypes()
Get lineAmountTypes- Returns:
- lineAmountTypes
-
setLineAmountTypes
public void setLineAmountTypes(LineAmountTypes lineAmountTypes)
lineAmountTypes- Parameters:
lineAmountTypes- LineAmountTypes
-
purchaseOrderNumber
public PurchaseOrder purchaseOrderNumber(String purchaseOrderNumber)
Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)- Parameters:
purchaseOrderNumber- String- Returns:
- PurchaseOrder
-
getPurchaseOrderNumber
public String getPurchaseOrderNumber()
Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)- Returns:
- purchaseOrderNumber
-
setPurchaseOrderNumber
public void setPurchaseOrderNumber(String purchaseOrderNumber)
Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)- Parameters:
purchaseOrderNumber- String
-
reference
public PurchaseOrder reference(String reference)
Additional reference number- Parameters:
reference- String- Returns:
- PurchaseOrder
-
getReference
public String getReference()
Additional reference number- Returns:
- reference
-
setReference
public void setReference(String reference)
Additional reference number- Parameters:
reference- String
-
brandingThemeID
public PurchaseOrder brandingThemeID(UUID brandingThemeID)
See BrandingThemes- Parameters:
brandingThemeID- UUID- Returns:
- PurchaseOrder
-
getBrandingThemeID
public UUID getBrandingThemeID()
See BrandingThemes- Returns:
- brandingThemeID
-
setBrandingThemeID
public void setBrandingThemeID(UUID brandingThemeID)
See BrandingThemes- Parameters:
brandingThemeID- UUID
-
currencyCode
public PurchaseOrder currencyCode(CurrencyCode currencyCode)
currencyCode- Parameters:
currencyCode- CurrencyCode- Returns:
- PurchaseOrder
-
getCurrencyCode
public CurrencyCode getCurrencyCode()
Get currencyCode- Returns:
- currencyCode
-
setCurrencyCode
public void setCurrencyCode(CurrencyCode currencyCode)
currencyCode- Parameters:
currencyCode- CurrencyCode
-
status
public PurchaseOrder status(PurchaseOrder.StatusEnum status)
See Purchase Order Status Codes- Parameters:
status- StatusEnum- Returns:
- PurchaseOrder
-
getStatus
public PurchaseOrder.StatusEnum getStatus()
See Purchase Order Status Codes- Returns:
- status
-
setStatus
public void setStatus(PurchaseOrder.StatusEnum status)
See Purchase Order Status Codes- Parameters:
status- StatusEnum
-
sentToContact
public PurchaseOrder sentToContact(Boolean sentToContact)
Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed- Parameters:
sentToContact- Boolean- Returns:
- PurchaseOrder
-
getSentToContact
public Boolean getSentToContact()
Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed- Returns:
- sentToContact
-
setSentToContact
public void setSentToContact(Boolean sentToContact)
Boolean to set whether the purchase order should be marked as “sent”. This can be set only on purchase orders that have been approved or billed- Parameters:
sentToContact- Boolean
-
deliveryAddress
public PurchaseOrder deliveryAddress(String deliveryAddress)
The address the goods are to be delivered to- Parameters:
deliveryAddress- String- Returns:
- PurchaseOrder
-
getDeliveryAddress
public String getDeliveryAddress()
The address the goods are to be delivered to- Returns:
- deliveryAddress
-
setDeliveryAddress
public void setDeliveryAddress(String deliveryAddress)
The address the goods are to be delivered to- Parameters:
deliveryAddress- String
-
attentionTo
public PurchaseOrder attentionTo(String attentionTo)
The person that the delivery is going to- Parameters:
attentionTo- String- Returns:
- PurchaseOrder
-
getAttentionTo
public String getAttentionTo()
The person that the delivery is going to- Returns:
- attentionTo
-
setAttentionTo
public void setAttentionTo(String attentionTo)
The person that the delivery is going to- Parameters:
attentionTo- String
-
telephone
public PurchaseOrder telephone(String telephone)
The phone number for the person accepting the delivery- Parameters:
telephone- String- Returns:
- PurchaseOrder
-
getTelephone
public String getTelephone()
The phone number for the person accepting the delivery- Returns:
- telephone
-
setTelephone
public void setTelephone(String telephone)
The phone number for the person accepting the delivery- Parameters:
telephone- String
-
deliveryInstructions
public PurchaseOrder deliveryInstructions(String deliveryInstructions)
A free text feild for instructions (500 characters max)- Parameters:
deliveryInstructions- String- Returns:
- PurchaseOrder
-
getDeliveryInstructions
public String getDeliveryInstructions()
A free text feild for instructions (500 characters max)- Returns:
- deliveryInstructions
-
setDeliveryInstructions
public void setDeliveryInstructions(String deliveryInstructions)
A free text feild for instructions (500 characters max)- Parameters:
deliveryInstructions- String
-
expectedArrivalDate
public PurchaseOrder expectedArrivalDate(String expectedArrivalDate)
The date the goods are expected to arrive.- Parameters:
expectedArrivalDate- String- Returns:
- PurchaseOrder
-
getExpectedArrivalDate
public String getExpectedArrivalDate()
The date the goods are expected to arrive.- Returns:
- expectedArrivalDate
-
getExpectedArrivalDateAsDate
public org.threeten.bp.LocalDate getExpectedArrivalDateAsDate()
The date the goods are expected to arrive.- Returns:
- LocalDate
-
setExpectedArrivalDate
public void setExpectedArrivalDate(String expectedArrivalDate)
The date the goods are expected to arrive.- Parameters:
expectedArrivalDate- String
-
setExpectedArrivalDate
public void setExpectedArrivalDate(org.threeten.bp.LocalDate expectedArrivalDate)
The date the goods are expected to arrive.- Parameters:
expectedArrivalDate- LocalDateTime
-
purchaseOrderID
public PurchaseOrder purchaseOrderID(UUID purchaseOrderID)
Xero generated unique identifier for purchase order- Parameters:
purchaseOrderID- UUID- Returns:
- PurchaseOrder
-
getPurchaseOrderID
public UUID getPurchaseOrderID()
Xero generated unique identifier for purchase order- Returns:
- purchaseOrderID
-
setPurchaseOrderID
public void setPurchaseOrderID(UUID purchaseOrderID)
Xero generated unique identifier for purchase order- Parameters:
purchaseOrderID- UUID
-
currencyRate
public PurchaseOrder currencyRate(Double currencyRate)
The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.- Parameters:
currencyRate- Double- Returns:
- PurchaseOrder
-
getCurrencyRate
public Double getCurrencyRate()
The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.- Returns:
- currencyRate
-
setCurrencyRate
public void setCurrencyRate(Double currencyRate)
The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.- Parameters:
currencyRate- Double
-
getSubTotal
public Double getSubTotal()
Total of purchase order excluding taxes- Returns:
- subTotal
-
getTotalTax
public Double getTotalTax()
Total tax on purchase order- Returns:
- totalTax
-
getTotal
public Double getTotal()
Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax)- Returns:
- total
-
getTotalDiscount
public Double getTotalDiscount()
Total of discounts applied on the purchase order line items- Returns:
- totalDiscount
-
getHasAttachments
public Boolean getHasAttachments()
boolean to indicate if a purchase order has an attachment- Returns:
- hasAttachments
-
getUpdatedDateUTC
public String getUpdatedDateUTC()
Last modified date UTC format- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
Last modified date UTC format- Returns:
- OffsetDateTime
-
statusAttributeString
public PurchaseOrder statusAttributeString(String statusAttributeString)
A string to indicate if a invoice status- Parameters:
statusAttributeString- String- Returns:
- PurchaseOrder
-
getStatusAttributeString
public String getStatusAttributeString()
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
public void setStatusAttributeString(String statusAttributeString)
A string to indicate if a invoice status- Parameters:
statusAttributeString- String
-
validationErrors
public PurchaseOrder validationErrors(List<ValidationError> validationErrors)
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>- Returns:
- PurchaseOrder
-
addValidationErrorsItem
public PurchaseOrder addValidationErrorsItem(ValidationError validationErrorsItem)
Displays array of validation error messages from the API- Parameters:
validationErrorsItem- ValidationError- Returns:
- PurchaseOrder
-
getValidationErrors
public List<ValidationError> getValidationErrors()
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
public void setValidationErrors(List<ValidationError> validationErrors)
Displays array of validation error messages from the API- Parameters:
validationErrors- List<ValidationError>
-
warnings
public PurchaseOrder warnings(List<ValidationError> warnings)
Displays array of warning messages from the API- Parameters:
warnings- List<ValidationError>- Returns:
- PurchaseOrder
-
addWarningsItem
public PurchaseOrder addWarningsItem(ValidationError warningsItem)
Displays array of warning messages from the API- Parameters:
warningsItem- ValidationError- Returns:
- PurchaseOrder
-
getWarnings
public List<ValidationError> getWarnings()
Displays array of warning messages from the API- Returns:
- warnings
-
setWarnings
public void setWarnings(List<ValidationError> warnings)
Displays array of warning messages from the API- Parameters:
warnings- List<ValidationError>
-
attachments
public PurchaseOrder attachments(List<Attachment> attachments)
Displays array of attachments from the API- Parameters:
attachments- List<Attachment>- Returns:
- PurchaseOrder
-
addAttachmentsItem
public PurchaseOrder addAttachmentsItem(Attachment attachmentsItem)
Displays array of attachments from the API- Parameters:
attachmentsItem- Attachment- Returns:
- PurchaseOrder
-
getAttachments
public List<Attachment> getAttachments()
Displays array of attachments from the API- Returns:
- attachments
-
setAttachments
public void setAttachments(List<Attachment> attachments)
Displays array of attachments from the API- Parameters:
attachments- List<Attachment>
-
-