dub 0.2.2.pre.alpha.55 → 0.2.2.pre.alpha.57

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55f9b73c3808d9f2eda06800381f633d42a0cbb7e38cf5aa4cfd8936c6570d96
4
- data.tar.gz: a66e94d859f1e1d9ee4113fffe7669b89794a93d4488b39afda8733efc55fcec
3
+ metadata.gz: 90ca44a44887c34dfd6efaea0d96ca25a8f867d04e6eefd4f937514f0a1d56c6
4
+ data.tar.gz: 0f4379035ac6e6ce5f892a31b654f32f2963d42d91195b0a6051c5b7592be313
5
5
  SHA512:
6
- metadata.gz: a5eb164d17f696c9f25ec91a82f7d4f971dd57ae4dadc3a4615437f78c9cef1dd4fed689aa2407f53ae7fcc750f7403fd2dc3c6dcbb03b6cd80b6c92e162460d
7
- data.tar.gz: aa9aa3580dc32b8d8fc03dcf471519cd7b072acbc98fa13092fe2381eb4374cd36cd2c2931707b9088fdc8d30bc808b95a3558232740838a673c51871452a754
6
+ metadata.gz: 0c1dafe19f778dd507e0c95521348b419ff4c26e2e48efd6d89f23a3a9c817f165a989e6193752eb5dde84ca4b46e46dbda54e716534ff8eb9f402dfde87075d
7
+ data.tar.gz: ffe0491ea65b40a469a969a0547ac67508c461bef8f1ce4f4908632426abccd552b45a1853619cd557a1be6defe979eb9a16bcaa4898921c44e26c977a72c9e2
data/lib/dub.rb CHANGED
@@ -14,6 +14,7 @@ module OpenApiSDK
14
14
  autoload :Domains, 'open_api_sdk/domains'
15
15
  autoload :Track, 'open_api_sdk/track'
16
16
  autoload :Customers, 'open_api_sdk/customers'
17
+ autoload :Partners, 'open_api_sdk/partners'
17
18
  autoload :Workspaces, 'open_api_sdk/workspaces'
18
19
  autoload :EmbedTokens, 'open_api_sdk/embed_tokens'
19
20
  autoload :QRCodes, 'open_api_sdk/qr_codes'
@@ -13,7 +13,7 @@ module OpenApiSDK
13
13
  class Dub
14
14
  extend T::Sig
15
15
 
16
- attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :embed_tokens, :qr_codes, :metatags
16
+ attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :partners, :workspaces, :embed_tokens, :qr_codes, :metatags
17
17
 
18
18
  sig do
