Class: Io::Flow::V0::Models::CheckoutAttributeForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::CheckoutAttributeForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#attribute_keys ⇒ Object
readonly
Returns the value of attribute attribute_keys.
-
#experience_key ⇒ Object
readonly
Returns the value of attribute experience_key.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ CheckoutAttributeForm
constructor
A new instance of CheckoutAttributeForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ CheckoutAttributeForm
Returns a new instance of CheckoutAttributeForm.
26660 26661 26662 26663 26664 26665 26666 26667 26668 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26660 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:key, :experience_key, :attribute_keys], 'CheckoutAttributeForm') @key = HttpClient::Preconditions.assert_class('key', opts.delete(:key), String) @name = (x = opts.delete(:name); x.nil? ? nil : HttpClient::Preconditions.assert_class('name', x, String)) @experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String) @attribute_keys = HttpClient::Preconditions.assert_class('attribute_keys', opts.delete(:attribute_keys), Array).map { |v| HttpClient::Preconditions.assert_class('attribute_keys', v, String) } @position = (x = opts.delete(:position); x.nil? ? nil : HttpClient::Preconditions.assert_class('position', x, Integer)) end |
Instance Attribute Details
#attribute_keys ⇒ Object (readonly)
Returns the value of attribute attribute_keys.
26658 26659 26660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26658 def attribute_keys @attribute_keys end |
#experience_key ⇒ Object (readonly)
Returns the value of attribute experience_key.
26658 26659 26660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26658 def experience_key @experience_key end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
26658 26659 26660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26658 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
26658 26659 26660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26658 def name @name end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
26658 26659 26660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26658 def position @position end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
26674 26675 26676 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26674 def copy(incoming={}) CheckoutAttributeForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
26678 26679 26680 26681 26682 26683 26684 26685 26686 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26678 def to_hash { :key => key, :name => name, :experience_key => experience_key, :attribute_keys => attribute_keys, :position => position } end |
#to_json ⇒ Object
26670 26671 26672 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26670 def to_json JSON.dump(to_hash) end |