Class Account

java.lang.Object
com.xero.models.accounting.Account

public class Account
extends Object
Account
  • Constructor Details

    • Account

      public Account()
  • Method Details

    • code

      public Account code​(String code)
    • getCode

      public String getCode()
      Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
      Returns:
      code
    • setCode

      public void setCode​(String code)
    • name

      public Account name​(String name)
    • getName

      public String getName()
      Name of account (max length = 150)
      Returns:
      name
    • setName

      public void setName​(String name)
    • accountID

      public Account accountID​(UUID accountID)
    • getAccountID

      public UUID getAccountID()
      The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
      Returns:
      accountID
    • setAccountID

      public void setAccountID​(UUID accountID)
    • type

      public Account type​(AccountType type)
    • getType

      public AccountType getType()
      Get type
      Returns:
      type
    • setType

      public void setType​(AccountType type)
    • bankAccountNumber

      public Account bankAccountNumber​(String bankAccountNumber)
    • getBankAccountNumber

      public String getBankAccountNumber()
      For bank accounts only (Account Type BANK)
      Returns:
      bankAccountNumber
    • setBankAccountNumber

      public void setBankAccountNumber​(String bankAccountNumber)
    • status

      public Account status​(Account.StatusEnum status)
    • getStatus

      public Account.StatusEnum getStatus()
      Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
      Returns:
      status
    • setStatus

      public void setStatus​(Account.StatusEnum status)
    • description

      public Account description​(String description)
    • getDescription

      public String getDescription()
      Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
      Returns:
      description
    • setDescription

      public void setDescription​(String description)
    • bankAccountType

      public Account bankAccountType​(Account.BankAccountTypeEnum bankAccountType)
    • getBankAccountType

      public Account.BankAccountTypeEnum getBankAccountType()
      For bank accounts only. See Bank Account types
      Returns:
      bankAccountType
    • setBankAccountType

      public void setBankAccountType​(Account.BankAccountTypeEnum bankAccountType)
    • currencyCode

      public Account currencyCode​(CurrencyCode currencyCode)
    • getCurrencyCode

      public CurrencyCode getCurrencyCode()
      Get currencyCode
      Returns:
      currencyCode
    • setCurrencyCode

      public void setCurrencyCode​(CurrencyCode currencyCode)
    • taxType

      public Account taxType​(String taxType)
    • getTaxType

      public String getTaxType()
      The tax type from TaxRates
      Returns:
      taxType
    • setTaxType

      public void setTaxType​(String taxType)
    • enablePaymentsToAccount

      public Account enablePaymentsToAccount​(Boolean enablePaymentsToAccount)
    • getEnablePaymentsToAccount

      public Boolean getEnablePaymentsToAccount()
      Boolean – describes whether account can have payments applied to it
      Returns:
      enablePaymentsToAccount
    • setEnablePaymentsToAccount

      public void setEnablePaymentsToAccount​(Boolean enablePaymentsToAccount)
    • showInExpenseClaims

      public Account showInExpenseClaims​(Boolean showInExpenseClaims)
    • getShowInExpenseClaims

      public Boolean getShowInExpenseClaims()
      Boolean – describes whether account code is available for use with expense claims
      Returns:
      showInExpenseClaims
    • setShowInExpenseClaims

      public void setShowInExpenseClaims​(Boolean showInExpenseClaims)
    • getPropertyClass

      public Account.PropertyClassEnum getPropertyClass()
      See Account Class Types
      Returns:
      propertyClass
    • getSystemAccount

      public Account.SystemAccountEnum getSystemAccount()
      If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
      Returns:
      systemAccount
    • getReportingCode

      public String getReportingCode()
      Shown if set
      Returns:
      reportingCode
    • getReportingCodeName

      public String getReportingCodeName()
      Shown if set
      Returns:
      reportingCodeName
    • getHasAttachments

      public Boolean getHasAttachments()
      boolean to indicate if an account has an attachment (read only)
      Returns:
      hasAttachments
    • getUpdatedDateUTC

      public String getUpdatedDateUTC()
      Last modified date UTC format
      Returns:
      updatedDateUTC
    • getUpdatedDateUTCAsDate

      public org.threeten.bp.OffsetDateTime getUpdatedDateUTCAsDate()
    • addToWatchlist

      public Account addToWatchlist​(Boolean addToWatchlist)
    • getAddToWatchlist

      public Boolean getAddToWatchlist()
      Boolean – describes whether the account is shown in the watchlist widget on the dashboard
      Returns:
      addToWatchlist
    • setAddToWatchlist

      public void setAddToWatchlist​(Boolean addToWatchlist)
    • validationErrors

      public Account validationErrors​(List<ValidationError> validationErrors)
    • addValidationErrorsItem

      public Account addValidationErrorsItem​(ValidationError validationErrorsItem)
    • getValidationErrors

      public List<ValidationError> getValidationErrors()
      Displays array of validation error messages from the API
      Returns:
      validationErrors
    • setValidationErrors

      public void setValidationErrors​(List<ValidationError> validationErrors)
    • equals

      public boolean equals​(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object