Class: RocketGate::Authorization
- Inherits:
-
Object
- Object
- RocketGate::Authorization
- Defined in:
- lib/rocketgate/authorization.rb
Instance Attribute Summary collapse
-
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
-
#approved_currency ⇒ Object
Returns the value of attribute approved_currency.
-
#auth_code ⇒ Object
Returns the value of attribute auth_code.
-
#avs_response ⇒ Object
Returns the value of attribute avs_response.
-
#card_country ⇒ Object
Returns the value of attribute card_country.
-
#card_description ⇒ Object
Returns the value of attribute card_description.
-
#card_expiration ⇒ Object
Returns the value of attribute card_expiration.
-
#card_hash ⇒ Object
Returns the value of attribute card_hash.
-
#card_last_four ⇒ Object
Returns the value of attribute card_last_four.
-
#card_type ⇒ Object
Returns the value of attribute card_type.
-
#customer_id ⇒ Object
Returns the value of attribute customer_id.
-
#cvv_response ⇒ Object
Returns the value of attribute cvv_response.
-
#issuer_name ⇒ Object
Returns the value of attribute issuer_name.
-
#issuer_network ⇒ Object
Returns the value of attribute issuer_network.
-
#issuer_phone ⇒ Object
Returns the value of attribute issuer_phone.
-
#issuer_url ⇒ Object
Returns the value of attribute issuer_url.
-
#reason_code ⇒ Object
Returns the value of attribute reason_code.
-
#reference_id ⇒ Object
Returns the value of attribute reference_id.
Instance Method Summary collapse
Instance Attribute Details
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def approved_amount @approved_amount end |
#approved_currency ⇒ Object
Returns the value of attribute approved_currency.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def approved_currency @approved_currency end |
#auth_code ⇒ Object
Returns the value of attribute auth_code.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def auth_code @auth_code end |
#avs_response ⇒ Object
Returns the value of attribute avs_response.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def avs_response @avs_response end |
#card_country ⇒ Object
Returns the value of attribute card_country.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_country @card_country end |
#card_description ⇒ Object
Returns the value of attribute card_description.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_description @card_description end |
#card_expiration ⇒ Object
Returns the value of attribute card_expiration.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_expiration @card_expiration end |
#card_hash ⇒ Object
Returns the value of attribute card_hash.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_hash @card_hash end |
#card_last_four ⇒ Object
Returns the value of attribute card_last_four.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_last_four @card_last_four end |
#card_type ⇒ Object
Returns the value of attribute card_type.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def card_type @card_type end |
#customer_id ⇒ Object
Returns the value of attribute customer_id.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def customer_id @customer_id end |
#cvv_response ⇒ Object
Returns the value of attribute cvv_response.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def cvv_response @cvv_response end |
#issuer_name ⇒ Object
Returns the value of attribute issuer_name.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def issuer_name @issuer_name end |
#issuer_network ⇒ Object
Returns the value of attribute issuer_network.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def issuer_network @issuer_network end |
#issuer_phone ⇒ Object
Returns the value of attribute issuer_phone.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def issuer_phone @issuer_phone end |
#issuer_url ⇒ Object
Returns the value of attribute issuer_url.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def issuer_url @issuer_url end |
#reason_code ⇒ Object
Returns the value of attribute reason_code.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def reason_code @reason_code end |
#reference_id ⇒ Object
Returns the value of attribute reference_id.
3 4 5 |
# File 'lib/rocketgate/authorization.rb', line 3 def reference_id @reference_id end |
Instance Method Details
#avs_ok? ⇒ Boolean
9 10 11 12 13 14 15 |
# File 'lib/rocketgate/authorization.rb', line 9 def avs_ok? if RocketGate.configuration.require_avs RocketGate::ResponseCode::AVS_SUCCESSES.include?(avs_response) else true end end |
#cvv_ok? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/rocketgate/authorization.rb', line 17 def cvv_ok? if RocketGate.configuration.require_cvv RocketGate::ResponseCode::CVV_SUCCESSES.include?(cvv_response) else true end end |
#declined? ⇒ Boolean
25 26 27 |
# File 'lib/rocketgate/authorization.rb', line 25 def declined? !success? end |
#success? ⇒ Boolean
29 30 31 |
# File 'lib/rocketgate/authorization.rb', line 29 def success? avs_ok? && cvv_ok? && reason_code == :success end |