dub 0.10.5 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/lib/crystalline/module.rb +4 -0
  3. data/lib/crystalline/utils.rb +13 -0
  4. data/lib/open_api_sdk/analytics.rb +1 -1
  5. data/lib/open_api_sdk/commissions.rb +2 -2
  6. data/lib/open_api_sdk/customers.rb +4 -241
  7. data/lib/open_api_sdk/domains.rb +6 -6
  8. data/lib/open_api_sdk/embed_tokens.rb +1 -1
  9. data/lib/open_api_sdk/events.rb +1 -1
  10. data/lib/open_api_sdk/folders.rb +4 -4
  11. data/lib/open_api_sdk/links.rb +10 -10
  12. data/lib/open_api_sdk/models/operations/banpartner_requestbody.rb +41 -0
  13. data/lib/open_api_sdk/models/operations/banpartner_requestbody.rbi +17 -0
  14. data/lib/open_api_sdk/models/operations/banpartner_responsebody.rb +33 -0
  15. data/lib/open_api_sdk/models/operations/banpartner_responsebody.rbi +13 -0
  16. data/lib/open_api_sdk/models/operations/createfolder_requestbody.rb +6 -2
  17. data/lib/open_api_sdk/models/operations/createfolder_requestbody.rbi +2 -0
  18. data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +1 -1
  19. data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +52 -24
  20. data/lib/open_api_sdk/models/operations/createpartner_responsebody.rbi +24 -10
  21. data/lib/open_api_sdk/models/operations/listcommissions_partner.rb +6 -2
  22. data/lib/open_api_sdk/models/operations/listcommissions_partner.rbi +2 -0
  23. data/lib/open_api_sdk/models/operations/listcommissions_request.rb +6 -2
  24. data/lib/open_api_sdk/models/operations/listcommissions_request.rbi +2 -0
  25. data/lib/open_api_sdk/models/operations/listevents_request.rb +6 -2
  26. data/lib/open_api_sdk/models/operations/listevents_request.rbi +2 -0
  27. data/lib/open_api_sdk/models/operations/listpartners_queryparam_sortby.rb +11 -6
  28. data/lib/open_api_sdk/models/operations/listpartners_request.rb +3 -7
  29. data/lib/open_api_sdk/models/operations/listpartners_request.rbi +0 -2
  30. data/lib/open_api_sdk/models/operations/listpartners_responsebody.rb +52 -24
  31. data/lib/open_api_sdk/models/operations/listpartners_responsebody.rbi +24 -10
  32. data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +6 -1
  33. data/lib/open_api_sdk/models/operations/reason.rb +26 -0
  34. data/lib/open_api_sdk/models/operations/reason.rbi +11 -0
  35. data/lib/open_api_sdk/models/operations/requestbody.rb +1 -1
  36. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +6 -2
  37. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rbi +2 -0
  38. data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +2 -2
  39. data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +10 -10
  40. data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rbi +4 -4
  41. data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +1 -1
  42. data/lib/open_api_sdk/models/operations/updatecommission_partner.rb +6 -2
  43. data/lib/open_api_sdk/models/operations/updatecommission_partner.rbi +2 -0
  44. data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rb +6 -2
  45. data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rbi +2 -0
  46. data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +1 -1
  47. data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +1 -1
  48. data/lib/open_api_sdk/models/operations.rb +3 -6
  49. data/lib/open_api_sdk/models/shared/analyticstopurls.rb +1 -1
  50. data/lib/open_api_sdk/models/shared/applicationformdata.rb +37 -0
  51. data/lib/open_api_sdk/models/shared/applicationformdata.rbi +15 -0
  52. data/lib/open_api_sdk/models/shared/commissioncreatedevent_partner.rb +6 -2
  53. data/lib/open_api_sdk/models/shared/commissioncreatedevent_partner.rbi +2 -0
  54. data/lib/open_api_sdk/models/shared/folderschema.rb +6 -2
  55. data/lib/open_api_sdk/models/shared/folderschema.rbi +2 -0
  56. data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rb +15 -11
  57. data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rbi +6 -4
  58. data/lib/open_api_sdk/models/shared/leadevent_link.rb +15 -11
  59. data/lib/open_api_sdk/models/shared/leadevent_link.rbi +6 -4
  60. data/lib/open_api_sdk/models/shared/link.rb +15 -11
  61. data/lib/open_api_sdk/models/shared/link.rbi +6 -4
  62. data/lib/open_api_sdk/models/shared/linkclickedevent_link.rb +15 -11
  63. data/lib/open_api_sdk/models/shared/linkclickedevent_link.rbi +6 -4
  64. data/lib/open_api_sdk/models/shared/linkschema.rb +7 -3
  65. data/lib/open_api_sdk/models/shared/linkschema.rbi +2 -0
  66. data/lib/open_api_sdk/models/shared/{tagschema.rb → linktagschema.rb} +1 -1
  67. data/lib/open_api_sdk/models/shared/{tagschema.rbi → linktagschema.rbi} +2 -2
  68. data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rb +15 -11
  69. data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rbi +6 -4
  70. data/lib/open_api_sdk/models/shared/partner.rb +6 -2
  71. data/lib/open_api_sdk/models/shared/partner.rbi +2 -0
  72. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rb +45 -0
  73. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rbi +19 -0
  74. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rb +45 -0
  75. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rbi +19 -0
  76. data/lib/open_api_sdk/models/{operations/createcustomer_type.rb → shared/partnerapplicationsubmittedevent_event.rb} +3 -4
  77. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rbi +11 -0
  78. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rb +89 -0
  79. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rbi +41 -0
  80. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rb +28 -0
  81. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rbi +11 -0
  82. data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rb +52 -24
  83. data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rbi +24 -10
  84. data/lib/open_api_sdk/models/shared/salecreatedevent_link.rb +15 -11
  85. data/lib/open_api_sdk/models/shared/salecreatedevent_link.rbi +6 -4
  86. data/lib/open_api_sdk/models/shared/salecreatedevent_partner.rb +6 -2
  87. data/lib/open_api_sdk/models/shared/salecreatedevent_partner.rbi +2 -0
  88. data/lib/open_api_sdk/models/shared/saleevent_link.rb +15 -11
  89. data/lib/open_api_sdk/models/shared/saleevent_link.rbi +6 -4
  90. data/lib/open_api_sdk/models/shared/workspaceschema.rb +10 -2
  91. data/lib/open_api_sdk/models/shared/workspaceschema.rbi +4 -0
  92. data/lib/open_api_sdk/models/shared.rb +7 -1
  93. data/lib/open_api_sdk/partners.rb +241 -6
  94. data/lib/open_api_sdk/qr_codes.rb +1 -1
  95. data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
  96. data/lib/open_api_sdk/tags.rb +10 -10
  97. data/lib/open_api_sdk/track.rb +2 -2
  98. data/lib/open_api_sdk/workspaces.rb +2 -2
  99. metadata +22 -16
  100. data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -61
  101. data/lib/open_api_sdk/models/operations/createcustomer_discount.rbi +0 -27
  102. data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -53
  103. data/lib/open_api_sdk/models/operations/createcustomer_link.rbi +0 -23
  104. data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -45
  105. data/lib/open_api_sdk/models/operations/createcustomer_partner.rbi +0 -19
  106. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -49
  107. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rbi +0 -21
  108. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -81
  109. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rbi +0 -37
  110. data/lib/open_api_sdk/models/operations/createcustomer_type.rbi +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dac6fb257dc647b247733ad945f117c3b0d8942918b962922609b665ec9f826b
