Class: GustoEmbedded::Models::Shared::Validation
- Inherits:
-
Object
- Object
- GustoEmbedded::Models::Shared::Validation
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/gusto_embedded/models/shared/validation.rb
Overview
- for ‘tax_rate`
-
Describes the validation required for the tax rate
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(type:, min: nil, max: nil, rates: nil) ⇒ Validation
constructor
A new instance of Validation.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(type:, min: nil, max: nil, rates: nil) ⇒ Validation
Returns a new instance of Validation.
27 28 29 30 31 32 |
# File 'lib/gusto_embedded/models/shared/validation.rb', line 27 def initialize(type:, min: nil, max: nil, rates: nil) @type = type @min = min @max = max @rates = rates end |
Instance Method Details
#==(other) ⇒ Object
35 36 37 38 39 40 41 42 |
# File 'lib/gusto_embedded/models/shared/validation.rb', line 35 def ==(other) return false unless other.is_a? self.class return false unless @type == other.type return false unless @min == other.min return false unless @max == other.max return false unless @rates == other.rates true end |