Class: Io::Flow::V0::Models::CardMetadata

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ CardMetadata

Returns a new instance of CardMetadata.



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

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @merchant_of_record = (x = opts.delete(:merchant_of_record); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::OrderMerchantOfRecord) ? x : ::Io::Flow::V0::Models::OrderMerchantOfRecord.apply(x)))
end

Instance Attribute Details

#merchant_of_recordObject (readonly)

Returns the value of attribute merchant_of_record.



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

def merchant_of_record
  @merchant_of_record
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



24915
24916
24917
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24915

def copy(incoming={})
  CardMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



24919
24920
24921
24922
24923
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 24919

def to_hash
  {
    :merchant_of_record => merchant_of_record.nil? ? nil : merchant_of_record.value
  }
end

#to_jsonObject



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

def to_json
  JSON.dump(to_hash)
end