Class: CrowdPay::Verification
- Inherits:
-
Object
- Object
- CrowdPay::Verification
- Includes:
- ActiveModel::AttributeMethods, ActiveModel::Validations, CrowdPay
- Defined in:
- lib/crowd_pay/verification.rb
Constant Summary
Constants included from CrowdPay
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#birthDay ⇒ Object
Returns the value of attribute birthDay.
-
#birthMonth ⇒ Object
Returns the value of attribute birthMonth.
-
#birthYear ⇒ Object
Returns the value of attribute birthYear.
-
#city ⇒ Object
Returns the value of attribute city.
-
#created_by_ip_address ⇒ Object
Returns the value of attribute created_by_ip_address.
-
#firstName ⇒ Object
Returns the value of attribute firstName.
-
#id ⇒ Object
Returns the value of attribute id.
-
#key ⇒ Object
Returns the value of attribute key.
-
#lastName ⇒ Object
Returns the value of attribute lastName.
-
#message ⇒ Object
Returns the value of attribute message.
-
#qualifiers ⇒ Object
Returns the value of attribute qualifiers.
-
#questions ⇒ Object
Returns the value of attribute questions.
-
#request_data ⇒ Object
Returns the value of attribute request_data.
-
#response_body ⇒ Object
Returns the value of attribute response_body.
-
#state ⇒ Object
Returns the value of attribute state.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#taxpayerId ⇒ Object
Returns the value of attribute taxpayerId.
-
#zip ⇒ Object
Returns the value of attribute zip.
Class Method Summary collapse
Instance Method Summary collapse
Methods included from CrowdPay
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def address @address end |
#birthDay ⇒ Object
Returns the value of attribute birthDay.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def birthDay @birthDay end |
#birthMonth ⇒ Object
Returns the value of attribute birthMonth.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def birthMonth @birthMonth end |
#birthYear ⇒ Object
Returns the value of attribute birthYear.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def birthYear @birthYear end |
#city ⇒ Object
Returns the value of attribute city.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def city @city end |
#created_by_ip_address ⇒ Object
Returns the value of attribute created_by_ip_address.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def created_by_ip_address @created_by_ip_address end |
#firstName ⇒ Object
Returns the value of attribute firstName.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def firstName @firstName end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def id @id end |
#key ⇒ Object
Returns the value of attribute key.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def key @key end |
#lastName ⇒ Object
Returns the value of attribute lastName.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def lastName @lastName end |
#message ⇒ Object
Returns the value of attribute message.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def @message end |
#qualifiers ⇒ Object
Returns the value of attribute qualifiers.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def qualifiers @qualifiers end |
#questions ⇒ Object
Returns the value of attribute questions.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def questions @questions end |
#request_data ⇒ Object
Returns the value of attribute request_data.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def request_data @request_data end |
#response_body ⇒ Object
Returns the value of attribute response_body.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def response_body @response_body end |
#state ⇒ Object
Returns the value of attribute state.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def state @state end |
#summary ⇒ Object
Returns the value of attribute summary.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def summary @summary end |
#taxpayerId ⇒ Object
Returns the value of attribute taxpayerId.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def taxpayerId @taxpayerId end |
#zip ⇒ Object
Returns the value of attribute zip.
7 8 9 |
# File 'lib/crowd_pay/verification.rb', line 7 def zip @zip end |
Class Method Details
.verify(data, bypass_validation) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/crowd_pay/verification.rb', line 12 def self.verify(data, bypass_validation) url = 'identification/api/v1/ops/verify-identity' response = post(url, data, bypass_validation) obj = parse(response) obj.response_body = response.body obj.request_data = data.to_s obj end |
.verify_answers(data) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/crowd_pay/verification.rb', line 21 def self.verify_answers(data) url = 'identification/api/v1/ops/verify-answers' response = post(url, data) obj = parse(response) obj.response_body = response.body obj.request_data = data.to_s obj end |
Instance Method Details
#fail? ⇒ Boolean
34 35 36 |
# File 'lib/crowd_pay/verification.rb', line 34 def fail? !pass? end |
#pass? ⇒ Boolean
30 31 32 |
# File 'lib/crowd_pay/verification.rb', line 30 def pass? .downcase == 'pass' || summary.try(:downcase) == 'pass' end |
#soft_fail? ⇒ Boolean
38 39 40 |
# File 'lib/crowd_pay/verification.rb', line 38 def soft_fail? !questions.nil? end |