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.
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.
7363 7364 7365 7366 7367 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7363 def initialize(incoming={}) super(:name => 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.
7361 7362 7363 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7361 def ignore @ignore end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
7373 7374 7375 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7373 def copy(incoming={}) AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
7377 7378 7379 7380 7381 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7377 def subtype_to_hash { :ignore => ignore } end |
#to_json ⇒ Object
7369 7370 7371 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 7369 def to_json JSON.dump(to_hash) end |