Class: Io::Flow::V0::Models::AtCost
- Inherits:
-
TierRuleOutcome
- Object
- TierRuleOutcome
- Io::Flow::V0::Models::AtCost
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Rule outcome where shipping surfaced in quote is actual cost of the service
Instance Attribute Summary collapse
-
#ignore ⇒ Object
readonly
Returns the value of attribute ignore.
Attributes inherited from TierRuleOutcome
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ AtCost
constructor
A new instance of AtCost.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from TierRuleOutcome
Constructor Details
#initialize(incoming = {}) ⇒ AtCost
Returns a new instance of AtCost.
30642 30643 30644 30645 30646 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30642 def initialize(incoming={}) super(:discriminator => TierRuleOutcome::Types::AT_COST) opts = HttpClient::Helper.symbolize_keys(incoming) @ignore = (x = opts.delete(:ignore); x.nil? ? nil : HttpClient::Preconditions.assert_class('ignore', x, String)) end |
Instance Attribute Details
#ignore ⇒ Object (readonly)
Returns the value of attribute ignore.
30640 30641 30642 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30640 def ignore @ignore end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30652 30653 30654 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30652 def copy(incoming={}) AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
30656 30657 30658 30659 30660 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30656 def subtype_to_hash { :ignore => ignore } end |
#to_json ⇒ Object
30648 30649 30650 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30648 def to_json JSON.dump(to_hash) end |