dub 0.2.2.pre.alpha.56 → 0.2.2.pre.alpha.58
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 +4 -4
- data/lib/dub.rb +1 -0
- data/lib/open_api_sdk/dub.rb +2 -1
- data/lib/open_api_sdk/models/operations/country.rb +266 -0
- data/lib/open_api_sdk/models/operations/createpartner_discount.rb +42 -0
- data/lib/open_api_sdk/models/operations/createpartner_interval.rb +18 -0
- data/lib/open_api_sdk/models/operations/createpartner_link.rb +48 -0
- data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +45 -0
- data/lib/open_api_sdk/models/operations/createpartner_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +69 -0
- data/lib/open_api_sdk/models/operations/createpartner_type.rb +18 -0
- data/lib/open_api_sdk/models/operations/linkprops.rb +96 -0
- data/lib/open_api_sdk/models/operations/status.rb +19 -0
- data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +5 -2
- data/lib/open_api_sdk/models/operations.rb +10 -0
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +5 -2
- data/lib/open_api_sdk/partners.rb +107 -0
- data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
- metadata +13 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47429a6d7d8e4fb16f872e496db62dc2705d0cdd71f0cea09c5c92216c0b4ad0
|
4
|
+
data.tar.gz: 3d40e296a6b9b0621d14d1db12c4689c43cbe2d2bf61242a20ce55ed310f0422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2193343b855147d8c6469bc97c7fd2c721e5dac17800d068be1f0a48930e027adcc2884fa4d26ea62150463925abcf49641b7bc5361a2b9f0899576ff3b053e6
|
7
|
+
data.tar.gz: 80bcfc2f828762e7aad45fb78e54a7ba723321a898bcbaed0aaad90cc3cc73e1c313bc5911d3028831934dcbe163f833d4e85acbb5bfcddc0d84da27e97ea655
|
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'
|
data/lib/open_api_sdk/dub.rb
CHANGED
@@ -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,45 @@
|
|
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
|
+
# Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
|
29
|
+
field :link_props, T.nilable(::OpenApiSDK::Operations::LinkProps), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('linkProps') } }
|
30
|
+
|
31
|
+
|
32
|
+
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), link_props: T.nilable(::OpenApiSDK::Operations::LinkProps)).void }
|
33
|
+
def initialize(email: nil, name: nil, program_id: nil, username: nil, country: nil, description: nil, image: nil, link_props: nil)
|
34
|
+
@email = email
|
35
|
+
@name = name
|
36
|
+
@program_id = program_id
|
37
|
+
@username = username
|
38
|
+
@country = country
|
39
|
+
@description = description
|
40
|
+
@image = image
|
41
|
+
@link_props = link_props
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
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
|
@@ -0,0 +1,96 @@
|
|
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
|
+
# Additional properties that you can pass to the partner's short link. Will be used to override the default link properties for this partner.
|
11
|
+
class LinkProps < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The Android destination URL for the short link for Android device targeting.
|
15
|
+
field :android, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('android') } }
|
16
|
+
# Whether the short link is archived. Defaults to `false` if not provided.
|
17
|
+
field :archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } }
|
18
|
+
# The comments for the short link.
|
19
|
+
field :comments, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comments') } }
|
20
|
+
# The custom link preview description (og:description). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
|
21
|
+
field :description, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
|
22
|
+
# Allow search engines to index your short link. Defaults to `false` if not provided. Learn more: https://d.to/noindex
|
23
|
+
field :do_index, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('doIndex') } }
|
24
|
+
# The URL to redirect to when the short link has expired.
|
25
|
+
field :expired_url, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiredUrl') } }
|
26
|
+
# The date and time when the short link will expire at.
|
27
|
+
field :expires_at, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt') } }
|
28
|
+
# The ID of the link in your database. If set, it can be used to identify the link in future API requests (must be prefixed with 'ext_' when passed as a query parameter). This key is unique across your workspace.
|
29
|
+
field :external_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
|
30
|
+
# The custom link preview image (og:image). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
|
31
|
+
field :image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
|
32
|
+
# The iOS destination URL for the short link for iOS device targeting.
|
33
|
+
field :ios, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
|
34
|
+
# The password required to access the destination URL of the short link.
|
35
|
+
field :password, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('password') } }
|
36
|
+
# The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
|
37
|
+
field :prefix, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('prefix') } }
|
38
|
+
# Whether the short link uses Custom Social Media Cards feature. Defaults to `false` if not provided.
|
39
|
+
field :proxy, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proxy') } }
|
40
|
+
# The referral tag of the short link. If set, this will populate or override the `ref` query parameter in the destination URL.
|
41
|
+
field :ref, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ref') } }
|
42
|
+
# Whether the short link uses link cloaking. Defaults to `false` if not provided.
|
43
|
+
field :rewrite, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rewrite') } }
|
44
|
+
# The unique IDs of the tags assigned to the short link.
|
45
|
+
field :tag_ids, T.nilable(::Object), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagIds') } }
|
46
|
+
# The unique name of the tags assigned to the short link (case insensitive).
|
47
|
+
field :tag_names, T.nilable(::Object), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagNames') } }
|
48
|
+
# The ID of the tenant that created the link inside your system. If set, it can be used to fetch all links for a tenant.
|
49
|
+
field :tenant_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
|
50
|
+
# The custom link preview title (og:title). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
|
51
|
+
field :title, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
|
52
|
+
# The UTM campaign of the short link. If set, this will populate or override the UTM campaign in the destination URL.
|
53
|
+
field :utm_campaign, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_campaign') } }
|
54
|
+
# The UTM content of the short link. If set, this will populate or override the UTM content in the destination URL.
|
55
|
+
field :utm_content, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_content') } }
|
56
|
+
# The UTM medium of the short link. If set, this will populate or override the UTM medium in the destination URL.
|
57
|
+
field :utm_medium, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_medium') } }
|
58
|
+
# The UTM source of the short link. If set, this will populate or override the UTM source in the destination URL.
|
59
|
+
field :utm_source, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_source') } }
|
60
|
+
# The UTM term of the short link. If set, this will populate or override the UTM term in the destination URL.
|
61
|
+
field :utm_term, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_term') } }
|
62
|
+
# The custom link preview video (og:video). Will be used for Custom Social Media Cards if `proxy` is true. Learn more: https://d.to/og
|
63
|
+
field :video, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('video') } }
|
64
|
+
|
65
|
+
|
66
|
+
sig { params(android: T.nilable(::String), archived: T.nilable(T::Boolean), comments: T.nilable(::String), description: T.nilable(::String), do_index: T.nilable(T::Boolean), expired_url: T.nilable(::String), expires_at: T.nilable(::String), external_id: T.nilable(::String), image: T.nilable(::String), ios: T.nilable(::String), password: T.nilable(::String), prefix: T.nilable(::String), proxy: T.nilable(T::Boolean), ref: T.nilable(::String), rewrite: T.nilable(T::Boolean), tag_ids: T.nilable(::Object), tag_names: T.nilable(::Object), tenant_id: T.nilable(::String), title: 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), video: T.nilable(::String)).void }
|
67
|
+
def initialize(android: nil, archived: nil, comments: nil, description: nil, do_index: nil, expired_url: nil, expires_at: nil, external_id: nil, image: nil, ios: nil, password: nil, prefix: nil, proxy: nil, ref: nil, rewrite: nil, tag_ids: nil, tag_names: nil, tenant_id: nil, title: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil)
|
68
|
+
@android = android
|
69
|
+
@archived = archived
|
70
|
+
@comments = comments
|
71
|
+
@description = description
|
72
|
+
@do_index = do_index
|
73
|
+
@expired_url = expired_url
|
74
|
+
@expires_at = expires_at
|
75
|
+
@external_id = external_id
|
76
|
+
@image = image
|
77
|
+
@ios = ios
|
78
|
+
@password = password
|
79
|
+
@prefix = prefix
|
80
|
+
@proxy = proxy
|
81
|
+
@ref = ref
|
82
|
+
@rewrite = rewrite
|
83
|
+
@tag_ids = tag_ids
|
84
|
+
@tag_names = tag_names
|
85
|
+
@tenant_id = tenant_id
|
86
|
+
@title = title
|
87
|
+
@utm_campaign = utm_campaign
|
88
|
+
@utm_content = utm_content
|
89
|
+
@utm_medium = utm_medium
|
90
|
+
@utm_source = utm_source
|
91
|
+
@utm_term = utm_term
|
92
|
+
@video = video
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
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
|
@@ -12,6 +12,8 @@ module OpenApiSDK
|
|
12
12
|
extend T::Sig
|
13
13
|
|
14
14
|
|
15
|
+
field :allowed_hostnames, T.nilable(T::Array[::String]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowedHostnames') } }
|
16
|
+
|
15
17
|
field :conversion_enabled, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('conversionEnabled') } }
|
16
18
|
|
17
19
|
field :logo, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('logo') } }
|
@@ -21,8 +23,9 @@ module OpenApiSDK
|
|
21
23
|
field :slug, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('slug') } }
|
22
24
|
|
23
25
|
|
24
|
-
sig { params(conversion_enabled: T.nilable(T::Boolean), logo: T.nilable(::String), name: T.nilable(::String), slug: T.nilable(::String)).void }
|
25
|
-
def initialize(conversion_enabled: nil, logo: nil, name: nil, slug: nil)
|
26
|
+
sig { params(allowed_hostnames: T.nilable(T::Array[::String]), conversion_enabled: T.nilable(T::Boolean), logo: T.nilable(::String), name: T.nilable(::String), slug: T.nilable(::String)).void }
|
27
|
+
def initialize(allowed_hostnames: nil, conversion_enabled: nil, logo: nil, name: nil, slug: nil)
|
28
|
+
@allowed_hostnames = allowed_hostnames
|
26
29
|
@conversion_enabled = conversion_enabled
|
27
30
|
@logo = logo
|
28
31
|
@name = name
|
@@ -117,6 +117,16 @@ 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 :LinkProps, 'open_api_sdk/models/operations/linkprops.rb'
|
122
|
+
autoload :CreatePartnerRequestBody, 'open_api_sdk/models/operations/createpartner_requestbody.rb'
|
123
|
+
autoload :Status, 'open_api_sdk/models/operations/status.rb'
|
124
|
+
autoload :CreatePartnerLink, 'open_api_sdk/models/operations/createpartner_link.rb'
|
125
|
+
autoload :CreatePartnerType, 'open_api_sdk/models/operations/createpartner_type.rb'
|
126
|
+
autoload :CreatePartnerInterval, 'open_api_sdk/models/operations/createpartner_interval.rb'
|
127
|
+
autoload :CreatePartnerDiscount, 'open_api_sdk/models/operations/createpartner_discount.rb'
|
128
|
+
autoload :CreatePartnerResponseBody, 'open_api_sdk/models/operations/createpartner_responsebody.rb'
|
129
|
+
autoload :CreatePartnerResponse, 'open_api_sdk/models/operations/createpartner_response.rb'
|
120
130
|
autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
|
121
131
|
autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
|
122
132
|
autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb'
|
@@ -15,6 +15,8 @@ module OpenApiSDK
|
|
15
15
|
field :ai_limit, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aiLimit') } }
|
16
16
|
# The AI usage of the workspace.
|
17
17
|
field :ai_usage, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('aiUsage') } }
|
18
|
+
# Specifies hostnames permitted for client-side click tracking.
|
19
|
+
field :allowed_hostnames, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('allowedHostnames') } }
|
18
20
|
# The date and time when the billing cycle starts for the workspace.
|
19
21
|
field :billing_cycle_start, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('billingCycleStart') } }
|
20
22
|
# Whether the workspace has conversion tracking enabled automatically for new links (d.to/conversions).
|
@@ -71,10 +73,11 @@ module OpenApiSDK
|
|
71
73
|
field :flags, T.nilable(T::Hash[Symbol, T::Boolean]), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('flags') } }
|
72
74
|
|
73
75
|
|
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)
|
76
|
+
sig { params(ai_limit: ::Float, ai_usage: ::Float, allowed_hostnames: T::Array[::String], 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 }
|
77
|
+
def initialize(ai_limit: nil, ai_usage: nil, allowed_hostnames: 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)
|
76
78
|
@ai_limit = ai_limit
|
77
79
|
@ai_usage = ai_usage
|
80
|
+
@allowed_hostnames = allowed_hostnames
|
78
81
|
@billing_cycle_start = billing_cycle_start
|
79
82
|
@conversion_enabled = conversion_enabled
|
80
83
|
@created_at = created_at
|
@@ -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.
|
42
|
-
@gen_version = '2.
|
43
|
-
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.
|
41
|
+
@sdk_version = '0.2.2-alpha.58'
|
42
|
+
@gen_version = '2.497.0'
|
43
|
+
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.58 2.497.0 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.
|
4
|
+
version: 0.2.2.pre.alpha.58
|
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-
|
11
|
+
date: 2025-01-29 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
|
@@ -225,6 +233,7 @@ files:
|
|
225
233
|
- lib/open_api_sdk/models/operations/interval.rb
|
226
234
|
- lib/open_api_sdk/models/operations/level.rb
|
227
235
|
- lib/open_api_sdk/models/operations/link.rb
|
236
|
+
- lib/open_api_sdk/models/operations/linkprops.rb
|
228
237
|
- lib/open_api_sdk/models/operations/listdomains_request.rb
|
229
238
|
- lib/open_api_sdk/models/operations/listdomains_response.rb
|
230
239
|
- lib/open_api_sdk/models/operations/listevents_request.rb
|
@@ -245,6 +254,7 @@ files:
|
|
245
254
|
- lib/open_api_sdk/models/operations/sort.rb
|
246
255
|
- lib/open_api_sdk/models/operations/sortby.rb
|
247
256
|
- lib/open_api_sdk/models/operations/sortorder.rb
|
257
|
+
- lib/open_api_sdk/models/operations/status.rb
|
248
258
|
- lib/open_api_sdk/models/operations/tracklead_requestbody.rb
|
249
259
|
- lib/open_api_sdk/models/operations/tracklead_response.rb
|
250
260
|
- lib/open_api_sdk/models/operations/tracklead_responsebody.rb
|
@@ -326,6 +336,7 @@ files:
|
|
326
336
|
- lib/open_api_sdk/models/shared/unprocessableentity_error.rb
|
327
337
|
- lib/open_api_sdk/models/shared/users.rb
|
328
338
|
- lib/open_api_sdk/models/shared/workspaceschema.rb
|
339
|
+
- lib/open_api_sdk/partners.rb
|
329
340
|
- lib/open_api_sdk/qr_codes.rb
|
330
341
|
- lib/open_api_sdk/sdkconfiguration.rb
|
331
342
|
- lib/open_api_sdk/tags.rb
|