dub 0.2.2.pre.alpha.69 → 0.2.2
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 +3 -8
- data/lib/open_api_sdk/analytics.rb +1 -2
- data/lib/open_api_sdk/domains.rb +55 -61
- data/lib/open_api_sdk/dub.rb +4 -9
- data/lib/open_api_sdk/links.rb +57 -145
- data/lib/open_api_sdk/metatags.rb +1 -2
- data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +6 -6
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +5 -8
- data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/color.rb +2 -1
- data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +3 -15
- data/lib/open_api_sdk/models/operations/createdomain_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +12 -50
- data/lib/open_api_sdk/models/operations/createlink_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +1 -1
- data/lib/open_api_sdk/models/operations/createtag_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/data.rb +11 -49
- data/lib/open_api_sdk/models/operations/deletedomain_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/deletedomain_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +1 -1
- data/lib/open_api_sdk/models/operations/deletelink_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/deletelink_response.rb +2 -2
- data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/event.rb +3 -2
- data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +2 -2
- data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/getlinks_request.rb +8 -23
- data/lib/open_api_sdk/models/operations/getlinks_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +5 -11
- data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/getmetatags_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/getmetatags_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/getmetatags_responsebody.rb +1 -1
- data/lib/open_api_sdk/models/operations/getqrcode_request.rb +4 -13
- data/lib/open_api_sdk/models/operations/getqrcode_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/gettags_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/getworkspace_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/getworkspace_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/groupby.rb +4 -12
- data/lib/open_api_sdk/models/operations/interval.rb +4 -5
- data/lib/open_api_sdk/models/operations/level.rb +2 -1
- data/lib/open_api_sdk/models/operations/listdomains_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/paymentprocessor.rb +2 -1
- data/lib/open_api_sdk/models/operations/requestbody.rb +12 -50
- data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +10 -52
- data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/sort.rb +3 -5
- data/lib/open_api_sdk/models/operations/trackcustomer_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/{createpartner_response.rb → trackcustomer_response.rb} +5 -5
- data/lib/open_api_sdk/models/operations/trackcustomer_responsebody.rb +33 -0
- data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +8 -16
- data/lib/open_api_sdk/models/operations/tracklead_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +22 -7
- data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +6 -14
- data/lib/open_api_sdk/models/operations/tracksale_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +19 -7
- data/lib/open_api_sdk/models/operations/updatedomain_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +3 -15
- data/lib/open_api_sdk/models/operations/updatedomain_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatelink_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +13 -51
- data/lib/open_api_sdk/models/operations/updatelink_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatetag_color.rb +2 -1
- data/lib/open_api_sdk/models/operations/updatetag_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatetag_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +1 -1
- data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +3 -12
- data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +1 -1
- data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +12 -50
- data/lib/open_api_sdk/models/operations/upsertlink_response.rb +1 -1
- data/lib/open_api_sdk/models/operations.rb +22 -112
- data/lib/open_api_sdk/models/shared/badrequest.rb +2 -2
- data/lib/open_api_sdk/models/shared/code.rb +2 -1
- data/lib/open_api_sdk/models/shared/color.rb +2 -1
- data/lib/open_api_sdk/models/shared/conflict.rb +2 -2
- data/lib/open_api_sdk/models/shared/conflict_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/conflict_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/countrycode.rb +2 -1
- data/lib/open_api_sdk/models/shared/domains.rb +3 -6
- data/lib/open_api_sdk/models/shared/domainschema.rb +3 -12
- data/lib/open_api_sdk/models/shared/error.rb +1 -1
- data/lib/open_api_sdk/models/shared/forbidden.rb +2 -2
- data/lib/open_api_sdk/models/shared/forbidden_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/forbidden_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/geo.rb +1 -1
- data/lib/open_api_sdk/models/shared/internalservererror.rb +2 -2
- data/lib/open_api_sdk/models/shared/internalservererror_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/internalservererror_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/inviteexpired.rb +2 -2
- data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +1 -1
- data/lib/open_api_sdk/models/shared/linkschema.rb +7 -28
- data/lib/open_api_sdk/models/shared/notfound.rb +2 -2
- data/lib/open_api_sdk/models/shared/notfound_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/notfound_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/plan.rb +2 -1
- data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +2 -2
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/role.rb +2 -1
- data/lib/open_api_sdk/models/shared/security.rb +3 -3
- data/lib/open_api_sdk/models/shared/tagschema.rb +1 -1
- data/lib/open_api_sdk/models/shared/unauthorized.rb +2 -2
- data/lib/open_api_sdk/models/shared/unauthorized_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/unauthorized_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/unprocessableentity.rb +2 -2
- data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +2 -1
- data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +1 -1
- data/lib/open_api_sdk/models/shared/users.rb +1 -1
- data/lib/open_api_sdk/models/shared/workspaceschema.rb +7 -43
- data/lib/open_api_sdk/models/shared.rb +2 -11
- data/lib/open_api_sdk/qr_codes.rb +2 -2
- data/lib/open_api_sdk/sdkconfiguration.rb +4 -4
- data/lib/open_api_sdk/tags.rb +28 -115
- data/lib/open_api_sdk/track.rb +85 -2
- data/lib/open_api_sdk/utils/metadata_fields.rb +1 -1
- data/lib/open_api_sdk/utils/t.rb +1 -1
- data/lib/open_api_sdk/utils/utils.rb +5 -4
- data/lib/open_api_sdk/workspaces.rb +1 -3
- metadata +13 -117
- data/lib/open_api_sdk/customers.rb +0 -447
- data/lib/open_api_sdk/embed_tokens.rb +0 -107
- data/lib/open_api_sdk/events.rb +0 -100
- data/lib/open_api_sdk/folders.rb +0 -359
- data/lib/open_api_sdk/models/operations/accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/click.rb +0 -24
- data/lib/open_api_sdk/models/operations/country.rb +0 -266
- data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/createcustomer_interval.rb +0 -18
- data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/createcustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/createcustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb +0 -30
- data/lib/open_api_sdk/models/operations/createembedtoken_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb +0 -27
- data/lib/open_api_sdk/models/operations/createfolder_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/createfolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +0 -48
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +0 -72
- data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +0 -102
- data/lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb +0 -39
- data/lib/open_api_sdk/models/operations/createpartnerlink_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/customer.rb +0 -33
- data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletefolder_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletefolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletefolder_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletetag_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/deletetag_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/deletetag_responsebody.rb +0 -24
- data/lib/open_api_sdk/models/operations/discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/getcustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/getcustomer_interval.rb +0 -18
- data/lib/open_api_sdk/models/operations/getcustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/getcustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/getcustomer_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/getcustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/getcustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/getcustomers_interval.rb +0 -18
- data/lib/open_api_sdk/models/operations/getcustomers_request.rb +0 -30
- data/lib/open_api_sdk/models/operations/getcustomers_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortby.rb +0 -18
- data/lib/open_api_sdk/models/operations/gettags_queryparam_sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/gettags_request.rb +0 -39
- data/lib/open_api_sdk/models/operations/link.rb +0 -36
- data/lib/open_api_sdk/models/operations/linkprops.rb +0 -102
- data/lib/open_api_sdk/models/operations/links.rb +0 -48
- data/lib/open_api_sdk/models/operations/listdomains_request.rb +0 -33
- data/lib/open_api_sdk/models/operations/listevents_request.rb +0 -135
- data/lib/open_api_sdk/models/operations/listevents_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/listfolders_request.rb +0 -24
- data/lib/open_api_sdk/models/operations/listfolders_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/order.rb +0 -20
- data/lib/open_api_sdk/models/operations/partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/queryparam_event.rb +0 -19
- data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +0 -19
- data/lib/open_api_sdk/models/operations/queryparam_interval.rb +0 -25
- data/lib/open_api_sdk/models/operations/queryparam_sortby.rb +0 -17
- data/lib/open_api_sdk/models/operations/queryparam_sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/queryparam_trigger.rb +0 -18
- data/lib/open_api_sdk/models/operations/responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb +0 -26
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +0 -45
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/sale.rb +0 -36
- data/lib/open_api_sdk/models/operations/sortby.rb +0 -20
- data/lib/open_api_sdk/models/operations/sortorder.rb +0 -18
- data/lib/open_api_sdk/models/operations/status.rb +0 -19
- data/lib/open_api_sdk/models/operations/tracksale_customer.rb +0 -36
- data/lib/open_api_sdk/models/operations/trigger.rb +0 -18
- data/lib/open_api_sdk/models/operations/type.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatecustomer_discount.rb +0 -42
- data/lib/open_api_sdk/models/operations/updatecustomer_interval.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatecustomer_link.rb +0 -36
- data/lib/open_api_sdk/models/operations/updatecustomer_partner.rb +0 -33
- data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +0 -30
- data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +0 -33
- data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +0 -51
- data/lib/open_api_sdk/models/operations/updatecustomer_type.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatefolder_accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/operations/updatefolder_request.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rb +0 -27
- data/lib/open_api_sdk/models/operations/updatefolder_response.rb +0 -60
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +0 -102
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb +0 -39
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb +0 -60
- data/lib/open_api_sdk/models/shared/accesslevel.rb +0 -18
- data/lib/open_api_sdk/models/shared/click.rb +0 -63
- data/lib/open_api_sdk/models/shared/clickevent.rb +0 -98
- data/lib/open_api_sdk/models/shared/clickevent_geo.rb +0 -771
- data/lib/open_api_sdk/models/shared/continentcode.rb +0 -23
- data/lib/open_api_sdk/models/shared/event.rb +0 -17
- data/lib/open_api_sdk/models/shared/folderschema.rb +0 -39
- data/lib/open_api_sdk/models/shared/link.rb +0 -163
- data/lib/open_api_sdk/models/shared/registereddomain.rb +0 -30
- data/lib/open_api_sdk/partners.rb +0 -358
@@ -1,23 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Shared
|
9
|
-
|
10
|
-
# ContinentCode - The continent to retrieve analytics for.
|
11
|
-
class ContinentCode < T::Enum
|
12
|
-
enums do
|
13
|
-
AF = new('AF')
|
14
|
-
AN = new('AN')
|
15
|
-
AS = new('AS')
|
16
|
-
EU = new('EU')
|
17
|
-
NA = new('NA')
|
18
|
-
OC = new('OC')
|
19
|
-
SA = new('SA')
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Shared
|
9
|
-
|
10
|
-
|
11
|
-
class Event < T::Enum
|
12
|
-
enums do
|
13
|
-
CLICK = new('click')
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Shared
|
9
|
-
|
10
|
-
|
11
|
-
class FolderSchema < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The access level of the folder within the workspace.
|
15
|
-
field :access_level, ::OpenApiSDK::Shared::AccessLevel, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('accessLevel'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Shared::AccessLevel, false) } }
|
16
|
-
# The date the folder was created.
|
17
|
-
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
|
18
|
-
# The unique ID of the folder.
|
19
|
-
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
20
|
-
# The number of links in the folder.
|
21
|
-
field :link_count, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('linkCount') } }
|
22
|
-
# The name of the folder.
|
23
|
-
field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
|
24
|
-
# The date the folder was updated.
|
25
|
-
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
|
26
|
-
|
27
|
-
|
28
|
-
sig { params(access_level: ::OpenApiSDK::Shared::AccessLevel, created_at: ::String, id: ::String, link_count: ::Float, name: ::String, updated_at: ::String).void }
|
29
|
-
def initialize(access_level: nil, created_at: nil, id: nil, link_count: nil, name: nil, updated_at: nil)
|
30
|
-
@access_level = access_level
|
31
|
-
@created_at = created_at
|
32
|
-
@id = id
|
33
|
-
@link_count = link_count
|
34
|
-
@name = name
|
35
|
-
@updated_at = updated_at
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,163 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Shared
|
9
|
-
|
10
|
-
|
11
|
-
class Link < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The Android destination URL for the short link for Android device targeting.
|
15
|
-
field :android, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('android') } }
|
16
|
-
# The number of clicks on the short link.
|
17
|
-
field :clicks, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clicks') } }
|
18
|
-
# The comments for the short link.
|
19
|
-
field :comments, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('comments') } }
|
20
|
-
|
21
|
-
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
|
22
|
-
# The description of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
|
23
|
-
field :description, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description') } }
|
24
|
-
# 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).
|
25
|
-
field :domain, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('domain') } }
|
26
|
-
|
27
|
-
field :expired_url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiredUrl') } }
|
28
|
-
|
29
|
-
field :expires_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt') } }
|
30
|
-
# 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.
|
31
|
-
field :external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('externalId') } }
|
32
|
-
# The unique ID of the folder assigned to the short link.
|
33
|
-
field :folder_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('folderId') } }
|
34
|
-
# Geo targeting information for the short link in JSON format `{[COUNTRY]: https://example.com }`. Learn more: https://d.to/geo
|
35
|
-
field :geo, ::OpenApiSDK::Shared::ClickEventGeo, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('geo') } }
|
36
|
-
# The unique ID of the short link.
|
37
|
-
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
38
|
-
# The image of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
|
39
|
-
field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
|
40
|
-
# The iOS destination URL for the short link for iOS device targeting.
|
41
|
-
field :ios, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
|
42
|
-
# The short link slug. If not provided, a random 7-character slug will be generated.
|
43
|
-
field :key, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('key') } }
|
44
|
-
|
45
|
-
field :last_clicked, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('lastClicked') } }
|
46
|
-
# The number of leads the short links has generated.
|
47
|
-
field :leads, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leads') } }
|
48
|
-
# The ID of the partner the short link is associated with.
|
49
|
-
field :partner_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
|
50
|
-
# The password required to access the destination URL of the short link.
|
51
|
-
field :password, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('password') } }
|
52
|
-
# The ID of the program the short link is associated with.
|
53
|
-
field :program_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('programId') } }
|
54
|
-
# The project ID of the short link. This field is deprecated – use `workspaceId` instead.
|
55
|
-
#
|
56
|
-
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
57
|
-
field :project_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('projectId') } }
|
58
|
-
# The full URL of the QR code for the short link (e.g. `https://api.dub.co/qr?url=https://dub.sh/try`).
|
59
|
-
field :qr_code, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('qrCode') } }
|
60
|
-
# The total dollar amount of sales the short links has generated (in cents).
|
61
|
-
field :sale_amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('saleAmount') } }
|
62
|
-
# The number of sales the short links has generated.
|
63
|
-
field :sales, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sales') } }
|
64
|
-
# The full URL of the short link, including the https protocol (e.g. `https://dub.sh/try`).
|
65
|
-
field :short_link, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('shortLink') } }
|
66
|
-
# The unique ID of the tag assigned to the short link. This field is deprecated – use `tags` instead.
|
67
|
-
#
|
68
|
-
# @deprecated true: This will be removed in a future release, please migrate away from it as soon as possible.
|
69
|
-
field :tag_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tagId') } }
|
70
|
-
# The tags assigned to the short link.
|
71
|
-
field :tags, T::Array[::OpenApiSDK::Shared::TagSchema], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tags') } }
|
72
|
-
# 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.
|
73
|
-
field :tenant_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId') } }
|
74
|
-
# The title of the short link generated via `api.dub.co/metatags`. Will be used for Custom Social Media Cards if `proxy` is true.
|
75
|
-
field :title, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('title') } }
|
76
|
-
|
77
|
-
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
|
78
|
-
|
79
|
-
field :url, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('url') } }
|
80
|
-
|
81
|
-
field :user_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('userId') } }
|
82
|
-
# The UTM campaign of the short link.
|
83
|
-
field :utm_campaign, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_campaign') } }
|
84
|
-
# The UTM content of the short link.
|
85
|
-
field :utm_content, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_content') } }
|
86
|
-
# The UTM medium of the short link.
|
87
|
-
field :utm_medium, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_medium') } }
|
88
|
-
# The UTM source of the short link.
|
89
|
-
field :utm_source, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_source') } }
|
90
|
-
# The UTM term of the short link.
|
91
|
-
field :utm_term, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('utm_term') } }
|
92
|
-
# 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
|
93
|
-
field :video, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('video') } }
|
94
|
-
# The IDs of the webhooks that the short link is associated with.
|
95
|
-
field :webhook_ids, T::Array[::String], { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('webhookIds') } }
|
96
|
-
# The workspace ID of the short link.
|
97
|
-
field :workspace_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('workspaceId') } }
|
98
|
-
|
99
|
-
field :archived, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('archived') } }
|
100
|
-
|
101
|
-
field :do_index, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('doIndex') } }
|
102
|
-
|
103
|
-
field :proxy, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('proxy') } }
|
104
|
-
|
105
|
-
field :public_stats, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('publicStats') } }
|
106
|
-
|
107
|
-
field :rewrite, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('rewrite') } }
|
108
|
-
|
109
|
-
field :track_conversion, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('trackConversion') } }
|
110
|
-
|
111
|
-
|
112
|
-
sig { params(android: ::String, clicks: ::Float, comments: ::String, created_at: ::String, description: ::String, domain: ::String, expired_url: ::String, expires_at: ::String, external_id: ::String, folder_id: ::String, geo: ::OpenApiSDK::Shared::ClickEventGeo, id: ::String, image: ::String, ios: ::String, key: ::String, last_clicked: ::String, leads: ::Float, partner_id: ::String, password: ::String, program_id: ::String, project_id: ::String, qr_code: ::String, sale_amount: ::Float, sales: ::Float, short_link: ::String, tag_id: ::String, tags: T::Array[::OpenApiSDK::Shared::TagSchema], tenant_id: ::String, title: ::String, updated_at: ::String, url: ::String, user_id: ::String, utm_campaign: ::String, utm_content: ::String, utm_medium: ::String, utm_source: ::String, utm_term: ::String, video: ::String, webhook_ids: T::Array[::String], workspace_id: ::String, archived: T.nilable(T::Boolean), do_index: T.nilable(T::Boolean), proxy: T.nilable(T::Boolean), public_stats: T.nilable(T::Boolean), rewrite: T.nilable(T::Boolean), track_conversion: T.nilable(T::Boolean)).void }
|
113
|
-
def initialize(android: nil, clicks: nil, comments: nil, created_at: nil, description: nil, domain: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, geo: nil, id: nil, image: nil, ios: nil, key: nil, last_clicked: nil, leads: nil, partner_id: nil, password: nil, program_id: nil, project_id: nil, qr_code: nil, sale_amount: nil, sales: nil, short_link: nil, tag_id: nil, tags: nil, tenant_id: nil, title: nil, updated_at: nil, url: nil, user_id: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil, webhook_ids: nil, workspace_id: nil, archived: nil, do_index: nil, proxy: nil, public_stats: nil, rewrite: nil, track_conversion: nil)
|
114
|
-
@android = android
|
115
|
-
@clicks = clicks
|
116
|
-
@comments = comments
|
117
|
-
@created_at = created_at
|
118
|
-
@description = description
|
119
|
-
@domain = domain
|
120
|
-
@expired_url = expired_url
|
121
|
-
@expires_at = expires_at
|
122
|
-
@external_id = external_id
|
123
|
-
@folder_id = folder_id
|
124
|
-
@geo = geo
|
125
|
-
@id = id
|
126
|
-
@image = image
|
127
|
-
@ios = ios
|
128
|
-
@key = key
|
129
|
-
@last_clicked = last_clicked
|
130
|
-
@leads = leads
|
131
|
-
@partner_id = partner_id
|
132
|
-
@password = password
|
133
|
-
@program_id = program_id
|
134
|
-
@project_id = project_id
|
135
|
-
@qr_code = qr_code
|
136
|
-
@sale_amount = sale_amount
|
137
|
-
@sales = sales
|
138
|
-
@short_link = short_link
|
139
|
-
@tag_id = tag_id
|
140
|
-
@tags = tags
|
141
|
-
@tenant_id = tenant_id
|
142
|
-
@title = title
|
143
|
-
@updated_at = updated_at
|
144
|
-
@url = url
|
145
|
-
@user_id = user_id
|
146
|
-
@utm_campaign = utm_campaign
|
147
|
-
@utm_content = utm_content
|
148
|
-
@utm_medium = utm_medium
|
149
|
-
@utm_source = utm_source
|
150
|
-
@utm_term = utm_term
|
151
|
-
@video = video
|
152
|
-
@webhook_ids = webhook_ids
|
153
|
-
@workspace_id = workspace_id
|
154
|
-
@archived = archived
|
155
|
-
@do_index = do_index
|
156
|
-
@proxy = proxy
|
157
|
-
@public_stats = public_stats
|
158
|
-
@rewrite = rewrite
|
159
|
-
@track_conversion = track_conversion
|
160
|
-
end
|
161
|
-
end
|
162
|
-
end
|
163
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
|
7
|
-
module OpenApiSDK
|
8
|
-
module Shared
|
9
|
-
|
10
|
-
# The registered domain record.
|
11
|
-
class RegisteredDomain < ::OpenApiSDK::Utils::FieldAugmented
|
12
|
-
extend T::Sig
|
13
|
-
|
14
|
-
# The date the domain was created.
|
15
|
-
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
|
16
|
-
# The date the domain expires.
|
17
|
-
field :expires_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('expiresAt') } }
|
18
|
-
# The ID of the registered domain record.
|
19
|
-
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
20
|
-
|
21
|
-
|
22
|
-
sig { params(created_at: ::String, expires_at: ::String, id: ::String).void }
|
23
|
-
def initialize(created_at: nil, expires_at: nil, id: nil)
|
24
|
-
@created_at = created_at
|
25
|
-
@expires_at = expires_at
|
26
|
-
@id = id
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,358 +0,0 @@
|
|
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
|
-
|
107
|
-
|
108
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::CreatePartnerLinkRequestBody)).returns(::OpenApiSDK::Operations::CreatePartnerLinkResponse) }
|
109
|
-
def create_link(request)
|
110
|
-
# create_link - Create a link for a partner
|
111
|
-
# Create a new link for a partner that is enrolled in your program.
|
112
|
-
url, params = @sdk_configuration.get_server_details
|
113
|
-
base_url = Utils.template_url(url, params)
|
114
|
-
url = "#{base_url}/partners/links"
|
115
|
-
headers = {}
|
116
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
117
|
-
headers['content-type'] = req_content_type
|
118
|
-
headers['Accept'] = 'application/json'
|
119
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
120
|
-
|
121
|
-
r = @sdk_configuration.client.post(url) do |req|
|
122
|
-
req.headers = headers
|
123
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
124
|
-
if form
|
125
|
-
req.body = Utils.encode_form(form)
|
126
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
127
|
-
req.body = URI.encode_www_form(data)
|
128
|
-
else
|
129
|
-
req.body = data
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
134
|
-
|
135
|
-
res = ::OpenApiSDK::Operations::CreatePartnerLinkResponse.new(
|
136
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
137
|
-
)
|
138
|
-
if r.status == 201
|
139
|
-
if Utils.match_content_type(content_type, 'application/json')
|
140
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
141
|
-
res.link_schema = out
|
142
|
-
end
|
143
|
-
elsif r.status == 400
|
144
|
-
if Utils.match_content_type(content_type, 'application/json')
|
145
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
146
|
-
res.bad_request = out
|
147
|
-
end
|
148
|
-
elsif r.status == 401
|
149
|
-
if Utils.match_content_type(content_type, 'application/json')
|
150
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
151
|
-
res.unauthorized = out
|
152
|
-
end
|
153
|
-
elsif r.status == 403
|
154
|
-
if Utils.match_content_type(content_type, 'application/json')
|
155
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
156
|
-
res.forbidden = out
|
157
|
-
end
|
158
|
-
elsif r.status == 404
|
159
|
-
if Utils.match_content_type(content_type, 'application/json')
|
160
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
161
|
-
res.not_found = out
|
162
|
-
end
|
163
|
-
elsif r.status == 409
|
164
|
-
if Utils.match_content_type(content_type, 'application/json')
|
165
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
166
|
-
res.conflict = out
|
167
|
-
end
|
168
|
-
elsif r.status == 410
|
169
|
-
if Utils.match_content_type(content_type, 'application/json')
|
170
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
171
|
-
res.invite_expired = out
|
172
|
-
end
|
173
|
-
elsif r.status == 422
|
174
|
-
if Utils.match_content_type(content_type, 'application/json')
|
175
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
176
|
-
res.unprocessable_entity = out
|
177
|
-
end
|
178
|
-
elsif r.status == 429
|
179
|
-
if Utils.match_content_type(content_type, 'application/json')
|
180
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
181
|
-
res.rate_limit_exceeded = out
|
182
|
-
end
|
183
|
-
elsif r.status == 500
|
184
|
-
if Utils.match_content_type(content_type, 'application/json')
|
185
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
186
|
-
res.internal_server_error = out
|
187
|
-
end
|
188
|
-
end
|
189
|
-
|
190
|
-
res
|
191
|
-
end
|
192
|
-
|
193
|
-
|
194
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpsertPartnerLinkRequestBody)).returns(::OpenApiSDK::Operations::UpsertPartnerLinkResponse) }
|
195
|
-
def upsert_link(request)
|
196
|
-
# upsert_link - Upsert a link for a partner
|
197
|
-
# Upsert a link for a partner that is enrolled in your program. If a link with the same URL already exists, return it (or update it if there are any changes). Otherwise, a new link will be created.
|
198
|
-
url, params = @sdk_configuration.get_server_details
|
199
|
-
base_url = Utils.template_url(url, params)
|
200
|
-
url = "#{base_url}/partners/links/upsert"
|
201
|
-
headers = {}
|
202
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
203
|
-
headers['content-type'] = req_content_type
|
204
|
-
headers['Accept'] = 'application/json'
|
205
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
206
|
-
|
207
|
-
r = @sdk_configuration.client.put(url) do |req|
|
208
|
-
req.headers = headers
|
209
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
210
|
-
if form
|
211
|
-
req.body = Utils.encode_form(form)
|
212
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
213
|
-
req.body = URI.encode_www_form(data)
|
214
|
-
else
|
215
|
-
req.body = data
|
216
|
-
end
|
217
|
-
end
|
218
|
-
|
219
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
220
|
-
|
221
|
-
res = ::OpenApiSDK::Operations::UpsertPartnerLinkResponse.new(
|
222
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
223
|
-
)
|
224
|
-
if r.status == 200
|
225
|
-
if Utils.match_content_type(content_type, 'application/json')
|
226
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::LinkSchema)
|
227
|
-
res.link_schema = out
|
228
|
-
end
|
229
|
-
elsif r.status == 400
|
230
|
-
if Utils.match_content_type(content_type, 'application/json')
|
231
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
232
|
-
res.bad_request = out
|
233
|
-
end
|
234
|
-
elsif r.status == 401
|
235
|
-
if Utils.match_content_type(content_type, 'application/json')
|
236
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
237
|
-
res.unauthorized = out
|
238
|
-
end
|
239
|
-
elsif r.status == 403
|
240
|
-
if Utils.match_content_type(content_type, 'application/json')
|
241
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
242
|
-
res.forbidden = out
|
243
|
-
end
|
244
|
-
elsif r.status == 404
|
245
|
-
if Utils.match_content_type(content_type, 'application/json')
|
246
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
247
|
-
res.not_found = out
|
248
|
-
end
|
249
|
-
elsif r.status == 409
|
250
|
-
if Utils.match_content_type(content_type, 'application/json')
|
251
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
252
|
-
res.conflict = out
|
253
|
-
end
|
254
|
-
elsif r.status == 410
|
255
|
-
if Utils.match_content_type(content_type, 'application/json')
|
256
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
257
|
-
res.invite_expired = out
|
258
|
-
end
|
259
|
-
elsif r.status == 422
|
260
|
-
if Utils.match_content_type(content_type, 'application/json')
|
261
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
262
|
-
res.unprocessable_entity = out
|
263
|
-
end
|
264
|
-
elsif r.status == 429
|
265
|
-
if Utils.match_content_type(content_type, 'application/json')
|
266
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
267
|
-
res.rate_limit_exceeded = out
|
268
|
-
end
|
269
|
-
elsif r.status == 500
|
270
|
-
if Utils.match_content_type(content_type, 'application/json')
|
271
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
272
|
-
res.internal_server_error = out
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
res
|
277
|
-
end
|
278
|
-
|
279
|
-
|
280
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::RetrievePartnerAnalyticsRequest)).returns(::OpenApiSDK::Operations::RetrievePartnerAnalyticsResponse) }
|
281
|
-
def analytics(request)
|
282
|
-
# analytics - Retrieve analytics for a partner
|
283
|
-
# Retrieve analytics for a partner within a program. The response type vary based on the `groupBy` query parameter.
|
284
|
-
url, params = @sdk_configuration.get_server_details
|
285
|
-
base_url = Utils.template_url(url, params)
|
286
|
-
url = "#{base_url}/partners/analytics"
|
287
|
-
headers = {}
|
288
|
-
query_params = Utils.get_query_params(::OpenApiSDK::Operations::RetrievePartnerAnalyticsRequest, request)
|
289
|
-
headers['Accept'] = 'application/json'
|
290
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
291
|
-
|
292
|
-
r = @sdk_configuration.client.get(url) do |req|
|
293
|
-
req.headers = headers
|
294
|
-
req.params = query_params
|
295
|
-
Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
|
296
|
-
end
|
297
|
-
|
298
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
299
|
-
|
300
|
-
res = ::OpenApiSDK::Operations::RetrievePartnerAnalyticsResponse.new(
|
301
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
302
|
-
)
|
303
|
-
if r.status == 200
|
304
|
-
if Utils.match_content_type(content_type, 'application/json')
|
305
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::Object)
|
306
|
-
res.one_of = out
|
307
|
-
end
|
308
|
-
elsif r.status == 400
|
309
|
-
if Utils.match_content_type(content_type, 'application/json')
|
310
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::BadRequest)
|
311
|
-
res.bad_request = out
|
312
|
-
end
|
313
|
-
elsif r.status == 401
|
314
|
-
if Utils.match_content_type(content_type, 'application/json')
|
315
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Unauthorized)
|
316
|
-
res.unauthorized = out
|
317
|
-
end
|
318
|
-
elsif r.status == 403
|
319
|
-
if Utils.match_content_type(content_type, 'application/json')
|
320
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Forbidden)
|
321
|
-
res.forbidden = out
|
322
|
-
end
|
323
|
-
elsif r.status == 404
|
324
|
-
if Utils.match_content_type(content_type, 'application/json')
|
325
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::NotFound)
|
326
|
-
res.not_found = out
|
327
|
-
end
|
328
|
-
elsif r.status == 409
|
329
|
-
if Utils.match_content_type(content_type, 'application/json')
|
330
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::Conflict)
|
331
|
-
res.conflict = out
|
332
|
-
end
|
333
|
-
elsif r.status == 410
|
334
|
-
if Utils.match_content_type(content_type, 'application/json')
|
335
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InviteExpired)
|
336
|
-
res.invite_expired = out
|
337
|
-
end
|
338
|
-
elsif r.status == 422
|
339
|
-
if Utils.match_content_type(content_type, 'application/json')
|
340
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::UnprocessableEntity)
|
341
|
-
res.unprocessable_entity = out
|
342
|
-
end
|
343
|
-
elsif r.status == 429
|
344
|
-
if Utils.match_content_type(content_type, 'application/json')
|
345
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::RateLimitExceeded)
|
346
|
-
res.rate_limit_exceeded = out
|
347
|
-
end
|
348
|
-
elsif r.status == 500
|
349
|
-
if Utils.match_content_type(content_type, 'application/json')
|
350
|
-
out = Utils.unmarshal_complex(r.env.response_body, ::OpenApiSDK::Shared::InternalServerError)
|
351
|
-
res.internal_server_error = out
|
352
|
-
end
|
353
|
-
end
|
354
|
-
|
355
|
-
res
|
356
|
-
end
|
357
|
-
end
|
358
|
-
end
|