Class: Io::Flow::V0::Models::StatementAttachmentType

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#valueObject (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

.ALLObject



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

.csvObject



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_hashObject



26819
26820
26821
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26819

def to_hash
  value
end