Class: Io::Flow::V0::Models::AddressConfigurationProvinceTranslation
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::AddressConfigurationProvinceTranslation
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AddressConfigurationProvinceTranslation
constructor
A new instance of AddressConfigurationProvinceTranslation.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ AddressConfigurationProvinceTranslation
Returns a new instance of AddressConfigurationProvinceTranslation.
21942 21943 21944 21945 21946 21947 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21942 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:locale, :name], 'AddressConfigurationProvinceTranslation') @locale = (x = opts.delete(:locale); x.is_a?(::Io::Flow::V0::Models::AddressConfigurationProvinceTranslationLocale) ? x : ::Io::Flow::V0::Models::AddressConfigurationProvinceTranslationLocale.new(x)) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Instance Attribute Details
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
21940 21941 21942 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21940 def locale @locale end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
21940 21941 21942 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21940 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
21953 21954 21955 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21953 def copy(incoming={}) AddressConfigurationProvinceTranslation.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
21957 21958 21959 21960 21961 21962 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21957 def to_hash { :locale => locale.to_hash, :name => name } end |
#to_json ⇒ Object
21949 21950 21951 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 21949 def to_json JSON.dump(to_hash) end |