Class: Moov::Models::Components::ApplePayResponse

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

Overview

Describes an Apple Pay token on a Moov account.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

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

Constructor Details

#initialize(brand:, card_type:, card_display_name:, fingerprint:, expiration:, dynamic_last_four:, issuer_country: nil) ⇒ ApplePayResponse

Returns a new instance of ApplePayResponse.



37
38
39
40
41
42
43
44
45
# File 'lib/moov/models/components/applepayresponse.rb', line 37

def initialize(brand:, card_type:, card_display_name:, fingerprint:, expiration:, dynamic_last_four:, issuer_country: nil)
  @brand = brand
  @card_type = card_type
  @card_display_name = card_display_name
  @fingerprint = fingerprint
  @expiration = expiration
  @dynamic_last_four = dynamic_last_four
  @issuer_country = issuer_country
end

Instance Method Details

#==(other) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/moov/models/components/applepayresponse.rb', line 48

def ==(other)
  return false unless other.is_a? self.class
  return false unless @brand == other.brand
  return false unless @card_type == other.card_type
  return false unless @card_display_name == other.card_display_name
  return false unless @fingerprint == other.fingerprint
  return false unless @expiration == other.expiration
  return false unless @dynamic_last_four == other.dynamic_last_four
  return false unless @issuer_country == other.issuer_country
  true
end