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.
64243 64244 64245 64246 64247 64248 64249 64250 64251 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64243 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.
64241 64242 64243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64241 def catalog_item_id @catalog_item_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
64241 64242 64243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64241 def id @id end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
64241 64242 64243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64241 def organization_id @organization_id end |
#return_policy_id ⇒ Object (readonly)
Returns the value of attribute return_policy_id.
64241 64242 64243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64241 def return_policy_id @return_policy_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
64241 64242 64243 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64241 def status @status end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
64257 64258 64259 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64257 def copy(incoming={}) ReturnPolicyItemResult.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
64261 64262 64263 64264 64265 64266 64267 64268 64269 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64261 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
64253 64254 64255 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64253 def to_json JSON.dump(to_hash) end |