dub 0.11.0 → 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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/lib/open_api_sdk/customers.rb +0 -237
  3. data/lib/open_api_sdk/models/operations/banpartner_requestbody.rb +41 -0
  4. data/lib/open_api_sdk/models/operations/banpartner_requestbody.rbi +17 -0
  5. data/lib/open_api_sdk/models/operations/banpartner_responsebody.rb +33 -0
  6. data/lib/open_api_sdk/models/operations/banpartner_responsebody.rbi +13 -0
  7. data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +32 -4
  8. data/lib/open_api_sdk/models/operations/createpartner_responsebody.rbi +14 -0
  9. data/lib/open_api_sdk/models/operations/listcommissions_partner.rb +6 -2
  10. data/lib/open_api_sdk/models/operations/listcommissions_partner.rbi +2 -0
  11. data/lib/open_api_sdk/models/operations/listcommissions_request.rb +6 -2
  12. data/lib/open_api_sdk/models/operations/listcommissions_request.rbi +2 -0
  13. data/lib/open_api_sdk/models/operations/listevents_request.rb +6 -2
  14. data/lib/open_api_sdk/models/operations/listevents_request.rbi +2 -0
  15. data/lib/open_api_sdk/models/operations/listpartners_queryparam_sortby.rb +7 -0
  16. data/lib/open_api_sdk/models/operations/listpartners_responsebody.rb +32 -4
  17. data/lib/open_api_sdk/models/operations/listpartners_responsebody.rbi +14 -0
  18. data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +2 -0
  19. data/lib/open_api_sdk/models/operations/reason.rb +26 -0
  20. data/lib/open_api_sdk/models/operations/reason.rbi +11 -0
  21. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +6 -2
  22. data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rbi +2 -0
  23. data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +2 -2
  24. data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +10 -10
  25. data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rbi +4 -4
  26. data/lib/open_api_sdk/models/operations/updatecommission_partner.rb +6 -2
  27. data/lib/open_api_sdk/models/operations/updatecommission_partner.rbi +2 -0
  28. data/lib/open_api_sdk/models/operations.rb +3 -6
  29. data/lib/open_api_sdk/models/shared/analyticstopurls.rb +1 -1
  30. data/lib/open_api_sdk/models/shared/applicationformdata.rb +37 -0
  31. data/lib/open_api_sdk/models/shared/applicationformdata.rbi +15 -0
  32. data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rb +14 -10
  33. data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rbi +6 -4
  34. data/lib/open_api_sdk/models/shared/leadevent_link.rb +14 -10
  35. data/lib/open_api_sdk/models/shared/leadevent_link.rbi +6 -4
  36. data/lib/open_api_sdk/models/shared/link.rb +14 -10
  37. data/lib/open_api_sdk/models/shared/link.rbi +6 -4
  38. data/lib/open_api_sdk/models/shared/linkclickedevent_link.rb +14 -10
  39. data/lib/open_api_sdk/models/shared/linkclickedevent_link.rbi +6 -4
  40. data/lib/open_api_sdk/models/shared/linkschema.rb +6 -2
  41. data/lib/open_api_sdk/models/shared/linkschema.rbi +2 -0
  42. data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rb +14 -10
  43. data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rbi +6 -4
  44. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rb +45 -0
  45. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rbi +19 -0
  46. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rb +45 -0
  47. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rbi +19 -0
  48. data/lib/open_api_sdk/models/{operations/createcustomer_type.rb → shared/partnerapplicationsubmittedevent_event.rb} +3 -4
  49. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rbi +11 -0
  50. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rb +89 -0
  51. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rbi +41 -0
  52. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rb +28 -0
  53. data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rbi +11 -0
  54. data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rb +32 -4
  55. data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rbi +14 -0
  56. data/lib/open_api_sdk/models/shared/salecreatedevent_link.rb +14 -10
  57. data/lib/open_api_sdk/models/shared/salecreatedevent_link.rbi +6 -4
  58. data/lib/open_api_sdk/models/shared/saleevent_link.rb +14 -10
  59. data/lib/open_api_sdk/models/shared/saleevent_link.rbi +6 -4
  60. data/lib/open_api_sdk/models/shared/workspaceschema.rb +6 -2
  61. data/lib/open_api_sdk/models/shared/workspaceschema.rbi +2 -0
  62. data/lib/open_api_sdk/models/shared.rb +6 -0
  63. data/lib/open_api_sdk/partners.rb +235 -0
  64. data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
  65. metadata +20 -14
  66. data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -61
  67. data/lib/open_api_sdk/models/operations/createcustomer_discount.rbi +0 -27
  68. data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -53
  69. data/lib/open_api_sdk/models/operations/createcustomer_link.rbi +0 -23
  70. data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -45
  71. data/lib/open_api_sdk/models/operations/createcustomer_partner.rbi +0 -19
  72. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -49
  73. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rbi +0 -21
  74. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -81
  75. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rbi +0 -37
  76. data/lib/open_api_sdk/models/operations/createcustomer_type.rbi +0 -11
