Class Account


  • public class Account
    extends Object
    Account
    • Constructor Detail

      • Account

        public Account()
    • Method Detail

      • code

        public Account code​(String code)
        Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
        Parameters:
        code - String
        Returns:
        Account
      • 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)
        Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)
        Parameters:
        code - String
      • name

        public Account name​(String name)
        Name of account (max length = 150)
        Parameters:
        name - String
        Returns:
        Account
      • getName

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

        public void setName​(String name)
        Name of account (max length = 150)
        Parameters:
        name - String
      • accountID

        public Account accountID​(UUID accountID)
        The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
        Parameters:
        accountID - UUID
        Returns:
        Account
      • 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)
        The Xero identifier for an account – specified as a string following the endpoint name e.g. /297c2dc5-cc47-4afd-8ec8-74990b8761e9
        Parameters:
        accountID - UUID
      • type

        public Account type​(AccountType type)
        type
        Parameters:
        type - AccountType
        Returns:
        Account
      • getType

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

        public void setType​(AccountType type)
        type
        Parameters:
        type - AccountType
      • bankAccountNumber

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

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

        public void setBankAccountNumber​(String bankAccountNumber)
        For bank accounts only (Account Type BANK)
        Parameters:
        bankAccountNumber - String
      • status

        public Account status​(Account.StatusEnum status)
        Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
        Parameters:
        status - StatusEnum
        Returns:
        Account
      • 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)
        Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
        Parameters:
        status - StatusEnum
      • description

        public Account description​(String description)
        Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
        Parameters:
        description - String
        Returns:
        Account
      • 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)
        Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
        Parameters:
        description - String
      • bankAccountType

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

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

        public void setBankAccountType​(Account.BankAccountTypeEnum bankAccountType)
        For bank accounts only. See Bank Account types
        Parameters:
        bankAccountType - BankAccountTypeEnum
      • currencyCode

        public Account currencyCode​(CurrencyCode currencyCode)
        currencyCode
        Parameters:
        currencyCode - CurrencyCode
        Returns:
        Account
      • getCurrencyCode

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

        public void setCurrencyCode​(CurrencyCode currencyCode)
        currencyCode
        Parameters:
        currencyCode - CurrencyCode
      • taxType

        public Account taxType​(String taxType)
        The tax type from TaxRates
        Parameters:
        taxType - String
        Returns:
        Account
      • getTaxType

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

        public void setTaxType​(String taxType)
        The tax type from TaxRates
        Parameters:
        taxType - String
      • enablePaymentsToAccount

        public Account enablePaymentsToAccount​(Boolean enablePaymentsToAccount)
        Boolean – describes whether account can have payments applied to it
        Parameters:
        enablePaymentsToAccount - Boolean
        Returns:
        Account
      • getEnablePaymentsToAccount

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

        public void setEnablePaymentsToAccount​(Boolean enablePaymentsToAccount)
        Boolean – describes whether account can have payments applied to it
        Parameters:
        enablePaymentsToAccount - Boolean
      • showInExpenseClaims

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

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

        public void setShowInExpenseClaims​(Boolean showInExpenseClaims)
        Boolean – describes whether account code is available for use with expense claims
        Parameters:
        showInExpenseClaims - Boolean
      • 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
      • reportingCode

        public Account reportingCode​(String reportingCode)
        Shown if set
        Parameters:
        reportingCode - String
        Returns:
        Account
      • getReportingCode

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

        public void setReportingCode​(String reportingCode)
        Shown if set
        Parameters:
        reportingCode - String
      • 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()
        Last modified date UTC format
        Returns:
        OffsetDateTime
      • addToWatchlist

        public Account addToWatchlist​(Boolean addToWatchlist)
        Boolean – describes whether the account is shown in the watchlist widget on the dashboard
        Parameters:
        addToWatchlist - Boolean
        Returns:
        Account
      • 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)
        Boolean – describes whether the account is shown in the watchlist widget on the dashboard
        Parameters:
        addToWatchlist - Boolean
      • validationErrors

        public Account validationErrors​(List<ValidationError> validationErrors)
        Displays array of validation error messages from the API
        Parameters:
        validationErrors - List<ValidationError>
        Returns:
        Account
      • addValidationErrorsItem

        public Account addValidationErrorsItem​(ValidationError validationErrorsItem)
        Displays array of validation error messages from the API
        Parameters:
        validationErrorsItem - ValidationError
        Returns:
        Account
      • 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>
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object