Class: PriorityPayoutGateway::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/priority_payout_gateway/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject

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

#codeObject

Returns the value of attribute code.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def code
  @code
end

#customer_vault_idObject

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

#customersObject

Returns the value of attribute customers.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def customers
  @customers
end

#orderidObject

Returns the value of attribute orderid.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def orderid
  @orderid
end

#plan_amountObject

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_idObject

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

#responseObject

Returns the value of attribute response.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def response
  @response
end

#response_messageObject

Returns the value of attribute response_message.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def response_message
  @response_message
end

#response_textObject

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_idObject

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

#successObject

Returns the value of attribute success.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def success
  @success
end

#transactionidObject

Returns the value of attribute transactionid.


4
5
6
# File 'lib/priority_payout_gateway/response.rb', line 4

def transactionid
  @transactionid
end

#transactionsObject

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

Returns:

  • (Boolean)

19
20
21
# File 'lib/priority_payout_gateway/response.rb', line 19

def success?
  !!success
end