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.
53078 53079 53080 53081 53082 53083 53084 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53078 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.
53076 53077 53078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53076 def country @country end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
53076 53077 53078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53076 def currency @currency end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
53076 53077 53078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53076 def ip @ip end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
53076 53077 53078 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53076 def language @language end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53090 53091 53092 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53090 def copy(incoming={}) OrderQuoteGeoPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53094 53095 53096 53097 53098 53099 53100 53101 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53094 def to_hash { :country => country, :ip => ip, :currency => currency, :language => language } end |
#to_json ⇒ Object
53086 53087 53088 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53086 def to_json JSON.dump(to_hash) end |