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.
45345 45346 45347 45348 45349 45350 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45345 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.
45343 45344 45345 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45343 def name @name end |
#primary ⇒ Object (readonly)
Returns the value of attribute primary.
45343 45344 45345 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45343 def primary @primary end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
45356 45357 45358 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45356 def copy(incoming={}) IdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
45360 45361 45362 45363 45364 45365 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45360 def to_hash { :primary => primary, :name => name } end |
#to_json ⇒ Object
45352 45353 45354 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45352 def to_json JSON.dump(to_hash) end |