Class: Io::Flow::V0::Models::ValueThresholdExceededDetails
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ValueThresholdExceededDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#local ⇒ Object
readonly
Returns the value of attribute local.
-
#original ⇒ Object
readonly
Returns the value of attribute original.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ValueThresholdExceededDetails
constructor
A new instance of ValueThresholdExceededDetails.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ValueThresholdExceededDetails
Returns a new instance of ValueThresholdExceededDetails.
38675 38676 38677 38678 38679 38680 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38675 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:local, :original], 'ValueThresholdExceededDetails') @local = (x = opts.delete(:local); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)) @original = (x = opts.delete(:original); x.is_a?(::Io::Flow::V0::Models::Price) ? x : ::Io::Flow::V0::Models::Price.new(x)) end |
Instance Attribute Details
#local ⇒ Object (readonly)
Returns the value of attribute local.
38673 38674 38675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38673 def local @local end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
38673 38674 38675 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38673 def original @original end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38686 38687 38688 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38686 def copy(incoming={}) ValueThresholdExceededDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38690 38691 38692 38693 38694 38695 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38690 def to_hash { :local => local.to_hash, :original => original.to_hash } end |
#to_json ⇒ Object
38682 38683 38684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38682 def to_json JSON.dump(to_hash) end |