Class: Io::Flow::V0::Models::TransactionNetworkDetailsCard

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 = {}) ⇒ TransactionNetworkDetailsCard

Returns a new instance of TransactionNetworkDetailsCard.



71925
71926
71927
71928
71929
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71925

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @network_transaction_id = (x = opts.delete(:network_transaction_id); x.nil? ? nil : HttpClient::Preconditions.assert_class('network_transaction_id', x, String))
  @network = (x = opts.delete(:network); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::CardType) ? x : ::Io::Flow::V0::Models::CardType.apply(x)))
end

Instance Attribute Details

#networkObject (readonly)

Returns the value of attribute network.



71923
71924
71925
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71923

def network
  @network
end

#network_transaction_idObject (readonly)

Returns the value of attribute network_transaction_id.



71923
71924
71925
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71923

def network_transaction_id
  @network_transaction_id
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



71935
71936
71937
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71935

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

#to_hashObject



71939
71940
71941
71942
71943
71944
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71939

def to_hash
  {
    :network_transaction_id => network_transaction_id,
    :network => network.nil? ? nil : network.value
  }
end

#to_jsonObject



71931
71932
71933
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71931

def to_json
  JSON.dump(to_hash)
end