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.
14471 14472 14473 14474 14475 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14471 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.
14469 14470 14471 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14469 def ignore @ignore end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
14481 14482 14483 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14481 def copy(incoming={}) AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
14485 14486 14487 14488 14489 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14485 def subtype_to_hash { :ignore => ignore } end |
#to_json ⇒ Object
14477 14478 14479 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 14477 def to_json JSON.dump(to_hash) end |