Class: Io::Flow::V0::Models::RefundIdentifier
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RefundIdentifier
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
-
#refund ⇒ Object
readonly
Returns the value of attribute refund.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RefundIdentifier
constructor
A new instance of RefundIdentifier.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RefundIdentifier
Returns a new instance of RefundIdentifier.
35591 35592 35593 35594 35595 35596 35597 35598 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35591 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :refund, :identifier, :primary], 'RefundIdentifier') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @refund = (x = opts.delete(:refund); x.is_a?(::Io::Flow::V0::Models::RefundReference) ? x : ::Io::Flow::V0::Models::RefundReference.new(x)) @identifier = HttpClient::Preconditions.assert_class('identifier', opts.delete(:identifier), String) @primary = HttpClient::Preconditions.assert_boolean('primary', opts.delete(:primary)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
35589 35590 35591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35589 def id @id end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
35589 35590 35591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35589 def identifier @identifier end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
35589 35590 35591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35589 def primary @primary end |
#refund ⇒ Object (readonly)
Returns the value of attribute refund.
35589 35590 35591 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35589 def refund @refund end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
35604 35605 35606 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35604 def copy(incoming={}) RefundIdentifier.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
35608 35609 35610 35611 35612 35613 35614 35615 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35608 def to_hash { :id => id, :refund => refund.to_hash, :identifier => identifier, :primary => primary } end |
#to_json ⇒ Object
35600 35601 35602 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 35600 def to_json JSON.dump(to_hash) end |