Class: WalmartApIs::AllOwnersConstraint
- Inherits:
-
Object
- Object
- WalmartApIs::AllOwnersConstraint
- Defined in:
- lib/walmart_ap_is/models/all_owners_constraint.rb
Overview
A constraint that applies to all owners. If no constraint is specified, defer to any individual owner constraints.
Constant Summary collapse
- ALL_OWNERS_CONSTRAINT =
[ # TODO: Write general description for MUST_MATCH MUST_MATCH = 'MUST_MATCH'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = MUST_MATCH) ⇒ Object
21 22 23 24 25 |
# File 'lib/walmart_ap_is/models/all_owners_constraint.rb', line 21 def self.from_value(value, default_value = MUST_MATCH) return default_value if value.nil? default_value end |
.validate(value) ⇒ Object
15 16 17 18 19 |
# File 'lib/walmart_ap_is/models/all_owners_constraint.rb', line 15 def self.validate(value) return false if value.nil? ALL_OWNERS_CONSTRAINT.include?(value) end |