Sha256: 21acccc17415c40623bfab1ba266932fd1f82c9d572beaca7be438c971c89dab
Contents?: true
Size: 930 Bytes
Versions: 2
Compression:
Stored size: 930 Bytes
Contents
module Payoneer class Configuration attr_reader :partner_id, :username, :api_password, :auto_approve_sandbox_accounts def initialize(partner_id:, username:, api_password:, environment: 'development', auto_approve_sandbox_accounts: true) @partner_id = partner_id @username = username @api_password = api_password @host = 'api.sandbox.payoneer.com' if environment != 'production' @auto_approve_sandbox_accounts = auto_approve_sandbox_accounts && environment != 'production' end def protocol @protocol || 'https' end def host @host || 'api.payoneer.com' end def xml_base_uri @xml_base_uri || "#{protocol}://#{host}/Payouts/HttpApi/API.aspx" end def json_base_uri @json_base_uri || "#{protocol}://#{host}/v2/programs/#{@partner_id}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
payoneer-client-0.4.1 | lib/payoneer/configuration.rb |
payoneer-client-0.4 | lib/payoneer/configuration.rb |