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.



26882
26883
26884
26885
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26882

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.



26880
26881
26882
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26880

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



26891
26892
26893
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26891

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

#to_hashObject



26895
26896
26897
26898
26899
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26895

def to_hash
  {
    :primary => primary
  }
end

#to_jsonObject



26887
26888
26889
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 26887

def to_json
  JSON.dump(to_hash)
end