4
- data.tar.gz: e98ad1496e1be015096cb02d3a1bf24a1ad47860f6be2f841efda413688aeb90
3
+ metadata.gz: 48ac05c03a1b54b31ab86c62a6399dfec43e6e53d781836ee747c04ac759a609
4
+ data.tar.gz: 1c07bc0040688358b221280d241dc7c207f84bf14a3debcc8460dbb19a0c6e55
5
5
  SHA512:
6
- metadata.gz: a908b0c29aad3cd1a73574ae956bc809526ee9b2686e9eccc518cc7470952d3939b0658124e072faa34106fc88b1c10c86360ba6a8f042efef233df9f4b24208
7
- data.tar.gz: 34dc9bd70d590fa623d141f42b68eab2de4bf4411e2394b04907b65c24d0417267426743f0d05e866ae1bdcb234277e33647fbf166ae0385e97b2538a3866c00
6
+ metadata.gz: a1596526caddb02c45d00f897de2f7ba09de7fe14d6e602021109b8d74770480dae24609133ee832aff29039a68c9a773c0a0b6b883356f89b51a9ea02d798db
7
+ data.tar.gz: c326159d89886eb1a9465535db1d0b4e65ebc3dd055c97dd797d3685beaf893cd9acbf9b9c57f67c9f22ff74b465c6af29ac4da2322e98a7b9e52aba538f1e9f
@@ -51,6 +51,10 @@ module Crystalline
51
51
  data.transform_values { |v| Crystalline.unmarshal_json(v, Crystalline::Utils.hash_of(type)) }
