class Payoneer::Configuration
Attributes
api_password[R]
auto_approve_sandbox_accounts[R]
http_client_options[R]
partner_id[R]
username[R]
Public Class Methods
new(partner_id:, username:, api_password:, environment: 'development', protocol: 'https', host: nil, http_client_options: {}, auto_approve_sandbox_accounts: true)
click to toggle source
# File lib/payoneer/configuration.rb, line 5 def initialize(partner_id:, username:, api_password:, environment: 'development', protocol: 'https', host: nil, http_client_options: {}, auto_approve_sandbox_accounts: true) @partner_id = partner_id @username = username @api_password = api_password @environment = environment @protocol = protocol @host = host || default_host @http_client_options = http_client_options @auto_approve_sandbox_accounts = auto_approve_sandbox_accounts && environment != 'production' end
Public Instance Methods
json_base_uri()
click to toggle source
# File lib/payoneer/configuration.rb, line 22 def json_base_uri "#{@protocol}://#{@host}/v2/programs/#{@partner_id}" end
xml_base_uri()
click to toggle source
# File lib/payoneer/configuration.rb, line 18 def xml_base_uri "#{@protocol}://#{@host}/Payouts/HttpApi/API.aspx" end
Private Instance Methods
default_host()
click to toggle source
# File lib/payoneer/configuration.rb, line 28 def default_host if @environment == 'production' 'api.payoneer.com' else 'api.sandbox.payoneer.com' end end