Class: Nordlet::Declarations::Client

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

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ void

Parameters:



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

def initialize(client:)
  @client = client
end

Instance Method Details

#post_v1declarations_configs_list(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsConfigsListResponse

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/declarations/client.rb', line 374

def post_v1declarations_configs_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/declarations/configs/list",
    body: Nordlet::Declarations::Types::PostV1DeclarationsConfigsListRequest.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::Declarations::Types::PostV1DeclarationsConfigsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_configs_update(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsConfigsUpdateResponse

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/declarations/client.rb', line 406

def post_v1declarations_configs_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/declarations/configs/update",
    body: Nordlet::Declarations::Types::PostV1DeclarationsConfigsUpdateRequest.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::Declarations::Types::PostV1DeclarationsConfigsUpdateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_eu_ioss_compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsEuIossComputeResponse

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/declarations/client.rb', line 342

def post_v1declarations_eu_ioss_compute(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/declarations/eu/ioss/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsEuIossComputeRequest.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::Declarations::Types::PostV1DeclarationsEuIossComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_eu_oss_compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsEuOssComputeResponse

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/declarations/client.rb', line 310

def post_v1declarations_eu_oss_compute(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/declarations/eu/oss/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsEuOssComputeRequest.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::Declarations::Types::PostV1DeclarationsEuOssComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_fr0600compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtFr0600ComputeResponse

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/declarations/client.rb', line 150

def post_v1declarations_lt_fr0600compute(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/declarations/lt/fr0600/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtFr0600ComputeRequest.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::Declarations::Types::PostV1DeclarationsLtFr0600ComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_gpm313compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtGpm313ComputeResponse

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/declarations/client.rb', line 182

def post_v1declarations_lt_gpm313compute(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/declarations/lt/gpm313/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtGpm313ComputeRequest.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::Declarations::Types::PostV1DeclarationsLtGpm313ComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_intrastat_compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtIntrastatComputeResponse

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/declarations/client.rb', line 22

def post_v1declarations_lt_intrastat_compute(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/declarations/lt/intrastat/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtIntrastatComputeRequest.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::Declarations::Types::PostV1DeclarationsLtIntrastatComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_intrastat_obligation(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtIntrastatObligationResponse

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/declarations/client.rb', line 86

def post_v1declarations_lt_intrastat_obligation(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/declarations/lt/intrastat/obligation",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtIntrastatObligationRequest.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::Declarations::Types::PostV1DeclarationsLtIntrastatObligationResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_isaf_generate(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtIsafGenerateResponse

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/declarations/client.rb', line 118

def post_v1declarations_lt_isaf_generate(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/declarations/lt/isaf/generate",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtIsafGenerateRequest.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::Declarations::Types::PostV1DeclarationsLtIsafGenerateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_ivaz_generate(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtIvazGenerateResponse

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/declarations/client.rb', line 54

def post_v1declarations_lt_ivaz_generate(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/declarations/lt/ivaz/generate",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtIvazGenerateRequest.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::Declarations::Types::PostV1DeclarationsLtIvazGenerateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_saft_generate(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtSaftGenerateResponse

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/declarations/client.rb', line 278

def post_v1declarations_lt_saft_generate(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/declarations/lt/saft/generate",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtSaftGenerateRequest.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::Declarations::Types::PostV1DeclarationsLtSaftGenerateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_sam_compute(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtSamComputeResponse

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/declarations/client.rb', line 214

def post_v1declarations_lt_sam_compute(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/declarations/lt/sam/compute",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtSamComputeRequest.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::Declarations::Types::PostV1DeclarationsLtSamComputeResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_lt_sd_generate(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsLtSdGenerateResponse

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/declarations/client.rb', line 246

def post_v1declarations_lt_sd_generate(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/declarations/lt/sd/generate",
    body: Nordlet::Declarations::Types::PostV1DeclarationsLtSdGenerateRequest.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::Declarations::Types::PostV1DeclarationsLtSdGenerateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_submissions_create(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsCreateResponse

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/declarations/client.rb', line 438

def post_v1declarations_submissions_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/declarations/submissions/create",
    body: Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsCreateRequest.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::Declarations::Types::PostV1DeclarationsSubmissionsCreateResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_submissions_list(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsListResponse

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/declarations/client.rb', line 502

def post_v1declarations_submissions_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/declarations/submissions/list",
    body: Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsListRequest.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::Declarations::Types::PostV1DeclarationsSubmissionsListResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end

#post_v1declarations_submissions_mark(request_options: {}, **params) ⇒ Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsMarkResponse

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/declarations/client.rb', line 470

def post_v1declarations_submissions_mark(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/declarations/submissions/mark",
    body: Nordlet::Declarations::Types::PostV1DeclarationsSubmissionsMarkRequest.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::Declarations::Types::PostV1DeclarationsSubmissionsMarkResponse.load(response.body)
  else
    error_class = Nordlet::Errors::ResponseError.subclass_for_code(code)
    raise error_class.new(response.body, code: code)
  end
end