52
52
  elsif Crystalline::Utils.nilable?(type) && data == 'null'
53
53
  nil
54
+ elsif Crystalline::Utils.boolean? type
55
+ Crystalline::Utils.to_boolean(data)
56
+ elsif type.is_a?(Class) && type < T::Enum
57
+ type.deserialize(data)
54
58
  else
55
59
  data
56
60
  end
@@ -52,5 +52,18 @@ module Crystalline
52
52
  def self.get_union_types(t)
53
53
  t.types
54
54
  end
55
+
56
+ def self.boolean?(t)
57
+ t.instance_of? Crystalline::Boolean
58
+ end
59
+
60
+ def self.to_boolean(value)
61
+ case value
62
+ when true, false
63
+ value
64
+ else
65
+ raise TypeError, "Cannot convert #{value.inspect} to boolean. The value is of type #{value.class}"
66
+ end
67
+ end
55
68
  end
56
69
  end
@@ -63,7 +63,7 @@ module OpenApiSDK
63
63
  hook_ctx = SDKHooks::HookContext.new(
64
64
  config: @sdk_configuration,
65
65
  base_url: base_url,
66
- oauth2_scopes: [],
66
+ oauth2_scopes: nil,
67
67
  operation_id: 'retrieveAnalytics',
68
68
  security_source: @sdk_configuration.security_source
69
69
  )
@@ -63,7 +63,7 @@ module OpenApiSDK
63
63
  hook_ctx = SDKHooks::HookContext.new(
64
64
  config: @sdk_configuration,
65
65
  base_url: base_url,
66
- oauth2_scopes: [],
66
+ oauth2_scopes: nil,
67
67
  operation_id: 'listCommissions',
68
68
  security_source: @sdk_configuration.security_source
69
69
  )
@@ -303,7 +303,7 @@ module OpenApiSDK
303
303
  hook_ctx = SDKHooks::HookContext.new(
304
304
  config: @sdk_configuration,
305
305
  base_url: base_url,
306
- oauth2_scopes: [],
306
+ oauth2_scopes: nil,
307
307
  operation_id: 'updateCommission',
308
308
  security_source: @sdk_configuration.security_source
309
309
  )
@@ -63,7 +63,7 @@ module OpenApiSDK
63
63
  hook_ctx = SDKHooks::HookContext.new(
64
64
  config: @sdk_configuration,
65
65
  base_url: base_url,
66
- oauth2_scopes: [],
66
+ oauth2_scopes: nil,
67
67
  operation_id: 'getCustomers',
68
68
  security_source: @sdk_configuration.security_source
69
69
  )
@@ -265,243 +265,6 @@ module OpenApiSDK
265
265
  end
266
266
 
267
267
 
