Class: Io::Flow::V0::Models::LocalPriceDetails
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::LocalPriceDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ LocalPriceDetails
constructor
A new instance of LocalPriceDetails.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ LocalPriceDetails
Returns a new instance of LocalPriceDetails.
15568 15569 15570 15571 15572 15573 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15568 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:base, :local], 'LocalPriceDetails') @base = (x = opts.delete(:base); x.is_a?(::Io::Flow::V0::Models::PriceDetails) ? x : ::Io::Flow::V0::Models::PriceDetails.new(x)) @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::PriceDetails) ? x : ::Io::Flow::V0::Models::PriceDetails.new(x)) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
15566 15567 15568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15566 def base @base end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
15566 15567 15568 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15566 def local @local end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
15579 15580 15581 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15579 def copy(incoming={}) LocalPriceDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
15583 15584 15585 15586 15587 15588 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15583 def to_hash { :base => base.to_hash, :local => local.to_hash } end |
#to_json ⇒ Object
15575 15576 15577 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15575 def to_json JSON.dump(to_hash) end |