Module: EY::ServicesAPI
- Defined in:
- lib/ey_services_api.rb,
lib/ey_services_api/invoice.rb,
lib/ey_services_api/message.rb,
lib/ey_services_api/service.rb,
lib/ey_services_api/version.rb,
lib/ey_services_api/connection.rb,
lib/ey_services_api/integration.rb,
lib/ey_services_api/integration/server.rb,
lib/ey_services_api/external_test_helper.rb,
lib/ey_services_api/service_account_creation.rb,
lib/ey_services_api/service_account_response.rb,
lib/ey_services_api/provisioned_service_creation.rb,
lib/ey_services_api/provisioned_service_response.rb
Defined Under Namespace
Modules: ExternalTestHelper
Classes: Connection, Integration, Invoice, Message, ProvisionedServiceCreation, ProvisionedServiceResponse, Service, ServiceAccountCreation, ServiceAccountResponse
Constant Summary
collapse
- VERSION =
"0.3.20"
Class Method Summary
collapse
Class Method Details
.connection ⇒ Object
25
26
27
|
# File 'lib/ey_services_api.rb', line 25
def self.connection
@connection or raise "Not setup!"
end
|
.enable_mock!(service_provider, tresfiestas = nil, awsm = nil) ⇒ Object
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/ey_services_api.rb', line 29
def self.enable_mock!(service_provider, tresfiestas = nil, awsm = nil)
unless @mock_backend
require "ey_services_fake/mock_backend"
@mock_backend = EyServicesFake::MockBackend.setup!(
:awsm => awsm,
:tresfiestas => tresfiestas,
:service_provider => service_provider)
end
@mock_backend.reset!
end
|
.mock_backend ⇒ Object
41
42
43
|
# File 'lib/ey_services_api.rb', line 41
def self.mock_backend
@mock_backend
end
|
.setup!(opts) ⇒ Object
17
18
19
|
# File 'lib/ey_services_api.rb', line 17
def self.setup!(opts)
@connection = Connection.new(opts[:auth_id], opts[:auth_key])
end
|
.setup? ⇒ Boolean
21
22
23
|
# File 'lib/ey_services_api.rb', line 21
def self.setup?
@connection
end
|