dub 0.2.2.pre.alpha.31 → 0.2.2.pre.alpha.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dub.rb +3 -2
  3. data/lib/open_api_sdk/customers.rb +434 -0
  4. data/lib/open_api_sdk/dub.rb +4 -3
  5. data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +33 -0
  6. data/lib/open_api_sdk/models/operations/createcustomer_response.rb +60 -0
  7. data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +39 -0
  8. data/lib/open_api_sdk/models/operations/customer.rb +4 -4
  9. data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +24 -0
  10. data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +60 -0
  11. data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +24 -0
  12. data/lib/open_api_sdk/models/operations/getcustomer_request.rb +24 -0
  13. data/lib/open_api_sdk/models/operations/getcustomer_response.rb +60 -0
  14. data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +39 -0
  15. data/lib/open_api_sdk/models/operations/getcustomers_response.rb +60 -0
  16. data/lib/open_api_sdk/models/operations/responsebody.rb +39 -0
  17. data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +10 -5
  18. data/lib/open_api_sdk/models/operations/tracksale_customer.rb +5 -2
  19. data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +10 -5
  20. data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +27 -0
  21. data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +33 -0
  22. data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +60 -0
  23. data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +39 -0
  24. data/lib/open_api_sdk/models/operations.rb +23 -8
  25. data/lib/open_api_sdk/models/shared/workspaceschema.rb +15 -3
  26. data/lib/open_api_sdk/models/shared.rb +2 -2
  27. data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
  28. data/lib/open_api_sdk/track.rb +2 -0
  29. metadata +18 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b32b4da23b916bbf4984baf9a52bf510062692885cd4fdb654b2c2f71a0e2b3
4
- data.tar.gz: 5c9d02640a18f9d606f480e4d8ac43fb6f850b41f9e9d5cbec7b9b149e342e8e
3
+ metadata.gz: 777f20ed561651c2ea0dfe0bb00570ef1ba064e6b3e141f15796d0e9b8022a3f
4
+ data.tar.gz: 5816567636af876fe506e2b6beb26d0c52213e2fe17e4950eb6b4513bf5cf07d
5
5
  SHA512:
6
- metadata.gz: 824416bf7d9bf7d519497d2af65ac691da08d25189d6a98985c35a9ce4c2c90dceaf110b1be9d503a0ed19b52c4158cff47737dcea59b835f67a0e1fef14f3bf
7
- data.tar.gz: 7510c830a36f307e81bd36679a17db9144d2bc9f12a44d349778c216d3ef58d709af692a5e81bcbbe0fa2808e5fae4495b881b1a6ff2922239f23bac995637f2
6
+ metadata.gz: 31adcd4191d3b5f503914df80975e1663692769c94698b8921b0f5d53f5533e10f576e129e8c6a70b9f82b303d8a616028a1b998eb5bd270102090214639785b
7
+ data.tar.gz: 27fcec0ed863896d77e9ea47fd547e80f60293c8d8825d0beaa7f023dd85f8c5c6b2e1e798f3b96988d957901716dc1c894a3bc670a41db893fdd16acf84bbb8
data/lib/dub.rb CHANGED
@@ -8,13 +8,14 @@ module OpenApiSDK
8
8
  autoload :Shared, 'open_api_sdk/models/shared'
9
9
  autoload :Operations, 'open_api_sdk/models/operations'
10
10
  autoload :Links, 'open_api_sdk/links'
11
- autoload :QRCodes, 'open_api_sdk/qr_codes'
12
11
  autoload :Analytics, 'open_api_sdk/analytics'
13
12
  autoload :Events, 'open_api_sdk/events'
14
- autoload :Workspaces, 'open_api_sdk/workspaces'
15
13
  autoload :Tags, 'open_api_sdk/tags'
16
14
  autoload :Domains, 'open_api_sdk/domains'
17
15
  autoload :Track, 'open_api_sdk/track'
16
+ autoload :Customers, 'open_api_sdk/customers'
17
+ autoload :Workspaces, 'open_api_sdk/workspaces'
18
+ autoload :QRCodes, 'open_api_sdk/qr_codes'
18
19
  autoload :Metatags, 'open_api_sdk/metatags'
19
20
  end
20
21
 
