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.



26411
26412
26413
26414
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26411

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.



26409
26410
26411
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26409

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



26420
26421
26422
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26420

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

#to_hashObject



26424
26425
26426
26427
26428
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26424

def to_hash
  {
    :primary => primary
  }
end

#to_jsonObject



26416
26417
26418
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26416

def to_json
  JSON.dump(to_hash)
end