@@ -22,6 +22,8 @@ class OpenApiSDK::Models::Shared::SaleEventLink
22
22
  def archived=(str_); end
23
23
  def expires_at(); end
24
24
  def expires_at=(str_); end
25
+ def disabled_at(); end
26
+ def disabled_at=(str_); end
25
27
  def proxy(); end
26
28
  def proxy=(str_); end
27
29
  def rewrite(); end
@@ -36,6 +38,10 @@ class OpenApiSDK::Models::Shared::SaleEventLink
36
38
  def short_link=(str_); end
37
39
  def qr_code(); end
38
40
  def qr_code=(str_); end
41
+ def test_started_at(); end
42
+ def test_started_at=(str_); end
43
+ def test_completed_at(); end
44
+ def test_completed_at=(str_); end
39
45
  def workspace_id(); end
40
46
  def workspace_id=(str_); end
41
47
  def last_clicked(); end
@@ -88,10 +94,6 @@ class OpenApiSDK::Models::Shared::SaleEventLink
88
94
  def utm_term=(str_); end
89
95
  def utm_content(); end
90
96
  def utm_content=(str_); end
91
- def test_started_at(); end
92
- def test_started_at=(str_); end
93
- def test_completed_at(); end
94
- def test_completed_at=(str_); end
95
97
  def user_id(); end
96
98
  def user_id=(str_); end
97
99
  def tag_id(); end
@@ -69,6 +69,8 @@ module OpenApiSDK
69
69
  field :domains, Crystalline::Array.new(Models::Shared::Domains), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domains'), required: true } }
70
70
  # The invite code of the workspace.
71
71
  field :invite_code, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('inviteCode'), required: true } }
72
+ # The tier of the workspace's plan.
73
+ field :plan_tier, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('planTier'), required: true } }
72
74
  # The Stripe ID of the workspace.
73
75
  field :stripe_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('stripeId'), required: true } }
74
76
  # The date and time when the payment failed for the workspace.
@@ -88,8 +90,8 @@ module OpenApiSDK
88
90
  # The logo of the workspace.
89
91
  field :logo, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo') } }
90
92
 
