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.



21822
21823
21824
21825
21826
21827
21828
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21822

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.



21820
21821
21822
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21820

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



21820
21821
21822
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21820

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



21820
21821
21822
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21820

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



21834
21835
21836
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21834

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

#to_hashObject



21838
21839
21840
21841
21842
21843
21844
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21838

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

#to_jsonObject



21830
21831
21832
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21830

def to_json
  JSON.dump(to_hash)
end