Module: FreshService

Extended by:
Configurable
Defined in:
lib/fresh_service.rb,
lib/fresh_service/error.rb,
lib/fresh_service/client.rb,
lib/fresh_service/default.rb,
lib/fresh_service/version.rb,
lib/fresh_service/connection.rb,
lib/fresh_service/configurable.rb,
lib/fresh_service/client/v2/group/view.rb,
lib/fresh_service/client/v2/ticket/view.rb,
lib/fresh_service/client/v2/group/create.rb,
lib/fresh_service/client/v2/ticket/create.rb,
lib/fresh_service/client/v2/ticket/update.rb,
lib/fresh_service/client/v2/service_request/create.rb,
lib/fresh_service/client/v2/service_request/update.rb

Overview

Network layer for API clients.

Defined Under Namespace

Modules: Configurable, Connection, Default Classes: Client, Error

Constant Summary collapse

MAJOR =

Current major release.

Returns:

  • (Integer)
1
MINOR =

Current minor release.

Returns:

  • (Integer)
0
PATCH =

Current patch level.

Returns:

  • (Integer)
2
VERSION =

Full release version.

Returns:

  • (String)
[MAJOR, MINOR, PATCH].join(".").freeze

Instance Attribute Summary

Attributes included from Configurable

#api_endpoint, #api_key, #content_type, #env, #organisation, #user_agent

Class Method Summary collapse

Methods included from Configurable

configure, keys, reset!, same_options?

Class Method Details

.clientFreshService::Client

API client based on configured options Configurable

Returns:



14
15
16
17
18
# File 'lib/fresh_service.rb', line 14

def client
  return @client if defined?(@client) && @client.same_options?(options)

  @client = FreshService::Client.new(options)
end