Class: Conjur::API

Inherits:
Object
  • Object
show all
Defined in:
lib/conjur/trial-factory-api.rb,
lib/conjur/api/trial_factories.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.trial_factory_asset_hostObject



37
38
39
# File 'lib/conjur/trial-factory-api.rb', line 37

def trial_factory_asset_host
  Conjur.configuration.trial_factory_url
end

Instance Method Details

#create_trial(account, email, options = {}) ⇒ Object

Creates a new trial



40
41
42
43
44
45
46
# File 'lib/conjur/api/trial_factories.rb', line 40

def create_trial , email, options = {}
  resp = trial_factory_resource.post({
    account: ,
    email: email
  }.merge(options.slice(:imageid)))
  build_trial resp
end

#trial(account, options = {}) ⇒ Object

Show a specific trial



34
35
36
37
# File 'lib/conjur/api/trial_factories.rb', line 34

def trial , options = {}
  resource = trial_factory_resource()
  build_trial resource.get(params: options)
end

#trialsObject

List all trials



27
28
29
30
31
# File 'lib/conjur/api/trial_factories.rb', line 27

def trials
  JSON.parse(trial_factory_resource.get).map do |resp|
    build_trial resp
  end
end