Class: PriorityPayoutGateway::Response
- Inherits:
-
Object
- Object
- PriorityPayoutGateway::Response
- Defined in:
- lib/priority_payout_gateway/response.rb
Instance Attribute Summary collapse
-
#api_type ⇒ Object
Returns the value of attribute api_type.
-
#code ⇒ Object
Returns the value of attribute code.
-
#customer_vault_id ⇒ Object
Returns the value of attribute customer_vault_id.
-
#customers ⇒ Object
Returns the value of attribute customers.
-
#orderid ⇒ Object
Returns the value of attribute orderid.
-
#plan_amount ⇒ Object
Returns the value of attribute plan_amount.
-
#plan_id ⇒ Object
Returns the value of attribute plan_id.
-
#response ⇒ Object
Returns the value of attribute response.
-
#response_message ⇒ Object
Returns the value of attribute response_message.
-
#response_text ⇒ Object
Returns the value of attribute response_text.
-
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
-
#success ⇒ Object
Returns the value of attribute success.
-
#transactionid ⇒ Object
Returns the value of attribute transactionid.
-
#transactions ⇒ Object
Returns the value of attribute transactions.
Instance Method Summary collapse
-
#initialize(response, api_type) ⇒ Response
constructor
A new instance of Response.
- #set_ ⇒ Object
- #success? ⇒ Boolean
Constructor Details
#initialize(response, api_type) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 11 12 |
# File 'lib/priority_payout_gateway/response.rb', line 6 def initialize(response, api_type) @response = response @code = response.code @api_type = api_type @success = response.success? send "set_#{api_type}" end |
Instance Attribute Details
#api_type ⇒ Object
Returns the value of attribute api_type.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def api_type @api_type end |
#code ⇒ Object
Returns the value of attribute code.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def code @code end |
#customer_vault_id ⇒ Object
Returns the value of attribute customer_vault_id.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def customer_vault_id @customer_vault_id end |
#customers ⇒ Object
Returns the value of attribute customers.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def customers @customers end |
#orderid ⇒ Object
Returns the value of attribute orderid.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def orderid @orderid end |
#plan_amount ⇒ Object
Returns the value of attribute plan_amount.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def plan_amount @plan_amount end |
#plan_id ⇒ Object
Returns the value of attribute plan_id.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def plan_id @plan_id end |
#response ⇒ Object
Returns the value of attribute response.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def response @response end |
#response_message ⇒ Object
Returns the value of attribute response_message.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def end |
#response_text ⇒ Object
Returns the value of attribute response_text.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def response_text @response_text end |
#subscription_id ⇒ Object
Returns the value of attribute subscription_id.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def subscription_id @subscription_id end |
#success ⇒ Object
Returns the value of attribute success.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def success @success end |
#transactionid ⇒ Object
Returns the value of attribute transactionid.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def transactionid @transactionid end |
#transactions ⇒ Object
Returns the value of attribute transactions.
4 5 6 |
# File 'lib/priority_payout_gateway/response.rb', line 4 def transactions @transactions end |
Instance Method Details
#set_ ⇒ Object
14 15 16 17 |
# File 'lib/priority_payout_gateway/response.rb', line 14 def set_ parsed_response binding.pry end |
#success? ⇒ Boolean
19 20 21 |
# File 'lib/priority_payout_gateway/response.rb', line 19 def success? !!success end |