Class: Io::Flow::V0::Models::ReturnPolicyForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ReturnPolicyForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ReturnPolicyForm
constructor
A new instance of ReturnPolicyForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ReturnPolicyForm
Returns a new instance of ReturnPolicyForm.
64215 64216 64217 64218 64219 64220 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64215 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:q], 'ReturnPolicyForm') @q = HttpClient::Preconditions.assert_class('q', opts.delete(:q), String) @description = (x = opts.delete(:description); x.nil? ? nil : HttpClient::Preconditions.assert_class('description', x, String)) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
64213 64214 64215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64213 def description @description end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
64213 64214 64215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64213 def q @q end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
64226 64227 64228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64226 def copy(incoming={}) ReturnPolicyForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
64230 64231 64232 64233 64234 64235 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64230 def to_hash { :q => q, :description => description } end |
#to_json ⇒ Object
64222 64223 64224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 64222 def to_json JSON.dump(to_hash) end |