Class: Braintree::ApplePayCard

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/apple_pay_card.rb

Defined Under Namespace

Modules: CardType

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(gateway, attributes) ⇒ ApplePayCard

Returns a new instance of ApplePayCard.



42
43
44
45
46
47
# File 'lib/braintree/apple_pay_card.rb', line 42

def initialize(gateway, attributes)
  @gateway = gateway
  set_instance_variables_from_hash(attributes)
  @billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil
  @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
end

Instance Attribute Details

#billing_addressObject (readonly)

Returns the value of attribute billing_address.



13
14
15
# File 'lib/braintree/apple_pay_card.rb', line 13

def billing_address
  @billing_address
end

#binObject (readonly)

Returns the value of attribute bin.



14
15
16
# File 'lib/braintree/apple_pay_card.rb', line 14

def bin
  @bin
end

#card_typeObject (readonly)

Returns the value of attribute card_type.



15
16
17
# File 'lib/braintree/apple_pay_card.rb', line 15

def card_type
  @card_type
end

#cardholder_nameObject (readonly)

Returns the value of attribute cardholder_name.



16
17
18
# File 'lib/braintree/apple_pay_card.rb', line 16

def cardholder_name
  @cardholder_name
end

#commercialObject (readonly)

Returns the value of attribute commercial.



17
18
19
# File 'lib/braintree/apple_pay_card.rb', line 17

def commercial
  @commercial
end

#country_of_issuanceObject (readonly)

Returns the value of attribute country_of_issuance.



18
19
20
# File 'lib/braintree/apple_pay_card.rb', line 18

def country_of_issuance
  @country_of_issuance
end

#created_atObject (readonly)

Returns the value of attribute created_at.



19
20
21
# File 'lib/braintree/apple_pay_card.rb', line 19

def created_at
  @created_at
end

#customer_idObject (readonly)

Returns the value of attribute customer_id.



20
21
22
# File 'lib/braintree/apple_pay_card.rb', line 20

def customer_id
  @customer_id
end

#debitObject (readonly)

Returns the value of attribute debit.



21
22
23
# File 'lib/braintree/apple_pay_card.rb', line 21

def debit
  @debit
end

#defaultObject (readonly)

Returns the value of attribute default.



22
23
24
# File 'lib/braintree/apple_pay_card.rb', line 22

def default
  @default
end

#durbin_regulatedObject (readonly)

Returns the value of attribute durbin_regulated.



23
24
25
# File 'lib/braintree/apple_pay_card.rb', line 23

def durbin_regulated
  @durbin_regulated
end

#expiration_monthObject (readonly)

Returns the value of attribute expiration_month.



24
25
26
# File 'lib/braintree/apple_pay_card.rb', line 24

def expiration_month
  @expiration_month
end

#expiration_yearObject (readonly)

Returns the value of attribute expiration_year.



25
26
27
# File 'lib/braintree/apple_pay_card.rb', line 25

def expiration_year
  @expiration_year
end

#expiredObject (readonly)

Returns the value of attribute expired.



26
27
28
# File 'lib/braintree/apple_pay_card.rb', line 26

def expired
  @expired
end

#healthcareObject (readonly)

Returns the value of attribute healthcare.



27
28
29
# File 'lib/braintree/apple_pay_card.rb', line 27

def healthcare
  @healthcare
end

#image_urlObject (readonly)

Returns the value of attribute image_url.



28
29
30
# File 'lib/braintree/apple_pay_card.rb', line 28

def image_url
  @image_url
end

#issuing_bankObject (readonly)

Returns the value of attribute issuing_bank.



29
30
31
# File 'lib/braintree/apple_pay_card.rb', line 29

def issuing_bank
  @issuing_bank
end

#last_4Object (readonly)

Returns the value of attribute last_4.



30
31
32
# File 'lib/braintree/apple_pay_card.rb', line 30

def last_4
  @last_4
end

#merchant_token_identifierObject (readonly)

Returns the value of attribute merchant_token_identifier.



31
32
33
# File 'lib/braintree/apple_pay_card.rb', line 31

def merchant_token_identifier
  @merchant_token_identifier
end

#payment_instrument_nameObject (readonly)

Returns the value of attribute payment_instrument_name.



32
33
34
# File 'lib/braintree/apple_pay_card.rb', line 32

def payment_instrument_name
  @payment_instrument_name
end

#payrollObject (readonly)

Returns the value of attribute payroll.



33
34
35
# File 'lib/braintree/apple_pay_card.rb', line 33

def payroll
  @payroll
end

#prepaidObject (readonly)

Returns the value of attribute prepaid.



34
35
36
# File 'lib/braintree/apple_pay_card.rb', line 34

def prepaid
  @prepaid
end

#product_idObject (readonly)

Returns the value of attribute product_id.



35
36
37
# File 'lib/braintree/apple_pay_card.rb', line 35

def product_id
  @product_id
end

#source_card_last4Object (readonly)

Returns the value of attribute source_card_last4.



36
37
38
# File 'lib/braintree/apple_pay_card.rb', line 36

def source_card_last4
  @source_card_last4
end

#source_descriptionObject (readonly)

Returns the value of attribute source_description.



37
38
39
# File 'lib/braintree/apple_pay_card.rb', line 37

def source_description
  @source_description
end

#subscriptionsObject (readonly)

Returns the value of attribute subscriptions.



38
39
40
# File 'lib/braintree/apple_pay_card.rb', line 38

def subscriptions
  @subscriptions
end

#tokenObject (readonly)

Returns the value of attribute token.



39
40
41
# File 'lib/braintree/apple_pay_card.rb', line 39

def token
  @token
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



40
41
42
# File 'lib/braintree/apple_pay_card.rb', line 40

def updated_at
  @updated_at
end

Class Method Details

._new(*args) ⇒ Object



61
62
63
# File 'lib/braintree/apple_pay_card.rb', line 61

def self._new(*args)
  self.new(*args)
end

Instance Method Details

#default?Boolean

Returns:

  • (Boolean)


49
50
51
# File 'lib/braintree/apple_pay_card.rb', line 49

def default?
  @default
end

#expired?Boolean

Returns:

  • (Boolean)


53
54
55
# File 'lib/braintree/apple_pay_card.rb', line 53

def expired?
  @expired
end