Class: Io::Flow::V0::Models::OrderRefundSummaryItem
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderRefundSummaryItem
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#quantity_to_refund ⇒ Object
readonly
Returns the value of attribute quantity_to_refund.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderRefundSummaryItem
constructor
A new instance of OrderRefundSummaryItem.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderRefundSummaryItem
Returns a new instance of OrderRefundSummaryItem.
47790 47791 47792 47793 47794 47795 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47790 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:number, :quantity_to_refund], 'OrderRefundSummaryItem') @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String) @quantity_to_refund = HttpClient::Preconditions.assert_class('quantity_to_refund', opts.delete(:quantity_to_refund), Integer) end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
47788 47789 47790 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47788 def number @number end |
#quantity_to_refund ⇒ Object (readonly)
Returns the value of attribute quantity_to_refund.
47788 47789 47790 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47788 def quantity_to_refund @quantity_to_refund end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47801 47802 47803 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47801 def copy(incoming={}) OrderRefundSummaryItem.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47805 47806 47807 47808 47809 47810 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47805 def to_hash { :number => number, :quantity_to_refund => quantity_to_refund } end |
#to_json ⇒ Object
47797 47798 47799 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47797 def to_json JSON.dump(to_hash) end |