Class: XeroRuby::PayrollAu::AccountType

Inherits:
Object
  • Object
show all
Defined in:
lib/xero-ruby/models/payroll_au/account_type.rb

Constant Summary collapse

BANK =
"BANK".freeze
CURRENT =
"CURRENT".freeze
CURRLIAB =
"CURRLIAB".freeze
DEPRECIATN =
"DEPRECIATN".freeze
DIRECTCOSTS =
"DIRECTCOSTS".freeze
EQUITY =
"EQUITY".freeze
EXPENSE =
"EXPENSE".freeze
FIXED =
"FIXED".freeze
INVENTORY =
"INVENTORY".freeze
LIABILITY =
"LIABILITY".freeze
NONCURRENT =
"NONCURRENT".freeze
OTHERINCOME =
"OTHERINCOME".freeze
OVERHEADS =
"OVERHEADS".freeze
PREPAYMENT =
"PREPAYMENT".freeze
REVENUE =
"REVENUE".freeze
SALES =
"SALES".freeze
TERMLIAB =
"TERMLIAB".freeze
PAYGLIABILITY =
"PAYGLIABILITY".freeze
PAYG =
"PAYG".freeze
SUPERANNUATIONEXPENSE =
"SUPERANNUATIONEXPENSE".freeze
SUPERANNUATIONLIABILITY =
"SUPERANNUATIONLIABILITY".freeze
WAGESEXPENSE =
"WAGESEXPENSE".freeze
WAGESPAYABLELIABILITY =
"WAGESPAYABLELIABILITY".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value


44
45
46
# File 'lib/xero-ruby/models/payroll_au/account_type.rb', line 44

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value


51
52
53
54
55
# File 'lib/xero-ruby/models/payroll_au/account_type.rb', line 51

def build_from_hash(value)
  constantValues = AccountType.constants.select { |c| AccountType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #AccountType" if constantValues.empty?
  value
end