Package com.xero.models.accounting
Class Account
- java.lang.Object
-
- com.xero.models.accounting.Account
-
public class Account extends Object
Account
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAccount.BankAccountTypeEnumFor bank accounts only.static classAccount.PropertyClassEnumSee Account Class Typesstatic classAccount.StatusEnumAccounts with a status of ACTIVE can be updated to ARCHIVED.static classAccount.SystemAccountEnumIf this is a system account then this element is returned.
-
Constructor Summary
Constructors Constructor Description Account()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccountaccountID(UUID accountID)The Xero identifier for an account – specified as a string following the endpoint name e.g.AccountaddToWatchlist(Boolean addToWatchlist)Boolean – describes whether the account is shown in the watchlist widget on the dashboardAccountaddValidationErrorsItem(ValidationError validationErrorsItem)Displays array of validation error messages from the APIAccountbankAccountNumber(String bankAccountNumber)For bank accounts only (Account Type BANK)AccountbankAccountType(Account.BankAccountTypeEnum bankAccountType)For bank accounts only.Accountcode(String code)Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)AccountcurrencyCode(CurrencyCode currencyCode)currencyCodeAccountdescription(String description)Description of the Account.AccountenablePaymentsToAccount(Boolean enablePaymentsToAccount)Boolean – describes whether account can have payments applied to itbooleanequals(Object o)UUIDgetAccountID()The Xero identifier for an account – specified as a string following the endpoint name e.g.BooleangetAddToWatchlist()Boolean – describes whether the account is shown in the watchlist widget on the dashboardStringgetBankAccountNumber()For bank accounts only (Account Type BANK)Account.BankAccountTypeEnumgetBankAccountType()For bank accounts only.StringgetCode()Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)CurrencyCodegetCurrencyCode()Get currencyCodeStringgetDescription()Description of the Account.BooleangetEnablePaymentsToAccount()Boolean – describes whether account can have payments applied to itBooleangetHasAttachments()boolean to indicate if an account has an attachment (read only)StringgetName()Name of account (max length = 150)Account.PropertyClassEnumgetPropertyClass()See Account Class TypesStringgetReportingCode()Shown if setStringgetReportingCodeName()Shown if setBooleangetShowInExpenseClaims()Boolean – describes whether account code is available for use with expense claimsAccount.StatusEnumgetStatus()Accounts with a status of ACTIVE can be updated to ARCHIVED.Account.SystemAccountEnumgetSystemAccount()If this is a system account then this element is returned.StringgetTaxType()The tax type from TaxRatesAccountTypegetType()Get typeStringgetUpdatedDateUTC()Last modified date UTC formatorg.threeten.bp.OffsetDateTimegetUpdatedDateUTCAsDate()Last modified date UTC formatList<ValidationError>getValidationErrors()Displays array of validation error messages from the APIinthashCode()Accountname(String name)Name of account (max length = 150)AccountreportingCode(String reportingCode)Shown if setvoidsetAccountID(UUID accountID)The Xero identifier for an account – specified as a string following the endpoint name e.g.voidsetAddToWatchlist(Boolean addToWatchlist)Boolean – describes whether the account is shown in the watchlist widget on the dashboardvoidsetBankAccountNumber(String bankAccountNumber)For bank accounts only (Account Type BANK)voidsetBankAccountType(Account.BankAccountTypeEnum bankAccountType)For bank accounts only.voidsetCode(String code)Customer defined alpha numeric account code e.g 200 or SALES (max length = 10)voidsetCurrencyCode(CurrencyCode currencyCode)currencyCodevoidsetDescription(String description)Description of the Account.voidsetEnablePaymentsToAccount(Boolean enablePaymentsToAccount)Boolean – describes whether account can have payments applied to itvoidsetName(String name)Name of account (max length = 150)voidsetReportingCode(String reportingCode)Shown if setvoidsetShowInExpenseClaims(Boolean showInExpenseClaims)Boolean – describes whether account code is available for use with expense claimsvoidsetStatus(Account.StatusEnum status)Accounts with a status of ACTIVE can be updated to ARCHIVED.voidsetTaxType(String taxType)The tax type from TaxRatesvoidsetType(AccountType type)typevoidsetValidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the APIAccountshowInExpenseClaims(Boolean showInExpenseClaims)Boolean – describes whether account code is available for use with expense claimsAccountstatus(Account.StatusEnum status)Accounts with a status of ACTIVE can be updated to ARCHIVED.AccounttaxType(String taxType)The tax type from TaxRatesStringtoString()Accounttype(AccountType type)typeAccountvalidationErrors(List<ValidationError> validationErrors)Displays array of validation error messages from the API
-
-
-
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
-
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
-
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>
-
-