Class: Io::Flow::V0::Models::StatementAttachmentType
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::StatementAttachmentType
- 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 StatementAttachmentType for this value, creating a new instance for an unknown value.
- .csv ⇒ Object
-
.from_string(value) ⇒ Object
Returns the instance of StatementAttachmentType for this value, or nil if not found.
Instance Method Summary collapse
-
#initialize(value) ⇒ StatementAttachmentType
constructor
A new instance of StatementAttachmentType.
- #to_hash ⇒ Object
Constructor Details
#initialize(value) ⇒ StatementAttachmentType
Returns a new instance of StatementAttachmentType.
26791 26792 26793 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26791 def initialize(value) @value = HttpClient::Preconditions.assert_class('value', value, String) end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
26789 26790 26791 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26789 def value @value end |
Class Method Details
.ALL ⇒ Object
26811 26812 26813 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26811 def StatementAttachmentType.ALL @@all ||= [StatementAttachmentType.csv] end |
.apply(value) ⇒ Object
Returns the instance of StatementAttachmentType for this value, creating a new instance for an unknown value
26796 26797 26798 26799 26800 26801 26802 26803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26796 def StatementAttachmentType.apply(value) if value.instance_of?(StatementAttachmentType) value else HttpClient::Preconditions.assert_class_or_nil('value', value, String) value.nil? ? nil : (from_string(value) || StatementAttachmentType.new(value)) end end |
.csv ⇒ Object
26815 26816 26817 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26815 def StatementAttachmentType.csv @@_csv ||= StatementAttachmentType.new('csv') end |
.from_string(value) ⇒ Object
Returns the instance of StatementAttachmentType for this value, or nil if not found
26806 26807 26808 26809 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26806 def StatementAttachmentType.from_string(value) HttpClient::Preconditions.assert_class('value', value, String) StatementAttachmentType.ALL.find { |v| v.value == value } end |
Instance Method Details
#to_hash ⇒ Object
26819 26820 26821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26819 def to_hash value end |