Class: KaChing::ApiV1::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ka_ching/api_v1/client.rb

Overview

The client class is the main entry point for the KaChing API V1.

Instance Method Summary collapse

Constructor Details

#initialize(conn:, base_url:) ⇒ Client

Returns a new instance of Client.



9
10
11
12
13
# File 'lib/ka_ching/api_v1/client.rb', line 9

def initialize(conn:, base_url:)
  @conn = conn
  @base_url = base_url
  @api_url = '/ka-ching/api/v1'
end

Instance Method Details

#adminKaChing::ApiV1::Admin

The admin endpoint interface for the KaChing API V1

Returns:



20
21
22
# File 'lib/ka_ching/api_v1/client.rb', line 20

def admin
  @_admin ||= KaChing::ApiV1::Admin.new(conn: @conn, api_url: @api_url)
end

#audit_logsKaChing::ApiV1::AuditLogs

The audit_logs endpoint interface for the KaChing API V1

Returns:



65
66
67
# File 'lib/ka_ching/api_v1/client.rb', line 65

def audit_logs
  @_audit_logs ||= KaChing::ApiV1::AuditLogs.new(conn: @conn, api_url: @api_url)
end

#bookingsKaChing::ApiV1::Bookings

The booking endpoint interface for the KaChing API V1

Returns:



47
48
49
# File 'lib/ka_ching/api_v1/client.rb', line 47

def bookings
  @_bookings ||= KaChing::ApiV1::Bookings.new(conn: @conn, api_url: @api_url)
end

#lockingsKaChing::ApiV1::Lockings

The lockings endpoint interface for the KaChing API V1

Returns:



56
57
58
# File 'lib/ka_ching/api_v1/client.rb', line 56

def lockings
  @_lockings ||= KaChing::ApiV1::Lockings.new(conn: @conn, api_url: @api_url)
end

#saldoKaChing::ApiV1::Saldo

The saldo endpoint interface for the KaChing API V1

Returns:



38
39
40
# File 'lib/ka_ching/api_v1/client.rb', line 38

def saldo
  @_saldo ||= KaChing::ApiV1::Saldo.new(conn: @conn, api_url: @api_url)
end

#tenantsKaChing::ApiV1::Tenants

The tenants endpoint interface for the KaChing API V1

Returns:



29
30
31
# File 'lib/ka_ching/api_v1/client.rb', line 29

def tenants
  @_tenants ||= KaChing::ApiV1::Tenants.new(conn: @conn, api_url: @api_url)
end