Class: Paya::Ppd::NonGuaranteed::CreditDebitTransaction

Inherits:
Base
  • Object
show all
Defined in:
lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#check_number, #consumer_info, #corporate_consumer, #data_packet, #get_archived_response, #identity_block, #non_corporate_consumer, #process_single_ccd_check, #process_single_certification_check, #process_single_check, #process_single_check_with_token, #process_single_ppd_check, #process_single_tel_check, #process_single_web_check

Constructor Details

#initialize(options = {}) ⇒ CreditDebitTransaction

Returns a new instance of CreditDebitTransaction.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 7

def initialize options={}
  @options = options
  @request_id = options[:request_id]
  @transaction_id = options[:transaction_id]
  @routing_number = options[:routing_number]
  @account_number = options[:account_number]
  @account_type = options[:account_type]
  @company_name = options[:company_name]
  @address_1 = options[:address_1]
  @address_2 = options[:address_2]
  @city = options[:city]
  @state = options[:state]
  @dl_state = options[:dl_state]
  @dl_number = options[:dl_number]
  @dob_year = options[:dob_year]
  @zip = options[:zip]
  @phone_number = options[:phone_number]
  @check_amount = options[:check_amount]
  @identifier = options[:identifier]
end

Instance Attribute Details

#account_numberObject

Returns the value of attribute account_number.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def 
  @account_number
end

#account_typeObject

Returns the value of attribute account_type.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def 
  @account_type
end

#address_1Object

Returns the value of attribute address_1.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def address_1
  @address_1
end

#address_2Object

Returns the value of attribute address_2.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def address_2
  @address_2
end

#check_amountObject

Returns the value of attribute check_amount.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def check_amount
  @check_amount
end

#cityObject

Returns the value of attribute city.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def city
  @city
end

#company_nameObject

Returns the value of attribute company_name.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def company_name
  @company_name
end

#dl_numberObject

Returns the value of attribute dl_number.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def dl_number
  @dl_number
end

#dl_stateObject

Returns the value of attribute dl_state.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def dl_state
  @dl_state
end

#dob_yearObject

Returns the value of attribute dob_year.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def dob_year
  @dob_year
end

#identifierObject

Returns the value of attribute identifier.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def identifier
  @identifier
end

#phone_numberObject

Returns the value of attribute phone_number.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def phone_number
  @phone_number
end

#request_idObject

Returns the value of attribute request_id.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def request_id
  @request_id
end

#routing_numberObject

Returns the value of attribute routing_number.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def routing_number
  @routing_number
end

#stateObject

Returns the value of attribute state.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def state
  @state
end

#transaction_idObject

Returns the value of attribute transaction_id.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def transaction_id
  @transaction_id
end

#zipObject

Returns the value of attribute zip.



5
6
7
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 5

def zip
  @zip
end

Instance Method Details

#check_no_verification_dl_optionalObject



50
51
52
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 50

def check_no_verification_dl_optional
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_no_verification_dl_optional_terminal_id, 'R'
end

#check_no_verification_dl_requiredObject



54
55
56
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 54

def check_no_verification_dl_required
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_no_verification_dl_required_terminal_id, 'R'
end

#check_verification_identity_verification_dl_optionalObject



58
59
60
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 58

def check_verification_identity_verification_dl_optional
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_verification_identity_verification_dl_optional_terminal_id, 'R'
end

#check_verification_identity_verification_dl_requiredObject



62
63
64
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 62

def check_verification_identity_verification_dl_required
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_verification_identity_verification_dl_required_terminal_id, 'R'
end

#check_verification_only_dl_optionalObject



66
67
68
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 66

def check_verification_only_dl_optional
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_verification_only_dl_optional_terminal_id, 'R'
end

#check_verification_only_dl_requiredObject



70
71
72
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 70

def check_verification_only_dl_required
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_check_verification_only_dl_required_terminal_id, 'R'
end

#identity_verification_only_dl_optionalObject



74
75
76
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 74

def identity_verification_only_dl_optional
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_identity_verification_only_dl_optional_terminal_id, 'R'
end

#identity_verification_only_dl_requiredObject



78
79
80
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 78

def identity_verification_only_dl_required
  process_single_check @options, Paya.configuration.ppd_non_guaranteed_credit_debit_identity_verification_only_dl_required_terminal_id, 'R'
end

#process(check_verification = false, identity_verification = false, dl_required = false) ⇒ Object



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/paya/ppd/non_guaranteed/credit_debit_transaction.rb', line 28

def process check_verification=false, identity_verification=false, dl_required=false
  if check_verification == false and identity_verification == false and dl_required == false
    check_no_verification_dl_optional
  elsif check_verification == false and identity_verification == false and dl_required == true
    check_no_verification_dl_required
  elsif check_verification == true and identity_verification == true and dl_required == false
    check_verification_identity_verification_dl_optional
  elsif check_verification == true and identity_verification == true and dl_required == true
    check_verification_identity_verification_dl_required
  elsif check_verification == true and identity_verification == false and dl_required == false
    check_verification_only_dl_optional
  elsif check_verification == true and identity_verification == false and dl_required == true
    check_verification_only_dl_required
  elsif check_verification == false and identity_verification == true and dl_required == false
    identity_verification_only_dl_optional
  elsif check_verification == false and identity_verification == true and dl_required == true
    identity_verification_only_dl_required
  else
    raise "Transaction not supported"
  end
end