Class: Io::Flow::V0::Models::B2bInvoiceType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::B2bInvoiceType
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
- .ALL ⇒ Object
-
.apply(value) ⇒ Object
Returns the instance of B2bInvoiceType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of B2bInvoiceType for this value, or nil if not found.
- .invoice ⇒ Object
- .self_bill_invoice ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ B2bInvoiceType
constructor
A new instance of B2bInvoiceType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ B2bInvoiceType
Returns a new instance of B2bInvoiceType.
16123 16124 16125 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16123 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16121 16122 16123 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16121 def value @value end |
Class Method Details
.ALL ⇒ Object
16143 16144 16145 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16143 def B2bInvoiceType.ALL @@all ||= [B2bInvoiceType.self_bill_invoice, B2bInvoiceType.invoice] end |
.apply(value) ⇒ Object
Returns the instance of B2bInvoiceType for this value, creating a new instance for an unknown value
16128 16129 16130 16131 16132 16133 16134 16135 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16128 def B2bInvoiceType.apply(value) if value.instance_of?(B2bInvoiceType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || B2bInvoiceType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of B2bInvoiceType for this value, or nil if not found
16138 16139 16140 16141 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16138 def B2bInvoiceType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) B2bInvoiceType.ALL.find { |v| v.value == value } end |
.invoice ⇒ Object
16151 16152 16153 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16151 def B2bInvoiceType.invoice @@_invoice ||= B2bInvoiceType.new('invoice') end |
.self_bill_invoice ⇒ Object
16147 16148 16149 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16147 def B2bInvoiceType.self_bill_invoice @@_self_bill_invoice ||= B2bInvoiceType.new('self_bill_invoice') end |
Instance Method Details
#to_hash ⇒ Object
16155 16156 16157 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16155 def to_hash value end |