dub 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/open_api_sdk/customers.rb +0 -237
- data/lib/open_api_sdk/models/operations/banpartner_requestbody.rb +41 -0
- data/lib/open_api_sdk/models/operations/banpartner_requestbody.rbi +17 -0
- data/lib/open_api_sdk/models/operations/banpartner_responsebody.rb +33 -0
- data/lib/open_api_sdk/models/operations/banpartner_responsebody.rbi +13 -0
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +32 -4
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rbi +14 -0
- data/lib/open_api_sdk/models/operations/listcommissions_partner.rb +6 -2
- data/lib/open_api_sdk/models/operations/listcommissions_partner.rbi +2 -0
- data/lib/open_api_sdk/models/operations/listcommissions_request.rb +6 -2
- data/lib/open_api_sdk/models/operations/listcommissions_request.rbi +2 -0
- data/lib/open_api_sdk/models/operations/listevents_request.rb +6 -2
- data/lib/open_api_sdk/models/operations/listevents_request.rbi +2 -0
- data/lib/open_api_sdk/models/operations/listpartners_queryparam_sortby.rb +7 -0
- data/lib/open_api_sdk/models/operations/listpartners_responsebody.rb +32 -4
- data/lib/open_api_sdk/models/operations/listpartners_responsebody.rbi +14 -0
- data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +2 -0
- data/lib/open_api_sdk/models/operations/reason.rb +26 -0
- data/lib/open_api_sdk/models/operations/reason.rbi +11 -0
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +6 -2
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rbi +2 -0
- data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +10 -10
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rbi +4 -4
- data/lib/open_api_sdk/models/operations/updatecommission_partner.rb +6 -2
- data/lib/open_api_sdk/models/operations/updatecommission_partner.rbi +2 -0
- data/lib/open_api_sdk/models/operations.rb +3 -6
- data/lib/open_api_sdk/models/shared/analyticstopurls.rb +1 -1
- data/lib/open_api_sdk/models/shared/applicationformdata.rb +37 -0
- data/lib/open_api_sdk/models/shared/applicationformdata.rbi +15 -0
- data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/leadcreatedevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/leadevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/leadevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/link.rb +14 -10
- data/lib/open_api_sdk/models/shared/link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/linkclickedevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/linkclickedevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/linkschema.rb +6 -2
- data/lib/open_api_sdk/models/shared/linkschema.rbi +2 -0
- data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/linkwebhookevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rb +45 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent.rbi +19 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rb +45 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_data.rbi +19 -0
- data/lib/open_api_sdk/models/{operations/createcustomer_type.rb → shared/partnerapplicationsubmittedevent_event.rb} +3 -4
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_event.rbi +11 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rb +89 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_partner.rbi +41 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rb +28 -0
- data/lib/open_api_sdk/models/shared/partnerapplicationsubmittedevent_status.rbi +11 -0
- data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rb +32 -4
- data/lib/open_api_sdk/models/shared/partnerenrolledevent_data.rbi +14 -0
- data/lib/open_api_sdk/models/shared/salecreatedevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/salecreatedevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/saleevent_link.rb +14 -10
- data/lib/open_api_sdk/models/shared/saleevent_link.rbi +6 -4
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +6 -2
- data/lib/open_api_sdk/models/shared/workspaceschema.rbi +2 -0
- data/lib/open_api_sdk/models/shared.rb +6 -0
- data/lib/open_api_sdk/partners.rb +235 -0
- data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
- metadata +20 -14
- data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -61
- data/lib/open_api_sdk/models/operations/createcustomer_discount.rbi +0 -27
- data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -53
- data/lib/open_api_sdk/models/operations/createcustomer_link.rbi +0 -23
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -45
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rbi +0 -19
- data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -49
- data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rbi +0 -21
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -81
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rbi +0 -37
- data/lib/open_api_sdk/models/operations/createcustomer_type.rbi +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48ac05c03a1b54b31ab86c62a6399dfec43e6e53d781836ee747c04ac759a609
|
|
4
|
+
data.tar.gz: 1c07bc0040688358b221280d241dc7c207f84bf14a3debcc8460dbb19a0c6e55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1596526caddb02c45d00f897de2f7ba09de7fe14d6e602021109b8d74770480dae24609133ee832aff29039a68c9a773c0a0b6b883356f89b51a9ea02d798db
|
|
7
|
+
data.tar.gz: c326159d89886eb1a9465535db1d0b4e65ebc3dd055c97dd797d3685beaf893cd9acbf9b9c57f67c9f22ff74b465c6af29ac4da2322e98a7b9e52aba538f1e9f
|
|
@@ -265,243 +265,6 @@ module OpenApiSDK
|
|
|
265
265
|
end
|
|
266
266
|
|
|
267
267
|
|
|
268
|
-
sig { params(request: T.nilable(Models::Operations::CreateCustomerRequestBody), timeout_ms: T.nilable(Integer)).returns(Models::Operations::CreateCustomerResponseBody) }
|
|
269
|
-
def create(request: nil, timeout_ms: nil)
|
|
270
|
-
# create - Create a customer
|
|
271
|
-
# [Deprecated]: Customer creation can only be done via tracking a lead event. Use the /track/lead endpoint instead.
|
|
272
|
-
#
|
|
273
|
-
# @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
274
|
-
url, params = @sdk_configuration.get_server_details
|
|
275
|
-
base_url = Utils.template_url(url, params)
|
|
276
|
-
url = "#{base_url}/customers"
|
|
277
|
-
headers = {}
|
|
278
|
-
headers = T.cast(headers, T::Hash[String, String])
|
|
279
|
-
req_content_type, data, form = Utils.serialize_request_body(request, false, true, :request, :json)
|
|
280
|
-
headers['content-type'] = req_content_type
|
|
281
|
-
|
|
282
|
-
if form
|
|
283
|
-
body = Utils.encode_form(form)
|
|
284
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
285
|
-
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
286
|
-
else
|
|
287
|
-
body = data
|
|
288
|
-
end
|
|
289
|
-
headers['Accept'] = 'application/json'
|
|
290
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
|
291
|
-
|
|
292
|
-
security = @sdk_configuration.security_source&.call
|
|
293
|
-
|
|
294
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
295
|
-
timeout ||= @sdk_configuration.timeout
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
connection = @sdk_configuration.client
|
|
299
|
-
|
|
300
|
-
hook_ctx = SDKHooks::HookContext.new(
|
|
301
|
-
config: @sdk_configuration,
|
|
302
|
-
base_url: base_url,
|
|
303
|
-
oauth2_scopes: nil,
|
|
304
|
-
operation_id: 'createCustomer',
|
|
305
|
-
security_source: @sdk_configuration.security_source
|
|
306
|
-
)
|
|
307
|
-
|
|
308
|
-
error = T.let(nil, T.nilable(StandardError))
|
|
309
|
-
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
begin
|
|
313
|
-
http_response = T.must(connection).post(url) do |req|
|
|
314
|
-
req.body = body
|
|
315
|
-
req.headers.merge!(headers)
|
|
316
|
-
req.options.timeout = timeout unless timeout.nil?
|
|
317
|
-
Utils.configure_request_security(req, security)
|
|
318
|
-
|
|
319
|
-
@sdk_configuration.hooks.before_request(
|
|
320
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
321
|
-
hook_ctx: hook_ctx
|
|
322
|
-
),
|
|
323
|
-
request: req
|
|
324
|
-
)
|
|
325
|
-
end
|
|
326
|
-
rescue StandardError => e
|
|
327
|
-
error = e
|
|
328
|
-
ensure
|
|
329
|
-
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
330
|
-
http_response = @sdk_configuration.hooks.after_error(
|
|
331
|
-
error: error,
|
|
332
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
333
|
-
hook_ctx: hook_ctx
|
|
334
|
-
),
|
|
335
|
-
response: http_response
|
|
336
|
-
)
|
|
337
|
-
else
|
|
338
|
-
http_response = @sdk_configuration.hooks.after_success(
|
|
339
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
340
|
-
hook_ctx: hook_ctx
|
|
341
|
-
),
|
|
342
|
-
response: http_response
|
|
343
|
-
)
|
|
344
|
-
end
|
|
345
|
-
|
|
346
|
-
if http_response.nil?
|
|
347
|
-
raise error if !error.nil?
|
|
348
|
-
raise 'no response'
|
|
349
|
-
end
|
|
350
|
-
end
|
|
351
|
-
|
|
352
|
-
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
353
|
-
if Utils.match_status_code(http_response.status, ['201'])
|
|
354
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
355
|
-
@sdk_configuration.hooks.after_success(
|
|
356
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
357
|
-
hook_ctx: hook_ctx
|
|
358
|
-
),
|
|
359
|
-
response: http_response
|
|
360
|
-
)
|
|
361
|
-
response_data = http_response.env.response_body
|
|
362
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Operations::CreateCustomerResponseBody)
|
|
363
|
-
|
|
364
|
-
return obj
|
|
365
|
-
else
|
|
366
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
367
|
-
end
|
|
368
|
-
elsif Utils.match_status_code(http_response.status, ['400'])
|
|
369
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
370
|
-
@sdk_configuration.hooks.after_success(
|
|
371
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
372
|
-
hook_ctx: hook_ctx
|
|
373
|
-
),
|
|
374
|
-
response: http_response
|
|
375
|
-
)
|
|
376
|
-
response_data = http_response.env.response_body
|
|
377
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::BadRequest)
|
|
378
|
-
raise obj
|
|
379
|
-
else
|
|
380
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
381
|
-
end
|
|
382
|
-
elsif Utils.match_status_code(http_response.status, ['401'])
|
|
383
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
384
|
-
@sdk_configuration.hooks.after_success(
|
|
385
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
386
|
-
hook_ctx: hook_ctx
|
|
387
|
-
),
|
|
388
|
-
response: http_response
|
|
389
|
-
)
|
|
390
|
-
response_data = http_response.env.response_body
|
|
391
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Unauthorized)
|
|
392
|
-
raise obj
|
|
393
|
-
else
|
|
394
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
395
|
-
end
|
|
396
|
-
elsif Utils.match_status_code(http_response.status, ['403'])
|
|
397
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
398
|
-
@sdk_configuration.hooks.after_success(
|
|
399
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
400
|
-
hook_ctx: hook_ctx
|
|
401
|
-
),
|
|
402
|
-
response: http_response
|
|
403
|
-
)
|
|
404
|
-
response_data = http_response.env.response_body
|
|
405
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Forbidden)
|
|
406
|
-
raise obj
|
|
407
|
-
else
|
|
408
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
409
|
-
end
|
|
410
|
-
elsif Utils.match_status_code(http_response.status, ['404'])
|
|
411
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
412
|
-
@sdk_configuration.hooks.after_success(
|
|
413
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
414
|
-
hook_ctx: hook_ctx
|
|
415
|
-
),
|
|
416
|
-
response: http_response
|
|
417
|
-
)
|
|
418
|
-
response_data = http_response.env.response_body
|
|
419
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::NotFound)
|
|
420
|
-
raise obj
|
|
421
|
-
else
|
|
422
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
423
|
-
end
|
|
424
|
-
elsif Utils.match_status_code(http_response.status, ['409'])
|
|
425
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
426
|
-
@sdk_configuration.hooks.after_success(
|
|
427
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
428
|
-
hook_ctx: hook_ctx
|
|
429
|
-
),
|
|
430
|
-
response: http_response
|
|
431
|
-
)
|
|
432
|
-
response_data = http_response.env.response_body
|
|
433
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::Conflict)
|
|
434
|
-
raise obj
|
|
435
|
-
else
|
|
436
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
437
|
-
end
|
|
438
|
-
elsif Utils.match_status_code(http_response.status, ['410'])
|
|
439
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
440
|
-
@sdk_configuration.hooks.after_success(
|
|
441
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
442
|
-
hook_ctx: hook_ctx
|
|
443
|
-
),
|
|
444
|
-
response: http_response
|
|
445
|
-
)
|
|
446
|
-
response_data = http_response.env.response_body
|
|
447
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InviteExpired)
|
|
448
|
-
raise obj
|
|
449
|
-
else
|
|
450
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
451
|
-
end
|
|
452
|
-
elsif Utils.match_status_code(http_response.status, ['422'])
|
|
453
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
454
|
-
@sdk_configuration.hooks.after_success(
|
|
455
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
456
|
-
hook_ctx: hook_ctx
|
|
457
|
-
),
|
|
458
|
-
response: http_response
|
|
459
|
-
)
|
|
460
|
-
response_data = http_response.env.response_body
|
|
461
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::UnprocessableEntity)
|
|
462
|
-
raise obj
|
|
463
|
-
else
|
|
464
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
465
|
-
end
|
|
466
|
-
elsif Utils.match_status_code(http_response.status, ['429'])
|
|
467
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
468
|
-
@sdk_configuration.hooks.after_success(
|
|
469
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
470
|
-
hook_ctx: hook_ctx
|
|
471
|
-
),
|
|
472
|
-
response: http_response
|
|
473
|
-
)
|
|
474
|
-
response_data = http_response.env.response_body
|
|
475
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::RateLimitExceeded)
|
|
476
|
-
raise obj
|
|
477
|
-
else
|
|
478
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
479
|
-
end
|
|
480
|
-
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
481
|
-
if Utils.match_content_type(content_type, 'application/json')
|
|
482
|
-
@sdk_configuration.hooks.after_success(
|
|
483
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
484
|
-
hook_ctx: hook_ctx
|
|
485
|
-
),
|
|
486
|
-
response: http_response
|
|
487
|
-
)
|
|
488
|
-
response_data = http_response.env.response_body
|
|
489
|
-
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::InternalServerError)
|
|
490
|
-
raise obj
|
|
491
|
-
else
|
|
492
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
493
|
-
end
|
|
494
|
-
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
495
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
496
|
-
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
497
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
498
|
-
else
|
|
499
|
-
raise ::OpenApiSDK::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
500
|
-
|
|
501
|
-
end
|
|
502
|
-
end
|
|
503
|
-
|
|
504
|
-
|
|
505
268
|
sig { params(request: Models::Operations::GetCustomerRequest, timeout_ms: T.nilable(Integer)).returns(Models::Operations::GetCustomerResponseBody) }
|
|
506
269
|
def get(request:, timeout_ms: nil)
|
|
507
270
|
# get - Retrieve a customer
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module OpenApiSDK
|
|
8
|
+
module Models
|
|
9
|
+
module Operations
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class BanPartnerRequestBody
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
field :reason, Models::Operations::Reason, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('reason'), required: true, 'decoder': Utils.enum_from_string(Models::Operations::Reason, false) } }
|
|
18
|
+
# The ID of the partner to create a link for. Will take precedence over `tenantId` if provided.
|
|
19
|
+
field :partner_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
|
|
20
|
+
# The ID of the partner in your system. If both `partnerId` and `tenantId` are not provided, an error will be thrown.
|
|
21
|
+
field :tenant_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
|
|
22
|
+
|
|
23
|
+
sig { params(reason: Models::Operations::Reason, partner_id: T.nilable(::String), tenant_id: T.nilable(::String)).void }
|
|
24
|
+
def initialize(reason:, partner_id: nil, tenant_id: nil)
|
|
25
|
+
@reason = reason
|
|
26
|
+
@partner_id = partner_id
|
|
27
|
+
@tenant_id = tenant_id
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
31
|
+
def ==(other)
|
|
32
|
+
return false unless other.is_a? self.class
|
|
33
|
+
return false unless @reason == other.reason
|
|
34
|
+
return false unless @partner_id == other.partner_id
|
|
35
|
+
return false unless @tenant_id == other.tenant_id
|
|
36
|
+
true
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Operations::BanPartnerRequestBody
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Operations::BanPartnerRequestBody
|
|
11
|
+
def reason(); end
|
|
12
|
+
def reason=(str_); end
|
|
13
|
+
def partner_id(); end
|
|
14
|
+
def partner_id=(str_); end
|
|
15
|
+
def tenant_id(); end
|
|
16
|
+
def tenant_id=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
module OpenApiSDK
|
|
8
|
+
module Models
|
|
9
|
+
module Operations
|
|
10
|
+
|
|
11
|
+
# The banned partner
|
|
12
|
+
class BanPartnerResponseBody
|
|
13
|
+
extend T::Sig
|
|
14
|
+
include Crystalline::MetadataFields
|
|
15
|
+
|
|
16
|
+
# The ID of the banned partner.
|
|
17
|
+
field :partner_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId'), required: true } }
|
|
18
|
+
|
|
19
|
+
sig { params(partner_id: ::String).void }
|
|
20
|
+
def initialize(partner_id:)
|
|
21
|
+
@partner_id = partner_id
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
25
|
+
def ==(other)
|
|
26
|
+
return false unless other.is_a? self.class
|
|
27
|
+
return false unless @partner_id == other.partner_id
|
|
28
|
+
true
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Operations::BanPartnerResponseBody
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Operations::BanPartnerResponseBody
|
|
11
|
+
def partner_id(); end
|
|
12
|
+
def partner_id=(str_); end
|
|
13
|
+
end
|
|
@@ -39,6 +39,8 @@ module OpenApiSDK
|
|
|
39
39
|
field :stripe_connect_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('stripeConnectId'), required: true } }
|
|
40
40
|
# The date when the partner enabled payouts.
|
|
41
41
|
field :payouts_enabled_at, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payoutsEnabledAt'), required: true } }
|
|
42
|
+
# The date when the partner received the trusted badge in the partner network.
|
|
43
|
+
field :trusted_at, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trustedAt'), required: true } }
|
|
42
44
|
# The partner's unique ID within your database. Can be useful for associating the partner with a user in your database and retrieving/update their data in the future.
|
|
43
45
|
field :tenant_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId'), required: true } }
|
|
44
46
|
# The partner's referral links in this program.
|
|
@@ -71,10 +73,22 @@ module OpenApiSDK
|
|
|
71
73
|
field :total_conversions, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalConversions') } }
|
|
72
74
|
# The total number of sales generated by the partner's links (includes recurring sales)
|
|
73
75
|
field :total_sales, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalSales') } }
|
|
74
|
-
#
|
|
76
|
+
# Total revenue generated by the partner's links
|
|
75
77
|
field :total_sale_amount, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalSaleAmount') } }
|
|
76
|
-
#
|
|
78
|
+
# Net revenue after commissions (`Total Revenue - Total Commissions`)
|
|
77
79
|
field :net_revenue, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('netRevenue') } }
|
|
80
|
+
# Earnings Per Click (EPC) (`Total Revenue ÷ Total Clicks`)
|
|
81
|
+
field :earnings_per_click, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earningsPerClick') } }
|
|
82
|
+
# Average lifetime value for each paying customer (`Total Revenue ÷ Total Conversions`)
|
|
83
|
+
field :average_lifetime_value, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('averageLifetimeValue') } }
|
|
84
|
+
# Percentage of clicks that become leads (`Total Leads ÷ Total Clicks`)
|
|
85
|
+
field :click_to_lead_rate, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clickToLeadRate') } }
|
|
86
|
+
# Percentage of clicks that convert to paying customers (`Total Conversions ÷ Total Clicks`)
|
|
87
|
+
field :click_to_conversion_rate, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clickToConversionRate') } }
|
|
88
|
+
# Percentage of leads that convert to paying customers (`Total Conversions ÷ Total Leads`)
|
|
89
|
+
field :lead_to_conversion_rate, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leadToConversionRate') } }
|
|
90
|
+
# Return On Ad Spend (ROAS) (`Total Revenue ÷ Total Commissions`)
|
|
91
|
+
field :return_on_ad_spend, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('returnOnAdSpend') } }
|
|
78
92
|
# The partner's website URL (including the https protocol).
|
|
79
93
|
field :website, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('website') } }
|
|
80
94
|
# The partner's YouTube channel username (e.g. `johndoe`).
|
|
@@ -88,8 +102,8 @@ module OpenApiSDK
|
|
|
88
102
|
# The partner's TikTok username (e.g. `johndoe`).
|
|
89
103
|
field :tiktok, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tiktok') } }
|
|
90
104
|
|
|
91
|
-
sig { params(id: ::String, name: ::String, program_id: ::String, partner_id: ::String, created_at: ::String, status: Models::Operations::CreatePartnerStatus, company_name: T.nilable(::String), email: T.nilable(::String), image: T.nilable(::String), country: T.nilable(::String), paypal_email: T.nilable(::String), stripe_connect_id: T.nilable(::String), payouts_enabled_at: T.nilable(::String), tenant_id: T.nilable(::String), links: T.nilable(T::Array[Models::Operations::CreatePartnerLink]), description: T.nilable(::String), group_id: T.nilable(::String), total_commissions: T.nilable(::Float), click_reward_id: T.nilable(::String), lead_reward_id: T.nilable(::String), sale_reward_id: T.nilable(::String), discount_id: T.nilable(::String), application_id: T.nilable(::String), banned_at: T.nilable(::String), banned_reason: T.nilable(Models::Operations::BannedReason), total_clicks: T.nilable(::Float), total_leads: T.nilable(::Float), total_conversions: T.nilable(::Float), total_sales: T.nilable(::Float), total_sale_amount: T.nilable(::Float), net_revenue: T.nilable(::Float), website: T.nilable(::String), youtube: T.nilable(::String), twitter: T.nilable(::String), linkedin: T.nilable(::String), instagram: T.nilable(::String), tiktok: T.nilable(::String)).void }
|
|
92
|
-
def initialize(id:, name:, program_id:, partner_id:, created_at:, status:, company_name: nil, email: nil, image: nil, country: nil, paypal_email: nil, stripe_connect_id: nil, payouts_enabled_at: nil, tenant_id: nil, links: nil, description: nil, group_id: nil, total_commissions: 0.0, click_reward_id: nil, lead_reward_id: nil, sale_reward_id: nil, discount_id: nil, application_id: nil, banned_at: nil, banned_reason: nil, total_clicks: 0.0, total_leads: 0.0, total_conversions: 0.0, total_sales: 0.0, total_sale_amount: 0.0, net_revenue: 0.0, website: nil, youtube: nil, twitter: nil, linkedin: nil, instagram: nil, tiktok: nil)
|
|
105
|
+
sig { params(id: ::String, name: ::String, program_id: ::String, partner_id: ::String, created_at: ::String, status: Models::Operations::CreatePartnerStatus, company_name: T.nilable(::String), email: T.nilable(::String), image: T.nilable(::String), country: T.nilable(::String), paypal_email: T.nilable(::String), stripe_connect_id: T.nilable(::String), payouts_enabled_at: T.nilable(::String), trusted_at: T.nilable(::String), tenant_id: T.nilable(::String), links: T.nilable(T::Array[Models::Operations::CreatePartnerLink]), description: T.nilable(::String), group_id: T.nilable(::String), total_commissions: T.nilable(::Float), click_reward_id: T.nilable(::String), lead_reward_id: T.nilable(::String), sale_reward_id: T.nilable(::String), discount_id: T.nilable(::String), application_id: T.nilable(::String), banned_at: T.nilable(::String), banned_reason: T.nilable(Models::Operations::BannedReason), total_clicks: T.nilable(::Float), total_leads: T.nilable(::Float), total_conversions: T.nilable(::Float), total_sales: T.nilable(::Float), total_sale_amount: T.nilable(::Float), net_revenue: T.nilable(::Float), earnings_per_click: T.nilable(::Float), average_lifetime_value: T.nilable(::Float), click_to_lead_rate: T.nilable(::Float), click_to_conversion_rate: T.nilable(::Float), lead_to_conversion_rate: T.nilable(::Float), return_on_ad_spend: T.nilable(::Float), website: T.nilable(::String), youtube: T.nilable(::String), twitter: T.nilable(::String), linkedin: T.nilable(::String), instagram: T.nilable(::String), tiktok: T.nilable(::String)).void }
|
|
106
|
+
def initialize(id:, name:, program_id:, partner_id:, created_at:, status:, company_name: nil, email: nil, image: nil, country: nil, paypal_email: nil, stripe_connect_id: nil, payouts_enabled_at: nil, trusted_at: nil, tenant_id: nil, links: nil, description: nil, group_id: nil, total_commissions: 0.0, click_reward_id: nil, lead_reward_id: nil, sale_reward_id: nil, discount_id: nil, application_id: nil, banned_at: nil, banned_reason: nil, total_clicks: 0.0, total_leads: 0.0, total_conversions: 0.0, total_sales: 0.0, total_sale_amount: 0.0, net_revenue: 0.0, earnings_per_click: nil, average_lifetime_value: nil, click_to_lead_rate: nil, click_to_conversion_rate: nil, lead_to_conversion_rate: nil, return_on_ad_spend: nil, website: nil, youtube: nil, twitter: nil, linkedin: nil, instagram: nil, tiktok: nil)
|
|
93
107
|
@id = id
|
|
94
108
|
@name = name
|
|
95
109
|
@program_id = program_id
|
|
@@ -103,6 +117,7 @@ module OpenApiSDK
|
|
|
103
117
|
@paypal_email = paypal_email
|
|
104
118
|
@stripe_connect_id = stripe_connect_id
|
|
105
119
|
@payouts_enabled_at = payouts_enabled_at
|
|
120
|
+
@trusted_at = trusted_at
|
|
106
121
|
@tenant_id = tenant_id
|
|
107
122
|
@links = links
|
|
108
123
|
@description = description
|
|
@@ -121,6 +136,12 @@ module OpenApiSDK
|
|
|
121
136
|
@total_sales = total_sales
|
|
122
137
|
@total_sale_amount = total_sale_amount
|
|
123
138
|
@net_revenue = net_revenue
|
|
139
|
+
@earnings_per_click = earnings_per_click
|
|
140
|
+
@average_lifetime_value = average_lifetime_value
|
|
141
|
+
@click_to_lead_rate = click_to_lead_rate
|
|
142
|
+
@click_to_conversion_rate = click_to_conversion_rate
|
|
143
|
+
@lead_to_conversion_rate = lead_to_conversion_rate
|
|
144
|
+
@return_on_ad_spend = return_on_ad_spend
|
|
124
145
|
@website = website
|
|
125
146
|
@youtube = youtube
|
|
126
147
|
@twitter = twitter
|
|
@@ -145,6 +166,7 @@ module OpenApiSDK
|
|
|
145
166
|
return false unless @paypal_email == other.paypal_email
|
|
146
167
|
return false unless @stripe_connect_id == other.stripe_connect_id
|
|
147
168
|
return false unless @payouts_enabled_at == other.payouts_enabled_at
|
|
169
|
+
return false unless @trusted_at == other.trusted_at
|
|
148
170
|
return false unless @tenant_id == other.tenant_id
|
|
149
171
|
return false unless @links == other.links
|
|
150
172
|
return false unless @description == other.description
|
|
@@ -163,6 +185,12 @@ module OpenApiSDK
|
|
|
163
185
|
return false unless @total_sales == other.total_sales
|
|
164
186
|
return false unless @total_sale_amount == other.total_sale_amount
|
|
165
187
|
return false unless @net_revenue == other.net_revenue
|
|
188
|
+
return false unless @earnings_per_click == other.earnings_per_click
|
|
189
|
+
return false unless @average_lifetime_value == other.average_lifetime_value
|
|
190
|
+
return false unless @click_to_lead_rate == other.click_to_lead_rate
|
|
191
|
+
return false unless @click_to_conversion_rate == other.click_to_conversion_rate
|
|
192
|
+
return false unless @lead_to_conversion_rate == other.lead_to_conversion_rate
|
|
193
|
+
return false unless @return_on_ad_spend == other.return_on_ad_spend
|
|
166
194
|
return false unless @website == other.website
|
|
167
195
|
return false unless @youtube == other.youtube
|
|
168
196
|
return false unless @twitter == other.twitter
|
|
@@ -34,6 +34,8 @@ class OpenApiSDK::Models::Operations::CreatePartnerResponseBody
|
|
|
34
34
|
def stripe_connect_id=(str_); end
|
|
35
35
|
def payouts_enabled_at(); end
|
|
36
36
|
def payouts_enabled_at=(str_); end
|
|
37
|
+
def trusted_at(); end
|
|
38
|
+
def trusted_at=(str_); end
|
|
37
39
|
def tenant_id(); end
|
|
38
40
|
def tenant_id=(str_); end
|
|
39
41
|
def links(); end
|
|
@@ -70,6 +72,18 @@ class OpenApiSDK::Models::Operations::CreatePartnerResponseBody
|
|
|
70
72
|
def total_sale_amount=(str_); end
|
|
71
73
|
def net_revenue(); end
|
|
72
74
|
def net_revenue=(str_); end
|
|
75
|
+
def earnings_per_click(); end
|
|
76
|
+
def earnings_per_click=(str_); end
|
|
77
|
+
def average_lifetime_value(); end
|
|
78
|
+
def average_lifetime_value=(str_); end
|
|
79
|
+
def click_to_lead_rate(); end
|
|
80
|
+
def click_to_lead_rate=(str_); end
|
|
81
|
+
def click_to_conversion_rate(); end
|
|
82
|
+
def click_to_conversion_rate=(str_); end
|
|
83
|
+
def lead_to_conversion_rate(); end
|
|
84
|
+
def lead_to_conversion_rate=(str_); end
|
|
85
|
+
def return_on_ad_spend(); end
|
|
86
|
+
def return_on_ad_spend=(str_); end
|
|
73
87
|
def website(); end
|
|
74
88
|
def website=(str_); end
|
|
75
89
|
def youtube(); end
|
|
@@ -25,15 +25,18 @@ module OpenApiSDK
|
|
|
25
25
|
field :payouts_enabled_at, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('payoutsEnabledAt'), required: true } }
|
|
26
26
|
# The partner's country (required for tax purposes).
|
|
27
27
|
field :country, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country'), required: true } }
|
|
28
|
+
# The partner's group ID on Dub.
|
|
29
|
+
field :group_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('groupId') } }
|
|
28
30
|
|
|
29
|
-
sig { params(id: ::String, name: ::String, email: T.nilable(::String), image: T.nilable(::String), payouts_enabled_at: T.nilable(::String), country: T.nilable(::String)).void }
|
|
30
|
-
def initialize(id:, name:, email: nil, image: nil, payouts_enabled_at: nil, country: nil)
|
|
31
|
+
sig { params(id: ::String, name: ::String, email: T.nilable(::String), image: T.nilable(::String), payouts_enabled_at: T.nilable(::String), country: T.nilable(::String), group_id: T.nilable(::String)).void }
|
|
32
|
+
def initialize(id:, name:, email: nil, image: nil, payouts_enabled_at: nil, country: nil, group_id: nil)
|
|
31
33
|
@id = id
|
|
32
34
|
@name = name
|
|
33
35
|
@email = email
|
|
34
36
|
@image = image
|
|
35
37
|
@payouts_enabled_at = payouts_enabled_at
|
|
36
38
|
@country = country
|
|
39
|
+
@group_id = group_id
|
|
37
40
|
end
|
|
38
41
|
|
|
39
42
|
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
@@ -45,6 +48,7 @@ module OpenApiSDK
|
|
|
45
48
|
return false unless @image == other.image
|
|
46
49
|
return false unless @payouts_enabled_at == other.payouts_enabled_at
|
|
47
50
|
return false unless @country == other.country
|
|
51
|
+
return false unless @group_id == other.group_id
|
|
48
52
|
true
|
|
49
53
|
end
|
|
50
54
|
end
|
|
@@ -33,6 +33,8 @@ module OpenApiSDK
|
|
|
33
33
|
field :start, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'start', 'style': 'form', 'explode': true } }
|
|
34
34
|
# The end date of the date range to filter the commissions by.
|
|
35
35
|
field :end_, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'end', 'style': 'form', 'explode': true } }
|
|
36
|
+
|
|
37
|
+
field :timezone, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'timezone', 'style': 'form', 'explode': true } }
|
|
36
38
|
# The field to sort the list of commissions by.
|
|
37
39
|
field :sort_by, Crystalline::Nilable.new(Models::Operations::ListCommissionsQueryParamSortBy), { 'query_param': { 'field_name': 'sortBy', 'style': 'form', 'explode': true } }
|
|
38
40
|
# The sort order for the list of commissions.
|
|
@@ -44,8 +46,8 @@ module OpenApiSDK
|
|
|
44
46
|
# The number of items per page.
|
|
45
47
|
field :page_size, Crystalline::Nilable.new(::Float), { 'query_param': { 'field_name': 'pageSize', 'style': 'form', 'explode': true } }
|
|
46
48
|
|
|
47
|
-
sig { params(type: T.nilable(Models::Operations::Type), customer_id: T.nilable(::String), payout_id: T.nilable(::String), partner_id: T.nilable(::String), tenant_id: T.nilable(::String), group_id: T.nilable(::String), invoice_id: T.nilable(::String), status: T.nilable(Models::Operations::QueryParamStatus), start: T.nilable(::String), end_: T.nilable(::String), sort_by: T.nilable(Models::Operations::ListCommissionsQueryParamSortBy), sort_order: T.nilable(Models::Operations::ListCommissionsQueryParamSortOrder), interval: T.nilable(Models::Operations::ListCommissionsQueryParamInterval), page: T.nilable(::Float), page_size: T.nilable(::Float)).void }
|
|
48
|
-
def initialize(type: nil, customer_id: nil, payout_id: nil, partner_id: nil, tenant_id: nil, group_id: nil, invoice_id: nil, status: nil, start: nil, end_: nil, sort_by: Models::Operations::ListCommissionsQueryParamSortBy::CREATED_AT, sort_order: Models::Operations::ListCommissionsQueryParamSortOrder::DESC, interval: Models::Operations::ListCommissionsQueryParamInterval::ALL, page: 1.0, page_size: 100.0)
|
|
49
|
+
sig { params(type: T.nilable(Models::Operations::Type), customer_id: T.nilable(::String), payout_id: T.nilable(::String), partner_id: T.nilable(::String), tenant_id: T.nilable(::String), group_id: T.nilable(::String), invoice_id: T.nilable(::String), status: T.nilable(Models::Operations::QueryParamStatus), start: T.nilable(::String), end_: T.nilable(::String), timezone: T.nilable(::String), sort_by: T.nilable(Models::Operations::ListCommissionsQueryParamSortBy), sort_order: T.nilable(Models::Operations::ListCommissionsQueryParamSortOrder), interval: T.nilable(Models::Operations::ListCommissionsQueryParamInterval), page: T.nilable(::Float), page_size: T.nilable(::Float)).void }
|
|
50
|
+
def initialize(type: nil, customer_id: nil, payout_id: nil, partner_id: nil, tenant_id: nil, group_id: nil, invoice_id: nil, status: nil, start: nil, end_: nil, timezone: nil, sort_by: Models::Operations::ListCommissionsQueryParamSortBy::CREATED_AT, sort_order: Models::Operations::ListCommissionsQueryParamSortOrder::DESC, interval: Models::Operations::ListCommissionsQueryParamInterval::ALL, page: 1.0, page_size: 100.0)
|
|
49
51
|
@type = type
|
|
50
52
|
@customer_id = customer_id
|
|
51
53
|
@payout_id = payout_id
|
|
@@ -56,6 +58,7 @@ module OpenApiSDK
|
|
|
56
58
|
@status = status
|
|
57
59
|
@start = start
|
|
58
60
|
@end_ = end_
|
|
61
|
+
@timezone = timezone
|
|
59
62
|
@sort_by = sort_by
|
|
60
63
|
@sort_order = sort_order
|
|
61
64
|
@interval = interval
|
|
@@ -76,6 +79,7 @@ module OpenApiSDK
|
|
|
76
79
|
return false unless @status == other.status
|
|
77
80
|
return false unless @start == other.start
|
|
78
81
|
return false unless @end_ == other.end_
|
|
82
|
+
return false unless @timezone == other.timezone
|
|
79
83
|
return false unless @sort_by == other.sort_by
|
|
80
84
|
return false unless @sort_order == other.sort_order
|
|
81
85
|
return false unless @interval == other.interval
|
|
@@ -61,6 +61,8 @@ module OpenApiSDK
|
|
|
61
61
|
field :tag_ids, Crystalline::Nilable.new(Crystalline::Union.new(::String, Crystalline::Array.new(::String))), { 'query_param': { 'field_name': 'tagIds', 'style': 'form', 'explode': true } }
|
|
62
62
|
# The folder ID to retrieve analytics for. If not provided, return analytics for unsorted links.
|
|
63
63
|
field :folder_id, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'folderId', 'style': 'form', 'explode': true } }
|
|
64
|
+
# The group ID to retrieve analytics for.
|
|
65
|
+
field :group_id, Crystalline::Nilable.new(::String), { 'query_param': { 'field_name': 'groupId', 'style': 'form', 'explode': true } }
|
|
64
66
|
# Filter for root domains. If true, filter for domains only. If false, filter for links only. If undefined, return both.
|
|
65
67
|
field :root, Crystalline::Nilable.new(Crystalline::Boolean.new), { 'query_param': { 'field_name': 'root', 'style': 'form', 'explode': true } }
|
|
66
68
|
# Filter sales by type: 'new' for first-time purchases, 'recurring' for repeat purchases. If undefined, returns both.
|
|
@@ -98,8 +100,8 @@ module OpenApiSDK
|
|
|
98
100
|
# DEPRECATED. Use `sortOrder` instead.
|
|
99
101
|
field :order, Crystalline::Nilable.new(Models::Operations::Order), { 'query_param': { 'field_name': 'order', 'style': 'form', 'explode': true } }
|
|
100
102
|
|
|
101
|
-
sig { params(domain: T.nilable(::String), key: T.nilable(::String), link_id: T.nilable(::String), external_id: T.nilable(::String), tenant_id: T.nilable(::String), program_id: T.nilable(::String), partner_id: T.nilable(::String), customer_id: T.nilable(::String), interval: T.nilable(Models::Operations::QueryParamInterval), start: T.nilable(::String), end_: T.nilable(::String), country: T.nilable(::String), city: T.nilable(::String), region: T.nilable(::String), continent: T.nilable(Models::Shared::ContinentCode), device: T.nilable(::String), browser: T.nilable(::String), os: T.nilable(::String), trigger: T.nilable(Models::Operations::QueryParamTrigger), referer: T.nilable(::String), referer_url: T.nilable(::String), url: T.nilable(::String), tag_ids: T.nilable(T.any(::String, T::Array[::String])), folder_id: T.nilable(::String), root: T.nilable(T::Boolean), sale_type: T.nilable(Models::Operations::QueryParamSaleType), query: T.nilable(::String), tag_id: T.nilable(::String), qr: T.nilable(T::Boolean), event: T.nilable(Models::Operations::QueryParamEvent), timezone: T.nilable(::String), utm_source: T.nilable(::String), utm_medium: T.nilable(::String), utm_campaign: T.nilable(::String), utm_term: T.nilable(::String), utm_content: T.nilable(::String), ref: T.nilable(::String), page: T.nilable(::Float), limit: T.nilable(::Float), sort_order: T.nilable(Models::Operations::QueryParamSortOrder), sort_by: T.nilable(Models::Operations::QueryParamSortBy), order: T.nilable(Models::Operations::Order)).void }
|
|
102
|
-
def initialize(domain: nil, key: nil, link_id: nil, external_id: nil, tenant_id: nil, program_id: nil, partner_id: nil, customer_id: nil, interval: nil, start: nil, end_: nil, country: nil, city: nil, region: nil, continent: nil, device: nil, browser: nil, os: nil, trigger: nil, referer: nil, referer_url: nil, url: nil, tag_ids: nil, folder_id: nil, root: nil, sale_type: nil, query: nil, tag_id: nil, qr: nil, event: Models::Operations::QueryParamEvent::CLICKS, timezone: 'UTC', utm_source: nil, utm_medium: nil, utm_campaign: nil, utm_term: nil, utm_content: nil, ref: nil, page: 1.0, limit: 100.0, sort_order: Models::Operations::QueryParamSortOrder::DESC, sort_by: Models::Operations::QueryParamSortBy::TIMESTAMP, order: Models::Operations::Order::DESC)
|
|
103
|
+
sig { params(domain: T.nilable(::String), key: T.nilable(::String), link_id: T.nilable(::String), external_id: T.nilable(::String), tenant_id: T.nilable(::String), program_id: T.nilable(::String), partner_id: T.nilable(::String), customer_id: T.nilable(::String), interval: T.nilable(Models::Operations::QueryParamInterval), start: T.nilable(::String), end_: T.nilable(::String), country: T.nilable(::String), city: T.nilable(::String), region: T.nilable(::String), continent: T.nilable(Models::Shared::ContinentCode), device: T.nilable(::String), browser: T.nilable(::String), os: T.nilable(::String), trigger: T.nilable(Models::Operations::QueryParamTrigger), referer: T.nilable(::String), referer_url: T.nilable(::String), url: T.nilable(::String), tag_ids: T.nilable(T.any(::String, T::Array[::String])), folder_id: T.nilable(::String), group_id: T.nilable(::String), root: T.nilable(T::Boolean), sale_type: T.nilable(Models::Operations::QueryParamSaleType), query: T.nilable(::String), tag_id: T.nilable(::String), qr: T.nilable(T::Boolean), event: T.nilable(Models::Operations::QueryParamEvent), timezone: T.nilable(::String), utm_source: T.nilable(::String), utm_medium: T.nilable(::String), utm_campaign: T.nilable(::String), utm_term: T.nilable(::String), utm_content: T.nilable(::String), ref: T.nilable(::String), page: T.nilable(::Float), limit: T.nilable(::Float), sort_order: T.nilable(Models::Operations::QueryParamSortOrder), sort_by: T.nilable(Models::Operations::QueryParamSortBy), order: T.nilable(Models::Operations::Order)).void }
|
|
104
|
+
def initialize(domain: nil, key: nil, link_id: nil, external_id: nil, tenant_id: nil, program_id: nil, partner_id: nil, customer_id: nil, interval: nil, start: nil, end_: nil, country: nil, city: nil, region: nil, continent: nil, device: nil, browser: nil, os: nil, trigger: nil, referer: nil, referer_url: nil, url: nil, tag_ids: nil, folder_id: nil, group_id: nil, root: nil, sale_type: nil, query: nil, tag_id: nil, qr: nil, event: Models::Operations::QueryParamEvent::CLICKS, timezone: 'UTC', utm_source: nil, utm_medium: nil, utm_campaign: nil, utm_term: nil, utm_content: nil, ref: nil, page: 1.0, limit: 100.0, sort_order: Models::Operations::QueryParamSortOrder::DESC, sort_by: Models::Operations::QueryParamSortBy::TIMESTAMP, order: Models::Operations::Order::DESC)
|
|
103
105
|
@domain = domain
|
|
104
106
|
@key = key
|
|
105
107
|
@link_id = link_id
|
|
@@ -124,6 +126,7 @@ module OpenApiSDK
|
|
|
124
126
|
@url = url
|
|
125
127
|
@tag_ids = tag_ids
|
|
126
128
|
@folder_id = folder_id
|
|
129
|
+
@group_id = group_id
|
|
127
130
|
@root = root
|
|
128
131
|
@sale_type = sale_type
|
|
129
132
|
@query = query
|
|
@@ -171,6 +174,7 @@ module OpenApiSDK
|
|
|
171
174
|
return false unless @url == other.url
|
|
172
175
|
return false unless @tag_ids == other.tag_ids
|
|
173
176
|
return false unless @folder_id == other.folder_id
|
|
177
|
+
return false unless @group_id == other.group_id
|
|
174
178
|
return false unless @root == other.root
|
|
175
179
|
return false unless @sale_type == other.sale_type
|
|
176
180
|
return false unless @query == other.query
|
|
@@ -19,6 +19,13 @@ module OpenApiSDK
|
|
|
19
19
|
TOTAL_CONVERSIONS = new('totalConversions')
|
|
20
20
|
TOTAL_SALE_AMOUNT = new('totalSaleAmount')
|
|
21
21
|
TOTAL_COMMISSIONS = new('totalCommissions')
|
|
22
|
+
NET_REVENUE = new('netRevenue')
|
|
23
|
+
EARNINGS_PER_CLICK = new('earningsPerClick')
|
|
24
|
+
AVERAGE_LIFETIME_VALUE = new('averageLifetimeValue')
|
|
25
|
+
CLICK_TO_LEAD_RATE = new('clickToLeadRate')
|
|
26
|
+
CLICK_TO_CONVERSION_RATE = new('clickToConversionRate')
|
|
27
|
+
LEAD_TO_CONVERSION_RATE = new('leadToConversionRate')
|
|
28
|
+
RETURN_ON_AD_SPEND = new('returnOnAdSpend')
|
|
22
29
|
end
|
|
23
30
|
end
|
|
24
31
|
end
|