Class: Io::Flow::V0::Models::SessionPutForm

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 = {}) ⇒ SessionPutForm

Returns a new instance of SessionPutForm.



21563
21564
21565
21566
21567
21568
21569
21570
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21563

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @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))
end

Instance Attribute Details

#countryObject (readonly)

Returns the value of attribute country.



21561
21562
21563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21561

def country
  @country
end

#currencyObject (readonly)

Returns the value of attribute currency.



21561
21562
21563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21561

def currency
  @currency
end

#experienceObject (readonly)

Returns the value of attribute experience.



21561
21562
21563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21561

def experience
  @experience
end

#languageObject (readonly)

Returns the value of attribute language.



21561
21562
21563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21561

def language
  @language
end

#localeObject (readonly)

Returns the value of attribute locale.



21561
21562
21563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21561

def locale
  @locale
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



21576
21577
21578
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21576

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

#to_hashObject



21580
21581
21582
21583
21584
21585
21586
21587
21588
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21580

def to_hash
  {
    :experience => experience,
    :country => country,
    :currency => currency,
    :language => language,
    :locale => locale
  }
end

#to_jsonObject



21572
21573
21574
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21572

def to_json
  JSON.dump(to_hash)
end