19
19
  params(client: Faraday::Request,
@@ -82,6 +82,7 @@ module OpenApiSDK
82
82
  @domains = Domains.new(@sdk_configuration)
83
83
  @track = Track.new(@sdk_configuration)
84
84
  @customers = Customers.new(@sdk_configuration)
85
+ @partners = Partners.new(@sdk_configuration)
85
86
  @workspaces = Workspaces.new(@sdk_configuration)
86
87
  @embed_tokens = EmbedTokens.new(@sdk_configuration)
87
88
  @qr_codes = QRCodes.new(@sdk_configuration)
@@ -0,0 +1,266 @@
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 Operations
9
+
10
+ # Country - Country where the partner is based.
11
+ class Country < T::Enum
12
+ enums do
13
+ AF = new('AF')
14
+ AL = new('AL')
15
+ DZ = new('DZ')
16
+ AS = new('AS')
17
+ AD = new('AD')
18
+ AO = new('AO')
19
+ AI = new('AI')
20
+ AQ = new('AQ')
21
+ AG = new('AG')
22
+ AR = new('AR')
23
+ AM = new('AM')
24
+ AW = new('AW')
25
+ AU = new('AU')
26
+ AT = new('AT')
27
+ AZ = new('AZ')
28
+ BS = new('BS')
29
+ BH = new('BH')
30
+ BD = new('BD')
31
+ BB = new('BB')
32
+ BY = new('BY')
33
+ BE = new('BE')
34
+ BZ = new('BZ')
35
+ BJ = new('BJ')
36
+ BM = new('BM')
37
+ BT = new('BT')
38
+ BO = new('BO')
39
+ BA = new('BA')
40
+ BW = new('BW')
41
+ BV = new('BV')
42
+ BR = new('BR')
43
+ IO = new('IO')
44
+ BN = new('BN')
45
+ BG = new('BG')
46
+ BF = new('BF')
47
+ BI = new('BI')
48
+ KH = new('KH')
49
+ CM = new('CM')
50
+ CA = new('CA')
51
+ CV = new('CV')
52
+ KY = new('KY')
53
+ CF = new('CF')
54
+ TD = new('TD')
55
+ CL = new('CL')
56
+ CN = new('CN')
57
+ CX = new('CX')
58
+ CC = new('CC')
59
+ CO = new('CO')
60
+ KM = new('KM')
61
+ CG = new('CG')
62
+ CD = new('CD')
63
+ CK = new('CK')
64
+ CR = new('CR')
65
+ CI = new('CI')
66
+ HR = new('HR')
67
+ CU = new('CU')
68
+ CY = new('CY')
69
+ CZ = new('CZ')
70
+ DK = new('DK')
71
+ DJ = new('DJ')
72
+ DM = new('DM')
73
+ DO = new('DO')
74
+ EC = new('EC')
75
+ EG = new('EG')
76
+ SV = new('SV')
77
+ GQ = new('GQ')
78
+ ER = new('ER')
79
+ EE = new('EE')
80
+ ET = new('ET')
81
+ FK = new('FK')
82
+ FO = new('FO')
83
+ FJ = new('FJ')
84
+ FI = new('FI')
85
+ FR = new('FR')
86
+ GF = new('GF')
87
+ PF = new('PF')
88
+ TF = new('TF')
89
+ GA = new('GA')
90
+ GM = new('GM')
91
+ GE = new('GE')
92
+ DE = new('DE')
93
+ GH = new('GH')
94
+ GI = new('GI')
95
+ GR = new('GR')
96
+ GL = new('GL')
97
+ GD = new('GD')
98
+ GP = new('GP')
99
+ GU = new('GU')
100
+ GT = new('GT')
101
+ GN = new('GN')
102
+ GW = new('GW')
103
+ GY = new('GY')
104
+ HT = new('HT')
105
+ HM = new('HM')
106
+ VA = new('VA')
107
+ HN = new('HN')
108
+ HK = new('HK')
109
+ HU = new('HU')
110
+ IS = new('IS')
111
+ IN = new('IN')
112
+ ID = new('ID')
113
+ IR = new('IR')
114
+ IQ = new('IQ')
115
+ IE = new('IE')
116
+ IL = new('IL')
117
+ IT = new('IT')
118
+ JM = new('JM')
119
+ JP = new('JP')
120
+ JO = new('JO')
121
+ KZ = new('KZ')
122
+ KE = new('KE')
123
+ KI = new('KI')
124
+ KP = new('KP')
125
+ KR = new('KR')
126
+ KW = new('KW')
127
+ KG = new('KG')
128
+ LA = new('LA')
129
+ LV = new('LV')
130
+ LB = new('LB')
131
+ LS = new('LS')
132
+ LR = new('LR')
133
+ LY = new('LY')
134
+ LI = new('LI')
135
+ LT = new('LT')
136
+ LU = new('LU')
137
+ MO = new('MO')
138
+ MG = new('MG')
139
+ MW = new('MW')
140
+ MY = new('MY')
141
+ MV = new('MV')
142
+ ML = new('ML')
143
+ MT = new('MT')
144
+ MH = new('MH')
145
+ MQ = new('MQ')
146
+ MR = new('MR')
147
+ MU = new('MU')
148
+ YT = new('YT')
149
+ MX = new('MX')
150
+ FM = new('FM')
151
+ MD = new('MD')
152
+ MC = new('MC')
153
+ MN = new('MN')
154
+ MS = new('MS')
155
+ MA = new('MA')
156
+ MZ = new('MZ')
157
+ MM = new('MM')
158
+ NA = new('NA')
159
+ NR = new('NR')
160
+ NP = new('NP')
161
+ NL = new('NL')
162
+ NC = new('NC')
163
+ NZ = new('NZ')
164
+ NI = new('NI')
165
+ NE = new('NE')
166
+ NG = new('NG')
167
+ NU = new('NU')
168
+ NF = new('NF')
169
+ MK = new('MK')
170
+ MP = new('MP')
171
+ NO = new('NO')
172
+ OM = new('OM')
173
+ PK = new('PK')
174
+ PW = new('PW')
175
+ PS = new('PS')
176
+ PA = new('PA')
177
+ PG = new('PG')
178
+ PY = new('PY')
179
+ PE = new('PE')
180
+ PH = new('PH')
181
+ PN = new('PN')
182
+ PL = new('PL')
183
+ PT = new('PT')
184
+ PR = new('PR')
185
+ QA = new('QA')
186
+ RE = new('RE')
187
+ RO = new('RO')
188
+ RU = new('RU')
189
+ RW = new('RW')
190
+ SH = new('SH')
191
+ KN = new('KN')
192
+ LC = new('LC')
193
+ PM = new('PM')
194
+ VC = new('VC')
195
+ WS = new('WS')
196
+ SM = new('SM')
197
+ ST = new('ST')
198
+ SA = new('SA')
199
+ SN = new('SN')
200
+ SC = new('SC')
201
+ SL = new('SL')
202
+ SG = new('SG')
203
+ SK = new('SK')
204
+ SI = new('SI')
205
+ SB = new('SB')
206
+ SO = new('SO')
207
+ ZA = new('ZA')
208
+ GS = new('GS')
209
+ ES = new('ES')
210
+ LK = new('LK')
211
+ SD = new('SD')
212
+ SR = new('SR')
213
+ SJ = new('SJ')
214
+ SZ = new('SZ')
215
+ SE = new('SE')
216
+ CH = new('CH')
217
+ SY = new('SY')
218
+ TW = new('TW')
219
+ TJ = new('TJ')
220
+ TZ = new('TZ')
221
+ TH = new('TH')
222
+ TL = new('TL')
223
+ TG = new('TG')
224
+ TK = new('TK')
225
+ TO = new('TO')
226
+ TT = new('TT')
227
+ TN = new('TN')
228
+ TR = new('TR')
229
+ TM = new('TM')
230
+ TC = new('TC')
231
+ TV = new('TV')
232
+ UG = new('UG')
233
+ UA = new('UA')
234
+ AE = new('AE')
235
+ GB = new('GB')
236
+ US = new('US')
237
+ UM = new('UM')
238
+ UY = new('UY')
239
+ UZ = new('UZ')
240
+ VU = new('VU')
241
+ VE = new('VE')
242
+ VN = new('VN')
243
+ VG = new('VG')
244
+ VI = new('VI')
245
+ WF = new('WF')
246
+ EH = new('EH')
247
+ YE = new('YE')
248
+ ZM = new('ZM')
249
+ ZW = new('ZW')
250
+ AX = new('AX')
251
+ BQ = new('BQ')
252
+ CW = new('CW')
253
+ GG = new('GG')
254
+ IM = new('IM')
255
+ JE = new('JE')
256
+ ME = new('ME')
257
+ BL = new('BL')
258
+ MF = new('MF')
259
+ RS = new('RS')
260
+ SX = new('SX')
261
+ SS = new('SS')
262
+ XK = new('XK')
263
+ end
264
+ end
265
+ end
266
+ end
@@ -0,0 +1,42 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerDiscount < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } }
16
+
17
+ field :coupon_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('couponId') } }
18
+
19
+ field :coupon_test_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('couponTestId') } }
20
+
21
+ field :duration, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('duration') } }
22
+
23
+ field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
24
+
25
+ field :interval, ::OpenApiSDK::Operations::CreatePartnerInterval, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('interval'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::CreatePartnerInterval, false) } }
26
+
27
+ field :type, ::OpenApiSDK::Operations::CreatePartnerType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::CreatePartnerType, false) } }
28
+
29
+
30
+ sig { params(amount: ::Float, coupon_id: ::String, coupon_test_id: ::String, duration: ::Float, id: ::String, interval: ::OpenApiSDK::Operations::CreatePartnerInterval, type: ::OpenApiSDK::Operations::CreatePartnerType).void }
31
+ def initialize(amount: nil, coupon_id: nil, coupon_test_id: nil, duration: nil, id: nil, interval: nil, type: nil)
32
+ @amount = amount
33
+ @coupon_id = coupon_id
34
+ @coupon_test_id = coupon_test_id
35
+ @duration = duration
36
+ @id = id
37
+ @interval = interval
38
+ @type = type
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,18 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerInterval < T::Enum
12
+ enums do
13
+ MONTH = new('month')
14
+ YEAR = new('year')
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,48 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerLink < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The number of clicks on the short link.
15
+ field :clicks, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clicks') } }
16
+ # 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).
17
+ field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } }
18
+ # The unique ID of the short link.
19
+ field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
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') } }
22
+ # The number of leads the short links has generated.
23
+ field :leads, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leads') } }
24
+ # The total dollar amount of sales the short links has generated (in cents).
25
+ field :sale_amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('saleAmount') } }
26
+ # The number of sales the short links has generated.
27
+ field :sales, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sales') } }
28
+ # The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
29
+ field :short_link, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('shortLink') } }
30
+ # The destination URL of the short link.
31
+ field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
32
+
33
+
34
+ sig { params(clicks: ::Float, domain: ::String, id: ::String, key: ::String, leads: ::Float, sale_amount: ::Float, sales: ::Float, short_link: ::String, url: ::String).void }
35
+ def initialize(clicks: nil, domain: nil, id: nil, key: nil, leads: nil, sale_amount: nil, sales: nil, short_link: nil, url: nil)
36
+ @clicks = clicks
37
+ @domain = domain
38
+ @id = id
39
+ @key = key
40
+ @leads = leads
41
+ @sale_amount = sale_amount
42
+ @sales = sales
43
+ @short_link = short_link
44
+ @url = url
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,42 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerRequestBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # Email for the partner in your system. Partners will be able to claim their profile by signing up to Dub Partners with this email.
15
+ field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
16
+ # Full legal name of the partner.
17
+ field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
18
+ # The ID of the program to create a partner for.
19
+ field :program_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('programId') } }
20
+ # A unique username for the partner in your system. This will be used to create a short link for the partner using your program's default domain.
21
+ field :username, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('username') } }
22
+ # Country where the partner is based.
23
+ field :country, T.nilable(::OpenApiSDK::Operations::Country), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::Country, true) } }
24
+ # A brief description of the partner and their background.
25
+ field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
26
+ # Avatar image for the partner – if not provided, a default avatar will be used.
27
+ field :image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
28
+
29
+
30
+ sig { params(email: ::String, name: ::String, program_id: ::String, username: ::String, country: T.nilable(::OpenApiSDK::Operations::Country), description: T.nilable(::String), image: T.nilable(::String)).void }
31
+ def initialize(email: nil, name: nil, program_id: nil, username: nil, country: nil, description: nil, image: nil)
32
+ @email = email
33
+ @name = name
34
+ @program_id = program_id
35
+ @username = username
36
+ @country = country
37
+ @description = description
38
+ @image = image
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,60 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerResponse < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
21
+ field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
22
+ # This response is sent when a request conflicts with the current state of the server.
23
+ field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
24
+ # The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
25
+ field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
26
+ # The server has encountered a situation it does not know how to handle.
27
+ field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError)
28
+ # This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
29
+ field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
30
+ # The server cannot find the requested resource.
31
+ field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
32
+ # The created partner
33
+ field :object, T.nilable(::OpenApiSDK::Operations::CreatePartnerResponseBody)
34
+ # The user has sent too many requests in a given amount of time ("rate limiting")
35
+ field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
36
+ # Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
37
+ field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
38
+ # The request was well-formed but was unable to be followed due to semantic errors.
39
+ field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
40
+
41
+
42
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::CreatePartnerResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void }
43
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil)
44
+ @content_type = content_type
45
+ @raw_response = raw_response
46
+ @status_code = status_code
47
+ @bad_request = bad_request
48
+ @conflict = conflict
49
+ @forbidden = forbidden
50
+ @internal_server_error = internal_server_error
51
+ @invite_expired = invite_expired
52
+ @not_found = not_found
53
+ @object = object
54
+ @rate_limit_exceeded = rate_limit_exceeded
55
+ @unauthorized = unauthorized
56
+ @unprocessable_entity = unprocessable_entity
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,69 @@
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 Operations
9
+
10
+ # The created partner
11
+ class CreatePartnerResponseBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+
15
+ field :bio, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('bio') } }
16
+
17
+ field :commission_amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('commissionAmount') } }
18
+
19
+ field :country, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country') } }
20
+
21
+ field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
22
+
23
+ field :earnings, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earnings') } }
24
+
25
+ field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
26
+
27
+ field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
28
+
29
+ field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
30
+
31
+ field :link, ::OpenApiSDK::Operations::CreatePartnerLink, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('link') } }
32
+
33
+ field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
34
+
35
+ field :payouts_enabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payoutsEnabled') } }
36
+
37
+ field :status, ::OpenApiSDK::Operations::Status, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::Status, false) } }
38
+
39
+ field :stripe_connect_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('stripeConnectId') } }
40
+
41
+ field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
42
+
43
+ field :coupon_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('couponId') } }
44
+
45
+ field :discount, T.nilable(::OpenApiSDK::Operations::CreatePartnerDiscount), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('discount') } }
46
+
47
+
48
+ sig { params(bio: ::String, commission_amount: ::Float, country: ::String, created_at: ::String, earnings: ::Float, email: ::String, id: ::String, image: ::String, link: ::OpenApiSDK::Operations::CreatePartnerLink, name: ::String, payouts_enabled: T::Boolean, status: ::OpenApiSDK::Operations::Status, stripe_connect_id: ::String, updated_at: ::String, coupon_id: T.nilable(::String), discount: T.nilable(::OpenApiSDK::Operations::CreatePartnerDiscount)).void }
49
+ def initialize(bio: nil, commission_amount: nil, country: nil, created_at: nil, earnings: nil, email: nil, id: nil, image: nil, link: nil, name: nil, payouts_enabled: nil, status: nil, stripe_connect_id: nil, updated_at: nil, coupon_id: nil, discount: nil)
50
+ @bio = bio
51
+ @commission_amount = commission_amount
52
+ @country = country
53
+ @created_at = created_at
54
+ @earnings = earnings
55
+ @email = email
56
+ @id = id
57
+ @image = image
58
+ @link = link
59
+ @name = name
60
+ @payouts_enabled = payouts_enabled
61
+ @status = status
62
+ @stripe_connect_id = stripe_connect_id
63
+ @updated_at = updated_at
64
+ @coupon_id = coupon_id
65
+ @discount = discount
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,18 @@
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 Operations
9
+
10
+
11
+ class CreatePartnerType < T::Enum
12
+ enums do
13
+ PERCENTAGE = new('percentage')
14
+ FLAT = new('flat')
15
+ end
16
+ end
17
+ end
18
+ end
@@ -7,7 +7,7 @@
7
7
  module OpenApiSDK
