Class: Io::Flow::V0::Models::MerchantGiftCardReversal
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::MerchantGiftCardReversal
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ MerchantGiftCardReversal
constructor
A new instance of MerchantGiftCardReversal.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ MerchantGiftCardReversal
Returns a new instance of MerchantGiftCardReversal.
38158 38159 38160 38161 38162 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38158 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id], 'MerchantGiftCardReversal') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
38156 38157 38158 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38156 def id @id end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38168 38169 38170 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38168 def copy(incoming={}) MerchantGiftCardReversal.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38172 38173 38174 38175 38176 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38172 def to_hash { :id => id } end |
#to_json ⇒ Object
38164 38165 38166 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38164 def to_json JSON.dump(to_hash) end |