Class: Moov::Models::Components::Recur

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/moov/models/components/recur.rb

Overview

Defines configuration for recurring transfers.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(recurrence_rule:, run_transfer:, indefinite: nil, start: nil) ⇒ Recur

Returns a new instance of Recur.



27
28
29
30
31
32
# File 'lib/moov/models/components/recur.rb', line 27

def initialize(recurrence_rule:, run_transfer:, indefinite: nil, start: nil)
  @recurrence_rule = recurrence_rule
  @run_transfer = run_transfer
  @indefinite = indefinite
  @start = start
end

Instance Method Details

#==(other) ⇒ Object



35
36
37
38
39
40
41
42
# File 'lib/moov/models/components/recur.rb', line 35

def ==(other)
  return false unless other.is_a? self.class
  return false unless @recurrence_rule == other.recurrence_rule
  return false unless @run_transfer == other.run_transfer
  return false unless @indefinite == other.indefinite
  return false unless @start == other.start
  true
end