dub 0.2.2.pre.alpha.73 → 0.2.2.pre.alpha.75
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/analytics.rb +2 -1
- data/lib/open_api_sdk/customers.rb +10 -5
- data/lib/open_api_sdk/domains.rb +8 -4
- data/lib/open_api_sdk/dub.rb +22 -23
- data/lib/open_api_sdk/embed_tokens.rb +9 -8
- data/lib/open_api_sdk/events.rb +2 -1
- data/lib/open_api_sdk/folders.rb +8 -4
- data/lib/open_api_sdk/links.rb +20 -10
- data/lib/open_api_sdk/metatags.rb +2 -1
- data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +5 -5
- data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +2 -5
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb +266 -0
- data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +99 -0
- data/lib/open_api_sdk/models/operations/{createembedtoken_requestbody.rb → createreferralsembedtoken_requestbody.rb} +6 -3
- data/lib/open_api_sdk/models/operations/{createembedtoken_response.rb → createreferralsembedtoken_response.rb} +3 -3
- data/lib/open_api_sdk/models/operations/{createembedtoken_responsebody.rb → createreferralsembedtoken_responsebody.rb} +1 -1
- data/lib/open_api_sdk/models/operations/getcustomers_partner.rb +33 -0
- data/lib/open_api_sdk/models/operations/interval.rb +0 -1
- data/lib/open_api_sdk/models/operations/linkprops.rb +2 -5
- data/lib/open_api_sdk/models/operations/partner.rb +20 -8
- data/lib/open_api_sdk/models/operations/responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb +0 -1
- data/lib/open_api_sdk/models/operations/updatepartnersale_requestbody.rb +30 -0
- data/lib/open_api_sdk/models/operations/updatepartnersale_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb +42 -0
- data/lib/open_api_sdk/models/operations/updatepartnersale_status.rb +22 -0
- data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +2 -5
- data/lib/open_api_sdk/models/operations.rb +11 -4
- data/lib/open_api_sdk/partners.rb +95 -4
- data/lib/open_api_sdk/qr_codes.rb +2 -1
- data/lib/open_api_sdk/sdkconfiguration.rb +12 -7
- data/lib/open_api_sdk/tags.rb +8 -4
- data/lib/open_api_sdk/track.rb +4 -2
- data/lib/open_api_sdk/workspaces.rb +4 -2
- metadata +12 -5
@@ -0,0 +1,60 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class UpdatePartnerSaleResponse < ::Crystalline::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# HTTP response content type for this operation
|
15
|
+
field :content_type, ::String
|
16
|
+
# Raw HTTP response; suitable for custom response parsing
|
17
|
+
field :raw_response, ::Faraday::Response
|
18
|
+
# HTTP response status code for this operation
|
19
|
+
field :status_code, ::Integer
|
20
|
+
# The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
|
21
|
+
field :bad_request, T.nilable(::OpenApiSDK::Shared::BadRequest)
|
22
|
+
# This response is sent when a request conflicts with the current state of the server.
|
23
|
+
field :conflict, T.nilable(::OpenApiSDK::Shared::Conflict)
|
24
|
+
# The client does not have access rights to the content; that is, it is unauthorized, so the server is refusing to give the requested resource. Unlike 401 Unauthorized, the client's identity is known to the server.
|
25
|
+
field :forbidden, T.nilable(::OpenApiSDK::Shared::Forbidden)
|
26
|
+
# The server has encountered a situation it does not know how to handle.
|
27
|
+
field :internal_server_error, T.nilable(::OpenApiSDK::Shared::InternalServerError)
|
28
|
+
# This response is sent when the requested content has been permanently deleted from server, with no forwarding address.
|
29
|
+
field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
|
30
|
+
# The server cannot find the requested resource.
|
31
|
+
field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
|
32
|
+
# The updated sale.
|
33
|
+
field :object, T.nilable(::OpenApiSDK::Operations::UpdatePartnerSaleResponseBody)
|
34
|
+
# The user has sent too many requests in a given amount of time ("rate limiting")
|
35
|
+
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
36
|
+
# Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
37
|
+
field :unauthorized, T.nilable(::OpenApiSDK::Shared::Unauthorized)
|
38
|
+
# The request was well-formed but was unable to be followed due to semantic errors.
|
39
|
+
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
40
|
+
|
41
|
+
|
42
|
+
sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, bad_request: T.nilable(::OpenApiSDK::Shared::BadRequest), conflict: T.nilable(::OpenApiSDK::Shared::Conflict), forbidden: T.nilable(::OpenApiSDK::Shared::Forbidden), internal_server_error: T.nilable(::OpenApiSDK::Shared::InternalServerError), invite_expired: T.nilable(::OpenApiSDK::Shared::InviteExpired), not_found: T.nilable(::OpenApiSDK::Shared::NotFound), object: T.nilable(::OpenApiSDK::Operations::UpdatePartnerSaleResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void }
|
43
|
+
def initialize(content_type: nil, raw_response: nil, status_code: nil, bad_request: nil, conflict: nil, forbidden: nil, internal_server_error: nil, invite_expired: nil, not_found: nil, object: nil, rate_limit_exceeded: nil, unauthorized: nil, unprocessable_entity: nil)
|
44
|
+
@content_type = content_type
|
45
|
+
@raw_response = raw_response
|
46
|
+
@status_code = status_code
|
47
|
+
@bad_request = bad_request
|
48
|
+
@conflict = conflict
|
49
|
+
@forbidden = forbidden
|
50
|
+
@internal_server_error = internal_server_error
|
51
|
+
@invite_expired = invite_expired
|
52
|
+
@not_found = not_found
|
53
|
+
@object = object
|
54
|
+
@rate_limit_exceeded = rate_limit_exceeded
|
55
|
+
@unauthorized = unauthorized
|
56
|
+
@unprocessable_entity = unprocessable_entity
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
# The updated sale.
|
11
|
+
class UpdatePartnerSaleResponseBody < ::Crystalline::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
|
15
|
+
field :amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } }
|
16
|
+
|
17
|
+
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt') } }
|
18
|
+
|
19
|
+
field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } }
|
20
|
+
|
21
|
+
field :earnings, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earnings') } }
|
22
|
+
|
23
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
24
|
+
|
25
|
+
field :status, ::OpenApiSDK::Operations::UpdatePartnerSaleStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::UpdatePartnerSaleStatus, false) } }
|
26
|
+
|
27
|
+
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
|
28
|
+
|
29
|
+
|
30
|
+
sig { params(amount: ::Float, created_at: ::String, currency: ::String, earnings: ::Float, id: ::String, status: ::OpenApiSDK::Operations::UpdatePartnerSaleStatus, updated_at: ::String).void }
|
31
|
+
def initialize(amount: nil, created_at: nil, currency: nil, earnings: nil, id: nil, status: nil, updated_at: nil)
|
32
|
+
@amount = amount
|
33
|
+
@created_at = created_at
|
34
|
+
@currency = currency
|
35
|
+
@earnings = earnings
|
36
|
+
@id = id
|
37
|
+
@status = status
|
38
|
+
@updated_at = updated_at
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class UpdatePartnerSaleStatus < T::Enum
|
12
|
+
enums do
|
13
|
+
PENDING = new('pending')
|
14
|
+
PROCESSED = new('processed')
|
15
|
+
PAID = new('paid')
|
16
|
+
REFUNDED = new('refunded')
|
17
|
+
DUPLICATE = new('duplicate')
|
18
|
+
FRAUD = new('fraud')
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -33,8 +33,6 @@ module OpenApiSDK
|
|
33
33
|
field :image, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
|
34
34
|
# The iOS destination URL for the short link for iOS device targeting.
|
35
35
|
field :ios, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('ios') } }
|
36
|
-
# The ID of the partner the short link is associated with.
|
37
|
-
field :partner_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partnerId') } }
|
38
36
|
# The password required to access the destination URL of the short link.
|
39
37
|
field :password, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('password') } }
|
40
38
|
# The prefix of the short link slug for randomly-generated keys (e.g. if prefix is `/c/`, generated keys will be in the `/c/:key` format). Will be ignored if `key` is provided.
|
@@ -67,8 +65,8 @@ module OpenApiSDK
|
|
67
65
|
field :video, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('video') } }
|
68
66
|
|
69
67
|
|
70
|
-
sig { params(android: T.nilable(::String), archived: T.nilable(T::Boolean), comments: T.nilable(::String), description: T.nilable(::String), do_index: T.nilable(T::Boolean), expired_url: T.nilable(::String), expires_at: T.nilable(::String), external_id: T.nilable(::String), folder_id: T.nilable(::String), image: T.nilable(::String), ios: T.nilable(::String),
|
71
|
-
def initialize(android: nil, archived: nil, comments: nil, description: nil, do_index: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, image: nil, ios: nil,
|
68
|
+
sig { params(android: T.nilable(::String), archived: T.nilable(T::Boolean), comments: T.nilable(::String), description: T.nilable(::String), do_index: T.nilable(T::Boolean), expired_url: T.nilable(::String), expires_at: T.nilable(::String), external_id: T.nilable(::String), folder_id: T.nilable(::String), image: T.nilable(::String), ios: T.nilable(::String), password: T.nilable(::String), prefix: T.nilable(::String), proxy: T.nilable(T::Boolean), ref: T.nilable(::String), rewrite: T.nilable(T::Boolean), tag_ids: T.nilable(::Object), tag_names: T.nilable(::Object), tenant_id: T.nilable(::String), title: T.nilable(::String), utm_campaign: T.nilable(::String), utm_content: T.nilable(::String), utm_medium: T.nilable(::String), utm_source: T.nilable(::String), utm_term: T.nilable(::String), video: T.nilable(::String)).void }
|
69
|
+
def initialize(android: nil, archived: nil, comments: nil, description: nil, do_index: nil, expired_url: nil, expires_at: nil, external_id: nil, folder_id: nil, image: nil, ios: nil, password: nil, prefix: nil, proxy: nil, ref: nil, rewrite: nil, tag_ids: nil, tag_names: nil, tenant_id: nil, title: nil, utm_campaign: nil, utm_content: nil, utm_medium: nil, utm_source: nil, utm_term: nil, video: nil)
|
72
70
|
@android = android
|
73
71
|
@archived = archived
|
74
72
|
@comments = comments
|
@@ -80,7 +78,6 @@ module OpenApiSDK
|
|
80
78
|
@folder_id = folder_id
|
81
79
|
@image = image
|
82
80
|
@ios = ios
|
83
|
-
@partner_id = partner_id
|
84
81
|
@password = password
|
85
82
|
@prefix = prefix
|
86
83
|
@proxy = proxy
|
@@ -96,7 +96,7 @@ module OpenApiSDK
|
|
96
96
|
autoload :TrackSaleResponse, 'open_api_sdk/models/operations/tracksale_response.rb'
|
97
97
|
autoload :GetCustomersRequest, 'open_api_sdk/models/operations/getcustomers_request.rb'
|
98
98
|
autoload :Link, 'open_api_sdk/models/operations/link.rb'
|
99
|
-
autoload :
|
99
|
+
autoload :GetCustomersPartner, 'open_api_sdk/models/operations/getcustomers_partner.rb'
|
100
100
|
autoload :Type, 'open_api_sdk/models/operations/type.rb'
|
101
101
|
autoload :GetCustomersInterval, 'open_api_sdk/models/operations/getcustomers_interval.rb'
|
102
102
|
autoload :Discount, 'open_api_sdk/models/operations/discount.rb'
|
@@ -147,14 +147,21 @@ module OpenApiSDK
|
|
147
147
|
autoload :QueryParamGroupBy, 'open_api_sdk/models/operations/queryparam_groupby.rb'
|
148
148
|
autoload :RetrievePartnerAnalyticsRequest, 'open_api_sdk/models/operations/retrievepartneranalytics_request.rb'
|
149
149
|
autoload :RetrievePartnerAnalyticsResponse, 'open_api_sdk/models/operations/retrievepartneranalytics_response.rb'
|
150
|
+
autoload :UpdatePartnerSaleRequestBody, 'open_api_sdk/models/operations/updatepartnersale_requestbody.rb'
|
151
|
+
autoload :UpdatePartnerSaleStatus, 'open_api_sdk/models/operations/updatepartnersale_status.rb'
|
152
|
+
autoload :UpdatePartnerSaleResponseBody, 'open_api_sdk/models/operations/updatepartnersale_responsebody.rb'
|
153
|
+
autoload :UpdatePartnerSaleResponse, 'open_api_sdk/models/operations/updatepartnersale_response.rb'
|
150
154
|
autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
|
151
155
|
autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
|
152
156
|
autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb'
|
153
157
|
autoload :UpdateWorkspaceRequest, 'open_api_sdk/models/operations/updateworkspace_request.rb'
|
154
158
|
autoload :UpdateWorkspaceResponse, 'open_api_sdk/models/operations/updateworkspace_response.rb'
|
155
|
-
autoload :
|
156
|
-
autoload :
|
157
|
-
autoload :
|
159
|
+
autoload :CreateReferralsEmbedTokenCountry, 'open_api_sdk/models/operations/createreferralsembedtoken_country.rb'
|
160
|
+
autoload :CreateReferralsEmbedTokenLinkProps, 'open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb'
|
161
|
+
autoload :Partner, 'open_api_sdk/models/operations/partner.rb'
|
162
|
+
autoload :CreateReferralsEmbedTokenRequestBody, 'open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb'
|
163
|
+
autoload :CreateReferralsEmbedTokenResponseBody, 'open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb'
|
164
|
+
autoload :CreateReferralsEmbedTokenResponse, 'open_api_sdk/models/operations/createreferralsembedtoken_response.rb'
|
158
165
|
autoload :Level, 'open_api_sdk/models/operations/level.rb'
|
159
166
|
autoload :GetQRCodeRequest, 'open_api_sdk/models/operations/getqrcode_request.rb'
|
160
167
|
autoload :GetQRCodeResponse, 'open_api_sdk/models/operations/getqrcode_response.rb'
|
@@ -34,7 +34,8 @@ module OpenApiSDK
|
|
34
34
|
|
35
35
|
r = @sdk_configuration.client.post(url) do |req|
|
36
36
|
req.headers = headers
|
37
|
-
|
37
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
38
39
|
if form
|
39
40
|
req.body = Utils.encode_form(form)
|
40
41
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -120,7 +121,8 @@ module OpenApiSDK
|
|
120
121
|
|
121
122
|
r = @sdk_configuration.client.post(url) do |req|
|
122
123
|
req.headers = headers
|
123
|
-
|
124
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
125
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
124
126
|
if form
|
125
127
|
req.body = Utils.encode_form(form)
|
126
128
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -206,7 +208,8 @@ module OpenApiSDK
|
|
206
208
|
|
207
209
|
r = @sdk_configuration.client.put(url) do |req|
|
208
210
|
req.headers = headers
|
209
|
-
|
211
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
212
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
210
213
|
if form
|
211
214
|
req.body = Utils.encode_form(form)
|
212
215
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -292,7 +295,8 @@ module OpenApiSDK
|
|
292
295
|
r = @sdk_configuration.client.get(url) do |req|
|
293
296
|
req.headers = headers
|
294
297
|
req.params = query_params
|
295
|
-
|
298
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
299
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
296
300
|
end
|
297
301
|
|
298
302
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -354,5 +358,92 @@ module OpenApiSDK
|
|
354
358
|
|
355
359
|
res
|
356
360
|
end
|
361
|
+
|
362
|
+
|
363
|
+
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdatePartnerSaleRequestBody)).returns(::OpenApiSDK::Operations::UpdatePartnerSaleResponse) }
|
364
|
+
def update_sale(request)
|
365
|
+
# update_sale - Update a sale for a partner.
|
366
|
+
# Update an existing sale amount. This is useful for handling refunds (partial or full) or fraudulent sales.
|
367
|
+
url, params = @sdk_configuration.get_server_details
|
368
|
+
base_url = Utils.template_url(url, params)
|
369
|
+
url = "#{base_url}/partners/sales"
|
370
|
+
headers = {}
|
371
|
+
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
372
|
+
headers['content-type'] = req_content_type
|
373
|
+
headers['Accept'] = 'application/json'
|
374
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
375
|
+
|
376
|
+
r = @sdk_configuration.client.patch(url) do |req|
|
377
|
+
req.headers = headers
|
378
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
379
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
380
|
+
if form
|
381
|
+
req.body = Utils.encode_form(form)
|
382
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
383
|
+
req.body = URI.encode_www_form(data)
|
384
|
+
else
|
385
|
+
req.body = data
|
386
|
+
end
|
387
|
+
end
|
388
|
+
|
389
|
+
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
390
|
+
|
391
|
+
res = ::OpenApiSDK::Operations::UpdatePartnerSaleResponse.new(
|
392
|
+
status_code: r.status, content_type: content_type, raw_response: r
|
393
|
+
)
|
394
|
+
if r.status == 200
|
395
|
+
if Utils.match_content_type(content_type, 'application/json')
|
396
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::UpdatePartnerSaleResponseBody)
|
397
|
+
res.object = out
|
398
|
+
end
|
399
|
+
elsif r.status == 400
|
400
|
+
if Utils.match_content_type(content_type, 'application/json')
|
401
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
402
|
+
res.bad_request = out
|
403
|
+
end
|
404
|
+
elsif r.status == 401
|
405
|
+
if Utils.match_content_type(content_type, 'application/json')
|
406
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
407
|
+
res.unauthorized = out
|
408
|
+
end
|
409
|
+
elsif r.status == 403
|
410
|
+
if Utils.match_content_type(content_type, 'application/json')
|
411
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
412
|
+
res.forbidden = out
|
413
|
+
end
|
414
|
+
elsif r.status == 404
|
415
|
+
if Utils.match_content_type(content_type, 'application/json')
|
416
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
417
|
+
res.not_found = out
|
418
|
+
end
|
419
|
+
elsif r.status == 409
|
420
|
+
if Utils.match_content_type(content_type, 'application/json')
|
421
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
422
|
+
res.conflict = out
|
423
|
+
end
|
424
|
+
elsif r.status == 410
|
425
|
+
if Utils.match_content_type(content_type, 'application/json')
|
426
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
427
|
+
res.invite_expired = out
|
428
|
+
end
|
429
|
+
elsif r.status == 422
|
430
|
+
if Utils.match_content_type(content_type, 'application/json')
|
431
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
432
|
+
res.unprocessable_entity = out
|
433
|
+
end
|
434
|
+
elsif r.status == 429
|
435
|
+
if Utils.match_content_type(content_type, 'application/json')
|
436
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
437
|
+
res.rate_limit_exceeded = out
|
438
|
+
end
|
439
|
+
elsif r.status == 500
|
440
|
+
if Utils.match_content_type(content_type, 'application/json')
|
441
|
+
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
442
|
+
res.internal_server_error = out
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
res
|
447
|
+
end
|
357
448
|
end
|
358
449
|
end
|
@@ -34,7 +34,8 @@ module OpenApiSDK
|
|
34
34
|
r = @sdk_configuration.client.get(url) do |req|
|
35
35
|
req.headers = headers
|
36
36
|
req.params = query_params
|
37
|
-
|
37
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
38
39
|
end
|
39
40
|
|
40
41
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -19,7 +19,7 @@ module OpenApiSDK
|
|
19
19
|
extend T::Sig
|
20
20
|
|
21
21
|
field :client, T.nilable(Faraday::Connection)
|
22
|
-
field :
|
22
|
+
field :security_source, T.nilable(T.proc.returns(T.nilable(::OpenApiSDK::Shared::Security)))
|
23
23
|
field :server_url, T.nilable(String)
|
24
24
|
field :server_idx, T.nilable(Integer)
|
25
25
|
field :language, String
|
@@ -29,18 +29,23 @@ module OpenApiSDK
|
|
29
29
|
field :user_agent, String
|
30
30
|
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
|
33
|
+
sig { params(client: T.nilable(Faraday::Connection), security: T.nilable(::OpenApiSDK::Shared::Security), security_source: T.nilable(T.proc.returns(::OpenApiSDK::Shared::Security)), server_url: T.nilable(String), server_idx: T.nilable(Integer)).void }
|
34
|
+
def initialize(client, security, security_source, server_url, server_idx)
|
34
35
|
@client = client
|
35
36
|
@server_url = server_url
|
36
37
|
@server_idx = server_idx.nil? ? 0 : server_idx
|
37
38
|
raise StandardError, "Invalid server index #{server_idx}" if @server_idx.negative? || @server_idx >= SERVERS.length
|
38
|
-
|
39
|
+
if !security_source.nil?
|
40
|
+
@security_source = security_source
|
41
|
+
elsif !security.nil?
|
42
|
+
@security_source = -> { security }
|
43
|
+
end
|
39
44
|
@language = 'ruby'
|
40
45
|
@openapi_doc_version = '0.0.1'
|
41
|
-
@sdk_version = '0.2.2-alpha.
|
42
|
-
@gen_version = '2.
|
43
|
-
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.
|
46
|
+
@sdk_version = '0.2.2-alpha.75'
|
47
|
+
@gen_version = '2.539.1'
|
48
|
+
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.75 2.539.1 0.0.1 dub'
|
44
49
|
end
|
45
50
|
|
46
51
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
data/lib/open_api_sdk/tags.rb
CHANGED
@@ -34,7 +34,8 @@ module OpenApiSDK
|
|
34
34
|
|
35
35
|
r = @sdk_configuration.client.post(url) do |req|
|
36
36
|
req.headers = headers
|
37
|
-
|
37
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
38
39
|
if form
|
39
40
|
req.body = Utils.encode_form(form)
|
40
41
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -120,7 +121,8 @@ module OpenApiSDK
|
|
120
121
|
r = @sdk_configuration.client.get(url) do |req|
|
121
122
|
req.headers = headers
|
122
123
|
req.params = query_params
|
123
|
-
|
124
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
125
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
124
126
|
end
|
125
127
|
|
126
128
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -204,7 +206,8 @@ module OpenApiSDK
|
|
204
206
|
|
205
207
|
r = @sdk_configuration.client.patch(url) do |req|
|
206
208
|
req.headers = headers
|
207
|
-
|
209
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
210
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
208
211
|
if form
|
209
212
|
req.body = Utils.encode_form(form)
|
210
213
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -293,7 +296,8 @@ module OpenApiSDK
|
|
293
296
|
|
294
297
|
r = @sdk_configuration.client.delete(url) do |req|
|
295
298
|
req.headers = headers
|
296
|
-
|
299
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
300
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
297
301
|
end
|
298
302
|
|
299
303
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
data/lib/open_api_sdk/track.rb
CHANGED
@@ -34,7 +34,8 @@ module OpenApiSDK
|
|
34
34
|
|
35
35
|
r = @sdk_configuration.client.post(url) do |req|
|
36
36
|
req.headers = headers
|
37
|
-
|
37
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
38
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
38
39
|
if form
|
39
40
|
req.body = Utils.encode_form(form)
|
40
41
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -120,7 +121,8 @@ module OpenApiSDK
|
|
120
121
|
|
121
122
|
r = @sdk_configuration.client.post(url) do |req|
|
122
123
|
req.headers = headers
|
123
|
-
|
124
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
125
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
124
126
|
if form
|
125
127
|
req.body = Utils.encode_form(form)
|
126
128
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
@@ -37,7 +37,8 @@ module OpenApiSDK
|
|
37
37
|
|
38
38
|
r = @sdk_configuration.client.get(url) do |req|
|
39
39
|
req.headers = headers
|
40
|
-
|
40
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
41
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
41
42
|
end
|
42
43
|
|
43
44
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
@@ -121,7 +122,8 @@ module OpenApiSDK
|
|
121
122
|
|
122
123
|
r = @sdk_configuration.client.patch(url) do |req|
|
123
124
|
req.headers = headers
|
124
|
-
|
125
|
+
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
126
|
+
Utils.configure_request_security(req, security) if !security.nil?
|
125
127
|
if form
|
126
128
|
req.body = Utils.encode_form(form)
|
127
129
|
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.2.pre.alpha.
|
4
|
+
version: 0.2.2.pre.alpha.75
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dub
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -191,9 +191,6 @@ files:
|
|
191
191
|
- lib/open_api_sdk/models/operations/createcustomer_type.rb
|
192
192
|
- lib/open_api_sdk/models/operations/createdomain_requestbody.rb
|
193
193
|
- lib/open_api_sdk/models/operations/createdomain_response.rb
|
194
|
-
- lib/open_api_sdk/models/operations/createembedtoken_requestbody.rb
|
195
|
-
- lib/open_api_sdk/models/operations/createembedtoken_response.rb
|
196
|
-
- lib/open_api_sdk/models/operations/createembedtoken_responsebody.rb
|
197
194
|
- lib/open_api_sdk/models/operations/createfolder_requestbody.rb
|
198
195
|
- lib/open_api_sdk/models/operations/createfolder_response.rb
|
199
196
|
- lib/open_api_sdk/models/operations/createlink_requestbody.rb
|
@@ -204,6 +201,11 @@ files:
|
|
204
201
|
- lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb
|
205
202
|
- lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb
|
206
203
|
- lib/open_api_sdk/models/operations/createpartnerlink_response.rb
|
204
|
+
- lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb
|
205
|
+
- lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb
|
206
|
+
- lib/open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb
|
207
|
+
- lib/open_api_sdk/models/operations/createreferralsembedtoken_response.rb
|
208
|
+
- lib/open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb
|
207
209
|
- lib/open_api_sdk/models/operations/createtag_requestbody.rb
|
208
210
|
- lib/open_api_sdk/models/operations/createtag_response.rb
|
209
211
|
- lib/open_api_sdk/models/operations/customer.rb
|
@@ -234,6 +236,7 @@ files:
|
|
234
236
|
- lib/open_api_sdk/models/operations/getcustomer_responsebody.rb
|
235
237
|
- lib/open_api_sdk/models/operations/getcustomer_type.rb
|
236
238
|
- lib/open_api_sdk/models/operations/getcustomers_interval.rb
|
239
|
+
- lib/open_api_sdk/models/operations/getcustomers_partner.rb
|
237
240
|
- lib/open_api_sdk/models/operations/getcustomers_request.rb
|
238
241
|
- lib/open_api_sdk/models/operations/getcustomers_response.rb
|
239
242
|
- lib/open_api_sdk/models/operations/getlinkinfo_request.rb
|
@@ -315,6 +318,10 @@ files:
|
|
315
318
|
- lib/open_api_sdk/models/operations/updatelink_request.rb
|
316
319
|
- lib/open_api_sdk/models/operations/updatelink_requestbody.rb
|
317
320
|
- lib/open_api_sdk/models/operations/updatelink_response.rb
|
321
|
+
- lib/open_api_sdk/models/operations/updatepartnersale_requestbody.rb
|
322
|
+
- lib/open_api_sdk/models/operations/updatepartnersale_response.rb
|
323
|
+
- lib/open_api_sdk/models/operations/updatepartnersale_responsebody.rb
|
324
|
+
- lib/open_api_sdk/models/operations/updatepartnersale_status.rb
|
318
325
|
- lib/open_api_sdk/models/operations/updatetag_color.rb
|
319
326
|
- lib/open_api_sdk/models/operations/updatetag_request.rb
|
320
327
|
- lib/open_api_sdk/models/operations/updatetag_requestbody.rb
|