Class: Io::Flow::V0::Models::CardMetadata
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CardMetadata
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#merchant_of_record ⇒ Object
readonly
Returns the value of attribute merchant_of_record.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CardMetadata
constructor
A new instance of CardMetadata.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CardMetadata
Returns a new instance of CardMetadata.
29178 29179 29180 29181 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29178 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_record ⇒ Object (readonly)
Returns the value of attribute merchant_of_record.
29176 29177 29178 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29176 def merchant_of_record @merchant_of_record end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
29187 29188 29189 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29187 def copy(incoming={}) CardMetadata.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
29191 29192 29193 29194 29195 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29191 def to_hash { :merchant_of_record => merchant_of_record.nil? ? nil : merchant_of_record.value } end |
#to_json ⇒ Object
29183 29184 29185 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 29183 def to_json JSON.dump(to_hash) end |