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.



21280
21281
21282
21283
21284
21285
21286
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21280

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.



21278
21279
21280
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21278

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



21278
21279
21280
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21278

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



21278
21279
21280
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21278

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



21292
21293
21294
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21292

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

#to_hashObject



21296
21297
21298
21299
21300
21301
21302
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21296

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

#to_jsonObject



21288
21289
21290
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21288

def to_json
  JSON.dump(to_hash)
end