Class: Moov::Models::Components::TipPresets
- Inherits:
-
Object
- Object
- Moov::Models::Components::TipPresets
- Extended by:
- T::Sig
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/moov/models/components/tippresets.rb
Overview
Tip presets when calculating tips for a transfer.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(calculation_basis: nil, percentage_options: nil, fixed_amount_options: nil) ⇒ TipPresets
constructor
A new instance of TipPresets.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(calculation_basis: nil, percentage_options: nil, fixed_amount_options: nil) ⇒ TipPresets
Returns a new instance of TipPresets.
25 26 27 28 29 |
# File 'lib/moov/models/components/tippresets.rb', line 25 def initialize(calculation_basis: nil, percentage_options: nil, fixed_amount_options: nil) @calculation_basis = calculation_basis @percentage_options = @fixed_amount_options = end |
Instance Method Details
#==(other) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/moov/models/components/tippresets.rb', line 32 def ==(other) return false unless other.is_a? self.class return false unless @calculation_basis == other.calculation_basis return false unless @percentage_options == other. return false unless @fixed_amount_options == other. true end |