Class: Braintree::Transaction::VisaCheckoutCardDetails

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

Overview

DEPRECATED: Visa Checkout is no longer supported for creating new transactions. This class is retained for search functionality and historical transaction data only.

Instance Attribute 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(attributes) ⇒ VisaCheckoutCardDetails

Returns a new instance of VisaCheckoutCardDetails.



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

def initialize(attributes)
  set_instance_variables_from_hash attributes unless attributes.nil?
end

Instance Attribute Details

#binObject (readonly)

Returns the value of attribute bin.



8
9
10
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 8

def bin
  @bin
end

#businessObject (readonly)

Returns the value of attribute business.



9
10
11
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 9

def business
  @business
end

#call_idObject (readonly)

Returns the value of attribute call_id.



10
11
12
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 10

def call_id
  @call_id
end

#card_typeObject (readonly)

Returns the value of attribute card_type.



11
12
13
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 11

def card_type
  @card_type
end

#cardholder_nameObject (readonly)

Returns the value of attribute cardholder_name.



12
13
14
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 12

def cardholder_name
  @cardholder_name
end

#commercialObject (readonly)

Returns the value of attribute commercial.



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

def commercial
  @commercial
end

#consumerObject (readonly)

Returns the value of attribute consumer.



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

def consumer
  @consumer
end

#corporateObject (readonly)

Returns the value of attribute corporate.



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

def corporate
  @corporate
end

#country_of_issuanceObject (readonly)

Returns the value of attribute country_of_issuance.



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

def country_of_issuance
  @country_of_issuance
end

#customer_locationObject (readonly)

Returns the value of attribute customer_location.



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

def customer_location
  @customer_location
end

#debitObject (readonly)

Returns the value of attribute debit.



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

def debit
  @debit
end

#durbin_regulatedObject (readonly)

Returns the value of attribute durbin_regulated.



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

def durbin_regulated
  @durbin_regulated
end

#expiration_monthObject (readonly)

Returns the value of attribute expiration_month.



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

def expiration_month
  @expiration_month
end

#expiration_yearObject (readonly)

Returns the value of attribute expiration_year.



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

def expiration_year
  @expiration_year
end

#healthcareObject (readonly)

Returns the value of attribute healthcare.



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

def healthcare
  @healthcare
end

#image_urlObject (readonly)

Returns the value of attribute image_url.



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

def image_url
  @image_url
end

#issuing_bankObject (readonly)

Returns the value of attribute issuing_bank.



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

def issuing_bank
  @issuing_bank
end

#last_4Object (readonly)

Returns the value of attribute last_4.



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

def last_4
  @last_4
end

#payrollObject (readonly)

Returns the value of attribute payroll.



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

def payroll
  @payroll
end

#prepaidObject (readonly)

Returns the value of attribute prepaid.



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

def prepaid
  @prepaid
end

#prepaid_reloadableObject (readonly)

Returns the value of attribute prepaid_reloadable.



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

def prepaid_reloadable
  @prepaid_reloadable
end

#product_idObject (readonly)

Returns the value of attribute product_id.



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

def product_id
  @product_id
end

#purchaseObject (readonly)

Returns the value of attribute purchase.



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

def purchase
  @purchase
end

#tokenObject (readonly)

Returns the value of attribute token.



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

def token
  @token
end

Instance Method Details

#expiration_dateObject



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

def expiration_date
  "#{expiration_month}/#{expiration_year}"
end

#inspectObject



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/braintree/transaction/visa_checkout_card_details.rb', line 41

def inspect
  attr_order = [
    :bin, :business, :call_id, :card_type, :cardholder_name, :commercial, :consumer, :corporate,
    :country_of_issuance, :customer_location, :debit, :durbin_regulated, :expiration_date,
    :healthcare, :image_url, :issuing_bank, :last_4, :payroll, :prepaid, :prepaid_reloadable,
    :product_id, :purchase, :token]
  formatted_attrs = attr_order.map do |attr|
    "#{attr}: #{send(attr).inspect}"
  end
  "#<#{formatted_attrs.join(", ")}>"
end

#masked_numberObject



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

def masked_number
  "#{bin}******#{last_4}"
end