Class: Io::Flow::V0::Models::ExperiencePriceFacetConversionRequest
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperiencePriceFacetConversionRequest
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#boundary ⇒ Object
readonly
Returns the value of attribute boundary.
-
#local ⇒ Object
readonly
Returns the value of attribute local.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperiencePriceFacetConversionRequest
constructor
A new instance of ExperiencePriceFacetConversionRequest.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperiencePriceFacetConversionRequest
Returns a new instance of ExperiencePriceFacetConversionRequest.
42451 42452 42453 42454 42455 42456 42457 42458 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42451 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:boundary, :value, :base, :local], 'ExperiencePriceFacetConversionRequest') @boundary = (x = opts.delete(:boundary); x.is_a?(::Io::Flow::V0::Models::PriceFacetBoundary) ? x : ::Io::Flow::V0::Models::PriceFacetBoundary.apply(x)) @value = HttpClient::Preconditions.assert_class('value', HttpClient::Helper.to_big_decimal(opts.delete(:value)), BigDecimal) @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String) @local = HttpClient::Preconditions.assert_class('local', opts.delete(:local), String) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
42449 42450 42451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42449 def base @base end |
#boundary ⇒ Object (readonly)
Returns the value of attribute boundary.
42449 42450 42451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42449 def boundary @boundary end |
#local ⇒ Object (readonly)
Returns the value of attribute local.
42449 42450 42451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42449 def local @local end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
42449 42450 42451 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42449 def value @value end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
42464 42465 42466 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42464 def copy(incoming={}) ExperiencePriceFacetConversionRequest.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
42468 42469 42470 42471 42472 42473 42474 42475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42468 def to_hash { :boundary => boundary.value, :value => value.to_f.to_s, :base => base, :local => local } end |
#to_json ⇒ Object
42460 42461 42462 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 42460 def to_json JSON.dump(to_hash) end |