Class: Io::Flow::V0::Models::OrderCancellationForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderCancellationForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
An order cancellation form will update all item quantities to 0. The implementation is a convenience method that wraps an order_update_form
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderCancellationForm
constructor
A new instance of OrderCancellationForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderCancellationForm
21575 21576 21577 21578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21575 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h }) end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
21573 21574 21575 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21573 def attributes @attributes end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
21584 21585 21586 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21584 def copy(incoming={}) OrderCancellationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
21588 21589 21590 21591 21592 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21588 def to_hash { :attributes => attributes.nil? ? nil : attributes } end |
#to_json ⇒ Object
21580 21581 21582 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21580 def to_json JSON.dump(to_hash) end |