Class: FactPulse::TypeFlux
- Inherits:
-
Object
- Object
- FactPulse::TypeFlux
- Defined in:
- lib/factpulse/models/type_flux.rb
Constant Summary collapse
- CUSTOMER_INVOICE =
"CustomerInvoice".freeze
- SUPPLIER_INVOICE =
"SupplierInvoice".freeze
- CUSTOMER_INVOICE_LC =
"CustomerInvoiceLC".freeze
- SUPPLIER_INVOICE_LC =
"SupplierInvoiceLC".freeze
- E_REPORTING =
"eReporting".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
24 25 26 |
# File 'lib/factpulse/models/type_flux.rb', line 24 def self.all_vars @all_vars ||= [CUSTOMER_INVOICE, SUPPLIER_INVOICE, CUSTOMER_INVOICE_LC, SUPPLIER_INVOICE_LC, E_REPORTING].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
31 32 33 |
# File 'lib/factpulse/models/type_flux.rb', line 31 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
38 39 40 41 |
# File 'lib/factpulse/models/type_flux.rb', line 38 def build_from_hash(value) return value if TypeFlux.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #TypeFlux" end |