Class: Io::Flow::V0::Models::ConsumerInvoiceDocumentType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ConsumerInvoiceDocumentType
- 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 ConsumerInvoiceDocumentType for this value, creating a new instance for an unknown value.
-
.from_string(value) ⇒ Object
Returns the instance of ConsumerInvoiceDocumentType for this value, or nil if not found.
- .pdf ⇒ Object
Instance Method Summary collapse
-
#initialize(value) ⇒ ConsumerInvoiceDocumentType
constructor
A new instance of ConsumerInvoiceDocumentType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ ConsumerInvoiceDocumentType
Returns a new instance of ConsumerInvoiceDocumentType.
16707 16708 16709 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16707 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
16705 16706 16707 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16705 def value @value end |
Class Method Details
.ALL ⇒ Object
16727 16728 16729 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16727 def ConsumerInvoiceDocumentType.ALL @@all ||= [ConsumerInvoiceDocumentType.pdf] end |
.apply(value) ⇒ Object
Returns the instance of ConsumerInvoiceDocumentType for this value, creating a new instance for an unknown value
16712 16713 16714 16715 16716 16717 16718 16719 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16712 def ConsumerInvoiceDocumentType.apply(value) if value.instance_of?(ConsumerInvoiceDocumentType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || ConsumerInvoiceDocumentType.new(value)) end end |
.from_string(value) ⇒ Object
Returns the instance of ConsumerInvoiceDocumentType for this value, or nil if not found
16722 16723 16724 16725 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16722 def ConsumerInvoiceDocumentType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) ConsumerInvoiceDocumentType.ALL.find { |v| v.value == value } end |
.pdf ⇒ Object
16731 16732 16733 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16731 def ConsumerInvoiceDocumentType.pdf @@_pdf ||= ConsumerInvoiceDocumentType.new('pdf') end |
Instance Method Details
#to_hash ⇒ Object
16735 16736 16737 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 16735 def to_hash value end |