dub 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e00c709c56a771100baa349a7e99ef991c1e6b1e90f3211edf3acf98a900675b
4
- data.tar.gz: 8db579a7055599565f267b330b1aa0631e175e80a4c768c6e8ef21b309136c86
3
+ metadata.gz: 9ee878aa68ba16282515d7ac7d84a0fcfd8aa41c9ff1f663dca50f063aa00638
4
+ data.tar.gz: 8f63f8ae784650c499e65914046111affb4da05675e5ff246bbbff8075278f46
5
5
  SHA512:
6
- metadata.gz: 3168bf22e639ce8bcedd76fbb22128c48e415160df8eb07eaadce064bad1c3a91a4aa28f3124fb13a5870fb8184e70f957ffaf3be66e5332d3967bcf514a50e0
7
- data.tar.gz: 921441987bf659883d3437d3392aaa21af5f4f7e05c634231e6fb66a86a9ebc7e8173bb8ac6fb10b7c4b330343333ce50b909bfa1396cbb858731bc9fb5bce0e
6
+ metadata.gz: 19ef41b5ed1ce7c4ebc42e6f76d25fccfbfcd65a06070d745eb7adf6f7d1e8bfd066e7945e76f073b50086f035800a45dd71c2d2f20dd4ccba6c6dafbdee70d4
7
+ data.tar.gz: 1ae41cddc1de50f15f73d5ff070667d130b76a66d7b8abfeffe523d6dc7427e08231969cf9be305f51e8b5e6608f76eee44df502184a303d74aacb1595ffa6c1
@@ -8,13 +8,14 @@ module OpenApiSDK
8
8
  module Models
9
9
  module Operations
10
10
 
11
- # Mode - The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub.
11
+ # Mode - The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub; `deferred` will defer the lead event creation to a subsequent request.
12
12
  class Mode < T::Enum
13
13
 
14
14
 
15
15
  enums do
16
16
  ASYNC = new('async')
17
17
  WAIT = new('wait')
18
+ DEFERRED = new('deferred')
18
19
  end
19
20
  end
20
21
  end
@@ -13,16 +13,16 @@ module OpenApiSDK
13
13
  extend T::Sig
14
14
  include Crystalline::MetadataFields
15
15
 
16
- # The unique ID of the click that the lead conversion event is attributed to. You can read this value from `dub_id` cookie.
16
+ # The unique ID of the click that the lead conversion event is attributed to. You can read this value from `dub_id` cookie. If an empty string is provided, Dub will try to find an existing customer with the provided `customerExternalId` and use the `clickId` from the customer if found.
17
17
  field :click_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clickId'), required: true } }
18
18
  # The name of the lead event to track. Can also be used as a unique identifier to associate a given lead event for a customer for a subsequent sale event (via the `leadEventName` prop in `/track/sale`).
19
19
  field :event_name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('eventName'), required: true } }
20
20
  # The unique ID of the customer in your system. Will be used to identify and attribute all future events to this customer.
21
21
  field :customer_external_id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerExternalId'), required: true } }
22
+ # The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub; `deferred` will defer the lead event creation to a subsequent request.
23
+ field :mode, Crystalline::Nilable.new(Models::Operations::Mode), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mode'), 'decoder': Utils.enum_from_string(Models::Operations::Mode, true) } }
22
24
  # The numerical value associated with this lead event (e.g., number of provisioned seats in a free trial). If defined as N, the lead event will be tracked N times.
23
25
  field :event_quantity, Crystalline::Nilable.new(::Float), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('eventQuantity') } }
24
- # The mode to use for tracking the lead event. `async` will not block the request; `wait` will block the request until the lead event is fully recorded in Dub.
25
- field :mode, Crystalline::Nilable.new(Models::Operations::Mode), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('mode'), 'decoder': Utils.enum_from_string(Models::Operations::Mode, true) } }
26
26
  # Additional metadata to be stored with the lead event. Max 10,000 characters.
27
27
  field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } }
28
28
  # The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).
@@ -32,13 +32,13 @@ module OpenApiSDK
32
32
  # The avatar URL of the customer.
33
33
  field :customer_avatar, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerAvatar') } }