@@ -0,0 +1,434 @@
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 Customers
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 { returns(::OpenApiSDK::Operations::GetCustomersResponse) }
23
+ def list
24
+ # list - Retrieve a list of customers
25
+ # Retrieve a list of customers for the authenticated workspace.
26
+ url, params = @sdk_configuration.get_server_details
27
+ base_url = Utils.template_url(url, params)
28
+ url = "#{base_url}/customers"
29
+ headers = {}
30
+ headers['Accept'] = 'application/json'
31
+ headers['user-agent'] = @sdk_configuration.user_agent
32
+
33
+ r = @sdk_configuration.client.get(url) do |req|
34
+ req.headers = headers
35
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
36
+ end
37
+
38
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
39
+
40
+ res = ::OpenApiSDK::Operations::GetCustomersResponse.new(
41
+ status_code: r.status, content_type: content_type, raw_response: r
42
+ )
43
+ if r.status == 200
44
+ if Utils.match_content_type(content_type, 'application/json')
45
+ out = Utils.unmarshal_complex(r.env.response_body, T::Array[::OpenApiSDK::Operations::ResponseBody])
46
+ res.response_bodies = out
47
+ end
48
+ elsif r.status == 400
49
+ if Utils.match_content_type(content_type, 'application/json')
50
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
51
+ res.bad_request = out
52
+ end
53
+ elsif r.status == 401
54
+ if Utils.match_content_type(content_type, 'application/json')
55
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
56
+ res.unauthorized = out
57
+ end
58
+ elsif r.status == 403
59
+ if Utils.match_content_type(content_type, 'application/json')
60
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
61
+ res.forbidden = out
62
+ end
63
+ elsif r.status == 404
64
+ if Utils.match_content_type(content_type, 'application/json')
65
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
66
+ res.not_found = out
67
+ end
68
+ elsif r.status == 409
69
+ if Utils.match_content_type(content_type, 'application/json')
70
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
71
+ res.conflict = out
72
+ end
73
+ elsif r.status == 410
74
+ if Utils.match_content_type(content_type, 'application/json')
75
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
76
+ res.invite_expired = out
77
+ end
78
+ elsif r.status == 422
79
+ if Utils.match_content_type(content_type, 'application/json')
80
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
81
+ res.unprocessable_entity = out
82
+ end
83
+ elsif r.status == 429
84
+ if Utils.match_content_type(content_type, 'application/json')
85
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
86
+ res.rate_limit_exceeded = out
87
+ end
88
+ elsif r.status == 500
89
+ if Utils.match_content_type(content_type, 'application/json')
90
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
91
+ res.internal_server_error = out
92
+ end
93
+ end
94
+ res
95
+ end
96
+
97
+
98
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::CreateCustomerRequestBody)).returns(::OpenApiSDK::Operations::CreateCustomerResponse) }
99
+ def create(request)
100
+ # create - Create a customer
101
+ # Create a customer for the authenticated workspace.
102
+ url, params = @sdk_configuration.get_server_details
103
+ base_url = Utils.template_url(url, params)
104
+ url = "#{base_url}/customers"
105
+ headers = {}
106
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
107
+ headers['content-type'] = req_content_type
108
+ headers['Accept'] = 'application/json'
109
+ headers['user-agent'] = @sdk_configuration.user_agent
110
+
111
+ r = @sdk_configuration.client.post(url) do |req|
112
+ req.headers = headers
113
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
114
+ if form
115
+ req.body = Utils.encode_form(form)
116
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
117
+ req.body = URI.encode_www_form(data)
118
+ else
119
+ req.body = data
120
+ end
121
+ end
122
+
123
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
124
+
125
+ res = ::OpenApiSDK::Operations::CreateCustomerResponse.new(
126
+ status_code: r.status, content_type: content_type, raw_response: r
127
+ )
128
+ if r.status == 201
129
+ if Utils.match_content_type(content_type, 'application/json')
130
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::CreateCustomerResponseBody)
131
+ res.object = out
132
+ end
133
+ elsif r.status == 400
134
+ if Utils.match_content_type(content_type, 'application/json')
135
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
136
+ res.bad_request = out
137
+ end
138
+ elsif r.status == 401
139
+ if Utils.match_content_type(content_type, 'application/json')
140
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
141
+ res.unauthorized = out
142
+ end
143
+ elsif r.status == 403
144
+ if Utils.match_content_type(content_type, 'application/json')
145
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
146
+ res.forbidden = out
147
+ end
148
+ elsif r.status == 404
149
+ if Utils.match_content_type(content_type, 'application/json')
150
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
151
+ res.not_found = out
152
+ end
153
+ elsif r.status == 409
154
+ if Utils.match_content_type(content_type, 'application/json')
155
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
156
+ res.conflict = out
157
+ end
158
+ elsif r.status == 410
159
+ if Utils.match_content_type(content_type, 'application/json')
160
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
161
+ res.invite_expired = out
162
+ end
163
+ elsif r.status == 422
164
+ if Utils.match_content_type(content_type, 'application/json')
165
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
166
+ res.unprocessable_entity = out
167
+ end
168
+ elsif r.status == 429
169
+ if Utils.match_content_type(content_type, 'application/json')
170
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
171
+ res.rate_limit_exceeded = out
172
+ end
173
+ elsif r.status == 500
174
+ if Utils.match_content_type(content_type, 'application/json')
175
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
176
+ res.internal_server_error = out
177
+ end
178
+ end
179
+ res
180
+ end
181
+
182
+
183
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::GetCustomerRequest)).returns(::OpenApiSDK::Operations::GetCustomerResponse) }
184
+ def get(request)
185
+ # get - Retrieve a customer
186
+ # Retrieve a customer by ID for the authenticated workspace.
187
+ url, params = @sdk_configuration.get_server_details
188
+ base_url = Utils.template_url(url, params)
189
+ url = Utils.generate_url(
190
+ ::OpenApiSDK::Operations::GetCustomerRequest,
191
+ base_url,
192
+ '/customers/{id}',
193
+ request
194
+ )
195
+ headers = {}
196
+ headers['Accept'] = 'application/json'
197
+ headers['user-agent'] = @sdk_configuration.user_agent
198
+
199
+ r = @sdk_configuration.client.get(url) do |req|
200
+ req.headers = headers
201
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
202
+ end
203
+
204
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
205
+
206
+ res = ::OpenApiSDK::Operations::GetCustomerResponse.new(
207
+ status_code: r.status, content_type: content_type, raw_response: r
208
+ )
209
+ if r.status == 200
210
+ if Utils.match_content_type(content_type, 'application/json')
211
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::GetCustomerResponseBody)
212
+ res.object = out
213
+ end
214
+ elsif r.status == 400
215
+ if Utils.match_content_type(content_type, 'application/json')
216
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
217
+ res.bad_request = out
218
+ end
219
+ elsif r.status == 401
220
+ if Utils.match_content_type(content_type, 'application/json')
221
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
222
+ res.unauthorized = out
223
+ end
224
+ elsif r.status == 403
225
+ if Utils.match_content_type(content_type, 'application/json')
226
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
227
+ res.forbidden = out
228
+ end
229
+ elsif r.status == 404
230
+ if Utils.match_content_type(content_type, 'application/json')
231
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
232
+ res.not_found = out
233
+ end
234
+ elsif r.status == 409
235
+ if Utils.match_content_type(content_type, 'application/json')
236
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
237
+ res.conflict = out
238
+ end
239
+ elsif r.status == 410
240
+ if Utils.match_content_type(content_type, 'application/json')
241
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
242
+ res.invite_expired = out
243
+ end
244
+ elsif r.status == 422
245
+ if Utils.match_content_type(content_type, 'application/json')
246
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
247
+ res.unprocessable_entity = out
248
+ end
249
+ elsif r.status == 429
250
+ if Utils.match_content_type(content_type, 'application/json')
251
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
252
+ res.rate_limit_exceeded = out
253
+ end
254
+ elsif r.status == 500
255
+ if Utils.match_content_type(content_type, 'application/json')
256
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
257
+ res.internal_server_error = out
258
+ end
259
+ end
260
+ res
261
+ end
262
+
263
+
264
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdateCustomerRequest)).returns(::OpenApiSDK::Operations::UpdateCustomerResponse) }
265
+ def update(request)
266
+ # update - Update a customer
267
+ # Update a customer for the authenticated workspace.
268
+ url, params = @sdk_configuration.get_server_details
269
+ base_url = Utils.template_url(url, params)
270
+ url = Utils.generate_url(
271
+ ::OpenApiSDK::Operations::UpdateCustomerRequest,
272
+ base_url,
273
+ '/customers/{id}',
274
+ request
275
+ )
276
+ headers = {}
277
+ req_content_type, data, form = Utils.serialize_request_body(request, :request_body, :json)
278
+ headers['content-type'] = req_content_type
279
+ headers['Accept'] = 'application/json'
280
+ headers['user-agent'] = @sdk_configuration.user_agent
281
+
282
+ r = @sdk_configuration.client.patch(url) do |req|
283
+ req.headers = headers
284
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
285
+ if form
286
+ req.body = Utils.encode_form(form)
287
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
288
+ req.body = URI.encode_www_form(data)
289
+ else
290
+ req.body = data
291
+ end
292
+ end
293
+
294
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
295
+
296
+ res = ::OpenApiSDK::Operations::UpdateCustomerResponse.new(
297
+ status_code: r.status, content_type: content_type, raw_response: r
298
+ )
299
+ if r.status == 200
300
+ if Utils.match_content_type(content_type, 'application/json')
301
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::UpdateCustomerResponseBody)
302
+ res.object = out
303
+ end
304
+ elsif r.status == 400
305
+ if Utils.match_content_type(content_type, 'application/json')
306
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
307
+ res.bad_request = out
308
+ end
309
+ elsif r.status == 401
310
+ if Utils.match_content_type(content_type, 'application/json')
311
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
312
+ res.unauthorized = out
313
+ end
314
+ elsif r.status == 403
315
+ if Utils.match_content_type(content_type, 'application/json')
316
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
317
+ res.forbidden = out
318
+ end
319
+ elsif r.status == 404
320
+ if Utils.match_content_type(content_type, 'application/json')
321
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
322
+ res.not_found = out
323
+ end
324
+ elsif r.status == 409
325
+ if Utils.match_content_type(content_type, 'application/json')
326
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
327
+ res.conflict = out
328
+ end
329
+ elsif r.status == 410
330
+ if Utils.match_content_type(content_type, 'application/json')
331
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
332
+ res.invite_expired = out
333
+ end
334
+ elsif r.status == 422
335
+ if Utils.match_content_type(content_type, 'application/json')
336
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
337
+ res.unprocessable_entity = out
338
+ end
339
+ elsif r.status == 429
340
+ if Utils.match_content_type(content_type, 'application/json')
341
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
342
+ res.rate_limit_exceeded = out
343
+ end
344
+ elsif r.status == 500
345
+ if Utils.match_content_type(content_type, 'application/json')
346
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
347
+ res.internal_server_error = out
348
+ end
349
+ end
350
+ res
351
+ end
352
+
353
+
354
+ sig { params(request: T.nilable(::OpenApiSDK::Operations::DeleteCustomerRequest)).returns(::OpenApiSDK::Operations::DeleteCustomerResponse) }
355
+ def delete(request)
356
+ # delete - Delete a customer
357
+ # Delete a customer from a workspace.
358
+ url, params = @sdk_configuration.get_server_details
359
+ base_url = Utils.template_url(url, params)
360
+ url = Utils.generate_url(
361
+ ::OpenApiSDK::Operations::DeleteCustomerRequest,
362
+ base_url,
363
+ '/customers/{id}',
364
+ request
365
+ )
366
+ headers = {}
367
+ headers['Accept'] = 'application/json'
368
+ headers['user-agent'] = @sdk_configuration.user_agent
369
+
370
+ r = @sdk_configuration.client.delete(url) do |req|
371
+ req.headers = headers
372
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
373
+ end
374
+
375
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
376
+
377
+ res = ::OpenApiSDK::Operations::DeleteCustomerResponse.new(
378
+ status_code: r.status, content_type: content_type, raw_response: r
379
+ )
380
+ if r.status == 200
381
+ if Utils.match_content_type(content_type, 'application/json')
382
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Operations::DeleteCustomerResponseBody)
383
+ res.object = out
384
+ end
385
+ elsif r.status == 400
386
+ if Utils.match_content_type(content_type, 'application/json')
387
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
388
+ res.bad_request = out
389
+ end
390
+ elsif r.status == 401
391
+ if Utils.match_content_type(content_type, 'application/json')
392
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
393
+ res.unauthorized = out
394
+ end
395
+ elsif r.status == 403
396
+ if Utils.match_content_type(content_type, 'application/json')
397
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
398
+ res.forbidden = out
399
+ end
400
+ elsif r.status == 404
401
+ if Utils.match_content_type(content_type, 'application/json')
402
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
403
+ res.not_found = out
404
+ end
405
+ elsif r.status == 409
406
+ if Utils.match_content_type(content_type, 'application/json')
407
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
408
+ res.conflict = out
409
+ end
410
+ elsif r.status == 410
411
+ if Utils.match_content_type(content_type, 'application/json')
412
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
413
+ res.invite_expired = out
414
+ end
415
+ elsif r.status == 422
416
+ if Utils.match_content_type(content_type, 'application/json')
417
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
418
+ res.unprocessable_entity = out
419
+ end
420
+ elsif r.status == 429
421
+ if Utils.match_content_type(content_type, 'application/json')
422
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
423
+ res.rate_limit_exceeded = out
424
+ end
425
+ elsif r.status == 500
426
+ if Utils.match_content_type(content_type, 'application/json')
427
+ out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
428
+ res.internal_server_error = out
429
+ end
430
+ end
431
+ res
432
+ end
433
+ end
434
+ end
@@ -13,7 +13,7 @@ module OpenApiSDK
13
13
  class Dub
