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.



25530
25531
25532
25533
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25530

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.



25528
25529
25530
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25528

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25539
25540
25541
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25539

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

#to_hashObject



25543
25544
25545
25546
25547
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25543

def to_hash
  {
    :primary => primary
  }
end

#to_jsonObject



25535
25536
25537
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25535

def to_json
  JSON.dump(to_hash)
end