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.



25935
25936
25937
25938
25939
25940
25941
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25935

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.



25933
25934
25935
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25933

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



25933
25934
25935
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25933

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



25933
25934
25935
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25933

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



25947
25948
25949
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25947

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

#to_hashObject



25951
25952
25953
25954
25955
25956
25957
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25951

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

#to_jsonObject



25943
25944
25945
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25943

def to_json
  JSON.dump(to_hash)
end