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.



22337
22338
22339
22340
22341
22342
22343
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22337

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.



22335
22336
22337
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22335

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



22335
22336
22337
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22335

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



22335
22336
22337
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22335

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



22349
22350
22351
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22349

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

#to_hashObject



22353
22354
22355
22356
22357
22358
22359
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22353

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

#to_jsonObject



22345
22346
22347
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 22345

def to_json
  JSON.dump(to_hash)
end