268
- sig { params(request: T.nilable(Models::Operations::CreateCustomerRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateCustomerResponseBody) }
269
- def create(request: nil, timeout_ms: nil)
270
- # create - Create a customer
271
- # [Deprecated]: Customer creation can only be done via tracking a lead event. Use the /track/lead endpoint instead.
272
- #
273
- # @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
274
- url, params = @sdk_configuration.get_server_details
275
- base_url = Utils.template_url(url, params)
276
- url = "#{base_url}/customers"
277
- headers = {}
278
- headers = T.cast(headers, T::Hash[String, String])
279
- req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
280
- headers['content-type'] = req_content_type
281
-
282
- if form
283
- body = Utils.encode_form(form)
284
- elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
285
- body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
286
- else
287
- body = data
288
- end
289
- headers['Accept'] = 'application/json'
290
- headers['user-agent'] = @sdk_configuration.user_agent
291
-
292
- security = @sdk_configuration.security_source&.call
293
-
294
- timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
295
- timeout ||= @sdk_configuration.timeout
296
-
297
-
298
- connection = @sdk_configuration.client
299
-
300
- hook_ctx = SDKHooks::HookContext.new(
301
- config: @sdk_configuration,
302
- base_url: base_url,
303
- oauth2_scopes: [],
304
- operation_id: 'createCustomer',
305
- security_source: @sdk_configuration.security_source
306
- )
307
-
308
- error = T.let(nil, T.nilable(StandardError))
309
- http_response = T.let(nil, T.nilable(Faraday::Response))
310
-
311
-
312
- begin
313
- http_response = T.must(connection).post(url) do |req|
314
- req.body = body
315
- req.headers.merge!(headers)
316
- req.options.timeout = timeout unless timeout.nil?
317
- Utils.configure_request_security(req, security)
318
-
319
- @sdk_configuration.hooks.before_request(
320
- hook_ctx: SDKHooks::BeforeRequestHookContext.new(
321
- hook_ctx: hook_ctx
322
- ),
323
- request: req
324
- )
325
- end
326
- rescue StandardError => e
327
- error = e
328
- ensure
329
- if http_response.nil? || Utils.error_status?(http_response.status)
330
- http_response = @sdk_configuration.hooks.after_error(
331
- error: error,
332
- hook_ctx: SDKHooks::AfterErrorHookContext.new(
333
- hook_ctx: hook_ctx
334
- ),
335
- response: http_response
336
- )
337
- else
338
- http_response = @sdk_configuration.hooks.after_success(
339
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
340
- hook_ctx: hook_ctx
341
- ),
342
- response: http_response
343
- )
344
- end
345
-
346
- if http_response.nil?
347
- raise error if !error.nil?
348
- raise 'no response'
349
- end
350
- end
351
-
352
- content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
353
- if Utils.match_status_code(http_response.status, ['201'])
354
- if Utils.match_content_type(content_type, 'application/json')
355
- @sdk_configuration.hooks.after_success(
356
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
357
- hook_ctx: hook_ctx
358
- ),
359
- response: http_response
360
- )
361
- response_data = http_response.env.response_body
362
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::CreateCustomerResponseBody)
363
-
364
- return obj
365
- else
366
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
367
- end
368
- elsif Utils.match_status_code(http_response.status, ['400'])
369
- if Utils.match_content_type(content_type, 'application/json')
370
- @sdk_configuration.hooks.after_success(
371
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
372
- hook_ctx: hook_ctx
373
- ),
374
- response: http_response
375
- )
376
- response_data = http_response.env.response_body
377
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequest)
378
- raise obj
379
- else
380
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
381
- end
382
- elsif Utils.match_status_code(http_response.status, ['401'])
383
- if Utils.match_content_type(content_type, 'application/json')
384
- @sdk_configuration.hooks.after_success(
385
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
386
- hook_ctx: hook_ctx
387
- ),
388
- response: http_response
389
- )
390
- response_data = http_response.env.response_body
391
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Unauthorized)
392
- raise obj
393
- else
394
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
395
- end
396
- elsif Utils.match_status_code(http_response.status, ['403'])
397
- if Utils.match_content_type(content_type, 'application/json')
398
- @sdk_configuration.hooks.after_success(
399
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
400
- hook_ctx: hook_ctx
401
- ),
402
- response: http_response
403
- )
404
- response_data = http_response.env.response_body
405
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Forbidden)
406
- raise obj
407
- else
408
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
409
- end
410
- elsif Utils.match_status_code(http_response.status, ['404'])
411
- if Utils.match_content_type(content_type, 'application/json')
412
- @sdk_configuration.hooks.after_success(
413
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
414
- hook_ctx: hook_ctx
415
- ),
416
- response: http_response
417
- )
418
- response_data = http_response.env.response_body
419
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFound)
420
- raise obj
421
- else
422
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
423
- end
424
- elsif Utils.match_status_code(http_response.status, ['409'])
425
- if Utils.match_content_type(content_type, 'application/json')
426
- @sdk_configuration.hooks.after_success(
427
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
428
- hook_ctx: hook_ctx
429
- ),
430
- response: http_response
431
- )
432
- response_data = http_response.env.response_body
433
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Conflict)
434
- raise obj
435
- else
436
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
437
- end
438
- elsif Utils.match_status_code(http_response.status, ['410'])
439
- if Utils.match_content_type(content_type, 'application/json')
440
- @sdk_configuration.hooks.after_success(
441
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
442
- hook_ctx: hook_ctx
443
- ),
444
- response: http_response
445
- )
446
- response_data = http_response.env.response_body
447
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InviteExpired)
448
- raise obj
449
- else
450
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
451
- end
452
- elsif Utils.match_status_code(http_response.status, ['422'])
453
- if Utils.match_content_type(content_type, 'application/json')
454
- @sdk_configuration.hooks.after_success(
455
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
456
- hook_ctx: hook_ctx
457
- ),
458
- response: http_response
459
- )
460
- response_data = http_response.env.response_body
461
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnprocessableEntity)
462
- raise obj
463
- else
464
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
465
- end
466
- elsif Utils.match_status_code(http_response.status, ['429'])
467
- if Utils.match_content_type(content_type, 'application/json')
468
- @sdk_configuration.hooks.after_success(
469
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
470
- hook_ctx: hook_ctx
471
- ),
472
- response: http_response
473
- )
474
- response_data = http_response.env.response_body
475
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitExceeded)
476
- raise obj
477
- else
478
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
479
- end
480
- elsif Utils.match_status_code(http_response.status, ['500'])
481
- if Utils.match_content_type(content_type, 'application/json')
482
- @sdk_configuration.hooks.after_success(
483
- hook_ctx: SDKHooks::AfterSuccessHookContext.new(
484
- hook_ctx: hook_ctx
485
- ),
486
- response: http_response
487
- )
488
- response_data = http_response.env.response_body
489
- obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError)
490
- raise obj
491
- else
492
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
493
- end
494
- elsif Utils.match_status_code(http_response.status, ['4XX'])
495
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
496
- elsif Utils.match_status_code(http_response.status, ['5XX'])
497
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
498
- else
499
- raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
500
-
501
- end
502
- end
503
-
504
-
505
268
  sig { params(request: Models::Operations::GetCustomerRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetCustomerResponseBody) }