34
34
 
35
- sig { params(click_id: ::String, event_name: ::String, customer_external_id: ::String, event_quantity: T.nilable(::Float), mode: T.nilable(Models::Operations::Mode), metadata: T.nilable(T::Hash[Symbol, ::Object]), customer_name: T.nilable(::String), customer_email: T.nilable(::String), customer_avatar: T.nilable(::String)).void }
36
- def initialize(click_id:, event_name:, customer_external_id:, event_quantity: nil, mode: Models::Operations::Mode::ASYNC, metadata: nil, customer_name: nil, customer_email: nil, customer_avatar: nil)
35
+ sig { params(click_id: ::String, event_name: ::String, customer_external_id: ::String, mode: T.nilable(Models::Operations::Mode), event_quantity: T.nilable(::Float), metadata: T.nilable(T::Hash[Symbol, ::Object]), customer_name: T.nilable(::String), customer_email: T.nilable(::String), customer_avatar: T.nilable(::String)).void }
36
+ def initialize(click_id:, event_name:, customer_external_id:, mode: Models::Operations::Mode::ASYNC, event_quantity: nil, metadata: nil, customer_name: nil, customer_email: nil, customer_avatar: nil)
37
37
  @click_id = click_id
38
38
  @event_name = event_name
39
39
  @customer_external_id = customer_external_id
40
- @event_quantity = event_quantity
41
40
  @mode = mode
41
+ @event_quantity = event_quantity
42
42
  @metadata = metadata
43
43
  @customer_name = customer_name
44
44
  @customer_email = customer_email
@@ -51,8 +51,8 @@ module OpenApiSDK
51
51
  return false unless @click_id == other.click_id
52
52
  return false unless @event_name == other.event_name
53
53
  return false unless @customer_external_id == other.customer_external_id
54
- return false unless @event_quantity == other.event_quantity
55
54
  return false unless @mode == other.mode
55
+ return false unless @event_quantity == other.event_quantity
56
56
  return false unless @metadata == other.metadata
57
57
  return false unless @customer_name == other.customer_name
58
58
  return false unless @customer_email == other.customer_email
@@ -14,10 +14,10 @@ class OpenApiSDK::Models::Operations::TrackLeadRequestBody
14
14
  def event_name=(str_); end
15
15
  def customer_external_id(); end
16
16
  def customer_external_id=(str_); end
17
- def event_quantity(); end
18
- def event_quantity=(str_); end
19
17
  def mode(); end
20
18
  def mode=(str_); end
19
+ def event_quantity(); end
20
+ def event_quantity=(str_); end
21
21
  def metadata(); end
22
22
  def metadata=(str_); end
23
23
  def customer_name(); end
@@ -25,21 +25,33 @@ module OpenApiSDK
25
25
  field :payment_processor, Crystalline::Nilable.new(Models::Operations::PaymentProcessor), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('paymentProcessor'), 'decoder': Utils.enum_from_string(Models::Operations::PaymentProcessor, true) } }
26
26
  # Additional metadata to be stored with the sale event. Max 10,000 characters when stringified.
27
27
  field :metadata, Crystalline::Nilable.new(Crystalline::Hash.new(Symbol, ::Object)), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('metadata') } }
28
+ # [For sale tracking without a pre-existing lead event]: The unique ID of the click that the sale conversion event is attributed to. You can read this value from `dub_id` cookie.
29
+ field :click_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('clickId') } }
28
30
  # The invoice ID of the sale. Can be used as a idempotency key – only one sale event can be recorded for a given invoice ID.
29
31
  field :invoice_id, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('invoiceId') } }
30
- # The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior).
32
+ # The name of the lead event that occurred before the sale (case-sensitive). This is used to associate the sale event with a particular lead event (instead of the latest lead event for a link-customer combination, which is the default behavior). For sale tracking without a pre-existing lead event, this field can also be used to specify the lead event name.
31
33
  field :lead_event_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('leadEventName') } }