91
- sig { params(id: ::String, name: ::String, slug: ::String, plan: Models::Shared::Plan, billing_cycle_start: ::Float, total_links: ::Float, usage: ::Float, usage_limit: ::Float, links_usage: ::Float, links_limit: ::Float, payouts_usage: ::Float, payouts_limit: ::Float, payout_fee: ::Float, domains_limit: ::Float, tags_limit: ::Float, folders_usage: ::Float, folders_limit: ::Float, groups_limit: ::Float, network_invites_limit: ::Float, users_limit: ::Float, ai_usage: ::Float, ai_limit: ::Float, conversion_enabled: T::Boolean, dot_link_claimed: T::Boolean, created_at: ::String, users: T::Array[Models::Shared::Users], domains: T::Array[Models::Shared::Domains], invite_code: T.nilable(::String), stripe_id: T.nilable(::String), payment_failed_at: T.nilable(::String), stripe_connect_id: T.nilable(::String), flags: T.nilable(T::Hash[Symbol, T::Boolean]), store: T.nilable(T::Hash[Symbol, ::Object]), allowed_hostnames: T.nilable(T::Array[::String]), sso_email_domain: T.nilable(::String), sso_enforced_at: T.nilable(::String), logo: T.nilable(::String)).void }
92
- def initialize(id:, name:, slug:, plan:, billing_cycle_start:, total_links:, usage:, usage_limit:, links_usage:, links_limit:, payouts_usage:, payouts_limit:, payout_fee:, domains_limit:, tags_limit:, folders_usage:, folders_limit:, groups_limit:, network_invites_limit:, users_limit:, ai_usage:, ai_limit:, conversion_enabled:, dot_link_claimed:, created_at:, users:, domains:, invite_code: nil, stripe_id: nil, payment_failed_at: nil, stripe_connect_id: nil, flags: nil, store: nil, allowed_hostnames: nil, sso_email_domain: nil, sso_enforced_at: nil, logo: nil)
93
+ sig { params(id: ::String, name: ::String, slug: ::String, plan: Models::Shared::Plan, billing_cycle_start: ::Float, total_links: ::Float, usage: ::Float, usage_limit: ::Float, links_usage: ::Float, links_limit: ::Float, payouts_usage: ::Float, payouts_limit: ::Float, payout_fee: ::Float, domains_limit: ::Float, tags_limit: ::Float, folders_usage: ::Float, folders_limit: ::Float, groups_limit: ::Float, network_invites_limit: ::Float, users_limit: ::Float, ai_usage: ::Float, ai_limit: ::Float, conversion_enabled: T::Boolean, dot_link_claimed: T::Boolean, created_at: ::String, users: T::Array[Models::Shared::Users], domains: T::Array[Models::Shared::Domains], invite_code: T.nilable(::String), plan_tier: T.nilable(::Float), stripe_id: T.nilable(::String), payment_failed_at: T.nilable(::String), stripe_connect_id: T.nilable(::String), flags: T.nilable(T::Hash[Symbol, T::Boolean]), store: T.nilable(T::Hash[Symbol, ::Object]), allowed_hostnames: T.nilable(T::Array[::String]), sso_email_domain: T.nilable(::String), sso_enforced_at: T.nilable(::String), logo: T.nilable(::String)).void }
94
+ def initialize(id:, name:, slug:, plan:, billing_cycle_start:, total_links:, usage:, usage_limit:, links_usage:, links_limit:, payouts_usage:, payouts_limit:, payout_fee:, domains_limit:, tags_limit:, folders_usage:, folders_limit:, groups_limit:, network_invites_limit:, users_limit:, ai_usage:, ai_limit:, conversion_enabled:, dot_link_claimed:, created_at:, users:, domains:, invite_code: nil, plan_tier: nil, stripe_id: nil, payment_failed_at: nil, stripe_connect_id: nil, flags: nil, store: nil, allowed_hostnames: nil, sso_email_domain: nil, sso_enforced_at: nil, logo: nil)
93
95
  @id = id
94
96
  @name = name
95
97
  @slug = slug
@@ -118,6 +120,7 @@ module OpenApiSDK
118
120
  @users = users
119
121
  @domains = domains
120
122
  @invite_code = invite_code
123
+ @plan_tier = plan_tier
121
124
  @stripe_id = stripe_id
122
125
  @payment_failed_at = payment_failed_at
123
126
  @stripe_connect_id = stripe_connect_id
@@ -160,6 +163,7 @@ module OpenApiSDK
160
163
  return false unless @users == other.users
161
164
  return false unless @domains == other.domains
162
165
  return false unless @invite_code == other.invite_code
166
+ return false unless @plan_tier == other.plan_tier
163
167
  return false unless @stripe_id == other.stripe_id
164
168
  return false unless @payment_failed_at == other.payment_failed_at
165
169
  return false unless @stripe_connect_id == other.stripe_connect_id
@@ -64,6 +64,8 @@ class OpenApiSDK::Models::Shared::WorkspaceSchema
64
64
  def domains=(str_); end
65
65
  def invite_code(); end
66
66
  def invite_code=(str_); end
67
+ def plan_tier(); end
68
+ def plan_tier=(str_); end
67
69
  def stripe_id(); end
68
70
  def stripe_id=(str_); end
69
71
  def payment_failed_at(); end
@@ -63,6 +63,11 @@ module OpenApiSDK
63
63
  autoload :PartnerAnalyticsCount, 'open_api_sdk/models/shared/partneranalyticscount.rb'
64
64
  autoload :PartnerAnalyticsTimeseries, 'open_api_sdk/models/shared/partneranalyticstimeseries.rb'
65
65
  autoload :PartnerAnalyticsTopLinks, 'open_api_sdk/models/shared/partneranalyticstoplinks.rb'