506
269
  def get(request:, timeout_ms: nil)
507
270
  # get - Retrieve a customer
@@ -531,7 +294,7 @@ module OpenApiSDK
531
294
  hook_ctx = SDKHooks::HookContext.new(
532
295
  config: @sdk_configuration,
533
296
  base_url: base_url,
534
- oauth2_scopes: [],
297
+ oauth2_scopes: nil,
535
298
  operation_id: 'getCustomer',
536
299
  security_source: @sdk_configuration.security_source
537
300
  )
@@ -772,7 +535,7 @@ module OpenApiSDK
772
535
  hook_ctx = SDKHooks::HookContext.new(
773
536
  config: @sdk_configuration,
774
537
  base_url: base_url,
775
- oauth2_scopes: [],
538
+ oauth2_scopes: nil,
776
539
  operation_id: 'updateCustomer',
777
540
  security_source: @sdk_configuration.security_source
778
541
  )
@@ -1006,7 +769,7 @@ module OpenApiSDK
1006
769
  hook_ctx = SDKHooks::HookContext.new(
1007
770
  config: @sdk_configuration,
1008
771
  base_url: base_url,
1009
- oauth2_scopes: [],
772
+ oauth2_scopes: nil,
1010
773
  operation_id: 'deleteCustomer',
1011
774
  security_source: @sdk_configuration.security_source
1012
775
  )
