Class: Cielo::API30::Environment

Inherits:
Object
  • Object
show all
Defined in:
lib/cielo/api30/environment.rb

Overview

API Environment URLs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#apiString

API URL

Returns:

  • (String)

    the current value of api



7
8
9
# File 'lib/cielo/api30/environment.rb', line 7

def api
  @api
end

#api_queryObject

Returns the value of attribute api_query.



8
9
10
# File 'lib/cielo/api30/environment.rb', line 8

def api_query
  @api_query
end

#apiQueryString

API Query URL

Returns:

  • (String)

    the current value of apiQuery



7
8
9
# File 'lib/cielo/api30/environment.rb', line 7

def apiQuery
  @apiQuery
end

Class Method Details

.productionEnvironment

The production environment

Returns:

  • (Environment)

    a configured Environment for production



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

.sandboxEnvironment

The sandbox environment

Returns:

  • (Environment)

    a configured Environment for testing



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