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
Modifier and Type Method Description PurchaseOrderaddAttachmentsItem(Attachment attachmentsItem)PurchaseOrderaddLineItemsItem(LineItem lineItemsItem)PurchaseOrderaddValidationErrorsItem(ValidationError validationErrorsItem)PurchaseOrderaddWarningsItem(ValidationError warningsItem)PurchaseOrderattachments(List<Attachment> attachments)PurchaseOrderattentionTo(String attentionTo)PurchaseOrderbrandingThemeID(UUID brandingThemeID)PurchaseOrdercontact(Contact contact)PurchaseOrdercurrencyCode(CurrencyCode currencyCode)PurchaseOrdercurrencyRate(Double currencyRate)PurchaseOrderdate(String date)PurchaseOrderdeliveryAddress(String deliveryAddress)PurchaseOrderdeliveryDate(String deliveryDate)PurchaseOrderdeliveryInstructions(String deliveryInstructions)booleanequals(Object o)PurchaseOrderexpectedArrivalDate(String expectedArrivalDate)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()StringgetDeliveryAddress()The address the goods are to be delivered toStringgetDeliveryDate()Date the goods are to be delivered – YYYY-MM-DDorg.threeten.bp.LocalDategetDeliveryDateAsDate()StringgetDeliveryInstructions()A free text feild for instructions (500 characters max)StringgetExpectedArrivalDate()The date the goods are expected to arrive.org.threeten.bp.LocalDategetExpectedArrivalDateAsDate()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()List<ValidationError>getValidationErrors()Displays array of validation error messages from the APIList<ValidationError>getWarnings()Displays array of warning messages from the APIinthashCode()PurchaseOrderlineAmountTypes(LineAmountTypes lineAmountTypes)PurchaseOrderlineItems(List<LineItem> lineItems)PurchaseOrderpurchaseOrderID(UUID purchaseOrderID)PurchaseOrderpurchaseOrderNumber(String purchaseOrderNumber)PurchaseOrderreference(String reference)PurchaseOrdersentToContact(Boolean sentToContact)voidsetAttachments(List<Attachment> attachments)voidsetAttentionTo(String attentionTo)voidsetBrandingThemeID(UUID brandingThemeID)voidsetContact(Contact contact)voidsetCurrencyCode(CurrencyCode currencyCode)voidsetCurrencyRate(Double currencyRate)voidsetDate(String date)voidsetDate(org.threeten.bp.LocalDate date)voidsetDeliveryAddress(String deliveryAddress)voidsetDeliveryDate(String deliveryDate)voidsetDeliveryDate(org.threeten.bp.LocalDate deliveryDate)voidsetDeliveryInstructions(String deliveryInstructions)voidsetExpectedArrivalDate(String expectedArrivalDate)voidsetExpectedArrivalDate(org.threeten.bp.LocalDate expectedArrivalDate)voidsetLineAmountTypes(LineAmountTypes lineAmountTypes)voidsetLineItems(List<LineItem> lineItems)voidsetPurchaseOrderID(UUID purchaseOrderID)voidsetPurchaseOrderNumber(String purchaseOrderNumber)voidsetReference(String reference)voidsetSentToContact(Boolean sentToContact)voidsetStatus(PurchaseOrder.StatusEnum status)voidsetStatusAttributeString(String statusAttributeString)voidsetTelephone(String telephone)voidsetValidationErrors(List<ValidationError> validationErrors)voidsetWarnings(List<ValidationError> warnings)PurchaseOrderstatus(PurchaseOrder.StatusEnum status)PurchaseOrderstatusAttributeString(String statusAttributeString)PurchaseOrdertelephone(String telephone)StringtoString()PurchaseOrdervalidationErrors(List<ValidationError> validationErrors)PurchaseOrderwarnings(List<ValidationError> warnings)
-
Constructor Details
-
PurchaseOrder
public PurchaseOrder()
-
-
Method Details
-
contact
-
getContact
Get contact- Returns:
- contact
-
setContact
-
lineItems
-
addLineItemsItem
-
getLineItems
See LineItems- Returns:
- lineItems
-
setLineItems
-
date
-
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() -
setDate
-
setDate
public void setDate(org.threeten.bp.LocalDate date) -
deliveryDate
-
getDeliveryDate
Date the goods are to be delivered – YYYY-MM-DD- Returns:
- deliveryDate
-
getDeliveryDateAsDate
public org.threeten.bp.LocalDate getDeliveryDateAsDate() -
setDeliveryDate
-
setDeliveryDate
public void setDeliveryDate(org.threeten.bp.LocalDate deliveryDate) -
lineAmountTypes
-
getLineAmountTypes
Get lineAmountTypes- Returns:
- lineAmountTypes
-
setLineAmountTypes
-
purchaseOrderNumber
-
getPurchaseOrderNumber
Unique alpha numeric code identifying purchase order (when missing will auto-generate from your Organisation Invoice Settings)- Returns:
- purchaseOrderNumber
-
setPurchaseOrderNumber
-
reference
-
getReference
Additional reference number- Returns:
- reference
-
setReference
-
brandingThemeID
-
getBrandingThemeID
See BrandingThemes- Returns:
- brandingThemeID
-
setBrandingThemeID
-
currencyCode
-
getCurrencyCode
Get currencyCode- Returns:
- currencyCode
-
setCurrencyCode
-
status
-
getStatus
See Purchase Order Status Codes- Returns:
- status
-
setStatus
-
sentToContact
-
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
-
deliveryAddress
-
getDeliveryAddress
The address the goods are to be delivered to- Returns:
- deliveryAddress
-
setDeliveryAddress
-
attentionTo
-
getAttentionTo
The person that the delivery is going to- Returns:
- attentionTo
-
setAttentionTo
-
telephone
-
getTelephone
The phone number for the person accepting the delivery- Returns:
- telephone
-
setTelephone
-
deliveryInstructions
-
getDeliveryInstructions
A free text feild for instructions (500 characters max)- Returns:
- deliveryInstructions
-
setDeliveryInstructions
-
expectedArrivalDate
-
getExpectedArrivalDate
The date the goods are expected to arrive.- Returns:
- expectedArrivalDate
-
getExpectedArrivalDateAsDate
public org.threeten.bp.LocalDate getExpectedArrivalDateAsDate() -
setExpectedArrivalDate
-
setExpectedArrivalDate
public void setExpectedArrivalDate(org.threeten.bp.LocalDate expectedArrivalDate) -
purchaseOrderID
-
getPurchaseOrderID
Xero generated unique identifier for purchase order- Returns:
- purchaseOrderID
-
setPurchaseOrderID
-
currencyRate
-
getCurrencyRate
The currency rate for a multicurrency purchase order. If no rate is specified, the XE.com day rate is used.- Returns:
- currencyRate
-
setCurrencyRate
-
getSubTotal
Total of purchase order excluding taxes- Returns:
- subTotal
-
getTotalTax
Total tax on purchase order- Returns:
- totalTax
-
getTotal
Total of Purchase Order tax inclusive (i.e. SubTotal + TotalTax)- Returns:
- total
-
getTotalDiscount
Total of discounts applied on the purchase order line items- Returns:
- totalDiscount
-
getHasAttachments
boolean to indicate if a purchase order has an attachment- Returns:
- hasAttachments
-
getUpdatedDateUTC
Last modified date UTC format- Returns:
- updatedDateUTC
-
getUpdatedDateUTCAsDate
public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate() -
statusAttributeString
-
getStatusAttributeString
A string to indicate if a invoice status- Returns:
- statusAttributeString
-
setStatusAttributeString
-
validationErrors
-
addValidationErrorsItem
-
getValidationErrors
Displays array of validation error messages from the API- Returns:
- validationErrors
-
setValidationErrors
-
warnings
-
addWarningsItem
-
getWarnings
Displays array of warning messages from the API- Returns:
- warnings
-
setWarnings
-
attachments
-
addAttachmentsItem
-
getAttachments
Displays array of attachments from the API- Returns:
- attachments
-
setAttachments
-
equals
-
hashCode
public int hashCode() -
toString
-