Class: Moov::Models::Components::Card

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

Overview

Describes a card 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(card_id:, fingerprint:, brand:, card_type:, last_four_card_number:, bin:, expiration:, billing_address:, card_verification:, card_category: nil, holder_name: nil, issuer: nil, issuer_country: nil, issuer_url: nil, issuer_phone: nil, commercial: nil, regulated: nil, card_on_file: nil, merchant_account_id: nil, card_account_updater: nil, domestic_push_to_card: nil, domestic_pull_from_card: nil, payment_methods: nil) ⇒ Card

Returns a new instance of Card.



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/moov/models/components/card.rb', line 71

def initialize(card_id:, fingerprint:, brand:, card_type:, last_four_card_number:, bin:, expiration:, billing_address:, card_verification:, card_category: nil, holder_name: nil, issuer: nil, issuer_country: nil, issuer_url: nil, issuer_phone: nil, commercial: nil, regulated: nil, card_on_file: nil, merchant_account_id: nil, card_account_updater: nil, domestic_push_to_card: nil, domestic_pull_from_card: nil, payment_methods: nil)
  @card_id = card_id
  @fingerprint = fingerprint
  @brand = brand
  @card_type = card_type
  @last_four_card_number = last_four_card_number
  @bin = bin
  @expiration = expiration
  @billing_address = billing_address
  @card_verification = card_verification
  @card_category = card_category
  @holder_name = holder_name
  @issuer = issuer
  @issuer_country = issuer_country
  @issuer_url = issuer_url
  @issuer_phone = issuer_phone
  @commercial = commercial
  @regulated = regulated
  @card_on_file = card_on_file
   = 
   = 
  @domestic_push_to_card = domestic_push_to_card
  @domestic_pull_from_card = domestic_pull_from_card
  @payment_methods = payment_methods
end

Instance Method Details

#==(other) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# File 'lib/moov/models/components/card.rb', line 98

def ==(other)
  return false unless other.is_a? self.class
  return false unless @card_id == other.card_id
  return false unless @fingerprint == other.fingerprint
  return false unless @brand == other.brand
  return false unless @card_type == other.card_type
  return false unless @last_four_card_number == other.last_four_card_number
  return false unless @bin == other.bin
  return false unless @expiration == other.expiration
  return false unless @billing_address == other.billing_address
  return false unless @card_verification == other.card_verification
  return false unless @card_category == other.card_category
  return false unless @holder_name == other.holder_name
  return false unless @issuer == other.issuer
  return false unless @issuer_country == other.issuer_country
  return false unless @issuer_url == other.issuer_url
  return false unless @issuer_phone == other.issuer_phone
  return false unless @commercial == other.commercial
  return false unless @regulated == other.regulated
  return false unless @card_on_file == other.card_on_file
  return false unless  == other.
  return false unless  == other.
  return false unless @domestic_push_to_card == other.domestic_push_to_card
  return false unless @domestic_pull_from_card == other.domestic_pull_from_card
  return false unless @payment_methods == other.payment_methods
  true
end