Class: FactPulse::AFNORFlowType

Inherits:
Object
  • Object
show all
Defined in:
lib/factpulse/models/afnor_flow_type.rb

Constant Summary collapse

CUSTOMER_INVOICE =
"CustomerInvoice".freeze
SUPPLIER_INVOICE =
"SupplierInvoice".freeze
STATE_INVOICE =
"StateInvoice".freeze
CUSTOMER_INVOICE_LC =
"CustomerInvoiceLC".freeze
SUPPLIER_INVOICE_LC =
"SupplierInvoiceLC".freeze
STATE_CUSTOMER_INVOICE_LC =
"StateCustomerInvoiceLC".freeze
STATE_SUPPLIER_INVOICE_LC =
"StateSupplierInvoiceLC".freeze
AGGREGATED_CUSTOMER_TRANSACTION_REPORT =
"AggregatedCustomerTransactionReport".freeze
UNITARY_CUSTOMER_TRANSACTION_REPORT =
"UnitaryCustomerTransactionReport".freeze
AGGREGATED_CUSTOMER_PAYMENT_REPORT =
"AggregatedCustomerPaymentReport".freeze
UNITARY_CUSTOMER_PAYMENT_REPORT =
"UnitaryCustomerPaymentReport".freeze
UNITARY_SUPPLIER_TRANSACTION_REPORT =
"UnitarySupplierTransactionReport".freeze
MULTI_FLOW_REPORT =
"MultiFlowReport".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



32
33
34
# File 'lib/factpulse/models/afnor_flow_type.rb', line 32

def self.all_vars
  @all_vars ||= [CUSTOMER_INVOICE, SUPPLIER_INVOICE, STATE_INVOICE, CUSTOMER_INVOICE_LC, SUPPLIER_INVOICE_LC, STATE_CUSTOMER_INVOICE_LC, STATE_SUPPLIER_INVOICE_LC, AGGREGATED_CUSTOMER_TRANSACTION_REPORT, UNITARY_CUSTOMER_TRANSACTION_REPORT, AGGREGATED_CUSTOMER_PAYMENT_REPORT, UNITARY_CUSTOMER_PAYMENT_REPORT, UNITARY_SUPPLIER_TRANSACTION_REPORT, MULTI_FLOW_REPORT].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



39
40
41
# File 'lib/factpulse/models/afnor_flow_type.rb', line 39

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



46
47
48
49
# File 'lib/factpulse/models/afnor_flow_type.rb', line 46

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