Class: Io::Flow::V0::Models::IdentifierForm

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(incoming = {}) ⇒ IdentifierForm

Returns a new instance of IdentifierForm.



30567
30568
30569
30570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30567

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @primary = (x = opts.delete(:primary); x.nil? ? nil : HttpClient::Preconditions.assert_boolean('primary', x))
end

Instance Attribute Details

#primaryObject (readonly)

Returns the value of attribute primary.



30565
30566
30567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30565

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



30576
30577
30578
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30576

def copy(incoming={})
  IdentifierForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



30580
30581
30582
30583
30584
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30580

def to_hash
  {
    :primary => primary
  }
end

#to_jsonObject



30572
30573
30574
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30572

def to_json
  JSON.dump(to_hash)
end