Class: Trizetto::Api::WebService

Inherits:
Object
  • Object
show all
Defined in:
lib/trizetto/api/web_service.rb

Overview

Base class for WebService API requests

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ WebService

:nodoc:



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/trizetto/api/web_service.rb', line 8

def initialize(options = {})
  @client = Savon.client({
    # SOAP Version 1 sends the wrong content type header and you get back a 415 response
    soap_version: 2,

    soap_header: { "tns:AuthSOAPHeader": {
      "tns:User":     Trizetto::Api.configuration.username,
      "tns:Password": Trizetto::Api.configuration.password
    }},

    # API maybe case sensitive - im not sure
    convert_request_keys_to: :none,

    # Lots of PHI, so lets not log anything
    log: false,
  }.merge(options))
end