Class: Io::Flow::V0::Models::AddressConfigurationProvinceTranslationLocale

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

Returns a new instance of AddressConfigurationProvinceTranslationLocale.



20557
20558
20559
20560
20561
20562
20563
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20557

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:id, :name, :language], 'AddressConfigurationProvinceTranslationLocale')
  @id = HttpClient::Preconditions.assert_class('id', opts.delete(:id), String)
  @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String)
  @language = HttpClient::Preconditions.assert_class('language', opts.delete(:language), String)
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



20555
20556
20557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20555

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



20555
20556
20557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20555

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



20555
20556
20557
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20555

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



20569
20570
20571
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20569

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

#to_hashObject



20573
20574
20575
20576
20577
20578
20579
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20573

def to_hash
  {
    :id => id,
    :name => name,
    :language => language
  }
end

#to_jsonObject



20565
20566
20567
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 20565

def to_json
  JSON.dump(to_hash)
end