8
8
  module Operations
9
9
 
10
- # GroupBy - The parameter to group the analytics data points by. Defaults to `count` if undefined. Note that `trigger` is deprecated (use `triggers` instead), but kept for backwards compatibility.
10
+ # GroupBy - The parameter to group the analytics data points by. Defaults to `count` if undefined.
11
11
  class GroupBy < T::Enum
12
12
  enums do
13
13
  COUNT = new('count')
@@ -25,6 +25,11 @@ module OpenApiSDK
25
25
  REFERER_URLS = new('referer_urls')
26
26
  TOP_LINKS = new('top_links')
27
27
  TOP_URLS = new('top_urls')
28
+ UTM_SOURCES = new('utm_sources')
29
+ UTM_MEDIUMS = new('utm_mediums')
30
+ UTM_CAMPAIGNS = new('utm_campaigns')
31
+ UTM_TERMS = new('utm_terms')
32
+ UTM_CONTENTS = new('utm_contents')
28
33
  end
29
34
  end
30
35
  end
@@ -69,10 +69,20 @@ module OpenApiSDK
69
69
  field :trigger, T.nilable(::OpenApiSDK::Operations::QueryParamTrigger), { 'query_param': { 'field_name': 'trigger', 'style': 'form', 'explode': true } }
70
70
  # The URL to retrieve analytics for.