66
+ autoload :PartnerApplicationSubmittedEvent, 'open_api_sdk/models/shared/partnerapplicationsubmittedevent.rb'
67
+ autoload :PartnerApplicationSubmittedEventData, 'open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rb'
68
+ autoload :PartnerApplicationSubmittedEventEvent, 'open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rb'
69
+ autoload :PartnerApplicationSubmittedEventPartner, 'open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rb'
70
+ autoload :PartnerApplicationSubmittedEventStatus, 'open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rb'
66
71
  autoload :PartnerEnrolledEvent, 'open_api_sdk/models/shared/partnerenrolledevent.rb'
67
72
  autoload :PartnerEnrolledEventLink, 'open_api_sdk/models/shared/partnerenrolledevent_link.rb'
68
73
  autoload :PartnerEnrolledEventData, 'open_api_sdk/models/shared/partnerenrolledevent_data.rb'
@@ -86,6 +91,7 @@ module OpenApiSDK
86
91
  autoload :WebhookEvent, 'open_api_sdk/models/shared/webhookevent.rb'
87
92
  autoload :WorkspaceSchema, 'open_api_sdk/models/shared/workspaceschema.rb'
88
93
  autoload :AccessLevel, 'open_api_sdk/models/shared/accesslevel.rb'
94
+ autoload :ApplicationFormData, 'open_api_sdk/models/shared/applicationformdata.rb'
89
95
  autoload :BannedReason, 'open_api_sdk/models/shared/bannedreason.rb'
90
96
  autoload :City, 'open_api_sdk/models/shared/city.rb'
91
97
  autoload :Click, 'open_api_sdk/models/shared/click.rb'
@@ -1420,5 +1420,240 @@ module OpenApiSDK
1420
1420
 
1421
1421
  end
1422
1422
  end