@@ -73,7 +73,7 @@ module OpenApiSDK
73
73
  hook_ctx = SDKHooks::HookContext.new(
74
74
  config: @sdk_configuration,
75
75
  base_url: base_url,
76
- oauth2_scopes: [],
76
+ oauth2_scopes: nil,
77
77
  operation_id: 'createDomain',
78
78
  security_source: @sdk_configuration.security_source
79
79
  )
@@ -299,7 +299,7 @@ module OpenApiSDK
299
299
  hook_ctx = SDKHooks::HookContext.new(
300
300
  config: @sdk_configuration,
301
301
  base_url: base_url,
302
- oauth2_scopes: [],
302
+ oauth2_scopes: nil,
303
303
  operation_id: 'listDomains',
304
304
  security_source: @sdk_configuration.security_source
305
305
  )
@@ -577,7 +577,7 @@ module OpenApiSDK
577
577
  hook_ctx = SDKHooks::HookContext.new(
578
578
  config: @sdk_configuration,
579
579
  base_url: base_url,
580
- oauth2_scopes: [],
580
+ oauth2_scopes: nil,
581
581
  operation_id: 'updateDomain',
582
582
  security_source: @sdk_configuration.security_source
583
583
  )
@@ -810,7 +810,7 @@ module OpenApiSDK
810
810
  hook_ctx = SDKHooks::HookContext.new(
811
811
  config: @sdk_configuration,
812
812
  base_url: base_url,
813
- oauth2_scopes: [],
813
+ oauth2_scopes: nil,
814
814
  operation_id: 'deleteDomain',
815
815
  security_source: @sdk_configuration.security_source
816
816
  )
@@ -1044,7 +1044,7 @@ module OpenApiSDK
1044
1044
  hook_ctx = SDKHooks::HookContext.new(
1045
1045
  config: @sdk_configuration,
1046
1046
  base_url: base_url,
1047
- oauth2_scopes: [],
1047
+ oauth2_scopes: nil,
1048
1048
  operation_id: 'registerDomain',
1049
1049
  security_source: @sdk_configuration.security_source
1050
1050
  )
@@ -1270,7 +1270,7 @@ module OpenApiSDK
1270
1270
  hook_ctx = SDKHooks::HookContext.new(
1271
1271
  config: @sdk_configuration,
1272
1272
  base_url: base_url,
1273
- oauth2_scopes: [],
1273
+ oauth2_scopes: nil,
1274
1274
  operation_id: 'checkDomainStatus',
1275
1275
  security_source: @sdk_configuration.security_source
1276
1276
  )
@@ -72,7 +72,7 @@ module OpenApiSDK
72
72
  hook_ctx = SDKHooks::HookContext.new(
73
73
  config: @sdk_configuration,
74
74
  base_url: base_url,
75
- oauth2_scopes: [],
75
+ oauth2_scopes: nil,
76
76
  operation_id: 'createReferralsEmbedToken',
77
77
  security_source: @sdk_configuration.security_source
78
78
  )
@@ -63,7 +63,7 @@ module OpenApiSDK
63
63
  hook_ctx = SDKHooks::HookContext.new(
64
64
  config: @sdk_configuration,
65
65
  base_url: base_url,
66
- oauth2_scopes: [],
66
+ oauth2_scopes: nil,
67
67
  operation_id: 'listEvents',
68
68
  security_source: @sdk_configuration.security_source
69
69
  )
@@ -72,7 +72,7 @@ module OpenApiSDK
72
72
  hook_ctx = SDKHooks::HookContext.new(
73
73
  config: @sdk_configuration,
74
74
  base_url: base_url,
75
- oauth2_scopes: [],
75
+ oauth2_scopes: nil,
76
76
  operation_id: 'createFolder',
77
77
  security_source: @sdk_configuration.security_source
78
78
  )
