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.
34651 34652 34653 34654 34655 34656 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34651 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.
34649 34650 34651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34649 def local @local end |
#original ⇒ Object (readonly)
Returns the value of attribute original.
34649 34650 34651 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34649 def original @original end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
34662 34663 34664 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34662 def copy(incoming={}) ValueThresholdExceededDetails.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
34666 34667 34668 34669 34670 34671 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34666 def to_hash { :local => local.to_hash, :original => original.to_hash } end |
#to_json ⇒ Object
34658 34659 34660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 34658 def to_json JSON.dump(to_hash) end |