1423
+
1424
+
1425
+ sig { params(request: T.nilable(Models::Operations::BanPartnerRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::BanPartnerResponseBody) }
1426
+ def ban(request: nil, timeout_ms: nil)
1427
+ # ban - Ban a partner
1428
+ # Ban a partner from your program. This will disable all links and mark all commissions as canceled.
1429
+ url, params = @sdk_configuration.get_server_details
1430
+ base_url = Utils.template_url(url, params)
1431
+ url = "#{base_url}/partners/ban"
1432
+ headers = {}
1433
+ headers = T.cast(headers, T::Hash[String, String])
1434
+ req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
1435
+ headers['content-type'] = req_content_type
1436
+
1437
+ if form
1438
+ body = Utils.encode_form(form)
1439
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
1440
+ body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
1441
+ else
1442
+ body = data
1443
+ end
1444
+ headers['Accept'] = 'application/json'
1445
+ headers['user-agent'] = @sdk_configuration.user_agent
1446
+
1447
+ security = @sdk_configuration.security_source&.call
1448
+
1449
+ timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
1450
+ timeout ||= @sdk_configuration.timeout
1451
+
1452
+
1453
+ connection = @sdk_configuration.client
1454
+
1455
+ hook_ctx = SDKHooks::HookContext.new(
1456
+ config: @sdk_configuration,
1457
+ base_url: base_url,
1458
+ oauth2_scopes: nil,
1459
+ operation_id: 'banPartner',
1460
+ security_source: @sdk_configuration.security_source
1461
+ )
1462
+
1463
+ error = T.let(nil, T.nilable(StandardError))
1464
+ http_response = T.let(nil, T.nilable(Faraday::Response))
1465
+
1466
+
1467
+ begin
1468
+ http_response = T.must(connection).post(url) do |req|
1469
+ req.body = body
1470
+ req.headers.merge!(headers)
1471
+ req.options.timeout = timeout unless timeout.nil?
1472
+ Utils.configure_request_security(req, security)
1473
+
1474
+ @sdk_configuration.hooks.before_request(
1475
+ hook_ctx: SDKHooks::BeforeRequestHookContext.new(
1476
+ hook_ctx: hook_ctx
1477
+ ),
1478
+ request: req
1479
+ )
1480
+ end
1481
+ rescue StandardError => e
1482
+ error = e
1483
+ ensure
1484
+ if http_response.nil? || Utils.error_status?(http_response.status)
1485
+ http_response = @sdk_configuration.hooks.after_error(
1486
+ error: error,
1487
+ hook_ctx: SDKHooks::AfterErrorHookContext.new(
1488
+ hook_ctx: hook_ctx
1489
+ ),
1490
+ response: http_response
1491
+ )
1492
+ else
1493
+ http_response = @sdk_configuration.hooks.after_success(
1494
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1495
+ hook_ctx: hook_ctx
1496
+ ),
1497
+ response: http_response
1498
+ )
1499
+ end
1500
+
1501
+ if http_response.nil?
1502
+ raise error if !error.nil?
1503
+ raise 'no response'
1504
+ end
1505
+ end
1506
+
1507
+ content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
1508
+ if Utils.match_status_code(http_response.status, ['200'])
1509
+ if Utils.match_content_type(content_type, 'application/json')
1510
+ @sdk_configuration.hooks.after_success(
1511
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1512
+ hook_ctx: hook_ctx
1513
+ ),
1514
+ response: http_response
1515
+ )
1516
+ response_data = http_response.env.response_body
1517
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::BanPartnerResponseBody)
1518
+
1519
+ return obj
1520
+ else
1521
+ 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'
1522
+ end
1523
+ elsif Utils.match_status_code(http_response.status, ['400'])
1524
+ if Utils.match_content_type(content_type, 'application/json')
1525
+ @sdk_configuration.hooks.after_success(
1526
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1527
+ hook_ctx: hook_ctx
1528
+ ),
1529
+ response: http_response
1530
+ )
1531
+ response_data = http_response.env.response_body
1532
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequest)
1533
+ raise obj
1534
+ else
1535
+ 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'
1536
+ end
1537
+ elsif Utils.match_status_code(http_response.status, ['401'])
1538
+ if Utils.match_content_type(content_type, 'application/json')
1539
+ @sdk_configuration.hooks.after_success(
1540
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1541
+ hook_ctx: hook_ctx
1542
+ ),
1543
+ response: http_response
1544
+ )
1545
+ response_data = http_response.env.response_body
1546
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Unauthorized)
1547
+ raise obj
1548
+ else
1549
+ 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'
1550
+ end
1551
+ elsif Utils.match_status_code(http_response.status, ['403'])
1552
+ if Utils.match_content_type(content_type, 'application/json')
1553
+ @sdk_configuration.hooks.after_success(
1554
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1555
+ hook_ctx: hook_ctx
1556
+ ),
1557
+ response: http_response
1558
+ )
1559
+ response_data = http_response.env.response_body
1560
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Forbidden)
1561
+ raise obj
1562
+ else
1563
+ 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'
1564
+ end
1565
+ elsif Utils.match_status_code(http_response.status, ['404'])
1566
+ if Utils.match_content_type(content_type, 'application/json')
1567
+ @sdk_configuration.hooks.after_success(
1568
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1569
+ hook_ctx: hook_ctx
1570
+ ),
1571
+ response: http_response
1572
+ )
1573
+ response_data = http_response.env.response_body
1574
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFound)
1575
+ raise obj
1576
+ else
1577
+ 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'
1578
+ end
1579
+ elsif Utils.match_status_code(http_response.status, ['409'])
1580
+ if Utils.match_content_type(content_type, 'application/json')
1581
+ @sdk_configuration.hooks.after_success(
1582
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1583
+ hook_ctx: hook_ctx
1584
+ ),
1585
+ response: http_response
1586
+ )
1587
+ response_data = http_response.env.response_body
1588
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Conflict)
1589
+ raise obj
1590
+ else
1591
+ 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'
1592
+ end
1593
+ elsif Utils.match_status_code(http_response.status, ['410'])
1594
+ if Utils.match_content_type(content_type, 'application/json')
1595
+ @sdk_configuration.hooks.after_success(
1596
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1597
+ hook_ctx: hook_ctx
1598
+ ),
1599
+ response: http_response
1600
+ )
1601
+ response_data = http_response.env.response_body
1602
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InviteExpired)
1603
+ raise obj
1604
+ else
1605
+ 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'
1606
+ end
1607
+ elsif Utils.match_status_code(http_response.status, ['422'])
1608
+ if Utils.match_content_type(content_type, 'application/json')
1609
+ @sdk_configuration.hooks.after_success(
1610
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1611
+ hook_ctx: hook_ctx
1612
+ ),
1613
+ response: http_response
1614
+ )
1615
+ response_data = http_response.env.response_body
1616
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnprocessableEntity)
1617
+ raise obj
1618
+ else
1619
+ 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'
1620
+ end
1621
+ elsif Utils.match_status_code(http_response.status, ['429'])
1622
+ if Utils.match_content_type(content_type, 'application/json')
1623
+ @sdk_configuration.hooks.after_success(
1624
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1625
+ hook_ctx: hook_ctx
1626
+ ),
1627
+ response: http_response
1628
+ )
1629
+ response_data = http_response.env.response_body
1630
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitExceeded)
1631
+ raise obj
1632
+ else
1633
+ 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'
1634
+ end
1635
+ elsif Utils.match_status_code(http_response.status, ['500'])
1636
+ if Utils.match_content_type(content_type, 'application/json')
1637
+ @sdk_configuration.hooks.after_success(
1638
+ hook_ctx: SDKHooks::AfterSuccessHookContext.new(
1639
+ hook_ctx: hook_ctx
1640
+ ),
1641
+ response: http_response
1642
+ )
1643
+ response_data = http_response.env.response_body
1644
+ obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError)
1645
+ raise obj
1646
+ else
1647
+ 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'
1648
+ end
1649
+ elsif Utils.match_status_code(http_response.status, ['4XX'])
1650
+ raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1651
+ elsif Utils.match_status_code(http_response.status, ['5XX'])
1652
+ raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
1653
+ else
1654
+ 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'
1655
+
1656
+ end
1657
+ end
1423
1658
  end
