Class: VirtualMerchant::Response
- Inherits:
-
Object
- Object
- VirtualMerchant::Response
- Defined in:
- lib/virtual_merchant/response.rb
Instance Attribute Summary collapse
-
#approval_code ⇒ Object
Returns the value of attribute approval_code.
-
#approved ⇒ Object
(also: #approved?)
Returns the value of attribute approved.
-
#billing_cycle ⇒ Object
Returns the value of attribute billing_cycle.
-
#blurred_card_number ⇒ Object
Returns the value of attribute blurred_card_number.
-
#cvv2_response ⇒ Object
Returns the value of attribute cvv2_response.
-
#error ⇒ Object
Returns the value of attribute error.
-
#exp_date ⇒ Object
Returns the value of attribute exp_date.
-
#next_payment_date ⇒ Object
Returns the value of attribute next_payment_date.
-
#recurring_batch_count ⇒ Object
Returns the value of attribute recurring_batch_count.
-
#recurring_id ⇒ Object
Returns the value of attribute recurring_id.
-
#result ⇒ Object
Returns the value of attribute result.
-
#result_message ⇒ Object
Returns the value of attribute result_message.
-
#skip_payment ⇒ Object
Returns the value of attribute skip_payment.
-
#start_payment_date ⇒ Object
Returns the value of attribute start_payment_date.
-
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
-
#transaction_time ⇒ Object
Returns the value of attribute transaction_time.
-
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
11 12 13 14 15 16 17 |
# File 'lib/virtual_merchant/response.rb', line 11 def initialize(data) if data[:type] == :invalid_credit_card bad_card_error(data[:errors]) else read_xml(data[:xml_string]) end end |
Instance Attribute Details
#approval_code ⇒ Object
Returns the value of attribute approval_code.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def approval_code @approval_code end |
#approved ⇒ Object Also known as: approved?
Returns the value of attribute approved.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def approved @approved end |
#billing_cycle ⇒ Object
Returns the value of attribute billing_cycle.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def billing_cycle @billing_cycle end |
#blurred_card_number ⇒ Object
Returns the value of attribute blurred_card_number.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def @blurred_card_number end |
#cvv2_response ⇒ Object
Returns the value of attribute cvv2_response.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def cvv2_response @cvv2_response end |
#error ⇒ Object
Returns the value of attribute error.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def error @error end |
#exp_date ⇒ Object
Returns the value of attribute exp_date.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def exp_date @exp_date end |
#next_payment_date ⇒ Object
Returns the value of attribute next_payment_date.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def next_payment_date @next_payment_date end |
#recurring_batch_count ⇒ Object
Returns the value of attribute recurring_batch_count.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def recurring_batch_count @recurring_batch_count end |
#recurring_id ⇒ Object
Returns the value of attribute recurring_id.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def recurring_id @recurring_id end |
#result ⇒ Object
Returns the value of attribute result.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def result @result end |
#result_message ⇒ Object
Returns the value of attribute result_message.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def @result_message end |
#skip_payment ⇒ Object
Returns the value of attribute skip_payment.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def skip_payment @skip_payment end |
#start_payment_date ⇒ Object
Returns the value of attribute start_payment_date.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def start_payment_date @start_payment_date end |
#transaction_id ⇒ Object
Returns the value of attribute transaction_id.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def transaction_id @transaction_id end |
#transaction_time ⇒ Object
Returns the value of attribute transaction_time.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def transaction_time @transaction_time end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
4 5 6 |
# File 'lib/virtual_merchant/response.rb', line 4 def transaction_type @transaction_type end |