Class: PayoneerApi::Client
- Inherits:
-
Object
- Object
- PayoneerApi::Client
- Defined in:
- lib/payoneer_api/client.rb
Constant Summary collapse
- SANDBOX_API_URL =
'https://api.sandbox.payoneer.com/Payouts/HttpApi/API.aspx?'- PRODUCTION_API_URL =
'https://api.payoneer.com/payouts/HttpAPI/API.aspx?'- API_PORT =
'443'
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
- #payee_prefilled_signup_url(member_name, attributes = {}) ⇒ Object
- #payee_signup_url(member_name) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
11 12 13 14 15 16 17 18 |
# File 'lib/payoneer_api/client.rb', line 11 def initialize( = {}) @partner_id, @username, @password = [:partner_id], [:username], [:password] @environment = [:environment] if @environment.nil? && defined?(Rails) Rails.env.production? ? 'production' : 'sandbox' end @environment ||= 'sandbox' end |
Class Method Details
.new_payee_link(partner_id, username, password, member_name) ⇒ Object
7 8 9 |
# File 'lib/payoneer_api/client.rb', line 7 def self.new_payee_link(partner_id, username, password, member_name) new(partner_id, username, password).payee_signup_url(member_name) end |
Instance Method Details
#payee_prefilled_signup_url(member_name, attributes = {}) ⇒ Object
25 26 27 28 |
# File 'lib/payoneer_api/client.rb', line 25 def payee_prefilled_signup_url(member_name, attributes = {}) response = post_api_call(payee_prefill_args(attributes.merge(payee_id: member_name))) xml_api_result(response) end |
#payee_signup_url(member_name) ⇒ Object
20 21 22 23 |
# File 'lib/payoneer_api/client.rb', line 20 def payee_signup_url(member_name) response = get_api_call(payee_link_args(payee_id: member_name)) api_result(response) end |