1424
1659
  end
@@ -89,9 +89,9 @@ module OpenApiSDK
89
89
  end
90
90
  @language = 'ruby'
91
91
  @openapi_doc_version = '0.0.1'
92
- @sdk_version = '0.11.0'
93
- @gen_version = '2.731.6'
94
- @user_agent = 'speakeasy-sdk/ruby 0.11.0 2.731.6 0.0.1 dub'
92
+ @sdk_version = '0.12.0'
93
+ @gen_version = '2.763.3'
94
+ @user_agent = 'speakeasy-sdk/ruby 0.12.0 2.763.3 0.0.1 dub'
95
95
  end
96
96
 
97
97
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-30 00:00:00.000000000 Z
11
+ date: 2025-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -282,6 +282,10 @@ files:
282
282
  - lib/open_api_sdk/models/operations/accesslevel.rbi
283
283
  - lib/open_api_sdk/models/operations/bannedreason.rb
284
284
  - lib/open_api_sdk/models/operations/bannedreason.rbi
285
+ - lib/open_api_sdk/models/operations/banpartner_requestbody.rb
286
+ - lib/open_api_sdk/models/operations/banpartner_requestbody.rbi
287
+ - lib/open_api_sdk/models/operations/banpartner_responsebody.rb
288
+ - lib/open_api_sdk/models/operations/banpartner_responsebody.rbi
285
289
  - lib/open_api_sdk/models/operations/bulkcreatelinks_tagids.rb
286
290
  - lib/open_api_sdk/models/operations/bulkcreatelinks_tagids.rbi
287
291
  - lib/open_api_sdk/models/operations/bulkcreatelinks_tagnames.rb
@@ -308,18 +312,6 @@ files:
308
312
  - lib/open_api_sdk/models/operations/click.rbi
309
313
  - lib/open_api_sdk/models/operations/color.rb
310
314
  - lib/open_api_sdk/models/operations/color.rbi
311
- - lib/open_api_sdk/models/operations/createcustomer_discount.rb
312
- - lib/open_api_sdk/models/operations/createcustomer_discount.rbi
313
- - lib/open_api_sdk/models/operations/createcustomer_link.rb
314
- - lib/open_api_sdk/models/operations/createcustomer_link.rbi
315
- - lib/open_api_sdk/models/operations/createcustomer_partner.rb
316
- - lib/open_api_sdk/models/operations/createcustomer_partner.rbi
317
- - lib/open_api_sdk/models/operations/createcustomer_requestbody.rb
318
- - lib/open_api_sdk/models/operations/createcustomer_requestbody.rbi
319
- - lib/open_api_sdk/models/operations/createcustomer_responsebody.rb
320
- - lib/open_api_sdk/models/operations/createcustomer_responsebody.rbi
321
- - lib/open_api_sdk/models/operations/createcustomer_type.rb
322
- - lib/open_api_sdk/models/operations/createcustomer_type.rbi
323
315
  - lib/open_api_sdk/models/operations/createdomain_requestbody.rb
