Class: Io::Flow::V0::Models::ReturnPolicyItemResult
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ReturnPolicyItemResult
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#catalog_item_id ⇒ Object
readonly
Returns the value of attribute catalog_item_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#return_policy_id ⇒ Object
readonly
Returns the value of attribute return_policy_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ReturnPolicyItemResult
constructor
A new instance of ReturnPolicyItemResult.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ReturnPolicyItemResult
Returns a new instance of ReturnPolicyItemResult.
59552 59553 59554 59555 59556 59557 59558 59559 59560 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59552 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:id, :organization_id, :catalog_item_id, :return_policy_id, :status], 'ReturnPolicyItemResult') @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String) @organization_id = HttpClient::Preconditions.assert_class('organization_id', opts.delete(:organization_id), String) @catalog_item_id = HttpClient::Preconditions.assert_class('catalog_item_id', opts.delete(:catalog_item_id), String) @return_policy_id = HttpClient::Preconditions.assert_class('return_policy_id', opts.delete(:return_policy_id), String) @status = (x = opts.delete(:status); x.is_a?(::Io::Flow::V0::Models::ReturnItemStatus) ? x : ::Io::Flow::V0::Models::ReturnItemStatus.apply(x)) end |
Instance Attribute Details
#catalog_item_id ⇒ Object (readonly)
Returns the value of attribute catalog_item_id.
59550 59551 59552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59550 def catalog_item_id @catalog_item_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
59550 59551 59552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59550 def id @id end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
59550 59551 59552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59550 def organization_id @organization_id end |
#return_policy_id ⇒ Object (readonly)
Returns the value of attribute return_policy_id.
59550 59551 59552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59550 def return_policy_id @return_policy_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
59550 59551 59552 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59550 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
59566 59567 59568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59566 def copy(incoming={}) ReturnPolicyItemResult.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
59570 59571 59572 59573 59574 59575 59576 59577 59578 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59570 def to_hash { :id => id, :organization_id => organization_id, :catalog_item_id => catalog_item_id, :return_policy_id => return_policy_id, :status => status.value } end |
#to_json ⇒ Object
59562 59563 59564 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 59562 def to_json JSON.dump(to_hash) end |