71
71
  field :url, T.nilable(::String), { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
72
+ # The UTM campaign of the short link.
73
+ field :utm_campaign, T.nilable(::String), { 'query_param': { 'field_name': 'utm_campaign', 'style': 'form', 'explode': true } }
74
+ # The UTM content of the short link.
75
+ field :utm_content, T.nilable(::String), { 'query_param': { 'field_name': 'utm_content', 'style': 'form', 'explode': true } }
76
+ # The UTM medium of the short link.
77
+ field :utm_medium, T.nilable(::String), { 'query_param': { 'field_name': 'utm_medium', 'style': 'form', 'explode': true } }
78
+ # The UTM source of the short link.
79
+ field :utm_source, T.nilable(::String), { 'query_param': { 'field_name': 'utm_source', 'style': 'form', 'explode': true } }
80
+ # The UTM term of the short link.
81
+ field :utm_term, T.nilable(::String), { 'query_param': { 'field_name': 'utm_term', 'style': 'form', 'explode': true } }
72
82
 
73
83
 
74
- sig { params(browser: T.nilable(::String), city: T.nilable(::String), continent: T.nilable(::OpenApiSDK::Shared::ContinentCode), country: T.nilable(::OpenApiSDK::Shared::CountryCode), device: T.nilable(::String), domain: T.nilable(::String), end_: T.nilable(::String), event: T.nilable(::OpenApiSDK::Operations::QueryParamEvent), external_id: T.nilable(::String), interval: T.nilable(::OpenApiSDK::Operations::QueryParamInterval), key: T.nilable(::String), limit: T.nilable(::Float), link_id: T.nilable(::String), order: T.nilable(::OpenApiSDK::Operations::Order), os: T.nilable(::String), page: T.nilable(::Float), qr: T.nilable(T::Boolean), referer: T.nilable(::String), referer_url: T.nilable(::String), region: T.nilable(::String), root: T.nilable(T::Boolean), sort_by: T.nilable(::OpenApiSDK::Operations::QueryParamSortBy), sort_order: T.nilable(::OpenApiSDK::Operations::QueryParamSortOrder), start: T.nilable(::String), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), timezone: T.nilable(::String), trigger: T.nilable(::OpenApiSDK::Operations::QueryParamTrigger), url: T.nilable(::String)).void }
75
- def initialize(browser: nil, city: nil, continent: nil, country: nil, device: nil, domain: nil, end_: nil, event: nil, external_id: nil, interval: nil, key: nil, limit: nil, link_id: nil, order: nil, os: nil, page: nil, qr: nil, referer: nil, referer_url: nil, region: nil, root: nil, sort_by: nil, sort_order: nil, start: nil, tag_id: nil, tag_ids: nil, timezone: nil, trigger: nil, url: nil)
84
+ sig { params(browser: T.nilable(::String), city: T.nilable(::String), continent: T.nilable(::OpenApiSDK::Shared::ContinentCode), country: T.nilable(::OpenApiSDK::Shared::CountryCode), device: T.nilable(::String), domain: T.nilable(::String), end_: T.nilable(::String), event: T.nilable(::OpenApiSDK::Operations::QueryParamEvent), external_id: T.nilable(::String), interval: T.nilable(::OpenApiSDK::Operations::QueryParamInterval), key: T.nilable(::String), limit: T.nilable(::Float), link_id: T.nilable(::String), order: T.nilable(::OpenApiSDK::Operations::Order), os: T.nilable(::String), page: T.nilable(::Float), qr: T.nilable(T::Boolean), referer: T.nilable(::String), referer_url: T.nilable(::String), region: T.nilable(::String), root: T.nilable(T::Boolean), sort_by: T.nilable(::OpenApiSDK::Operations::QueryParamSortBy), sort_order: T.nilable(::OpenApiSDK::Operations::QueryParamSortOrder), start: T.nilable(::String), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), timezone: T.nilable(::String), trigger: T.nilable(::OpenApiSDK::Operations::QueryParamTrigger), url: T.nilable(::String), utm_campaign: T.nilable(::String), utm_content: T.nilable(::String), utm_medium: T.nilable(::String), utm_source: T.nilable(::String), utm_term: T.nilable(::String)).void }
85
+ def initialize(browser: nil, city: nil, continent: nil, country: nil, device: nil, domain: nil, end_: nil, event: nil, external_id: nil, interval: nil, key: nil, limit: nil, link_id: nil, order: nil, os: nil, page: nil, qr: nil, referer: nil, referer_url: nil, region: nil, root: nil, sort_by: nil, sort_order: nil, start: nil, tag_id: nil, tag_ids: nil, timezone: nil, trigger: nil, url: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil)
76
86
  @browser = browser
