Class: Io::Flow::V0::Models::IdentifierForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::IdentifierForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#primary ⇒ Object
readonly
Returns the value of attribute primary.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ IdentifierForm
constructor
A new instance of IdentifierForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ IdentifierForm
Returns a new instance of IdentifierForm.
34103 34104 34105 34106 34107 34108 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34103 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:name], 'IdentifierForm') @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x)) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
34101 34102 34103 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34101 def name @name end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
34101 34102 34103 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34101 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
34114 34115 34116 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34114 def copy(incoming={}) IdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
34118 34119 34120 34121 34122 34123 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34118 def to_hash { :primary => primary, :name => name } end |
#to_json ⇒ Object
34110 34111 34112 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34110 def to_json JSON.dump(to_hash) end |