Class: Payoneer::Configuration
- Inherits:
-
Object
- Object
- Payoneer::Configuration
- Defined in:
- lib/payoneer/configuration.rb
Instance Attribute Summary collapse
-
#api_password ⇒ Object
readonly
Returns the value of attribute api_password.
-
#auto_approve_sandbox_accounts ⇒ Object
readonly
Returns the value of attribute auto_approve_sandbox_accounts.
-
#http_client_options ⇒ Object
readonly
Returns the value of attribute http_client_options.
-
#partner_id ⇒ Object
readonly
Returns the value of attribute partner_id.
-
#username ⇒ Object
readonly
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize(partner_id:, username:, api_password:, environment: 'development', protocol: 'https', host: nil, http_client_options: {}, auto_approve_sandbox_accounts: true) ⇒ Configuration
constructor
A new instance of Configuration.
- #json_base_uri ⇒ Object
- #xml_base_uri ⇒ Object
Constructor Details
#initialize(partner_id:, username:, api_password:, environment: 'development', protocol: 'https', host: nil, http_client_options: {}, auto_approve_sandbox_accounts: true) ⇒ Configuration
Returns a new instance of Configuration.
5 6 7 8 9 10 11 12 13 14 15 16 |
# 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 = @auto_approve_sandbox_accounts = auto_approve_sandbox_accounts && environment != 'production' end |
Instance Attribute Details
#api_password ⇒ Object (readonly)
Returns the value of attribute api_password.
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def api_password @api_password end |
#auto_approve_sandbox_accounts ⇒ Object (readonly)
Returns the value of attribute auto_approve_sandbox_accounts.
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def auto_approve_sandbox_accounts @auto_approve_sandbox_accounts end |
#http_client_options ⇒ Object (readonly)
Returns the value of attribute http_client_options.
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def @http_client_options end |
#partner_id ⇒ Object (readonly)
Returns the value of attribute partner_id.
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def partner_id @partner_id end |
#username ⇒ Object (readonly)
Returns the value of attribute username.
3 4 5 |
# File 'lib/payoneer/configuration.rb', line 3 def username @username end |
Instance Method Details
#json_base_uri ⇒ Object
22 23 24 |
# File 'lib/payoneer/configuration.rb', line 22 def json_base_uri "#{@protocol}://#{@host}/v2/programs/#{@partner_id}" end |
#xml_base_uri ⇒ Object
18 19 20 |
# File 'lib/payoneer/configuration.rb', line 18 def xml_base_uri "#{@protocol}://#{@host}/Payouts/HttpApi/API.aspx" end |