Class: TogaiClient::InvoicesStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/togai_client/models/invoices_status.rb

Constant Summary collapse

DRAFT =
"DRAFT".freeze
DUE =
"DUE".freeze
"PAID".freeze
VOID =
"VOID".freeze
UN_COLLECTIBLE =
"UN_COLLECTIBLE".freeze
REFUND_INITIATED =
"REFUND_INITIATED".freeze
REFUND_COMPLETED =
"REFUND_COMPLETED".freeze
MERGED =
"MERGED".freeze
PARTIALLY_PAID =
"PARTIALLY_PAID".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



28
29
30
# File 'lib/togai_client/models/invoices_status.rb', line 28

def self.all_vars
  @all_vars ||= [DRAFT, DUE, PAID, VOID, UN_COLLECTIBLE, REFUND_INITIATED, REFUND_COMPLETED, MERGED, PARTIALLY_PAID].freeze
end

.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



35
36
37
# File 'lib/togai_client/models/invoices_status.rb', line 35

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



42
43
44
45
# File 'lib/togai_client/models/invoices_status.rb', line 42

def build_from_hash(value)
  return value if InvoicesStatus.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #InvoicesStatus"
end