@@ -298,7 +298,7 @@ module OpenApiSDK
298
298
  hook_ctx = SDKHooks::HookContext.new(
299
299
  config: @sdk_configuration,
300
300
  base_url: base_url,
301
- oauth2_scopes: [],
301
+ oauth2_scopes: nil,
302
302
  operation_id: 'listFolders',
303
303
  security_source: @sdk_configuration.security_source
304
304
  )
@@ -542,7 +542,7 @@ module OpenApiSDK
542
542
  hook_ctx = SDKHooks::HookContext.new(
543
543
  config: @sdk_configuration,
544
544
  base_url: base_url,
545
- oauth2_scopes: [],
545
+ oauth2_scopes: nil,
546
546
  operation_id: 'updateFolder',
547
547
  security_source: @sdk_configuration.security_source
548
548
  )
@@ -775,7 +775,7 @@ module OpenApiSDK
775
775
  hook_ctx = SDKHooks::HookContext.new(
776
776
  config: @sdk_configuration,
777
777
  base_url: base_url,
778
- oauth2_scopes: [],
778
+ oauth2_scopes: nil,
779
779
  operation_id: 'deleteFolder',
780
780
  security_source: @sdk_configuration.security_source
781
781
  )
@@ -73,7 +73,7 @@ module OpenApiSDK
73
73
  hook_ctx = SDKHooks::HookContext.new(
74
74
  config: @sdk_configuration,
75
75
  base_url: base_url,
76
- oauth2_scopes: [],
76
+ oauth2_scopes: nil,
77
77
  operation_id: 'createLink',
78
78
  security_source: @sdk_configuration.security_source
79
79
  )
@@ -299,7 +299,7 @@ module OpenApiSDK
299
299
  hook_ctx = SDKHooks::HookContext.new(
300
300
  config: @sdk_configuration,
301
301
  base_url: base_url,
302
- oauth2_scopes: [],
302
+ oauth2_scopes: nil,
303
303
  operation_id: 'getLinks',
304
304
  security_source: @sdk_configuration.security_source
305
305
  )
@@ -570,7 +570,7 @@ module OpenApiSDK
570
570
  hook_ctx = SDKHooks::HookContext.new(
571
571
  config: @sdk_configuration,
572
572
  base_url: base_url,
573
- oauth2_scopes: [],
573
+ oauth2_scopes: nil,
574
574
  operation_id: 'getLinksCount',
575
575
  security_source: @sdk_configuration.security_source
576
576
  )
@@ -796,7 +796,7 @@ module OpenApiSDK
796
796
  hook_ctx = SDKHooks::HookContext.new(
797
797
  config: @sdk_configuration,
798
798
  base_url: base_url,
799
- oauth2_scopes: [],
799
+ oauth2_scopes: nil,
800
800
  operation_id: 'getLinkInfo',
801
801
  security_source: @sdk_configuration.security_source
802
802
  )
@@ -1040,7 +1040,7 @@ module OpenApiSDK
1040
1040
  hook_ctx = SDKHooks::HookContext.new(
1041
1041
  config: @sdk_configuration,
1042
1042
  base_url: base_url,
1043
- oauth2_scopes: [],
1043
+ oauth2_scopes: nil,
1044
1044
  operation_id: 'updateLink',
1045
1045
  security_source: @sdk_configuration.security_source
1046
1046
  )
@@ -1273,7 +1273,7 @@ module OpenApiSDK
1273
1273
  hook_ctx = SDKHooks::HookContext.new(
1274
1274
  config: @sdk_configuration,
1275
1275
  base_url: base_url,
1276
- oauth2_scopes: [],
1276
+ oauth2_scopes: nil,
1277
1277
  operation_id: 'deleteLink',
1278
1278
  security_source: @sdk_configuration.security_source
1279
1279
  )
@@ -1507,7 +1507,7 @@ module OpenApiSDK
1507
1507
  hook_ctx = SDKHooks::HookContext.new(
1508
1508
  config: @sdk_configuration,
1509
1509
  base_url: base_url,
1510
- oauth2_scopes: [],
1510
+ oauth2_scopes: nil,
1511
1511
  operation_id: 'bulkCreateLinks',
1512
1512
  security_source: @sdk_configuration.security_source
1513
1513
  )
