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.



17
18
19
20
21
22
23
# File 'lib/tesote_sdk/v2/client.rb', line 17

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.



15
16
17
# File 'lib/tesote_sdk/v2/client.rb', line 15

def transport
  @transport
end

Instance Method Details

#accountsObject



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

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

#batchesObject



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

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

#last_rate_limitObject



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

def last_rate_limit
  transport.last_rate_limit
end

#last_request_idObject



57
58
59
# File 'lib/tesote_sdk/v2/client.rb', line 57

def last_request_id
  transport.last_request_id
end

#payment_methodsObject



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

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

#statusObject



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

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

#sync_sessionsObject



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

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

#transaction_ordersObject



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

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

#transactionsObject



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

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