dub 0.2.2.pre.alpha.97 → 0.2.2.pre.alpha.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dub.rb +1 -0
- data/lib/open_api_sdk/commissions.rb +298 -0
- data/lib/open_api_sdk/dub.rb +2 -1
- data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +4 -4
- data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +41 -23
- data/lib/open_api_sdk/models/operations/createpartner_status.rb +22 -0
- data/lib/open_api_sdk/models/operations/getcustomer_partner.rb +4 -4
- data/lib/open_api_sdk/models/operations/getcustomers_partner.rb +4 -4
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_interval.rb +25 -0
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortby.rb +18 -0
- data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortorder.rb +18 -0
- data/lib/open_api_sdk/models/operations/listcommissions_request.rb +60 -0
- data/lib/open_api_sdk/models/operations/listcommissions_response.rb +60 -0
- data/lib/open_api_sdk/models/operations/{updatepartnersale_responsebody.rb → listcommissions_responsebody.rb} +6 -6
- data/lib/open_api_sdk/models/operations/{updatepartnersale_status.rb → listcommissions_status.rb} +1 -1
- data/lib/open_api_sdk/models/operations/listcommissions_type.rb +19 -0
- data/lib/open_api_sdk/models/operations/queryparam_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/status.rb +5 -7
- data/lib/open_api_sdk/models/operations/type.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatecommission_request.rb +27 -0
- data/lib/open_api_sdk/models/operations/updatecommission_requestbody.rb +33 -0
- data/lib/open_api_sdk/models/operations/{updatepartnersale_response.rb → updatecommission_response.rb} +4 -4
- data/lib/open_api_sdk/models/operations/updatecommission_responsebody.rb +48 -0
- data/lib/open_api_sdk/models/operations/updatecommission_status.rb +23 -0
- data/lib/open_api_sdk/models/operations/updatecommission_type.rb +19 -0
- data/lib/open_api_sdk/models/operations/updatecustomer_partner.rb +4 -4
- data/lib/open_api_sdk/models/operations.rb +17 -5
- data/lib/open_api_sdk/partners.rb +0 -139
- data/lib/open_api_sdk/sdkconfiguration.rb +2 -2
- metadata +19 -6
- data/lib/open_api_sdk/models/operations/updatepartnersale_requestbody.rb +0 -36
@@ -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 ListCommissionsResponse < ::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 user has sent too many requests in a given amount of time ("rate limiting")
|
33
|
+
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
34
|
+
# The list of commissions.
|
35
|
+
field :response_bodies, T.nilable(T::Array[::OpenApiSDK::Operations::ListCommissionsResponseBody])
|
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), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), response_bodies: T.nilable(T::Array[::OpenApiSDK::Operations::ListCommissionsResponseBody]), 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, rate_limit_exceeded: nil, response_bodies: 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
|
+
@rate_limit_exceeded = rate_limit_exceeded
|
54
|
+
@response_bodies = response_bodies
|
55
|
+
@unauthorized = unauthorized
|
56
|
+
@unprocessable_entity = unprocessable_entity
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -7,8 +7,8 @@
|
|
7
7
|
module OpenApiSDK
|
8
8
|
module Operations
|
9
9
|
|
10
|
-
|
11
|
-
class
|
10
|
+
|
11
|
+
class ListCommissionsResponseBody < ::Crystalline::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
14
|
|
@@ -19,19 +19,19 @@ module OpenApiSDK
|
|
19
19
|
field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } }
|
20
20
|
|
21
21
|
field :earnings, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earnings') } }
|
22
|
-
|
22
|
+
# The commission's unique ID on Dub.
|
23
23
|
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
24
24
|
|
25
|
-
field :status, ::OpenApiSDK::Operations::
|
25
|
+
field :status, ::OpenApiSDK::Operations::ListCommissionsStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::ListCommissionsStatus, false) } }
|
26
26
|
|
27
27
|
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
|
28
28
|
|
29
29
|
field :invoice_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId') } }
|
30
30
|
|
31
|
-
field :type, T.nilable(::OpenApiSDK::Operations::
|
31
|
+
field :type, T.nilable(::OpenApiSDK::Operations::ListCommissionsType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::ListCommissionsType, true) } }
|
32
32
|
|
33
33
|
|
34
|
-
sig { params(amount: ::Float, created_at: ::String, currency: ::String, earnings: ::Float, id: ::String, status: ::OpenApiSDK::Operations::
|
34
|
+
sig { params(amount: ::Float, created_at: ::String, currency: ::String, earnings: ::Float, id: ::String, status: ::OpenApiSDK::Operations::ListCommissionsStatus, updated_at: ::String, invoice_id: T.nilable(::String), type: T.nilable(::OpenApiSDK::Operations::ListCommissionsType)).void }
|
35
35
|
def initialize(amount: nil, created_at: nil, currency: nil, earnings: nil, id: nil, status: nil, updated_at: nil, invoice_id: nil, type: nil)
|
36
36
|
@amount = amount
|
37
37
|
@created_at = created_at
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class ListCommissionsType < T::Enum
|
12
|
+
enums do
|
13
|
+
CLICK = new('click')
|
14
|
+
LEAD = new('lead')
|
15
|
+
SALE = new('sale')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,23 @@
|
|
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
|
+
# QueryParamStatus - Filter the list of commissions by their corresponding status.
|
11
|
+
class QueryParamStatus < 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
|
+
CANCELED = new('canceled')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -7,15 +7,13 @@
|
|
7
7
|
module OpenApiSDK
|
8
8
|
module Operations
|
9
9
|
|
10
|
-
|
10
|
+
# Status - Useful for marking a commission as refunded, duplicate, canceled, or fraudulent. Takes precedence over `amount` and `modifyAmount`. When a commission is marked as refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated.
|
11
11
|
class Status < T::Enum
|
12
12
|
enums do
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
DECLINED = new('declined')
|
18
|
-
BANNED = new('banned')
|
13
|
+
REFUNDED = new('refunded')
|
14
|
+
DUPLICATE = new('duplicate')
|
15
|
+
CANCELED = new('canceled')
|
16
|
+
FRAUD = new('fraud')
|
19
17
|
end
|
20
18
|
end
|
21
19
|
end
|
@@ -0,0 +1,27 @@
|
|
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 UpdateCommissionRequest < ::Crystalline::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The commission's unique ID on Dub.
|
15
|
+
field :id, ::String, { 'path_param': { 'field_name': 'id', 'style': 'simple', 'explode': false } }
|
16
|
+
|
17
|
+
field :request_body, T.nilable(::OpenApiSDK::Operations::UpdateCommissionRequestBody), { 'request': { 'media_type': 'application/json' } }
|
18
|
+
|
19
|
+
|
20
|
+
sig { params(id: ::String, request_body: T.nilable(::OpenApiSDK::Operations::UpdateCommissionRequestBody)).void }
|
21
|
+
def initialize(id: nil, request_body: nil)
|
22
|
+
@id = id
|
23
|
+
@request_body = request_body
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class UpdateCommissionRequestBody < ::Crystalline::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The new absolute amount for the sale. Paid commissions cannot be updated.
|
15
|
+
field :amount, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount') } }
|
16
|
+
# The currency of the sale amount to update. Accepts ISO 4217 currency codes.
|
17
|
+
field :currency, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency') } }
|
18
|
+
# Modify the current sale amount: use positive values to increase the amount, negative values to decrease it. Takes precedence over `amount`. Paid commissions cannot be updated.
|
19
|
+
field :modify_amount, T.nilable(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('modifyAmount') } }
|
20
|
+
# Useful for marking a commission as refunded, duplicate, canceled, or fraudulent. Takes precedence over `amount` and `modifyAmount`. When a commission is marked as refunded, duplicate, canceled, or fraudulent, it will be omitted from the payout, and the payout amount will be recalculated accordingly. Paid commissions cannot be updated.
|
21
|
+
field :status, T.nilable(::OpenApiSDK::Operations::Status), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::Status, true) } }
|
22
|
+
|
23
|
+
|
24
|
+
sig { params(amount: T.nilable(::Float), currency: T.nilable(::String), modify_amount: T.nilable(::Float), status: T.nilable(::OpenApiSDK::Operations::Status)).void }
|
25
|
+
def initialize(amount: nil, currency: nil, modify_amount: nil, status: nil)
|
26
|
+
@amount = amount
|
27
|
+
@currency = currency
|
28
|
+
@modify_amount = modify_amount
|
29
|
+
@status = status
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -8,7 +8,7 @@ module OpenApiSDK
|
|
8
8
|
module Operations
|
9
9
|
|
10
10
|
|
11
|
-
class
|
11
|
+
class UpdateCommissionResponse < ::Crystalline::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
14
|
# HTTP response content type for this operation
|
@@ -29,8 +29,8 @@ module OpenApiSDK
|
|
29
29
|
field :invite_expired, T.nilable(::OpenApiSDK::Shared::InviteExpired)
|
30
30
|
# The server cannot find the requested resource.
|
31
31
|
field :not_found, T.nilable(::OpenApiSDK::Shared::NotFound)
|
32
|
-
# The updated
|
33
|
-
field :object, T.nilable(::OpenApiSDK::Operations::
|
32
|
+
# The updated commission.
|
33
|
+
field :object, T.nilable(::OpenApiSDK::Operations::UpdateCommissionResponseBody)
|
34
34
|
# The user has sent too many requests in a given amount of time ("rate limiting")
|
35
35
|
field :rate_limit_exceeded, T.nilable(::OpenApiSDK::Shared::RateLimitExceeded)
|
36
36
|
# Although the HTTP standard specifies "unauthorized", semantically this response means "unauthenticated". That is, the client must authenticate itself to get the requested response.
|
@@ -39,7 +39,7 @@ module OpenApiSDK
|
|
39
39
|
field :unprocessable_entity, T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)
|
40
40
|
|
41
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::
|
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::UpdateCommissionResponseBody), rate_limit_exceeded: T.nilable(::OpenApiSDK::Shared::RateLimitExceeded), unauthorized: T.nilable(::OpenApiSDK::Shared::Unauthorized), unprocessable_entity: T.nilable(::OpenApiSDK::Shared::UnprocessableEntity)).void }
|
43
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
44
|
@content_type = content_type
|
45
45
|
@raw_response = raw_response
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
# The updated commission.
|
11
|
+
class UpdateCommissionResponseBody < ::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
|
+
# The commission's unique ID on Dub.
|
23
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
24
|
+
|
25
|
+
field :status, ::OpenApiSDK::Operations::UpdateCommissionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::UpdateCommissionStatus, false) } }
|
26
|
+
|
27
|
+
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt') } }
|
28
|
+
|
29
|
+
field :invoice_id, T.nilable(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId') } }
|
30
|
+
|
31
|
+
field :type, T.nilable(::OpenApiSDK::Operations::UpdateCommissionType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': Utils.enum_from_string(::OpenApiSDK::Operations::UpdateCommissionType, true) } }
|
32
|
+
|
33
|
+
|
34
|
+
sig { params(amount: ::Float, created_at: ::String, currency: ::String, earnings: ::Float, id: ::String, status: ::OpenApiSDK::Operations::UpdateCommissionStatus, updated_at: ::String, invoice_id: T.nilable(::String), type: T.nilable(::OpenApiSDK::Operations::UpdateCommissionType)).void }
|
35
|
+
def initialize(amount: nil, created_at: nil, currency: nil, earnings: nil, id: nil, status: nil, updated_at: nil, invoice_id: nil, type: nil)
|
36
|
+
@amount = amount
|
37
|
+
@created_at = created_at
|
38
|
+
@currency = currency
|
39
|
+
@earnings = earnings
|
40
|
+
@id = id
|
41
|
+
@status = status
|
42
|
+
@updated_at = updated_at
|
43
|
+
@invoice_id = invoice_id
|
44
|
+
@type = type
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,23 @@
|
|
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 UpdateCommissionStatus < 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
|
+
CANCELED = new('canceled')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
2
|
+
|
3
|
+
# typed: true
|
4
|
+
# frozen_string_literal: true
|
5
|
+
|
6
|
+
|
7
|
+
module OpenApiSDK
|
8
|
+
module Operations
|
9
|
+
|
10
|
+
|
11
|
+
class UpdateCommissionType < T::Enum
|
12
|
+
enums do
|
13
|
+
CLICK = new('click')
|
14
|
+
LEAD = new('lead')
|
15
|
+
SALE = new('sale')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -11,13 +11,13 @@ module OpenApiSDK
|
|
11
11
|
class UpdateCustomerPartner < ::Crystalline::FieldAugmented
|
12
12
|
extend T::Sig
|
13
13
|
|
14
|
-
|
14
|
+
# The partner's email address. Should be a unique value across Dub.
|
15
15
|
field :email, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email') } }
|
16
|
-
|
16
|
+
# The partner's unique ID on Dub.
|
17
17
|
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id') } }
|
18
|
-
|
18
|
+
# The partner's avatar image.
|
19
19
|
field :image, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('image') } }
|
20
|
-
|
20
|
+
# The partner's full legal name.
|
21
21
|
field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name') } }
|
22
22
|
|
23
23
|
|
@@ -137,7 +137,7 @@ module OpenApiSDK
|
|
137
137
|
autoload :CreatePartnerTestVariants, 'open_api_sdk/models/operations/createpartner_testvariants.rb'
|
138
138
|
autoload :LinkProps, 'open_api_sdk/models/operations/linkprops.rb'
|
139
139
|
autoload :CreatePartnerRequestBody, 'open_api_sdk/models/operations/createpartner_requestbody.rb'
|
140
|
-
autoload :
|
140
|
+
autoload :CreatePartnerStatus, 'open_api_sdk/models/operations/createpartner_status.rb'
|
141
141
|
autoload :CreatePartnerLink, 'open_api_sdk/models/operations/createpartner_link.rb'
|
142
142
|
autoload :CreatePartnerResponseBody, 'open_api_sdk/models/operations/createpartner_responsebody.rb'
|
143
143
|
autoload :CreatePartnerResponse, 'open_api_sdk/models/operations/createpartner_response.rb'
|
@@ -156,11 +156,23 @@ module OpenApiSDK
|
|
156
156
|
autoload :QueryParamGroupBy, 'open_api_sdk/models/operations/queryparam_groupby.rb'
|
157
157
|
autoload :RetrievePartnerAnalyticsRequest, 'open_api_sdk/models/operations/retrievepartneranalytics_request.rb'
|
158
158
|
autoload :RetrievePartnerAnalyticsResponse, 'open_api_sdk/models/operations/retrievepartneranalytics_response.rb'
|
159
|
-
autoload :UpdatePartnerSaleRequestBody, 'open_api_sdk/models/operations/updatepartnersale_requestbody.rb'
|
160
159
|
autoload :Type, 'open_api_sdk/models/operations/type.rb'
|
161
|
-
autoload :
|
162
|
-
autoload :
|
163
|
-
autoload :
|
160
|
+
autoload :QueryParamStatus, 'open_api_sdk/models/operations/queryparam_status.rb'
|
161
|
+
autoload :ListCommissionsQueryParamSortBy, 'open_api_sdk/models/operations/listcommissions_queryparam_sortby.rb'
|
162
|
+
autoload :ListCommissionsQueryParamSortOrder, 'open_api_sdk/models/operations/listcommissions_queryparam_sortorder.rb'
|
163
|
+
autoload :ListCommissionsQueryParamInterval, 'open_api_sdk/models/operations/listcommissions_queryparam_interval.rb'
|
164
|
+
autoload :ListCommissionsRequest, 'open_api_sdk/models/operations/listcommissions_request.rb'
|
165
|
+
autoload :ListCommissionsType, 'open_api_sdk/models/operations/listcommissions_type.rb'
|
166
|
+
autoload :ListCommissionsStatus, 'open_api_sdk/models/operations/listcommissions_status.rb'
|
167
|
+
autoload :ListCommissionsResponseBody, 'open_api_sdk/models/operations/listcommissions_responsebody.rb'
|
168
|
+
autoload :ListCommissionsResponse, 'open_api_sdk/models/operations/listcommissions_response.rb'
|
169
|
+
autoload :Status, 'open_api_sdk/models/operations/status.rb'
|
170
|
+
autoload :UpdateCommissionRequestBody, 'open_api_sdk/models/operations/updatecommission_requestbody.rb'
|
171
|
+
autoload :UpdateCommissionRequest, 'open_api_sdk/models/operations/updatecommission_request.rb'
|
172
|
+
autoload :UpdateCommissionType, 'open_api_sdk/models/operations/updatecommission_type.rb'
|
173
|
+
autoload :UpdateCommissionStatus, 'open_api_sdk/models/operations/updatecommission_status.rb'
|
174
|
+
autoload :UpdateCommissionResponseBody, 'open_api_sdk/models/operations/updatecommission_responsebody.rb'
|
175
|
+
autoload :UpdateCommissionResponse, 'open_api_sdk/models/operations/updatecommission_response.rb'
|
164
176
|
autoload :GetWorkspaceRequest, 'open_api_sdk/models/operations/getworkspace_request.rb'
|
165
177
|
autoload :GetWorkspaceResponse, 'open_api_sdk/models/operations/getworkspace_response.rb'
|
166
178
|
autoload :UpdateWorkspaceRequestBody, 'open_api_sdk/models/operations/updateworkspace_requestbody.rb'
|
@@ -697,144 +697,5 @@ module OpenApiSDK
|
|
697
697
|
|
698
698
|
res
|
699
699
|
end
|
700
|
-
|
701
|
-
|
702
|
-
sig { params(request: T.nilable(::OpenApiSDK::Operations::UpdatePartnerSaleRequestBody), timeout_ms: T.nilable(Integer)).returns(::OpenApiSDK::Operations::UpdatePartnerSaleResponse) }
|
703
|
-
def update_sale(request, timeout_ms = nil)
|
704
|
-
# update_sale - Update a sale for a partner.
|
705
|
-
# Update an existing sale amount. This is useful for handling refunds (partial or full) or fraudulent sales.
|
706
|
-
url, params = @sdk_configuration.get_server_details
|
707
|
-
base_url = Utils.template_url(url, params)
|
708
|
-
url = "#{base_url}/partners/sales"
|
709
|
-
headers = {}
|
710
|
-
req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
|
711
|
-
headers['content-type'] = req_content_type
|
712
|
-
|
713
|
-
if form
|
714
|
-
body = Utils.encode_form(form)
|
715
|
-
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
716
|
-
body = URI.encode_www_form(data)
|
717
|
-
else
|
718
|
-
body = data
|
719
|
-
end
|
720
|
-
headers['Accept'] = 'application/json'
|
721
|
-
headers['user-agent'] = @sdk_configuration.user_agent
|
722
|
-
|
723
|
-
security = !@sdk_configuration.nil? && !@sdk_configuration.security_source.nil? ? @sdk_configuration.security_source.call : nil
|
724
|
-
|
725
|
-
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
726
|
-
timeout ||= @sdk_configuration.timeout
|
727
|
-
|
728
|
-
connection = @sdk_configuration.client
|
729
|
-
|
730
|
-
hook_ctx = SDKHooks::HookContext.new(
|
731
|
-
base_url: base_url,
|
732
|
-
oauth2_scopes: nil,
|
733
|
-
operation_id: 'updatePartnerSale',
|
734
|
-
security_source: @sdk_configuration.security_source
|
735
|
-
)
|
736
|
-
|
737
|
-
error = T.let(nil, T.nilable(StandardError))
|
738
|
-
r = T.let(nil, T.nilable(Faraday::Response))
|
739
|
-
|
740
|
-
begin
|
741
|
-
r = connection.patch(url) do |req|
|
742
|
-
req.body = body
|
743
|
-
req.headers.merge!(headers)
|
744
|
-
req.options.timeout = timeout unless timeout.nil?
|
745
|
-
Utils.configure_request_security(req, security)
|
746
|
-
|
747
|
-
@sdk_configuration.hooks.before_request(
|
748
|
-
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
749
|
-
hook_ctx: hook_ctx
|
750
|
-
),
|
751
|
-
request: req
|
752
|
-
)
|
753
|
-
end
|
754
|
-
rescue StandardError => e
|
755
|
-
error = e
|
756
|
-
ensure
|
757
|
-
if r.nil? || Utils.error_status?(r.status)
|
758
|
-
r = @sdk_configuration.hooks.after_error(
|
759
|
-
error: error,
|
760
|
-
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
761
|
-
hook_ctx: hook_ctx
|
762
|
-
),
|
763
|
-
response: r
|
764
|
-
)
|
765
|
-
else
|
766
|
-
r = @sdk_configuration.hooks.after_success(
|
767
|
-
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
768
|
-
hook_ctx: hook_ctx
|
769
|
-
),
|
770
|
-
response: r
|
771
|
-
)
|
772
|
-
end
|
773
|
-
|
774
|
-
if r.nil?
|
775
|
-
raise error if !error.nil?
|
776
|
-
raise 'no response'
|
777
|
-
end
|
778
|
-
end
|
779
|
-
|
780
|
-
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
781
|
-
|
782
|
-
res = ::OpenApiSDK::Operations::UpdatePartnerSaleResponse.new(
|
783
|
-
status_code: r.status, content_type: content_type, raw_response: r
|
784
|
-
)
|
785
|
-
if r.status == 200
|
786
|
-
if Utils.match_content_type(content_type, 'application/json')
|
787
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Operations::UpdatePartnerSaleResponseBody)
|
788
|
-
res.object = out
|
789
|
-
end
|
790
|
-
elsif r.status == 400
|
791
|
-
if Utils.match_content_type(content_type, 'application/json')
|
792
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::BadRequest)
|
793
|
-
res.bad_request = out
|
794
|
-
end
|
795
|
-
elsif r.status == 401
|
796
|
-
if Utils.match_content_type(content_type, 'application/json')
|
797
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Unauthorized)
|
798
|
-
res.unauthorized = out
|
799
|
-
end
|
800
|
-
elsif r.status == 403
|
801
|
-
if Utils.match_content_type(content_type, 'application/json')
|
802
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Forbidden)
|
803
|
-
res.forbidden = out
|
804
|
-
end
|
805
|
-
elsif r.status == 404
|
806
|
-
if Utils.match_content_type(content_type, 'application/json')
|
807
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::NotFound)
|
808
|
-
res.not_found = out
|
809
|
-
end
|
810
|
-
elsif r.status == 409
|
811
|
-
if Utils.match_content_type(content_type, 'application/json')
|
812
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::Conflict)
|
813
|
-
res.conflict = out
|
814
|
-
end
|
815
|
-
elsif r.status == 410
|
816
|
-
if Utils.match_content_type(content_type, 'application/json')
|
817
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InviteExpired)
|
818
|
-
res.invite_expired = out
|
819
|
-
end
|
820
|
-
elsif r.status == 422
|
821
|
-
if Utils.match_content_type(content_type, 'application/json')
|
822
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::UnprocessableEntity)
|
823
|
-
res.unprocessable_entity = out
|
824
|
-
end
|
825
|
-
elsif r.status == 429
|
826
|
-
if Utils.match_content_type(content_type, 'application/json')
|
827
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::RateLimitExceeded)
|
828
|
-
res.rate_limit_exceeded = out
|
829
|
-
end
|
830
|
-
elsif r.status == 500
|
831
|
-
if Utils.match_content_type(content_type, 'application/json')
|
832
|
-
out = Crystalline.unmarshal_json(JSON.parse(r.env.response_body), ::OpenApiSDK::Shared::InternalServerError)
|
833
|
-
res.internal_server_error = out
|
834
|
-
end
|
835
|
-
end
|
836
|
-
|
837
|
-
res
|
838
|
-
end
|
839
700
|
end
|
840
701
|
end
|
@@ -61,9 +61,9 @@ module OpenApiSDK
|
|
61
61
|
end
|
62
62
|
@language = 'ruby'
|
63
63
|
@openapi_doc_version = '0.0.1'
|
64
|
-
@sdk_version = '0.2.2-alpha.
|
64
|
+
@sdk_version = '0.2.2-alpha.101'
|
65
65
|
@gen_version = '2.563.0'
|
66
|
-
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.
|
66
|
+
@user_agent = 'speakeasy-sdk/ruby 0.2.2-alpha.101 2.563.0 0.0.1 dub'
|
67
67
|
end
|
68
68
|
|
69
69
|
sig { returns([String, T::Hash[Symbol, String]]) }
|