Class PurchaseOrder


  • public class PurchaseOrder
    extends Object
    PurchaseOrder
    • Constructor Detail

      • PurchaseOrder

        public PurchaseOrder()
    • 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
      • getLineItems

        public List<LineItem> getLineItems()
        See LineItems
        Returns:
        lineItems
      • 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
      • 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>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object