Class: Io::Flow::V0::Models::TierEstimate
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TierEstimate
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TierEstimate
constructor
A new instance of TierEstimate.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ TierEstimate
Returns a new instance of TierEstimate.
53956 53957 53958 53959 53960 53961 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53956 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type], 'TierEstimate') @type = (x = opts.delete(:type); x.is_a?(::Io::Flow::V0::Models::TierEstimateType) ? x : ::Io::Flow::V0::Models::TierEstimateType.apply(x)) @label = (x = opts.delete(:label); x.nil? ? nil : HttpClient::Preconditions.assert_class('label', x, String)) end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
53954 53955 53956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53954 def label @label end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
53954 53955 53956 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53954 def type @type end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
53967 53968 53969 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53967 def copy(incoming={}) TierEstimate.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
53971 53972 53973 53974 53975 53976 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53971 def to_hash { :type => type.value, :label => label } end |
#to_json ⇒ Object
53963 53964 53965 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53963 def to_json JSON.dump(to_hash) end |