Class: Io::Flow::V0::Models::OrderQuoteGeoPutForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::OrderQuoteGeoPutForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Provides options that may be used to configure how a order_quote is rendered for a customer, such as currency and language.
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#ip ⇒ Object
readonly
Returns the value of attribute ip.
-
#language ⇒ Object
readonly
Returns the value of attribute language.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ OrderQuoteGeoPutForm
constructor
A new instance of OrderQuoteGeoPutForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ OrderQuoteGeoPutForm
Returns a new instance of OrderQuoteGeoPutForm.
49205 49206 49207 49208 49209 49210 49211 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49205 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @country = (x = opts.delete(:country); x.nil? ? nil : HttpClient::Preconditions.assert_class('country', x, String)) @ip = (x = opts.delete(:ip); x.nil? ? nil : HttpClient::Preconditions.assert_class('ip', x, String)) @currency = (x = opts.delete(:currency); x.nil? ? nil : HttpClient::Preconditions.assert_class('currency', x, String)) @language = (x = opts.delete(:language); x.nil? ? nil : HttpClient::Preconditions.assert_class('language', x, String)) end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
49203 49204 49205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49203 def country @country end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
49203 49204 49205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49203 def currency @currency end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
49203 49204 49205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49203 def ip @ip end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
49203 49204 49205 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49203 def language @language end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
49217 49218 49219 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49217 def copy(incoming={}) OrderQuoteGeoPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
49221 49222 49223 49224 49225 49226 49227 49228 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49221 def to_hash { :country => country, :ip => ip, :currency => currency, :language => language } end |
#to_json ⇒ Object
49213 49214 49215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 49213 def to_json JSON.dump(to_hash) end |