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.
47105 47106 47107 47108 47109 47110 47111 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47105 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.
47103 47104 47105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47103 def country @country end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
47103 47104 47105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47103 def currency @currency end |
#ip ⇒ Object (readonly)
Returns the value of attribute ip.
47103 47104 47105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47103 def ip @ip end |
#language ⇒ Object (readonly)
Returns the value of attribute language.
47103 47104 47105 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47103 def language @language end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
47117 47118 47119 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47117 def copy(incoming={}) OrderQuoteGeoPutForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
47121 47122 47123 47124 47125 47126 47127 47128 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47121 def to_hash { :country => country, :ip => ip, :currency => currency, :language => language } end |
#to_json ⇒ Object
47113 47114 47115 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47113 def to_json JSON.dump(to_hash) end |