Class: Gibft::Service

Inherits:
Salesforce::Service show all
Defined in:
lib/gibft/service.rb

Constant Summary collapse

CONSUMER_KEY =
Settings['salesforce-gibft'].consumer_key
SIGNING_KEY_PATH =
Settings['salesforce-gibft'].signing_key_path
SALESFORCE_USERNAMES =
{
  'prod' => '[email protected]',
  'reg' => '[email protected]',
  'dev' => '[email protected]'
}.freeze
SALESFORCE_USERNAME =
SALESFORCE_USERNAMES[Settings['salesforce-gibft'].env]
STATSD_KEY_PREFIX =
'api.gibft'

Constants inherited from Salesforce::Service

Salesforce::Service::SALESFORCE_HOST

Instance Method Summary collapse

Methods inherited from Salesforce::Service

#claim_set, #get_client, #get_oauth_token, #jwt_bearer_token, #oauth_params, #private_key

Methods included from Common::Client::Concerns::Monitoring

#with_monitoring

Methods inherited from Common::Client::Base

configuration, #raise_backend_exception

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger

Instance Method Details

#submit(form) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'lib/gibft/service.rb', line 20

def submit(form)
  client = get_client
  response_body = with_monitoring do
    client.post('/services/apexrest/educationcomplaint', form).body
  end
  Raven.extra_context(submit_response_body: response_body)

  response_body.slice('case_id', 'case_number')
end