Class: Paya::Ppd::NonGuaranteed::DebitTransaction

Inherits:
Base
  • Object
show all
Defined in:
lib/paya/ppd/non_guaranteed/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 = {}) ⇒ DebitTransaction

Returns a new instance of DebitTransaction.



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

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.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def 
  @account_number
end

#account_typeObject

Returns the value of attribute account_type.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def 
  @account_type
end

#address_1Object

Returns the value of attribute address_1.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def address_1
  @address_1
end

#address_2Object

Returns the value of attribute address_2.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def address_2
  @address_2
end

#check_amountObject

Returns the value of attribute check_amount.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def check_amount
  @check_amount
end

#cityObject

Returns the value of attribute city.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def city
  @city
end

#company_nameObject

Returns the value of attribute company_name.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def company_name
  @company_name
end

#dl_numberObject

Returns the value of attribute dl_number.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def dl_number
  @dl_number
end

#dl_stateObject

Returns the value of attribute dl_state.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def dl_state
  @dl_state
end

#dob_yearObject

Returns the value of attribute dob_year.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def dob_year
  @dob_year
end

#identifierObject

Returns the value of attribute identifier.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def identifier
  @identifier
end

#phone_numberObject

Returns the value of attribute phone_number.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def phone_number
  @phone_number
end

#request_idObject

Returns the value of attribute request_id.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def request_id
  @request_id
end

#routing_numberObject

Returns the value of attribute routing_number.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def routing_number
  @routing_number
end

#stateObject

Returns the value of attribute state.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def state
  @state
end

#transaction_idObject

Returns the value of attribute transaction_id.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def transaction_id
  @transaction_id
end

#zipObject

Returns the value of attribute zip.



6
7
8
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 6

def zip
  @zip
end

Instance Method Details

#check_no_verification_dl_optionalObject



51
52
53
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 51

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

#check_no_verification_dl_requiredObject



55
56
57
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 55

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

#check_verification_identity_verification_dl_optionalObject



59
60
61
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 59

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

#check_verification_identity_verification_dl_requiredObject



63
64
65
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 63

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

#check_verification_only_dl_optionalObject



67
68
69
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 67

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

#check_verification_only_dl_requiredObject



71
72
73
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 71

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

#identity_verification_only_dl_optionalObject



75
76
77
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 75

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

#identity_verification_only_dl_requiredObject



79
80
81
# File 'lib/paya/ppd/non_guaranteed/debit_transaction.rb', line 79

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

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



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

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