77
87
  @city = city
78
88
  @continent = continent
@@ -102,6 +112,11 @@ module OpenApiSDK
102
112
  @timezone = timezone
103
113
  @trigger = trigger
104
114
  @url = url
115
+ @utm_campaign = utm_campaign
116
+ @utm_content = utm_content
117
+ @utm_medium = utm_medium
118
+ @utm_source = utm_source
119
+ @utm_term = utm_term
105
120
  end
106
121
  end
107
122
  end
@@ -29,7 +29,7 @@ module OpenApiSDK
29
29
  field :event, T.nilable(::OpenApiSDK::Operations::Event), { 'query_param': { 'field_name': 'event', 'style': 'form', 'explode': true } }
30
30
  # This is the ID of the link in the your database. Must be prefixed with 'ext_' when passed as a query parameter.
31
31
  field :external_id, T.nilable(::String), { 'query_param': { 'field_name': 'externalId', 'style': 'form', 'explode': true } }
32
- # The parameter to group the analytics data points by. Defaults to `count` if undefined. Note that `trigger` is deprecated (use `triggers` instead), but kept for backwards compatibility.
32
+ # The parameter to group the analytics data points by. Defaults to `count` if undefined.
33
33
  field :group_by, T.nilable(::OpenApiSDK::Operations::GroupBy), { 'query_param': { 'field_name': 'groupBy', 'style': 'form', 'explode': true } }
34
34
  # The interval to retrieve analytics for. If undefined, defaults to 24h.
35
35
  field :interval, T.nilable(::OpenApiSDK::Operations::Interval), { 'query_param': { 'field_name': 'interval', 'style': 'form', 'explode': true } }
@@ -61,10 +61,20 @@ module OpenApiSDK
61
61
  field :trigger, T.nilable(::OpenApiSDK::Operations::Trigger), { 'query_param': { 'field_name': 'trigger', 'style': 'form', 'explode': true } }
62
62
  # The URL to retrieve analytics for.
63
63
  field :url, T.nilable(::String), { 'query_param': { 'field_name': 'url', 'style': 'form', 'explode': true } }
64
+ # The UTM campaign of the short link.
65
+ field :utm_campaign, T.nilable(::String), { 'query_param': { 'field_name': 'utm_campaign', 'style': 'form', 'explode': true } }
66
+ # The UTM content of the short link.
67
+ field :utm_content, T.nilable(::String), { 'query_param': { 'field_name': 'utm_content', 'style': 'form', 'explode': true } }
68
+ # The UTM medium of the short link.
69
+ field :utm_medium, T.nilable(::String), { 'query_param': { 'field_name': 'utm_medium', 'style': 'form', 'explode': true } }
70
+ # The UTM source of the short link.
71
+ field :utm_source, T.nilable(::String), { 'query_param': { 'field_name': 'utm_source', 'style': 'form', 'explode': true } }
72
+ # The UTM term of the short link.
73
+ field :utm_term, T.nilable(::String), { 'query_param': { 'field_name': 'utm_term', 'style': 'form', 'explode': true } }
64
74
 