@@ -1742,7 +1742,7 @@ module OpenApiSDK
1742
1742
  hook_ctx = SDKHooks::HookContext.new(
1743
1743
  config: @sdk_configuration,
1744
1744
  base_url: base_url,
1745
- oauth2_scopes: [],
1745
+ oauth2_scopes: nil,
1746
1746
  operation_id: 'bulkUpdateLinks',
1747
1747
  security_source: @sdk_configuration.security_source
1748
1748
  )
@@ -1968,7 +1968,7 @@ module OpenApiSDK
1968
1968
  hook_ctx = SDKHooks::HookContext.new(
1969
1969
  config: @sdk_configuration,
1970
1970
  base_url: base_url,
1971
- oauth2_scopes: [],
1971
+ oauth2_scopes: nil,
1972
1972
  operation_id: 'bulkDeleteLinks',
1973
1973
  security_source: @sdk_configuration.security_source
1974
1974
  )
@@ -2203,7 +2203,7 @@ module OpenApiSDK
2203
2203
  hook_ctx = SDKHooks::HookContext.new(
2204
2204
  config: @sdk_configuration,
2205
2205
  base_url: base_url,
2206
- oauth2_scopes: [],
2206
+ oauth2_scopes: nil,
2207
2207
  operation_id: 'upsertLink',
2208
2208
  security_source: @sdk_configuration.security_source
2209
2209
  )
@@ -0,0 +1,41 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Models
9
+ module Operations
10
+
11
+
12
+ class BanPartnerRequestBody
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+
17
+ field :reason, Models::Operations::Reason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('reason'), required: true, 'decoder': Utils.enum_from_string(Models::Operations::Reason, false) } }
18
+ # The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.
19
+ field :partner_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
20
+ # The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.
21
+ field :tenant_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
22
+
23
+ sig { params(reason: Models::Operations::Reason, partner_id: T.nilable(::String), tenant_id: T.nilable(::String)).void }
24
+ def initialize(reason:, partner_id: nil, tenant_id: nil)
25
+ @reason = reason
26
+ @partner_id = partner_id
27
+ @tenant_id = tenant_id
28
+ end
29
+
30
+ sig { params(other: T.untyped).returns(T::Boolean) }
31
+ def ==(other)
32
+ return false unless other.is_a? self.class
33
+ return false unless @reason == other.reason
34
+ return false unless @partner_id == other.partner_id
35
+ return false unless @tenant_id == other.tenant_id
36
+ true
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,17 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class OpenApiSDK::Models::Operations::BanPartnerRequestBody
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class OpenApiSDK::Models::Operations::BanPartnerRequestBody
11
+ def reason(); end
12
+ def reason=(str_); end
13
+ def partner_id(); end
14
+ def partner_id=(str_); end
15
+ def tenant_id(); end
16
+ def tenant_id=(str_); end
17
+ end
@@ -0,0 +1,33 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Models
9
+ module Operations
10
+
11
+ # The banned partner
12
+ class BanPartnerResponseBody
13
+ extend T::Sig
14
+ include Crystalline::MetadataFields
15
+
16
+ # The ID of the banned partner.
17
+ field :partner_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId'), required: true } }
18
+
19
+ sig { params(partner_id: ::String).void }
20
+ def initialize(partner_id:)
21
+ @partner_id = partner_id
22
+ end
23
+
24
+ sig { params(other: T.untyped).returns(T::Boolean) }
25
+ def ==(other)
26
+ return false unless other.is_a? self.class
27
+ return false unless @partner_id == other.partner_id
28
+ true
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,13 @@
1
+ # typed: true
2
+ # frozen_string_literal: true
3
+
4
+
5
+ class OpenApiSDK::Models::Operations::BanPartnerResponseBody
6
+ extend ::Crystalline::MetadataFields::ClassMethods
7
+ end
8
+
9
+
10
+ class OpenApiSDK::Models::Operations::BanPartnerResponseBody
11
+ def partner_id(); end
12
+ def partner_id=(str_); end
13
+ end