Class: Io::Flow::V0::Models::TransactionNetworkDetailsCard
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TransactionNetworkDetailsCard
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#network ⇒ Object
readonly
Returns the value of attribute network.
-
#network_transaction_id ⇒ Object
readonly
Returns the value of attribute network_transaction_id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TransactionNetworkDetailsCard
constructor
A new instance of TransactionNetworkDetailsCard.
- #to_hash ⇒ Object
- #to_json ⇒ Object
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
#network ⇒ Object (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_id ⇒ Object (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_hash ⇒ Object
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_json ⇒ Object
71931 71932 71933 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 71931 def to_json JSON.dump(to_hash) end |