65
75
 
66
- sig { params(browser: T.nilable(::String), city: T.nilable(::String), continent: T.nilable(::OpenApiSDK::Shared::ContinentCode), country: T.nilable(::OpenApiSDK::Shared::CountryCode), device: T.nilable(::String), domain: T.nilable(::String), end_: T.nilable(::String), event: T.nilable(::OpenApiSDK::Operations::Event), external_id: T.nilable(::String), group_by: T.nilable(::OpenApiSDK::Operations::GroupBy), interval: T.nilable(::OpenApiSDK::Operations::Interval), key: T.nilable(::String), link_id: T.nilable(::String), os: T.nilable(::String), qr: T.nilable(T::Boolean), referer: T.nilable(::String), referer_url: T.nilable(::String), region: T.nilable(::String), root: T.nilable(T::Boolean), start: T.nilable(::String), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), timezone: T.nilable(::String), trigger: T.nilable(::OpenApiSDK::Operations::Trigger), url: T.nilable(::String)).void }
67
- def initialize(browser: nil, city: nil, continent: nil, country: nil, device: nil, domain: nil, end_: nil, event: nil, external_id: nil, group_by: nil, interval: nil, key: nil, link_id: nil, os: nil, qr: nil, referer: nil, referer_url: nil, region: nil, root: nil, start: nil, tag_id: nil, tag_ids: nil, timezone: nil, trigger: nil, url: nil)
76
+ sig { params(browser: T.nilable(::String), city: T.nilable(::String), continent: T.nilable(::OpenApiSDK::Shared::ContinentCode), country: T.nilable(::OpenApiSDK::Shared::CountryCode), device: T.nilable(::String), domain: T.nilable(::String), end_: T.nilable(::String), event: T.nilable(::OpenApiSDK::Operations::Event), external_id: T.nilable(::String), group_by: T.nilable(::OpenApiSDK::Operations::GroupBy), interval: T.nilable(::OpenApiSDK::Operations::Interval), key: T.nilable(::String), link_id: T.nilable(::String), os: T.nilable(::String), qr: T.nilable(T::Boolean), referer: T.nilable(::String), referer_url: T.nilable(::String), region: T.nilable(::String), root: T.nilable(T::Boolean), start: T.nilable(::String), tag_id: T.nilable(::String), tag_ids: T.nilable(::Object), timezone: T.nilable(::String), trigger: T.nilable(::OpenApiSDK::Operations::Trigger), url: T.nilable(::String), utm_campaign: T.nilable(::String), utm_content: T.nilable(::String), utm_medium: T.nilable(::String), utm_source: T.nilable(::String), utm_term: T.nilable(::String)).void }
77
+ def initialize(browser: nil, city: nil, continent: nil, country: nil, device: nil, domain: nil, end_: nil, event: nil, external_id: nil, group_by: nil, interval: nil, key: nil, link_id: nil, os: nil, qr: nil, referer: nil, referer_url: nil, region: nil, root: nil, start: nil, tag_id: nil, tag_ids: nil, timezone: nil, trigger: nil, url: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil)
68
78
  @browser = browser
69
79
  @city = city
70
80
  @continent = continent
@@ -90,6 +100,11 @@ module OpenApiSDK
90
100
  @timezone = timezone
91
101
  @trigger = trigger
92
102
  @url = url
103
+ @utm_campaign = utm_campaign
104
+ @utm_content = utm_content
105
+ @utm_medium = utm_medium
106
+ @utm_source = utm_source
107
+ @utm_term = utm_term
93
108
  end
94
109
  end
95
110
  end
@@ -0,0 +1,19 @@
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 Operations
9
+
10
+
11
+ class Status < T::Enum
12
+ enums do
13
+ APPROVED = new('approved')
14
+ PENDING = new('pending')
15
+ REJECTED = new('rejected')
16
+ end
17
+ end
18
+ end
19
+ end
@@ -117,6 +117,15 @@ module OpenApiSDK
117
117
  autoload :DeleteCustomerRequest, 'open_api_sdk/models/operations/deletecustomer_request.rb'
118
118
  autoload :DeleteCustomerResponseBody, 'open_api_sdk/models/operations/deletecustomer_responsebody.rb'
119
119
  autoload :DeleteCustomerResponse, 'open_api_sdk/models/operations/deletecustomer_response.rb'
120
+ autoload :Country, 'open_api_sdk/models/operations/country.rb'
121
+ autoload :CreatePartnerRequestBody, 'open_api_sdk/models/operations/createpartner_requestbody.rb'
122
+ autoload :Status, 'open_api_sdk/models/operations/status.rb'
123
+ autoload :CreatePartnerLink, 'open_api_sdk/models/operations/createpartner_link.rb'
124
+ autoload :CreatePartnerType, 'open_api_sdk/models/operations/createpartner_type.rb'
125
+ autoload :CreatePartnerInterval, 'open_api_sdk/models/operations/createpartner_interval.rb'
126
+ autoload :CreatePartnerDiscount, 'open_api_sdk/models/operations/createpartner_discount.rb'
127
+ autoload :CreatePartnerResponseBody, 'open_api_sdk/models/operations/createpartner_responsebody.rb'
128
+ autoload :CreatePartnerResponse, 'open_api_sdk/models/operations/createpartner_response.rb'
120
129
  autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
