dub 0.12.11 → 0.12.13
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/commissions.rb +1 -1
- data/lib/open_api_sdk/models/operations/bulkupdatecommissions_commissions_status.rb +1 -1
- data/lib/open_api_sdk/models/operations/bulkupdatecommissions_responsebody.rb +1 -1
- data/lib/open_api_sdk/models/operations/lead.rb +38 -0
- data/lib/open_api_sdk/models/operations/lead.rbi +15 -0
- data/lib/open_api_sdk/models/operations/listcommissions_responsebody.rb +19 -15
- data/lib/open_api_sdk/models/operations/listcommissions_responsebody.rbi +4 -2
- data/lib/open_api_sdk/models/operations/listcommissions_status.rb +1 -1
- data/lib/open_api_sdk/models/operations/listcommissions_type.rb +1 -1
- data/lib/open_api_sdk/models/operations/requestbody_1.rb +2 -2
- data/lib/open_api_sdk/models/operations/requestbody_2.rb +15 -3
- data/lib/open_api_sdk/models/operations/requestbody_2.rbi +4 -0
- data/lib/open_api_sdk/models/operations/requestbody_3.rb +25 -9
- data/lib/open_api_sdk/models/operations/requestbody_3.rbi +6 -2
- data/lib/open_api_sdk/models/operations/requestbody_paymentprocessor.rb +27 -0
- data/lib/open_api_sdk/models/operations/requestbody_paymentprocessor.rbi +11 -0
- data/lib/open_api_sdk/models/operations/sale.rb +20 -16
- data/lib/open_api_sdk/models/operations/sale.rbi +4 -2
- data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +2 -2
- data/lib/open_api_sdk/models/operations/tracksale_sale.rb +50 -0
- data/lib/open_api_sdk/models/operations/tracksale_sale.rbi +21 -0
- data/lib/open_api_sdk/models/operations/updatecommission_responsebody.rb +19 -15
- data/lib/open_api_sdk/models/operations/updatecommission_responsebody.rbi +4 -2
- data/lib/open_api_sdk/models/operations/updatecommission_status.rb +1 -1
- data/lib/open_api_sdk/models/operations/updatecommission_type.rb +1 -1
- data/lib/open_api_sdk/models/operations.rb +3 -0
- data/lib/open_api_sdk/models/shared/commissioncreatedevent_data.rb +19 -15
- data/lib/open_api_sdk/models/shared/commissioncreatedevent_data.rbi +4 -2
- data/lib/open_api_sdk/models/shared/commissioncreatedevent_status.rb +1 -1
- data/lib/open_api_sdk/models/shared/commissioncreatedevent_type.rb +1 -1
- data/lib/open_api_sdk/models/shared/partnermergedevent.rb +46 -0
- data/lib/open_api_sdk/models/shared/partnermergedevent.rbi +19 -0
- data/lib/open_api_sdk/models/shared/partnermergedevent_data.rb +44 -0
- data/lib/open_api_sdk/models/shared/partnermergedevent_data.rbi +17 -0
- data/lib/open_api_sdk/models/shared/partnermergedevent_event.rb +20 -0
- data/lib/open_api_sdk/models/shared/partnermergedevent_event.rbi +11 -0
- data/lib/open_api_sdk/models/shared/sourcepartner.rb +42 -0
- data/lib/open_api_sdk/models/shared/sourcepartner.rbi +17 -0
- data/lib/open_api_sdk/models/shared/targetpartner.rb +42 -0
- data/lib/open_api_sdk/models/shared/targetpartner.rbi +17 -0
- data/lib/open_api_sdk/models/shared.rb +5 -0
- data/lib/open_api_sdk/sdkconfiguration.rb +3 -3
- metadata +18 -2
|
@@ -16,28 +16,30 @@ module OpenApiSDK
|
|
|
16
16
|
|
|
17
17
|
# The commission's unique ID on Dub.
|
|
18
18
|
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
|
|
19
|
-
|
|
19
|
+
# The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`.
|
|
20
|
+
field :type, Models::Operations::UpdateCommissionType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), required: true, 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Operations::UpdateCommissionType, false) } }
|
|
21
|
+
# The associated event amount in cents. For sale commissions, this is the sale amount.
|
|
20
22
|
field :amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount'), required: true } }
|
|
21
|
-
|
|
23
|
+
# The amount earned by the partner, in cents.
|
|
22
24
|
field :earnings, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earnings'), required: true } }
|
|
23
|
-
|
|
25
|
+
# The currency of the commission, as an ISO 4217 currency code.
|
|
24
26
|
field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency'), required: true } }
|
|
25
|
-
|
|
27
|
+
# The current status of the commission.
|
|
26
28
|
field :status, Models::Operations::UpdateCommissionStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), required: true, 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Operations::UpdateCommissionStatus, false) } }
|
|
27
|
-
|
|
29
|
+
# The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.
|
|
28
30
|
field :quantity, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('quantity'), required: true } }
|
|
29
|
-
|
|
31
|
+
# The date and time when the commission was created.
|
|
30
32
|
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt'), required: true } }
|
|
31
|
-
|
|
33
|
+
# The date and time when the commission was last updated.
|
|
32
34
|
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt'), required: true } }
|
|
33
35
|
|
|
34
36
|
field :partner, Models::Operations::UpdateCommissionPartner, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partner'), required: true } }
|
|
35
|
-
|
|
36
|
-
field :type, Crystalline::Nilable.new(Models::Operations::UpdateCommissionType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Operations::UpdateCommissionType, true) } }
|
|
37
|
-
|
|
37
|
+
# The associated invoice ID. Only set for sale commissions.
|
|
38
38
|
field :invoice_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId'), required: true } }
|
|
39
|
-
|
|
39
|
+
# An optional description of the commission.
|
|
40
40
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description'), required: true } }
|
|
41
|
+
# User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).
|
|
42
|
+
field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata'), required: true } }
|
|
41
43
|
# The date the commission was paid out to the partner. Null if not paid yet.
|
|
42
44
|
field :paid_at, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paidAt'), required: true } }
|
|
43
45
|
# The user who created the manual commission.
|
|
@@ -45,9 +47,10 @@ module OpenApiSDK
|
|
|
45
47
|
|
|
46
48
|
field :customer, Crystalline::Nilable.new(Models::Operations::UpdateCommissionCustomer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } }
|
|
47
49
|
|
|
48
|
-
sig { params(id: ::String, amount: ::Float, earnings: ::Float, currency: ::String, status: Models::Operations::UpdateCommissionStatus, quantity: ::Float, created_at: ::String, updated_at: ::String, partner: Models::Operations::UpdateCommissionPartner,
|
|
49
|
-
def initialize(id:, amount:, earnings:, currency:, status:, quantity:, created_at:, updated_at:, partner:,
|
|
50
|
+
sig { params(id: ::String, type: Models::Operations::UpdateCommissionType, amount: ::Float, earnings: ::Float, currency: ::String, status: Models::Operations::UpdateCommissionStatus, quantity: ::Float, created_at: ::String, updated_at: ::String, partner: Models::Operations::UpdateCommissionPartner, invoice_id: T.nilable(::String), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object]), paid_at: T.nilable(::String), user_id: T.nilable(::String), customer: T.nilable(Models::Operations::UpdateCommissionCustomer)).void }
|
|
51
|
+
def initialize(id:, type:, amount:, earnings:, currency:, status:, quantity:, created_at:, updated_at:, partner:, invoice_id: nil, description: nil, metadata: nil, paid_at: nil, user_id: nil, customer: nil)
|
|
50
52
|
@id = id
|
|
53
|
+
@type = type
|
|
51
54
|
@amount = amount
|
|
52
55
|
@earnings = earnings
|
|
53
56
|
@currency = currency
|
|
@@ -56,9 +59,9 @@ module OpenApiSDK
|
|
|
56
59
|
@created_at = created_at
|
|
57
60
|
@updated_at = updated_at
|
|
58
61
|
@partner = partner
|
|
59
|
-
@type = type
|
|
60
62
|
@invoice_id = invoice_id
|
|
61
63
|
@description = description
|
|
64
|
+
@metadata = metadata
|
|
62
65
|
@paid_at = paid_at
|
|
63
66
|
@user_id = user_id
|
|
64
67
|
@customer = customer
|
|
@@ -68,6 +71,7 @@ module OpenApiSDK
|
|
|
68
71
|
def ==(other)
|
|
69
72
|
return false unless other.is_a? self.class
|
|
70
73
|
return false unless @id == other.id
|
|
74
|
+
return false unless @type == other.type
|
|
71
75
|
return false unless @amount == other.amount
|
|
72
76
|
return false unless @earnings == other.earnings
|
|
73
77
|
return false unless @currency == other.currency
|
|
@@ -76,9 +80,9 @@ module OpenApiSDK
|
|
|
76
80
|
return false unless @created_at == other.created_at
|
|
77
81
|
return false unless @updated_at == other.updated_at
|
|
78
82
|
return false unless @partner == other.partner
|
|
79
|
-
return false unless @type == other.type
|
|
80
83
|
return false unless @invoice_id == other.invoice_id
|
|
81
84
|
return false unless @description == other.description
|
|
85
|
+
return false unless @metadata == other.metadata
|
|
82
86
|
return false unless @paid_at == other.paid_at
|
|
83
87
|
return false unless @user_id == other.user_id
|
|
84
88
|
return false unless @customer == other.customer
|
|
@@ -10,6 +10,8 @@ end
|
|
|
10
10
|
class OpenApiSDK::Models::Operations::UpdateCommissionResponseBody
|
|
11
11
|
def id(); end
|
|
12
12
|
def id=(str_); end
|
|
13
|
+
def type(); end
|
|
14
|
+
def type=(str_); end
|
|
13
15
|
def amount(); end
|
|
14
16
|
def amount=(str_); end
|
|
15
17
|
def earnings(); end
|
|
@@ -26,12 +28,12 @@ class OpenApiSDK::Models::Operations::UpdateCommissionResponseBody
|
|
|
26
28
|
def updated_at=(str_); end
|
|
27
29
|
def partner(); end
|
|
28
30
|
def partner=(str_); end
|
|
29
|
-
def type(); end
|
|
30
|
-
def type=(str_); end
|
|
31
31
|
def invoice_id(); end
|
|
32
32
|
def invoice_id=(str_); end
|
|
33
33
|
def description(); end
|
|
34
34
|
def description=(str_); end
|
|
35
|
+
def metadata(); end
|
|
36
|
+
def metadata=(str_); end
|
|
35
37
|
def paid_at(); end
|
|
36
38
|
def paid_at=(str_); end
|
|
37
39
|
def user_id(); end
|
|
@@ -159,6 +159,7 @@ module OpenApiSDK
|
|
|
159
159
|
autoload :GroupBy, 'open_api_sdk/models/operations/groupby.rb'
|
|
160
160
|
autoload :Ids, 'open_api_sdk/models/operations/ids.rb'
|
|
161
161
|
autoload :Interval, 'open_api_sdk/models/operations/interval.rb'
|
|
162
|
+
autoload :Lead, 'open_api_sdk/models/operations/lead.rb'
|
|
162
163
|
autoload :Level, 'open_api_sdk/models/operations/level.rb'
|
|
163
164
|
autoload :Link, 'open_api_sdk/models/operations/link.rb'
|
|
164
165
|
autoload :LinkProps, 'open_api_sdk/models/operations/linkprops.rb'
|
|
@@ -257,6 +258,7 @@ module OpenApiSDK
|
|
|
257
258
|
autoload :RequestBody2, 'open_api_sdk/models/operations/requestbody_2.rb'
|
|
258
259
|
autoload :RequestBody3, 'open_api_sdk/models/operations/requestbody_3.rb'
|
|
259
260
|
autoload :RequestBodyCustomer, 'open_api_sdk/models/operations/requestbody_customer.rb'
|
|
261
|
+
autoload :RequestBodyPaymentProcessor, 'open_api_sdk/models/operations/requestbody_paymentprocessor.rb'
|
|
260
262
|
autoload :RequestBodyType, 'open_api_sdk/models/operations/requestbody_type.rb'
|
|
261
263
|
autoload :ResponseBody, 'open_api_sdk/models/operations/responsebody.rb'
|
|
262
264
|
autoload :ResponseBodyClick, 'open_api_sdk/models/operations/responsebody_click.rb'
|
|
@@ -289,6 +291,7 @@ module OpenApiSDK
|
|
|
289
291
|
autoload :TrackSaleCustomer, 'open_api_sdk/models/operations/tracksale_customer.rb'
|
|
290
292
|
autoload :TrackSaleRequestBody, 'open_api_sdk/models/operations/tracksale_requestbody.rb'
|
|
291
293
|
autoload :TrackSaleResponseBody, 'open_api_sdk/models/operations/tracksale_responsebody.rb'
|
|
294
|
+
autoload :TrackSaleSale, 'open_api_sdk/models/operations/tracksale_sale.rb'
|
|
292
295
|
autoload :Type, 'open_api_sdk/models/operations/type.rb'
|
|
293
296
|
autoload :UpdateCommissionCustomer, 'open_api_sdk/models/operations/updatecommission_customer.rb'
|
|
294
297
|
autoload :UpdateCommissionPartner, 'open_api_sdk/models/operations/updatecommission_partner.rb'
|
|
@@ -16,28 +16,30 @@ module OpenApiSDK
|
|
|
16
16
|
|
|
17
17
|
# The commission's unique ID on Dub.
|
|
18
18
|
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
|
|
19
|
-
|
|
19
|
+
# The type of commission. Can be `click`, `lead`, `sale`, `referral`, or `custom`.
|
|
20
|
+
field :type, Models::Shared::CommissionCreatedEventType, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), required: true, 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Shared::CommissionCreatedEventType, false) } }
|
|
21
|
+
# The associated event amount in cents. For sale commissions, this is the sale amount.
|
|
20
22
|
field :amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('amount'), required: true } }
|
|
21
|
-
|
|
23
|
+
# The amount earned by the partner, in cents.
|
|
22
24
|
field :earnings, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('earnings'), required: true } }
|
|
23
|
-
|
|
25
|
+
# The currency of the commission, as an ISO 4217 currency code.
|
|
24
26
|
field :currency, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('currency'), required: true } }
|
|
25
|
-
|
|
27
|
+
# The current status of the commission.
|
|
26
28
|
field :status, Models::Shared::CommissionCreatedEventStatus, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('status'), required: true, 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Shared::CommissionCreatedEventStatus, false) } }
|
|
27
|
-
|
|
29
|
+
# The event quantity. Used for click and lead commissions; typically `1` for sale and custom commissions.
|
|
28
30
|
field :quantity, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('quantity'), required: true } }
|
|
29
|
-
|
|
31
|
+
# The date and time when the commission was created.
|
|
30
32
|
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt'), required: true } }
|
|
31
|
-
|
|
33
|
+
# The date and time when the commission was last updated.
|
|
32
34
|
field :updated_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('updatedAt'), required: true } }
|
|
33
35
|
|
|
34
36
|
field :partner, Models::Shared::CommissionCreatedEventPartner, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('partner'), required: true } }
|
|
35
|
-
|
|
36
|
-
field :type, Crystalline::Nilable.new(Models::Shared::CommissionCreatedEventType), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('type'), 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Shared::CommissionCreatedEventType, true) } }
|
|
37
|
-
|
|
37
|
+
# The associated invoice ID. Only set for sale commissions.
|
|
38
38
|
field :invoice_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId'), required: true } }
|
|
39
|
-
|
|
39
|
+
# An optional description of the commission.
|
|
40
40
|
field :description, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('description'), required: true } }
|
|
41
|
+
# User-provided metadata from the associated lead or sale event (`lead.metadata` / `sale.metadata`).
|
|
42
|
+
field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata'), required: true } }
|
|
41
43
|
|
|
42
44
|
field :link, Crystalline::Nilable.new(Models::Shared::CommissionCreatedEventLink), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('link'), required: true } }
|
|
43
45
|
# The user who created the manual commission.
|
|
@@ -45,9 +47,10 @@ module OpenApiSDK
|
|
|
45
47
|
|
|
46
48
|
field :customer, Crystalline::Nilable.new(Models::Shared::CommissionCreatedEventCustomer), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customer') } }
|
|
47
49
|
|
|
48
|
-
sig { params(id: ::String, amount: ::Float, earnings: ::Float, currency: ::String, status: Models::Shared::CommissionCreatedEventStatus, quantity: ::Float, created_at: ::String, updated_at: ::String, partner: Models::Shared::CommissionCreatedEventPartner,
|
|
49
|
-
def initialize(id:, amount:, earnings:, currency:, status:, quantity:, created_at:, updated_at:, partner:,
|
|
50
|
+
sig { params(id: ::String, type: Models::Shared::CommissionCreatedEventType, amount: ::Float, earnings: ::Float, currency: ::String, status: Models::Shared::CommissionCreatedEventStatus, quantity: ::Float, created_at: ::String, updated_at: ::String, partner: Models::Shared::CommissionCreatedEventPartner, invoice_id: T.nilable(::String), description: T.nilable(::String), metadata: T.nilable(T::Hash[Symbol, ::Object]), link: T.nilable(Models::Shared::CommissionCreatedEventLink), user_id: T.nilable(::String), customer: T.nilable(Models::Shared::CommissionCreatedEventCustomer)).void }
|
|
51
|
+
def initialize(id:, type:, amount:, earnings:, currency:, status:, quantity:, created_at:, updated_at:, partner:, invoice_id: nil, description: nil, metadata: nil, link: nil, user_id: nil, customer: nil)
|
|
50
52
|
@id = id
|
|
53
|
+
@type = type
|
|
51
54
|
@amount = amount
|
|
52
55
|
@earnings = earnings
|
|
53
56
|
@currency = currency
|
|
@@ -56,9 +59,9 @@ module OpenApiSDK
|
|
|
56
59
|
@created_at = created_at
|
|
57
60
|
@updated_at = updated_at
|
|
58
61
|
@partner = partner
|
|
59
|
-
@type = type
|
|
60
62
|
@invoice_id = invoice_id
|
|
61
63
|
@description = description
|
|
64
|
+
@metadata = metadata
|
|
62
65
|
@link = link
|
|
63
66
|
@user_id = user_id
|
|
64
67
|
@customer = customer
|
|
@@ -68,6 +71,7 @@ module OpenApiSDK
|
|
|
68
71
|
def ==(other)
|
|
69
72
|
return false unless other.is_a? self.class
|
|
70
73
|
return false unless @id == other.id
|
|
74
|
+
return false unless @type == other.type
|
|
71
75
|
return false unless @amount == other.amount
|
|
72
76
|
return false unless @earnings == other.earnings
|
|
73
77
|
return false unless @currency == other.currency
|
|
@@ -76,9 +80,9 @@ module OpenApiSDK
|
|
|
76
80
|
return false unless @created_at == other.created_at
|
|
77
81
|
return false unless @updated_at == other.updated_at
|
|
78
82
|
return false unless @partner == other.partner
|
|
79
|
-
return false unless @type == other.type
|
|
80
83
|
return false unless @invoice_id == other.invoice_id
|
|
81
84
|
return false unless @description == other.description
|
|
85
|
+
return false unless @metadata == other.metadata
|
|
82
86
|
return false unless @link == other.link
|
|
83
87
|
return false unless @user_id == other.user_id
|
|
84
88
|
return false unless @customer == other.customer
|
|
@@ -10,6 +10,8 @@ end
|
|
|
10
10
|
class OpenApiSDK::Models::Shared::CommissionCreatedEventData
|
|
11
11
|
def id(); end
|
|
12
12
|
def id=(str_); end
|
|
13
|
+
def type(); end
|
|
14
|
+
def type=(str_); end
|
|
13
15
|
def amount(); end
|
|
14
16
|
def amount=(str_); end
|
|
15
17
|
def earnings(); end
|
|
@@ -26,12 +28,12 @@ class OpenApiSDK::Models::Shared::CommissionCreatedEventData
|
|
|
26
28
|
def updated_at=(str_); end
|
|
27
29
|
def partner(); end
|
|
28
30
|
def partner=(str_); end
|
|
29
|
-
def type(); end
|
|
30
|
-
def type=(str_); end
|
|
31
31
|
def invoice_id(); end
|
|
32
32
|
def invoice_id=(str_); end
|
|
33
33
|
def description(); end
|
|
34
34
|
def description=(str_); end
|
|
35
|
+
def metadata(); end
|
|
36
|
+
def metadata=(str_); end
|
|
35
37
|
def link(); end
|
|
36
38
|
def link=(str_); end
|
|
37
39
|
def user_id(); end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
# Generated under the AGPL-3.0-only license.
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# typed: true
|
|
6
|
+
# frozen_string_literal: true
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module OpenApiSDK
|
|
10
|
+
module Models
|
|
11
|
+
module Shared
|
|
12
|
+
# Triggered when two partner accounts are merged. Fired once per program the source partner was enrolled in.
|
|
13
|
+
class PartnerMergedEvent
|
|
14
|
+
extend T::Sig
|
|
15
|
+
include Crystalline::MetadataFields
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
|
|
19
|
+
|
|
20
|
+
field :event, Models::Shared::PartnerMergedEventEvent, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('event'), required: true, 'decoder': ::OpenApiSDK::Utils.enum_from_string(Models::Shared::PartnerMergedEventEvent, false) } }
|
|
21
|
+
|
|
22
|
+
field :created_at, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('createdAt'), required: true } }
|
|
23
|
+
|
|
24
|
+
field :data, Models::Shared::PartnerMergedEventData, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('data'), required: true } }
|
|
25
|
+
|
|
26
|
+
sig { params(id: ::String, event: Models::Shared::PartnerMergedEventEvent, created_at: ::String, data: Models::Shared::PartnerMergedEventData).void }
|
|
27
|
+
def initialize(id:, event:, created_at:, data:)
|
|
28
|
+
@id = id
|
|
29
|
+
@event = event
|
|
30
|
+
@created_at = created_at
|
|
31
|
+
@data = data
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
35
|
+
def ==(other)
|
|
36
|
+
return false unless other.is_a? self.class
|
|
37
|
+
return false unless @id == other.id
|
|
38
|
+
return false unless @event == other.event
|
|
39
|
+
return false unless @created_at == other.created_at
|
|
40
|
+
return false unless @data == other.data
|
|
41
|
+
true
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Shared::PartnerMergedEvent
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Shared::PartnerMergedEvent
|
|
11
|
+
def id(); end
|
|
12
|
+
def id=(str_); end
|
|
13
|
+
def event(); end
|
|
14
|
+
def event=(str_); end
|
|
15
|
+
def created_at(); end
|
|
16
|
+
def created_at=(str_); end
|
|
17
|
+
def data(); end
|
|
18
|
+
def data=(str_); end
|
|
19
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
# Generated under the AGPL-3.0-only license.
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# typed: true
|
|
6
|
+
# frozen_string_literal: true
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module OpenApiSDK
|
|
10
|
+
module Models
|
|
11
|
+
module Shared
|
|
12
|
+
|
|
13
|
+
class PartnerMergedEventData
|
|
14
|
+
extend T::Sig
|
|
15
|
+
include Crystalline::MetadataFields
|
|
16
|
+
|
|
17
|
+
# The source partner account that was merged away. Its enrollment in this program no longer exists; use `targetPartner.id` instead.
|
|
18
|
+
field :source_partner, Models::Shared::SourcePartner, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('sourcePartner'), required: true } }
|
|
19
|
+
# The target partner account that the source account was merged into.
|
|
20
|
+
field :target_partner, Models::Shared::TargetPartner, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('targetPartner'), required: true } }
|
|
21
|
+
# Whether the target partner account was already enrolled in this program before the merge.
|
|
22
|
+
# If `true`, both partners were already enrolled in the program and the merge process will collapse the source account into the target account.
|
|
23
|
+
# If `false`, only the source partner account was enrolled in the program, which means the partner's ID in your program will be updated to the target partner's ID.
|
|
24
|
+
field :target_already_enrolled, Crystalline::Boolean.new, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('targetAlreadyEnrolled'), required: true } }
|
|
25
|
+
|
|
26
|
+
sig { params(source_partner: Models::Shared::SourcePartner, target_partner: Models::Shared::TargetPartner, target_already_enrolled: T::Boolean).void }
|
|
27
|
+
def initialize(source_partner:, target_partner:, target_already_enrolled:)
|
|
28
|
+
@source_partner = source_partner
|
|
29
|
+
@target_partner = target_partner
|
|
30
|
+
@target_already_enrolled = target_already_enrolled
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
34
|
+
def ==(other)
|
|
35
|
+
return false unless other.is_a? self.class
|
|
36
|
+
return false unless @source_partner == other.source_partner
|
|
37
|
+
return false unless @target_partner == other.target_partner
|
|
38
|
+
return false unless @target_already_enrolled == other.target_already_enrolled
|
|
39
|
+
true
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Shared::PartnerMergedEventData
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Shared::PartnerMergedEventData
|
|
11
|
+
def source_partner(); end
|
|
12
|
+
def source_partner=(str_); end
|
|
13
|
+
def target_partner(); end
|
|
14
|
+
def target_partner=(str_); end
|
|
15
|
+
def target_already_enrolled(); end
|
|
16
|
+
def target_already_enrolled=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
# Generated under the AGPL-3.0-only license.
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# typed: true
|
|
6
|
+
# frozen_string_literal: true
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module OpenApiSDK
|
|
10
|
+
module Models
|
|
11
|
+
module Shared
|
|
12
|
+
|
|
13
|
+
class PartnerMergedEventEvent < T::Enum
|
|
14
|
+
enums do
|
|
15
|
+
PARTNER_MERGED = new('partner.merged')
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
# Generated under the AGPL-3.0-only license.
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# typed: true
|
|
6
|
+
# frozen_string_literal: true
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module OpenApiSDK
|
|
10
|
+
module Models
|
|
11
|
+
module Shared
|
|
12
|
+
# The source partner account that was merged away. Its enrollment in this program no longer exists; use `targetPartner.id` instead.
|
|
13
|
+
class SourcePartner
|
|
14
|
+
extend T::Sig
|
|
15
|
+
include Crystalline::MetadataFields
|
|
16
|
+
|
|
17
|
+
# The partner's unique ID on Dub.
|
|
18
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
|
|
19
|
+
# The partner's unique ID in your system
|
|
20
|
+
field :tenant_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId'), required: true } }
|
|
21
|
+
# The partner's email address.
|
|
22
|
+
field :email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email'), required: true } }
|
|
23
|
+
|
|
24
|
+
sig { params(id: ::String, tenant_id: T.nilable(::String), email: T.nilable(::String)).void }
|
|
25
|
+
def initialize(id:, tenant_id: nil, email: nil)
|
|
26
|
+
@id = id
|
|
27
|
+
@tenant_id = tenant_id
|
|
28
|
+
@email = email
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
32
|
+
def ==(other)
|
|
33
|
+
return false unless other.is_a? self.class
|
|
34
|
+
return false unless @id == other.id
|
|
35
|
+
return false unless @tenant_id == other.tenant_id
|
|
36
|
+
return false unless @email == other.email
|
|
37
|
+
true
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Shared::SourcePartner
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Shared::SourcePartner
|
|
11
|
+
def id(); end
|
|
12
|
+
def id=(str_); end
|
|
13
|
+
def tenant_id(); end
|
|
14
|
+
def tenant_id=(str_); end
|
|
15
|
+
def email(); end
|
|
16
|
+
def email=(str_); end
|
|
17
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
# Generated under the AGPL-3.0-only license.
|
|
3
|
+
# SPDX-License-Identifier: AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# typed: true
|
|
6
|
+
# frozen_string_literal: true
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
module OpenApiSDK
|
|
10
|
+
module Models
|
|
11
|
+
module Shared
|
|
12
|
+
# The target partner account that the source account was merged into.
|
|
13
|
+
class TargetPartner
|
|
14
|
+
extend T::Sig
|
|
15
|
+
include Crystalline::MetadataFields
|
|
16
|
+
|
|
17
|
+
# The partner's unique ID on Dub.
|
|
18
|
+
field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
|
|
19
|
+
# The partner's unique ID in your system
|
|
20
|
+
field :tenant_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('tenantId'), required: true } }
|
|
21
|
+
# The partner's email address.
|
|
22
|
+
field :email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email'), required: true } }
|
|
23
|
+
|
|
24
|
+
sig { params(id: ::String, tenant_id: T.nilable(::String), email: T.nilable(::String)).void }
|
|
25
|
+
def initialize(id:, tenant_id: nil, email: nil)
|
|
26
|
+
@id = id
|
|
27
|
+
@tenant_id = tenant_id
|
|
28
|
+
@email = email
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
sig { params(other: T.untyped).returns(T::Boolean) }
|
|
32
|
+
def ==(other)
|
|
33
|
+
return false unless other.is_a? self.class
|
|
34
|
+
return false unless @id == other.id
|
|
35
|
+
return false unless @tenant_id == other.tenant_id
|
|
36
|
+
return false unless @email == other.email
|
|
37
|
+
true
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# typed: true
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class OpenApiSDK::Models::Shared::TargetPartner
|
|
6
|
+
extend ::Crystalline::MetadataFields::ClassMethods
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OpenApiSDK::Models::Shared::TargetPartner
|
|
11
|
+
def id(); end
|
|
12
|
+
def id=(str_); end
|
|
13
|
+
def tenant_id(); end
|
|
14
|
+
def tenant_id=(str_); end
|
|
15
|
+
def email(); end
|
|
16
|
+
def email=(str_); end
|
|
17
|
+
end
|
|
@@ -81,6 +81,9 @@ module OpenApiSDK
|
|
|
81
81
|
autoload :PartnerEnrolledEventFieldsDataReferralFormDataType, 'open_api_sdk/models/shared/partnerenrolledevent_fields_data_referralformdata_type.rb'
|
|
82
82
|
autoload :PartnerEnrolledEventFieldsDataType, 'open_api_sdk/models/shared/partnerenrolledevent_fields_data_type.rb'
|
|
83
83
|
autoload :PartnerEnrolledEventFieldsType, 'open_api_sdk/models/shared/partnerenrolledevent_fields_type.rb'
|
|
84
|
+
autoload :PartnerMergedEvent, 'open_api_sdk/models/shared/partnermergedevent.rb'
|
|
85
|
+
autoload :PartnerMergedEventData, 'open_api_sdk/models/shared/partnermergedevent_data.rb'
|
|
86
|
+
autoload :PartnerMergedEventEvent, 'open_api_sdk/models/shared/partnermergedevent_event.rb'
|
|
84
87
|
autoload :SaleCreatedEvent, 'open_api_sdk/models/shared/salecreatedevent.rb'
|
|
85
88
|
autoload :SaleCreatedEventClick, 'open_api_sdk/models/shared/salecreatedevent_click.rb'
|
|
86
89
|
autoload :SaleCreatedEventCustomer, 'open_api_sdk/models/shared/salecreatedevent_customer.rb'
|
|
@@ -126,8 +129,10 @@ module OpenApiSDK
|
|
|
126
129
|
autoload :RegisteredDomain, 'open_api_sdk/models/shared/registereddomain.rb'
|
|
127
130
|
autoload :RejectionReason, 'open_api_sdk/models/shared/rejectionreason.rb'
|
|
128
131
|
autoload :Sale, 'open_api_sdk/models/shared/sale.rb'
|
|
132
|
+
autoload :SourcePartner, 'open_api_sdk/models/shared/sourcepartner.rb'
|
|
129
133
|
autoload :Status, 'open_api_sdk/models/shared/status.rb'
|
|
130
134
|
autoload :Tags, 'open_api_sdk/models/shared/tags.rb'
|
|
135
|
+
autoload :TargetPartner, 'open_api_sdk/models/shared/targetpartner.rb'
|
|
131
136
|
autoload :TestVariants, 'open_api_sdk/models/shared/testvariants.rb'
|
|
132
137
|
autoload :Trigger, 'open_api_sdk/models/shared/trigger.rb'
|
|
133
138
|
autoload :Type, 'open_api_sdk/models/shared/type.rb'
|
|
@@ -90,9 +90,9 @@ module OpenApiSDK
|
|
|
90
90
|
end
|
|
91
91
|
@language = 'ruby'
|
|
92
92
|
@openapi_doc_version = '0.0.1'
|
|
93
|
-
@sdk_version = '0.12.
|
|
94
|
-
@gen_version = '2.
|
|
95
|
-
@user_agent = 'speakeasy-sdk/ruby 0.12.
|
|
93
|
+
@sdk_version = '0.12.13'
|
|
94
|
+
@gen_version = '2.932.9'
|
|
95
|
+
@user_agent = 'speakeasy-sdk/ruby 0.12.13 2.932.9 0.0.1 dub'
|
|
96
96
|
end
|
|
97
97
|
|
|
98
98
|
sig { returns([String, T::Hash[Symbol, String]]) }
|