Class: Nordlet::Ledger::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/nordlet/ledger/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ void

Parameters:



9
10
11
# File 'lib/nordlet/ledger/client.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#post_v1ledger_accounts_apply_template(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerAccountsApplyTemplateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/nordlet/ledger/client.rb', line 118

def post_v1ledger_accounts_apply_template(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/accounts/apply-template",
    body: Nordlet::Ledger::Types::PostV1LedgerAccountsApplyTemplateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerAccountsApplyTemplateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_accounts_create(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerAccountsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/nordlet/ledger/client.rb', line 54

def post_v1ledger_accounts_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/accounts/create",
    body: Nordlet::Ledger::Types::PostV1LedgerAccountsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerAccountsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_accounts_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerAccountsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/nordlet/ledger/client.rb', line 22

def post_v1ledger_accounts_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/accounts/list",
    body: Nordlet::Ledger::Types::PostV1LedgerAccountsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerAccountsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_accounts_update(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerAccountsUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/nordlet/ledger/client.rb', line 86

def post_v1ledger_accounts_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/accounts/update",
    body: Nordlet::Ledger::Types::PostV1LedgerAccountsUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerAccountsUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_center_groups_create(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/nordlet/ledger/client.rb', line 374

def post_v1ledger_cost_center_groups_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-center-groups/create",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_center_groups_delete(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsDeleteResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/nordlet/ledger/client.rb', line 438

def post_v1ledger_cost_center_groups_delete(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-center-groups/delete",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsDeleteRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsDeleteResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_center_groups_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
# File 'lib/nordlet/ledger/client.rb', line 470

def post_v1ledger_cost_center_groups_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-center-groups/list",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_center_groups_update(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# File 'lib/nordlet/ledger/client.rb', line 406

def post_v1ledger_cost_center_groups_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-center-groups/update",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCenterGroupsUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_centers_create(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCentersCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/nordlet/ledger/client.rb', line 278

def post_v1ledger_cost_centers_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-centers/create",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCentersCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCentersCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_centers_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCentersListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/nordlet/ledger/client.rb', line 342

def post_v1ledger_cost_centers_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-centers/list",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCentersListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCentersListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_cost_centers_update(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerCostCentersUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# File 'lib/nordlet/ledger/client.rb', line 310

def post_v1ledger_cost_centers_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/cost-centers/update",
    body: Nordlet::Ledger::Types::PostV1LedgerCostCentersUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerCostCentersUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_journal_transactions_create(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/nordlet/ledger/client.rb', line 726

def post_v1ledger_journal_transactions_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/journal/transactions/create",
    body: Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_journal_transactions_get(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsGetResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
# File 'lib/nordlet/ledger/client.rb', line 694

def post_v1ledger_journal_transactions_get(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/journal/transactions/get",
    body: Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsGetRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsGetResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_journal_transactions_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/nordlet/ledger/client.rb', line 246

def post_v1ledger_journal_transactions_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/journal/transactions/list",
    body: Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerJournalTransactionsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_owners_create(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerOwnersCreateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# File 'lib/nordlet/ledger/client.rb', line 566

def post_v1ledger_owners_create(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/owners/create",
    body: Nordlet::Ledger::Types::PostV1LedgerOwnersCreateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerOwnersCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_owners_delete(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerOwnersDeleteResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/nordlet/ledger/client.rb', line 630

def post_v1ledger_owners_delete(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/owners/delete",
    body: Nordlet::Ledger::Types::PostV1LedgerOwnersDeleteRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerOwnersDeleteResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_owners_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerOwnersListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/nordlet/ledger/client.rb', line 662

def post_v1ledger_owners_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/owners/list",
    body: Nordlet::Ledger::Types::PostV1LedgerOwnersListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerOwnersListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_owners_update(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerOwnersUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
# File 'lib/nordlet/ledger/client.rb', line 598

def post_v1ledger_owners_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/owners/update",
    body: Nordlet::Ledger::Types::PostV1LedgerOwnersUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerOwnersUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_periods_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerPeriodsListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/nordlet/ledger/client.rb', line 150

def post_v1ledger_periods_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/periods/list",
    body: Nordlet::Ledger::Types::PostV1LedgerPeriodsListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerPeriodsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_periods_lock(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerPeriodsLockResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/nordlet/ledger/client.rb', line 182

def post_v1ledger_periods_lock(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/periods/lock",
    body: Nordlet::Ledger::Types::PostV1LedgerPeriodsLockRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerPeriodsLockResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_periods_unlock(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerPeriodsUnlockResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/nordlet/ledger/client.rb', line 214

def post_v1ledger_periods_unlock(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/periods/unlock",
    body: Nordlet::Ledger::Types::PostV1LedgerPeriodsUnlockRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerPeriodsUnlockResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_posting_rules_list(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerPostingRulesListResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/nordlet/ledger/client.rb', line 502

def post_v1ledger_posting_rules_list(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/posting-rules/list",
    body: Nordlet::Ledger::Types::PostV1LedgerPostingRulesListRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerPostingRulesListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1ledger_posting_rules_update(request_options: {}, **params) ⇒ Nordlet::Ledger::Types::PostV1LedgerPostingRulesUpdateResponse

Parameters:

Options Hash (request_options:):

  • :base_url (String)
  • :additional_headers (Hash{String => Object})
  • :additional_query_parameters (Hash{String => Object})
  • :additional_body_parameters (Hash{String => Object})
  • :timeout_in_seconds (Integer)

Returns:



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/nordlet/ledger/client.rb', line 534

def post_v1ledger_posting_rules_update(request_options: {}, **params)
  params = Nordlet::Internal::Types::Utils.normalize_keys(params)
  request = Nordlet::Internal::JSON::Request.new(
    base_url: request_options[:base_url],
    method: "POST",
    path: "v1/ledger/posting-rules/update",
    body: Nordlet::Ledger::Types::PostV1LedgerPostingRulesUpdateRequest.new(params).to_h,
    request_options: request_options
  )
  begin
    response = @client.send(request)
  rescue Net::HTTPRequestTimeout
    raise Nordlet::Errors::TimeoutError
  end
  code = response.code.to_i
  if code.between?(200, 299)
    Nordlet::Ledger::Types::PostV1LedgerPostingRulesUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end