34
+ # [For sale tracking without a pre-existing lead event]: The name of the customer. If not passed, a random name will be generated (e.g. “Big Red Caribou”).
35
+ field :customer_name, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerName') } }
36
+ # [For sale tracking without a pre-existing lead event]: The email address of the customer.
37
+ field :customer_email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerEmail') } }
38
+ # [For sale tracking without a pre-existing lead event]: The avatar URL of the customer.
39
+ field :customer_avatar, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('customerAvatar') } }
32
40
 
33
- sig { params(customer_external_id: ::String, amount: ::Integer, currency: T.nilable(::String), event_name: T.nilable(::String), payment_processor: T.nilable(Models::Operations::PaymentProcessor), metadata: T.nilable(T::Hash[Symbol, ::Object]), invoice_id: T.nilable(::String), lead_event_name: T.nilable(::String)).void }
34
- def initialize(customer_external_id:, amount:, currency: 'usd', event_name: 'Purchase', payment_processor: Models::Operations::PaymentProcessor::CUSTOM, metadata: nil, invoice_id: nil, lead_event_name: nil)
41
+ sig { params(customer_external_id: ::String, amount: ::Integer, currency: T.nilable(::String), event_name: T.nilable(::String), payment_processor: T.nilable(Models::Operations::PaymentProcessor), metadata: T.nilable(T::Hash[Symbol, ::Object]), click_id: T.nilable(::String), invoice_id: T.nilable(::String), lead_event_name: T.nilable(::String), customer_name: T.nilable(::String), customer_email: T.nilable(::String), customer_avatar: T.nilable(::String)).void }
42
+ def initialize(customer_external_id:, amount:, currency: 'usd', event_name: 'Purchase', payment_processor: Models::Operations::PaymentProcessor::CUSTOM, metadata: nil, click_id: nil, invoice_id: nil, lead_event_name: nil, customer_name: nil, customer_email: nil, customer_avatar: nil)
35
43
  @customer_external_id = customer_external_id
36
44
  @amount = amount
37
45
  @currency = currency
38
46
  @event_name = event_name
39
47
  @payment_processor = payment_processor
40
48
  @metadata = metadata
49
+ @click_id = click_id
41
50
  @invoice_id = invoice_id
42
51
  @lead_event_name = lead_event_name
52
+ @customer_name = customer_name
53
+ @customer_email = customer_email
54
+ @customer_avatar = customer_avatar
43
55
  end
44
56
 
45
57
  sig { params(other: T.untyped).returns(T::Boolean) }
@@ -51,8 +63,12 @@ module OpenApiSDK
51
63
  return false unless @event_name == other.event_name
52
64
  return false unless @payment_processor == other.payment_processor
53
65
  return false unless @metadata == other.metadata
66
+ return false unless @click_id == other.click_id
54
67
  return false unless @invoice_id == other.invoice_id
55
68
  return false unless @lead_event_name == other.lead_event_name
69
+ return false unless @customer_name == other.customer_name
70
+ return false unless @customer_email == other.customer_email
71
+ return false unless @customer_avatar == other.customer_avatar
56
72
  true
57
73
  end
58
74
  end
@@ -20,8 +20,16 @@ class OpenApiSDK::Models::Operations::TrackSaleRequestBody
20
20
  def payment_processor=(str_); end
21
21
  def metadata(); end
22
22
  def metadata=(str_); end
23
+ def click_id(); end
24
+ def click_id=(str_); end
23
25
  def invoice_id(); end
24
26
  def invoice_id=(str_); end
25
27
  def lead_event_name(); end
26
28
  def lead_event_name=(str_); end
29
+ def customer_name(); end
30
+ def customer_name=(str_); end
31
+ def customer_email(); end
32
+ def customer_email=(str_); end
33
+ def customer_avatar(); end
34
+ def customer_avatar=(str_); end
27
35
  end
@@ -17,6 +17,18 @@ module OpenApiSDK
17
17
  field :id, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('id'), required: true } }
18
18
  # The partner's full legal name.
19
19
  field :name, ::String, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('name'), required: true } }
20
+
21
+ field :total_clicks, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalClicks'), required: true } }
22
+
23
+ field :total_leads, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalLeads'), required: true } }
24
+
25
+ field :total_conversions, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalConversions'), required: true } }
26
+
27
+ field :total_sales, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalSales'), required: true } }
28
+
29
+ field :total_sale_amount, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalSaleAmount'), required: true } }
30
+
31
+ field :total_commissions, ::Float, { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('totalCommissions'), required: true } }
20
32
  # The partner's email address. Should be a unique value across Dub.
