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.
13910 13911 13912 13913 13914 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13910 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.
13908 13909 13910 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13908 def ignore @ignore end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
13920 13921 13922 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13920 def copy(incoming={}) AtCost.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
13924 13925 13926 13927 13928 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13924 def subtype_to_hash { :ignore => ignore } end |
#to_json ⇒ Object
13916 13917 13918 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 13916 def to_json JSON.dump(to_hash) end |