14
14
  extend T::Sig
15
15
 
16
- attr_accessor :links, :qr_codes, :analytics, :events, :workspaces, :tags, :domains, :track, :metatags
16
+ attr_accessor :links, :analytics, :events, :tags, :domains, :track, :customers, :workspaces, :qr_codes, :metatags
17
17
 
18
18
  sig do
19
19
  params(client: Faraday::Request,
@@ -76,13 +76,14 @@ module OpenApiSDK
76
76
  sig { void }
77
77
  def init_sdks
78
78
  @links = Links.new(@sdk_configuration)
79
- @qr_codes = QRCodes.new(@sdk_configuration)
80
79
  @analytics = Analytics.new(@sdk_configuration)
81
80
  @events = Events.new(@sdk_configuration)
82
- @workspaces = Workspaces.new(@sdk_configuration)
83
81
  @tags = Tags.new(@sdk_configuration)
84
82
  @domains = Domains.new(@sdk_configuration)
85
83
  @track = Track.new(@sdk_configuration)
84
+ @customers = Customers.new(@sdk_configuration)
85
+ @workspaces = Workspaces.new(@sdk_configuration)
86
+ @qr_codes = QRCodes.new(@sdk_configuration)
86
87
  @metatags = Metatags.new(@sdk_configuration)
87
88
  end
88
89
  end
@@ -0,0 +1,33 @@
1
+ # Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module OpenApiSDK
8
+ module Operations
9
+
10
+
11
+ class CreateCustomerRequestBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # Unique identifier for the customer in the client's app.
15
+ field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
16
+ # Avatar URL of the customer in the client's app.
17
+ field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } }
18
+ # Email of the customer in the client's app.
19
+ field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
20
+ # Name of the customer in the client's app. If not provided, a random name will be generated.
21
+ field :name, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
22
+
23
+
24
+ sig { params(external_id: ::String, avatar: T.nilable(::String), email: T.nilable(::String), name: T.nilable(::String)).void }
25
+ def initialize(external_id: nil, avatar: nil, email: nil, name: nil)
26
+ @external_id = external_id
27
+ @avatar = avatar
28
+ @email = email
29
+ @name = name
30
+ end
31
+ end
32
+ end
33
+ 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 CreateCustomerResponse < ::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 customer was created.
33
+ field :object, T.nilable(::OpenApiSDK::Operations::CreateCustomerResponseBody)
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::CreateCustomerResponseBody), 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,39 @@
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 customer was created.
11
+ class CreateCustomerResponseBody < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The date the customer was created.
15
+ field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
16
+ # Unique identifier for the customer in the client's app.
17
+ field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
18
+ # The unique identifier of the customer in Dub.
19
+ field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
20
+ # Name of the customer.
21
+ field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
22
+ # Avatar URL of the customer.
23
+ field :avatar, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('avatar') } }
24
+ # Email of the customer.
25
+ field :email, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
26
+
27
+
28
+ sig { params(created_at: ::String, external_id: ::String, id: ::String, name: ::String, avatar: T.nilable(::String), email: T.nilable(::String)).void }
29
+ def initialize(created_at: nil, external_id: nil, id: nil, name: nil, avatar: nil, email: nil)
30
+ @created_at = created_at
31
+ @external_id = external_id
32
+ @id = id
33
+ @name = name
34
+ @avatar = avatar
35
+ @email = email
36
+ end
37
+ end
38
+ end
39
+ end
@@ -16,16 +16,16 @@ module OpenApiSDK
16
16
 
17
17
  field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
18
18
 
19
- field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
19
+ field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
20
20
 
21
21
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
22
22
 
23
23
 
24
- sig { params(avatar: ::String, email: ::String, id: ::String, name: ::String).void }
25
- def initialize(avatar: nil, email: nil, id: nil, name: nil)
24
+ sig { params(avatar: ::String, email: ::String, external_id: ::String, name: ::String).void }
25
+ def initialize(avatar: nil, email: nil, external_id: nil, name: nil)
26
26
  @avatar = avatar
27
27
  @email = email
28
- @id = id
28
+ @external_id = external_id
29
29
  @name = name
30
30
  end
31
31
  end
@@ -0,0 +1,24 @@
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 DeleteCustomerRequest < ::OpenApiSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The unique identifier of the customer in Dub.
15
+ field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
16
+
17
+
18
+ sig { params(id: ::String).void }
19
+ def initialize(id: nil)
20
+ @id = id
21
+ end
22
+ end
23
+ end
24
+ end