Class: TicketAbstractorClient::Base::Client

Inherits:
Object
  • Object
show all
Includes:
ResponseHandler
Defined in:
lib/ticket_abstractor_client/base/client.rb

Direct Known Subclasses

Jira::Client, ServiceNow::Client

Constant Summary collapse

TA_RESPONSE_TIME_HEADERS_LIST =
%i(total_response_time ta_response_time ts_response_time).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ResponseHandler

#with_response_handling

Constructor Details

#initializeClient

Returns a new instance of Client.



10
11
12
13
14
15
16
17
18
19
# File 'lib/ticket_abstractor_client/base/client.rb', line 10

def initialize
  @base_url = TicketAbstractorClient.configuration.ticket_abstractor_url
  @security_token = TicketAbstractorClient.configuration.security_token
  @ssl_options = TicketAbstractorClient.configuration.ssl_options
  @communications_stack = []
  @trace_communications = TicketAbstractorClient.configuration.trace_communications

  raise Errors::ConfigurationError, 'TicketAbstractor url is not given' if @base_url.blank?
  raise Errors::ConfigurationError, 'SecurityToken is not given' if @security_token.blank?
end

Instance Attribute Details

#communications_stackObject (readonly)

Returns the value of attribute communications_stack.



8
9
10
# File 'lib/ticket_abstractor_client/base/client.rb', line 8

def communications_stack
  @communications_stack
end

#trace_communicationsObject (readonly)

Returns the value of attribute trace_communications.



8
9
10
# File 'lib/ticket_abstractor_client/base/client.rb', line 8

def trace_communications
  @trace_communications
end