121
130
  autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
122
131
  autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb'
@@ -43,8 +43,6 @@ module OpenApiSDK
43
43
  field :partners_enabled, T::Boolean, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnersEnabled') } }
44
44
  # The date and time when the payment failed for the workspace.
45
45
  field :payment_failed_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paymentFailedAt') } }
46
- # [BETA – Dub Partners]: The ID of the payment method for partner payouts.
47
- field :payout_method_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payoutMethodId') } }
48
46
  # The plan of the workspace.
49
47
  field :plan, ::OpenApiSDK::Shared::Plan, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('plan'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::Plan, false) } }
50
48
  # The limit of tracked revenue in the current billing cycle (in cents).
@@ -73,8 +71,8 @@ module OpenApiSDK
73
71
  field :flags, T.nilable(T::Hash[Symbol, T::Boolean]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('flags') } }
74
72
 
75
73
 
76
- sig { params(ai_limit: ::Float, ai_usage: ::Float, billing_cycle_start: ::Float, conversion_enabled: T::Boolean, created_at: ::String, domains: T::Array[::OpenApiSDK::Shared::Domains], domains_limit: ::Float, dot_link_claimed: T::Boolean, id: ::String, invite_code: ::String, links_limit: ::Float, links_usage: ::Float, logo: ::String, name: ::String, partners_enabled: T::Boolean, payment_failed_at: ::String, payout_method_id: ::String, plan: ::OpenApiSDK::Shared::Plan, sales_limit: ::Float, sales_usage: ::Float, slug: ::String, store: T::Hash[Symbol, ::Object], stripe_connect_id: ::String, stripe_id: ::String, tags_limit: ::Float, usage: ::Float, usage_limit: ::Float, users: T::Array[::OpenApiSDK::Shared::Users], users_limit: ::Float, flags: T.nilable(T::Hash[Symbol, T::Boolean])).void }
77
- def initialize(ai_limit: nil, ai_usage: nil, billing_cycle_start: nil, conversion_enabled: nil, created_at: nil, domains: nil, domains_limit: nil, dot_link_claimed: nil, id: nil, invite_code: nil, links_limit: nil, links_usage: nil, logo: nil, name: nil, partners_enabled: nil, payment_failed_at: nil, payout_method_id: nil, plan: nil, sales_limit: nil, sales_usage: nil, slug: nil, store: nil, stripe_connect_id: nil, stripe_id: nil, tags_limit: nil, usage: nil, usage_limit: nil, users: nil, users_limit: nil, flags: nil)
74
+ sig { params(ai_limit: ::Float, ai_usage: ::Float, billing_cycle_start: ::Float, conversion_enabled: T::Boolean, created_at: ::String, domains: T::Array[::OpenApiSDK::Shared::Domains], domains_limit: ::Float, dot_link_claimed: T::Boolean, id: ::String, invite_code: ::String, links_limit: ::Float, links_usage: ::Float, logo: ::String, name: ::String, partners_enabled: T::Boolean, payment_failed_at: ::String, plan: ::OpenApiSDK::Shared::Plan, sales_limit: ::Float, sales_usage: ::Float, slug: ::String, store: T::Hash[Symbol, ::Object], stripe_connect_id: ::String, stripe_id: ::String, tags_limit: ::Float, usage: ::Float, usage_limit: ::Float, users: T::Array[::OpenApiSDK::Shared::Users], users_limit: ::Float, flags: T.nilable(T::Hash[Symbol, T::Boolean])).void }
75
+ def initialize(ai_limit: nil, ai_usage: nil, billing_cycle_start: nil, conversion_enabled: nil, created_at: nil, domains: nil, domains_limit: nil, dot_link_claimed: nil, id: nil, invite_code: nil, links_limit: nil, links_usage: nil, logo: nil, name: nil, partners_enabled: nil, payment_failed_at: nil, plan: nil, sales_limit: nil, sales_usage: nil, slug: nil, store: nil, stripe_connect_id: nil, stripe_id: nil, tags_limit: nil, usage: nil, usage_limit: nil, users: nil, users_limit: nil, flags: nil)
78
76
  @ai_limit = ai_limit
79
77
  @ai_usage = ai_usage
80
78
  @billing_cycle_start = billing_cycle_start
@@ -91,7 +89,6 @@ module OpenApiSDK
91
89
  @name = name
92
90
  @partners_enabled = partners_enabled
93
91
  @payment_failed_at = payment_failed_at
94
- @payout_method_id = payout_method_id
95
92
  @plan = plan
96
93
  @sales_limit = sales_limit
97
94
  @sales_usage = sales_usage
