Class: TesoteSdk::V2::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/tesote_sdk/v2/client.rb

Constant Summary collapse

VERSION_SEGMENT =
'v2'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key:, **transport_options) ⇒ Client

Returns a new instance of Client.



12
13
14
15
16
17
18
# File 'lib/tesote_sdk/v2/client.rb', line 12

def initialize(api_key:, **transport_options)
  @transport = Transport.new(
    api_key: api_key,
    version_segment: VERSION_SEGMENT,
    **transport_options
  )
end

Instance Attribute Details

#transportObject (readonly)

Returns the value of attribute transport.



10
11
12
# File 'lib/tesote_sdk/v2/client.rb', line 10

def transport
  @transport
end

Instance Method Details

#accountsObject



20
21
22
# File 'lib/tesote_sdk/v2/client.rb', line 20

def accounts
  @accounts ||= Accounts.new(transport)
end

#batchesObject



36
37
38
# File 'lib/tesote_sdk/v2/client.rb', line 36

def batches
  @batches ||= Batches.new(transport)
end

#last_rate_limitObject



48
49
50
# File 'lib/tesote_sdk/v2/client.rb', line 48

def last_rate_limit
  transport.last_rate_limit
end

#last_request_idObject



52
53
54
# File 'lib/tesote_sdk/v2/client.rb', line 52

def last_request_id
  transport.last_request_id
end

#payment_methodsObject



40
41
42
# File 'lib/tesote_sdk/v2/client.rb', line 40

def payment_methods
  @payment_methods ||= PaymentMethods.new(transport)
end

#statusObject



44
45
46
# File 'lib/tesote_sdk/v2/client.rb', line 44

def status
  @status ||= Status.new(transport)
end

#sync_sessionsObject



28
29
30
# File 'lib/tesote_sdk/v2/client.rb', line 28

def sync_sessions
  @sync_sessions ||= SyncSessions.new(transport)
end

#transaction_ordersObject



32
33
34
# File 'lib/tesote_sdk/v2/client.rb', line 32

def transaction_orders
  @transaction_orders ||= TransactionOrders.new(transport)
end

#transactionsObject



24
25
26
# File 'lib/tesote_sdk/v2/client.rb', line 24

def transactions
  @transactions ||= Transactions.new(transport)
end