Class: Moov::Models::Components::IssuedControls

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

Overview

Spend controls applied to an issued card, including velocity runtime state.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(single_use: nil, velocity_limits: nil, merchant_category_restrictions: nil, merchant_restrictions: nil, allowed_schedule: nil, expires_on: nil) ⇒ IssuedControls

Returns a new instance of IssuedControls.



29
30
31
32
33
34
35
36
# File 'lib/moov/models/components/issuedcontrols.rb', line 29

def initialize(single_use: nil, velocity_limits: nil, merchant_category_restrictions: nil, merchant_restrictions: nil, allowed_schedule: nil, expires_on: nil)
  @single_use = single_use
  @velocity_limits = velocity_limits
  @merchant_category_restrictions = merchant_category_restrictions
  @merchant_restrictions = merchant_restrictions
  @allowed_schedule = allowed_schedule
  @expires_on = expires_on
end

Instance Method Details

#==(other) ⇒ Object



39
40
41
42
43
44
45
46
47
48
# File 'lib/moov/models/components/issuedcontrols.rb', line 39

def ==(other)
  return false unless other.is_a? self.class
  return false unless @single_use == other.single_use
  return false unless @velocity_limits == other.velocity_limits
  return false unless @merchant_category_restrictions == other.merchant_category_restrictions
  return false unless @merchant_restrictions == other.merchant_restrictions
  return false unless @allowed_schedule == other.allowed_schedule
  return false unless @expires_on == other.expires_on
  true
end