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.



21970
21971
21972
21973
21974
21975
21976
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21970

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.



21968
21969
21970
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21968

def id
  @id
end

#languageObject (readonly)

Returns the value of attribute language.



21968
21969
21970
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21968

def language
  @language
end

#nameObject (readonly)

Returns the value of attribute name.



21968
21969
21970
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21968

def name
  @name
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



21982
21983
21984
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21982

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

#to_hashObject



21986
21987
21988
21989
21990
21991
21992
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21986

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

#to_jsonObject



21978
21979
21980
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21978

def to_json
  JSON.dump(to_hash)
end