21
33
  field :email, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('email'), required: true } }
22
34
  # The partner's avatar image.
@@ -26,10 +38,16 @@ module OpenApiSDK
26
38
  # The partner's country (required for tax purposes).
27
39
  field :country, Crystalline::Nilable.new(::String), { 'format_json': { 'letter_case': ::OpenApiSDK::Utils.field_name('country'), required: true } }
28
40
 
29
- sig { params(id: ::String, name: ::String, email: T.nilable(::String), image: T.nilable(::String), payouts_enabled_at: T.nilable(::String), country: T.nilable(::String)).void }
30
- def initialize(id:, name:, email: nil, image: nil, payouts_enabled_at: nil, country: nil)
41
+ sig { params(id: ::String, name: ::String, total_clicks: ::Float, total_leads: ::Float, total_conversions: ::Float, total_sales: ::Float, total_sale_amount: ::Float, total_commissions: ::Float, email: T.nilable(::String), image: T.nilable(::String), payouts_enabled_at: T.nilable(::String), country: T.nilable(::String)).void }
42
+ def initialize(id:, name:, total_clicks:, total_leads:, total_conversions:, total_sales:, total_sale_amount:, total_commissions:, email: nil, image: nil, payouts_enabled_at: nil, country: nil)
31
43
  @id = id
32
44
  @name = name
45
+ @total_clicks = total_clicks
46
+ @total_leads = total_leads
47
+ @total_conversions = total_conversions
48
+ @total_sales = total_sales
49
+ @total_sale_amount = total_sale_amount
50
+ @total_commissions = total_commissions
33
51
  @email = email
34
52
  @image = image
35
53
  @payouts_enabled_at = payouts_enabled_at
@@ -41,6 +59,12 @@ module OpenApiSDK
41
59
  return false unless other.is_a? self.class
42
60
  return false unless @id == other.id
43
61
  return false unless @name == other.name
62
+ return false unless @total_clicks == other.total_clicks
63
+ return false unless @total_leads == other.total_leads
64
+ return false unless @total_conversions == other.total_conversions
65
+ return false unless @total_sales == other.total_sales
66
+ return false unless @total_sale_amount == other.total_sale_amount
67
+ return false unless @total_commissions == other.total_commissions
44
68
  return false unless @email == other.email
45
69
  return false unless @image == other.image
46
70
  return false unless @payouts_enabled_at == other.payouts_enabled_at
@@ -12,6 +12,18 @@ class OpenApiSDK::Models::Shared::Partner
12
12
  def id=(str_); end
13
13
  def name(); end
14
14
  def name=(str_); end
15
+ def total_clicks(); end
16
+ def total_clicks=(str_); end
17
+ def total_leads(); end
18
+ def total_leads=(str_); end
19
+ def total_conversions(); end
20
+ def total_conversions=(str_); end
21
+ def total_sales(); end
22
+ def total_sales=(str_); end
23
+ def total_sale_amount(); end
24
+ def total_sale_amount=(str_); end
25
+ def total_commissions(); end
26
+ def total_commissions=(str_); end
15
27
  def email(); end
16
28
  def email=(str_); end
17
29
  def image(); end
@@ -89,9 +89,9 @@ module OpenApiSDK
89
89
  end
90
90
  @language = 'ruby'
91
91
  @openapi_doc_version = '0.0.1'
92
- @sdk_version = '0.10.1'
93
- @gen_version = '2.687.1'
94
- @user_agent = 'speakeasy-sdk/ruby 0.10.1 2.687.1 0.0.1 dub'
92
+ @sdk_version = '0.10.2'
93
+ @gen_version = '2.698.0'
94
+ @user_agent = 'speakeasy-sdk/ruby 0.10.2 2.698.0 0.0.1 dub'
95
95
  end
96
96
 
97
97
  sig { returns([String, T::Hash[Symbol, String]]) }
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.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dub
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-24 00:00:00.000000000 Z
11
+ date: 2025-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64