class Io::Flow::V0::Models::SessionPutForm

Attributes

attributes[R]
country[R]
currency[R]
experience[R]
ip[R]
language[R]
locale[R]

Public Class Methods

new(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65582
def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String))
  @experience = (x = opts.delete(:experience); x.nil? ? nil : HttpClient::Preconditions.assert_class('experience', x, String))
  @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String))
  @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String))
  @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String))
  @locale = (x = opts.delete(:locale); x.nil? ? nil : HttpClient::Preconditions.assert_class('locale', x, String))
  @attributes = (x = opts.delete(:attributes); x.nil? ? nil : HttpClient::Preconditions.assert_class('attributes', x, Hash).inject({}) { |h, d| h[d[0]] = HttpClient::Preconditions.assert_class('attributes', d[1], String); h })
end

Public Instance Methods

copy(incoming={}) click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65597
def copy(incoming={})
  SessionPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end
to_hash() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65601
def to_hash
  {
    :ip => ip,
    :experience => experience,
    :country => country,
    :currency => currency,
    :language => language,
    :locale => locale,
    :attributes => attributes.nil? ? nil : attributes
  }
end
to_json() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 65593
def to_json
  JSON.dump(to_hash)
end