Class: Braspag::Environment
- Inherits:
-
Object
- Object
- Braspag::Environment
- Defined in:
- lib/braspag/environment.rb
Overview
API Environment URLs
Instance Attribute Summary collapse
-
#api ⇒ String
API URL.
-
#api_query ⇒ Object
Returns the value of attribute api_query.
-
#apiQuery ⇒ String
API Query URL.
Class Method Summary collapse
-
.production ⇒ Environment
The production environment.
-
.sandbox ⇒ Environment
The sandbox environment.
Instance Method Summary collapse
-
#initialize(api, api_query) ⇒ Environment
constructor
A new instance of Environment.
Constructor Details
#initialize(api, api_query) ⇒ Environment
Returns a new instance of Environment.
10 11 12 13 |
# File 'lib/braspag/environment.rb', line 10 def initialize(api, api_query) @api = api @api_query = api_query end |
Instance Attribute Details
#api ⇒ String
API URL
6 7 8 |
# File 'lib/braspag/environment.rb', line 6 def api @api end |
#api_query ⇒ Object
Returns the value of attribute api_query.
7 8 9 |
# File 'lib/braspag/environment.rb', line 7 def api_query @api_query end |
#apiQuery ⇒ String
API Query URL
6 7 8 |
# File 'lib/braspag/environment.rb', line 6 def apiQuery @apiQuery end |
Class Method Details
.production ⇒ Environment
The production environment
18 19 20 21 |
# File 'lib/braspag/environment.rb', line 18 def self.production() return Environment.new("https://api.braspag.com.br/", "https://apiquery.braspag.com.br/") end |
.sandbox ⇒ Environment
The sandbox environment
26 27 28 29 |
# File 'lib/braspag/environment.rb', line 26 def self.sandbox() return Environment.new("https://apisandbox.braspag.com.br/", "https://apiquerysandbox.braspag.com.br/") end |