324
316
  - lib/open_api_sdk/models/operations/createdomain_requestbody.rbi
325
317
  - lib/open_api_sdk/models/operations/createfolder_requestbody.rb
@@ -532,6 +524,8 @@ files:
532
524
  - lib/open_api_sdk/models/operations/queryparam_tagnames.rbi
533
525
  - lib/open_api_sdk/models/operations/queryparam_trigger.rb
534
526
  - lib/open_api_sdk/models/operations/queryparam_trigger.rbi
527
+ - lib/open_api_sdk/models/operations/reason.rb
528
+ - lib/open_api_sdk/models/operations/reason.rbi
535
529
  - lib/open_api_sdk/models/operations/registerdomain_requestbody.rb
536
530
  - lib/open_api_sdk/models/operations/registerdomain_requestbody.rbi
537
531
  - lib/open_api_sdk/models/operations/registerdomain_responsebody.rb
@@ -703,6 +697,8 @@ files:
703
697
  - lib/open_api_sdk/models/shared/analyticstopurls.rbi
704
698
  - lib/open_api_sdk/models/shared/analyticstriggers.rb
705
699
  - lib/open_api_sdk/models/shared/analyticstriggers.rbi
700
+ - lib/open_api_sdk/models/shared/applicationformdata.rb
701
+ - lib/open_api_sdk/models/shared/applicationformdata.rbi
706
702
  - lib/open_api_sdk/models/shared/bannedreason.rb
707
703
  - lib/open_api_sdk/models/shared/bannedreason.rbi
708
704
  - lib/open_api_sdk/models/shared/city.rb
@@ -807,6 +803,16 @@ files:
807
803
  - lib/open_api_sdk/models/shared/partneranalyticstimeseries.rbi
808
804
  - lib/open_api_sdk/models/shared/partneranalyticstoplinks.rb
809
805
  - lib/open_api_sdk/models/shared/partneranalyticstoplinks.rbi
806
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rb
807
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rbi
808
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rb
809
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rbi
810
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rb
811
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rbi
812
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rb
813
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rbi
814
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rb
815
+ - lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rbi
810
816
  - lib/open_api_sdk/models/shared/partnerenrolledevent.rb
811
817
  - lib/open_api_sdk/models/shared/partnerenrolledevent.rbi
812
818
  - lib/open_api_sdk/models/shared/partnerenrolledevent_data.rb