@@ -0,0 +1,107 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+ require 'faraday'
7
+ require 'faraday/multipart'
8
+ require 'sorbet-runtime'
9
+
10
+ module OpenApiSDK
11
+ extend T::Sig
12
+ class Partners
13
+ extend T::Sig
14
+
15
+
16
+ sig { params(sdk_config: SDKConfiguration).void }
17
+ def initialize(sdk_config)
18
+ @sdk_configuration = sdk_config
19
+ end
20
+
21
+
22
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::CreatePartnerRequestBody)).returns(::OpenApiSDK::Operations::CreatePartnerResponse) }
23
+ def create(request)
24
+ # create - Create a new partner
25
+ # Create a new partner for a program. If partner exists, automatically enrolls them.
26
+ url, params = @sdk_configuration.get_server_details
27
+ base_url = Utils.template_url(url, params)
28
+ url = "#{base_url}/partners"
29
+ headers = {}
30
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
31
+ headers['content-type'] = req_content_type
32
+ headers['Accept'] = 'application/json'
33
+ headers['user-agent'] = @sdk_configuration.user_agent
34
+
35
+ r = @sdk_configuration.client.post(url) do |req|
36
+ req.headers = headers
37
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
38
+ if form
39
+ req.body = Utils.encode_form(form)
40
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
41
+ req.body = URI.encode_www_form(data)
42
+ else
43
+ req.body = data
44
+ end
45
+ end
46
+
47
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
48
+
49
+ res = ::OpenApiSDK::Operations::CreatePartnerResponse.new(
50
+ status_code: r.status, content_type: content_type, raw_response: r
51
+ )
52
+ if r.status == 201
53
+ if Utils.match_content_type(content_type, 'application/json')
54
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::CreatePartnerResponseBody)
55
+ res.object = out
56
+ end
57
+ elsif r.status == 400
58
+ if Utils.match_content_type(content_type, 'application/json')
59
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
60
+ res.bad_request = out
61
+ end
62
+ elsif r.status == 401
63
+ if Utils.match_content_type(content_type, 'application/json')
64
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
65
+ res.unauthorized = out
66
+ end
67
+ elsif r.status == 403
68
+ if Utils.match_content_type(content_type, 'application/json')
69
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
70
+ res.forbidden = out
71
+ end
72
+ elsif r.status == 404
73
+ if Utils.match_content_type(content_type, 'application/json')
74
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
75
+ res.not_found = out
76
+ end
77
+ elsif r.status == 409
78
+ if Utils.match_content_type(content_type, 'application/json')
79
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
80
+ res.conflict = out
81
+ end
82
+ elsif r.status == 410
83
+ if Utils.match_content_type(content_type, 'application/json')
84
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
85
+ res.invite_expired = out
86
+ end
87
+ elsif r.status == 422
88
+ if Utils.match_content_type(content_type, 'application/json')
89
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
90
+ res.unprocessable_entity = out
91
+ end
92
+ elsif r.status == 429
93
+ if Utils.match_content_type(content_type, 'application/json')
94
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
95
+ res.rate_limit_exceeded = out
96
+ end
97
+ elsif r.status == 500
98
+ if Utils.match_content_type(content_type, 'application/json')
99
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
100
+ res.internal_server_error = out
101
+ end
102
+ end
103
+
104
+ res
105
+ end
106
+ end
107
+ end
@@ -38,9 +38,9 @@ module OpenApiSDK
38
38
  @security = security
39
39
  @language = 'ruby'
40
40
  @openapi_doc_version = '0.0.1'
41
- @sdk_version = '0.2.2-alpha.55'
42
- @gen_version = '2.493.23'
43
- @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.55 2.493.23 0.0.1 dub'
41
+ @sdk_version = '0.2.2-alpha.57'
42
+ @gen_version = '2.495.1'
43
+ @user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.57 2.495.1 0.0.1 dub'
44
44
  end
45
45
 
46
46
  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.2.2.pre.alpha.55
4
+ version: 0.2.2.pre.alpha.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-20 00:00:00.000000000 Z
11
+ date: 2025-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -160,6 +160,7 @@ files:
160
160
  - lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb
161
161
  - lib/open_api_sdk/models/operations/click.rb
162
162
  - lib/open_api_sdk/models/operations/color.rb
163
+ - lib/open_api_sdk/models/operations/country.rb
163
164
  - lib/open_api_sdk/models/operations/createcustomer_discount.rb
164
165
  - lib/open_api_sdk/models/operations/createcustomer_interval.rb
165
166
  - lib/open_api_sdk/models/operations/createcustomer_link.rb
@@ -175,6 +176,13 @@ files:
175
176
  - lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb
176
177
  - lib/open_api_sdk/models/operations/createlink_requestbody.rb
177
178
  - lib/open_api_sdk/models/operations/createlink_response.rb
179
+ - lib/open_api_sdk/models/operations/createpartner_discount.rb
180
+ - lib/open_api_sdk/models/operations/createpartner_interval.rb
181
+ - lib/open_api_sdk/models/operations/createpartner_link.rb
182
+ - lib/open_api_sdk/models/operations/createpartner_requestbody.rb
183
+ - lib/open_api_sdk/models/operations/createpartner_response.rb
184
+ - lib/open_api_sdk/models/operations/createpartner_responsebody.rb
185
+ - lib/open_api_sdk/models/operations/createpartner_type.rb
178
186
  - lib/open_api_sdk/models/operations/createtag_requestbody.rb
179
187
  - lib/open_api_sdk/models/operations/createtag_response.rb
180
188
  - lib/open_api_sdk/models/operations/customer.rb
@@ -245,6 +253,7 @@ files:
245
253
  - lib/open_api_sdk/models/operations/sort.rb
246
254
  - lib/open_api_sdk/models/operations/sortby.rb
247
255
  - lib/open_api_sdk/models/operations/sortorder.rb
256
+ - lib/open_api_sdk/models/operations/status.rb
248
257
  - lib/open_api_sdk/models/operations/tracklead_requestbody.rb
249
258
  - lib/open_api_sdk/models/operations/tracklead_response.rb
250
259
  - lib/open_api_sdk/models/operations/tracklead_responsebody.rb
@@ -326,6 +335,7 @@ files:
326
335
  - lib/open_api_sdk/models/shared/unprocessableentity_error.rb
327
336
  - lib/open_api_sdk/models/shared/users.rb
328
337
  - lib/open_api_sdk/models/shared/workspaceschema.rb
338
+ - lib/open_api_sdk/partners.rb
329
339
  - lib/open_api_sdk/qr_codes.rb
330
340
  - lib/open_api_sdk/sdkconfiguration.rb
331
341
  - lib/open_api_sdk/tags.rb