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.



28023
28024
28025
28026
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28023

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.



28021
28022
28023
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28021

def primary
  @primary
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



28032
28033
28034
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28032

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

#to_hashObject



28036
28037
28038
28039
28040
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28036

def to_hash
  {
    :primary => primary
  }
end

#to_jsonObject



28028
28029
28030
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28028

def to_json
  JSON.dump(to_hash)
end