Class: Cielo::API30::Environment
- Inherits:
-
Object
- Object
- Cielo::API30::Environment
- Defined in:
- lib/cielo/api30/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.
11 12 13 14 |
# File 'lib/cielo/api30/environment.rb', line 11 def initialize(api, api_query) @api = api @api_query = api_query end |
Instance Attribute Details
#api ⇒ String
API URL
7 8 9 |
# File 'lib/cielo/api30/environment.rb', line 7 def api @api end |
#api_query ⇒ Object
Returns the value of attribute api_query.
8 9 10 |
# File 'lib/cielo/api30/environment.rb', line 8 def api_query @api_query end |
#apiQuery ⇒ String
API Query URL
7 8 9 |
# File 'lib/cielo/api30/environment.rb', line 7 def apiQuery @apiQuery end |
Class Method Details
.production ⇒ Environment
The production environment
19 20 21 |
# File 'lib/cielo/api30/environment.rb', line 19 def self.production new("https://api.cieloecommerce.cielo.com.br/", "https://apiquery.cieloecommerce.cielo.com.br/") end |
.sandbox ⇒ Environment
The sandbox environment
26 27 28 |
# File 'lib/cielo/api30/environment.rb', line 26 def self.sandbox new("https://apisandbox.cieloecommerce.cielo.com.br/", "https://apiquerysandbox.cieloecommerce.cielo.com.br/") end |