@@ -1,61 +0,0 @@
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 CreateCustomerDiscount
13
- extend T::Sig
14
- include Crystalline::MetadataFields
15
-
16
-
17
- field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
18
-
19
- field :amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount'), required: true } }
20
-
21
- field :type, Models::Operations::CreateCustomerType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), required: true, 'decoder': Utils.enum_from_string(Models::Operations::CreateCustomerType, false) } }
22
-
23
- field :max_duration, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('maxDuration'), required: true } }
24
-
25
- field :coupon_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('couponId'), required: true } }
26
-
27
- field :coupon_test_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('couponTestId'), required: true } }
28
-
29
- field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
30
-
31
- field :partners_count, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnersCount') } }
32
-
33
- sig { params(id: ::String, amount: ::Float, type: Models::Operations::CreateCustomerType, max_duration: T.nilable(::Float), coupon_id: T.nilable(::String), coupon_test_id: T.nilable(::String), description: T.nilable(::String), partners_count: T.nilable(::Float)).void }
34
- def initialize(id:, amount:, type:, max_duration: nil, coupon_id: nil, coupon_test_id: nil, description: nil, partners_count: nil)
35
- @id = id
36
- @amount = amount
37
- @type = type
38
- @max_duration = max_duration
39
- @coupon_id = coupon_id
40
- @coupon_test_id = coupon_test_id
41
- @description = description
42
- @partners_count = partners_count
43
- end
44
-
45
- sig { params(other: T.untyped).returns(T::Boolean) }
46
- def ==(other)
47
- return false unless other.is_a? self.class
48
- return false unless @id == other.id
49
- return false unless @amount == other.amount
50
- return false unless @type == other.type
51
- return false unless @max_duration == other.max_duration
52
- return false unless @coupon_id == other.coupon_id
53
- return false unless @coupon_test_id == other.coupon_test_id
54
- return false unless @description == other.description
55
- return false unless @partners_count == other.partners_count
56
- true
57
- end
58
- end
59
- end
60
- end
61
- end
@@ -1,27 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
-
5
- class OpenApiSDK::Models::Operations::CreateCustomerDiscount
6
- extend ::Crystalline::MetadataFields::ClassMethods
7
- end
8
-
9
-
10
- class OpenApiSDK::Models::Operations::CreateCustomerDiscount
11
- def id(); end
12
- def id=(str_); end
13
- def amount(); end
14
- def amount=(str_); end
15
- def type(); end
16
- def type=(str_); end
17
- def max_duration(); end
18
- def max_duration=(str_); end
19
- def coupon_id(); end
20
- def coupon_id=(str_); end
21
- def coupon_test_id(); end
22
- def coupon_test_id=(str_); end
23
- def description(); end
24
- def description=(str_); end
25
- def partners_count(); end
26
- def partners_count=(str_); end
27
- end
@@ -1,53 +0,0 @@
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 CreateCustomerLink
13
- extend T::Sig
14
- include Crystalline::MetadataFields
15
-
16
- # The unique ID of the short link.
17
- field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
18
- # The domain of the short link. If not provided, the primary domain for the workspace will be used (or `dub.sh` if the workspace has no domains).
19
- field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain'), required: true } }
20
- # The short link slug. If not provided, a random 7-character slug will be generated.
21
- field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key'), required: true } }
22
- # The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
23
- field :short_link, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('shortLink'), required: true } }
24
- # The destination URL of the short link.
25
- field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url'), required: true } }
26
- # The ID of the program the short link is associated with.
27
- field :program_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('programId'), required: true } }
28
-
29
- sig { params(id: ::String, domain: ::String, key: ::String, short_link: ::String, url: ::String, program_id: T.nilable(::String)).void }
30
- def initialize(id:, domain:, key:, short_link:, url:, program_id: nil)
31
- @id = id
32
- @domain = domain
33
- @key = key
34
- @short_link = short_link
35
- @url = url
36
- @program_id = program_id
37
- end
38
-
39
- sig { params(other: T.untyped).returns(T::Boolean) }
40
- def ==(other)
41
- return false unless other.is_a? self.class
42
- return false unless @id == other.id
43
- return false unless @domain == other.domain
44
- return false unless @key == other.key
45
- return false unless @short_link == other.short_link
46
- return false unless @url == other.url
47
- return false unless @program_id == other.program_id
48
- true
49
- end
50
- end
51
- end
52
- end
53
- end
@@ -1,23 +0,0 @@
1
- # typed: true
2
- # frozen_string_literal: true
3
-
4
-
5
- class OpenApiSDK::Models::Operations::CreateCustomerLink
6
- extend ::Crystalline::MetadataFields::ClassMethods
7
- end
8
-
9
-
10
- class OpenApiSDK::Models::Operations::CreateCustomerLink
11
- def id(); end
12
- def id=(str_); end
13
- def domain(); end
14
- def domain=(str_); end
15
- def key(); end
16
- def key=(str_); end
17
- def short_link(); end
18
- def short_link=(str_); end
19
- def url(); end
20
- def url=(str_); end
21
- def program_id(); end
22
- def program_id=(str_); end
23
- end
@@ -1,45 +0,0 @@
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 CreateCustomerPartner
13
- extend T::Sig
14
- include Crystalline::MetadataFields
15
-
16
- # The partner's unique ID on Dub.
17
- field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
18
- # The partner's full legal name.
19
- field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name'), required: true } }
20
- # The partner's email address. Should be a unique value across Dub.
21
- field :email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email'), required: true } }
22
- # The partner's avatar image.
23
- field :image, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image'), required: true } }
24
-
25
- sig { params(id: ::String, name: ::String, email: T.nilable(::String), image: T.nilable(::String)).void }
26
- def initialize(id:, name:, email: nil, image: nil)
27
- @id = id
28
- @name = name
29
- @email = email
30
- @image = image
31
- end
32
-
33
- sig { params(other: T.untyped).returns(T::Boolean) }
34
- def ==(other)
35
- return false unless other.is_a? self.class
36
- return false unless @id == other.id
37
- return false unless @name == other.name
38
- return false unless @email == other.email
39
- return false unless @image == other.image
40
- true
41
- end
42
- end
43
- end
44
- end
45
- end