Class: Io::Flow::V0::Models::PayoutAttachmentType

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) ⇒ PayoutAttachmentType

Returns a new instance of PayoutAttachmentType.



24884
24885
24886
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24884

def initialize(value)
  @value = HttpClient::Preconditions.assert_class('value', value, String)
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



24882
24883
24884
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24882

def value
  @value
end

Class Method Details

.ALLObject



24904
24905
24906
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24904

def PayoutAttachmentType.ALL
  @@all ||= [PayoutAttachmentType.transactions]
end

.apply(value) ⇒ Object

Returns the instance of PayoutAttachmentType for this value, creating a new instance for an unknown value



24889
24890
24891
24892
24893
24894
24895
24896
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24889

def PayoutAttachmentType.apply(value)
  if value.instance_of?(PayoutAttachmentType)
    value
  else
    HttpClient::Preconditions.assert_class_or_nil('value', value, String)
    value.nil? ? nil : (from_string(value) || PayoutAttachmentType.new(value))
  end
end

.from_string(value) ⇒ Object

Returns the instance of PayoutAttachmentType for this value, or nil if not found



24899
24900
24901
24902
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24899

def PayoutAttachmentType.from_string(value)
  HttpClient::Preconditions.assert_class('value', value, String)
  PayoutAttachmentType.ALL.find { |v| v.value == value }
end

.transactionsObject



24908
24909
24910
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24908

def PayoutAttachmentType.transactions
  @@_transactions ||= PayoutAttachmentType.new('transactions')
end

Instance Method Details

#to_hashObject



24912
24913
24914
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24912

def to_hash
  value
end