Class: Io::Flow::V0::Models::ParentTransactionSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ParentTransactionSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ParentTransactionSummary
constructor
A new instance of ParentTransactionSummary.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ParentTransactionSummary
Returns a new instance of ParentTransactionSummary.
55991 55992 55993 55994 55995 55996 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55991 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :source], 'ParentTransactionSummary') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @source = (x = opts.delete(:source); x.is_a?(::Io::Flow::V0::Models::TransactionSource) ? x : ::Io::Flow::V0::Models::TransactionSource.apply(x)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
55989 55990 55991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55989 def id @id end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
55989 55990 55991 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55989 def source @source end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
56002 56003 56004 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56002 def copy(incoming={}) ParentTransactionSummary.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
56006 56007 56008 56009 56010 56011 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 56006 def to_hash { :id => id, :source => source.value } end |
#to_json ⇒ Object
55998 55999 56000 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 55998 def to_json JSON.dump(to_hash) end |