dodopayments 1.68.0 → 1.69.0

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: cbc5ebc492dd27b97a18b069e5dafdb0f4699ac2a17723fb53ba75ad64349fdb
4
- data.tar.gz: 35f1af6bd6e7b96d17abd850f7f02b70f69743ba499183ad3c4777a3bc87e346
3
+ metadata.gz: fbc15aac4003caa6999329abf8f850019c1a060baa5f63dd8fa54b750a28ce22
4
+ data.tar.gz: 2824c3ce1a598275daee61e42e359514603e3d7484ba4eaa202c4d1c57ca5cbb
5
5
  SHA512:
6
- metadata.gz: d69b3e9b87777621c52503650d511596a94851382cd5d8334a008df9062aa7566a8f28a837c0b0a79115c073e99c5251c8a0eecc88043ab22431276fbc2b7f1a
7
- data.tar.gz: 78ad85f5dc0512ac803e47dffa6fa96968138db519cdf8cbc95b1e6843162b7ae27dcb371962ea2d1abf2f63c064d23aa257f1c0d0845d2e446267382170edf4
6
+ metadata.gz: dd280f7ac3569ebeb254d5401e7dd299581a97ce40fb8d1fda64d0eb9d12c98da51e909e4ec94bead4f9b74e1e5475b5dfa880b8f8935949cf4264c02568b366
7
+ data.tar.gz: 6f0c878bdc2ab7f47cc3ae11fba94f4fa71d42b0b42cb7a8949b0c2a03f5854972882845a00ea61281c0b029222ccb6853dfdf1b68ad603bd4b34430ac6975e0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.69.0 (2025-12-23)
4
+
5
+ Full Changelog: [v1.68.0...v1.69.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.68.0...v1.69.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([702b110](https://github.com/dodopayments/dodopayments-ruby/commit/702b110a222abca719163c70b74ac5be66bee79f))
10
+
3
11
  ## 1.68.0 (2025-12-19)
4
12
 
5
13
  Full Changelog: [v1.67.2...v1.68.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.67.2...v1.68.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "dodopayments", "~> 1.68.0"
20
+ gem "dodopayments", "~> 1.69.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::ShortLinks#create
7
+ class ShortLinkCreateParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute slug
12
+ # Slug for the short link.
13
+ #
14
+ # @return [String]
15
+ required :slug, String
16
+
17
+ # @!attribute static_checkout_params
18
+ # Static Checkout URL parameters to apply to the resulting short URL.
19
+ #
20
+ # @return [Hash{Symbol=>String}, nil]
21
+ optional :static_checkout_params, Dodopayments::Internal::Type::HashOf[String], nil?: true
22
+
23
+ # @!method initialize(slug:, static_checkout_params: nil, request_options: {})
24
+ # Some parameter documentations has been truncated, see
25
+ # {Dodopayments::Models::Products::ShortLinkCreateParams} for more details.
26
+ #
27
+ # @param slug [String] Slug for the short link.
28
+ #
29
+ # @param static_checkout_params [Hash{Symbol=>String}, nil] Static Checkout URL parameters to apply to the resulting
30
+ #
31
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::ShortLinks#create
7
+ class ShortLinkCreateResponse < Dodopayments::Internal::Type::BaseModel
8
+ # @!attribute full_url
9
+ # Full URL.
10
+ #
11
+ # @return [String]
12
+ required :full_url, String
13
+
14
+ # @!attribute short_url
15
+ # Short URL.
16
+ #
17
+ # @return [String]
18
+ required :short_url, String
19
+
20
+ # @!method initialize(full_url:, short_url:)
21
+ # @param full_url [String] Full URL.
22
+ #
23
+ # @param short_url [String] Short URL.
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::ShortLinks#list
7
+ class ShortLinkListParams < Dodopayments::Internal::Type::BaseModel
8
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
+ include Dodopayments::Internal::Type::RequestParameters
10
+
11
+ # @!attribute page_number
12
+ # Page number default is 0
13
+ #
14
+ # @return [Integer, nil]
15
+ optional :page_number, Integer
16
+
17
+ # @!attribute page_size
18
+ # Page size default is 10 max is 100
19
+ #
20
+ # @return [Integer, nil]
21
+ optional :page_size, Integer
22
+
23
+ # @!attribute product_id
24
+ # Filter by product ID
25
+ #
26
+ # @return [String, nil]
27
+ optional :product_id, String
28
+
29
+ # @!method initialize(page_number: nil, page_size: nil, product_id: nil, request_options: {})
30
+ # @param page_number [Integer] Page number default is 0
31
+ #
32
+ # @param page_size [Integer] Page size default is 10 max is 100
33
+ #
34
+ # @param product_id [String] Filter by product ID
35
+ #
36
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ # @see Dodopayments::Resources::Products::ShortLinks#list
7
+ class ShortLinkListResponse < Dodopayments::Internal::Type::BaseModel
8
+ # @!attribute created_at
9
+ # When the short url was created
10
+ #
11
+ # @return [Time]
12
+ required :created_at, Time
13
+
14
+ # @!attribute full_url
15
+ # Full URL the short url redirects to
16
+ #
17
+ # @return [String]
18
+ required :full_url, String
19
+
20
+ # @!attribute product_id
21
+ # Product ID associated with the short link
22
+ #
23
+ # @return [String]
24
+ required :product_id, String
25
+
26
+ # @!attribute short_url
27
+ # Short URL
28
+ #
29
+ # @return [String]
30
+ required :short_url, String
31
+
32
+ # @!method initialize(created_at:, full_url:, product_id:, short_url:)
33
+ # @param created_at [Time] When the short url was created
34
+ #
35
+ # @param full_url [String] Full URL the short url redirects to
36
+ #
37
+ # @param product_id [String] Product ID associated with the short link
38
+ #
39
+ # @param short_url [String] Short URL
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Products
6
+ class ShortLinks
7
+ # Some parameter documentations has been truncated, see
8
+ # {Dodopayments::Models::Products::ShortLinkCreateParams} for more details.
9
+ #
10
+ # Gives a Short Checkout URL with custom slug for a product. Uses a Static
11
+ # Checkout URL under the hood.
12
+ #
13
+ # @overload create(id, slug:, static_checkout_params: nil, request_options: {})
14
+ #
15
+ # @param id [String] Product Id
16
+ #
17
+ # @param slug [String] Slug for the short link.
18
+ #
19
+ # @param static_checkout_params [Hash{Symbol=>String}, nil] Static Checkout URL parameters to apply to the resulting
20
+ #
21
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
22
+ #
23
+ # @return [Dodopayments::Models::Products::ShortLinkCreateResponse]
24
+ #
25
+ # @see Dodopayments::Models::Products::ShortLinkCreateParams
26
+ def create(id, params)
27
+ parsed, options = Dodopayments::Products::ShortLinkCreateParams.dump_request(params)
28
+ @client.request(
29
+ method: :post,
30
+ path: ["products/%1$s/short_links", id],
31
+ body: parsed,
32
+ model: Dodopayments::Models::Products::ShortLinkCreateResponse,
33
+ options: options
34
+ )
35
+ end
36
+
37
+ # Lists all short links created by the business.
38
+ #
39
+ # @overload list(page_number: nil, page_size: nil, product_id: nil, request_options: {})
40
+ #
41
+ # @param page_number [Integer] Page number default is 0
42
+ #
43
+ # @param page_size [Integer] Page size default is 10 max is 100
44
+ #
45
+ # @param product_id [String] Filter by product ID
46
+ #
47
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
48
+ #
49
+ # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::Products::ShortLinkListResponse>]
50
+ #
51
+ # @see Dodopayments::Models::Products::ShortLinkListParams
52
+ def list(params = {})
53
+ parsed, options = Dodopayments::Products::ShortLinkListParams.dump_request(params)
54
+ @client.request(
55
+ method: :get,
56
+ path: "products/short_links",
57
+ query: parsed,
58
+ page: Dodopayments::Internal::DefaultPageNumberPagination,
59
+ model: Dodopayments::Models::Products::ShortLinkListResponse,
60
+ options: options
61
+ )
62
+ end
63
+
64
+ # @api private
65
+ #
66
+ # @param client [Dodopayments::Client]
67
+ def initialize(client:)
68
+ @client = client
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -6,6 +6,9 @@ module Dodopayments
6
6
  # @return [Dodopayments::Resources::Products::Images]
7
7
  attr_reader :images
8
8
 
9
+ # @return [Dodopayments::Resources::Products::ShortLinks]
10
+ attr_reader :short_links
11
+
9
12
  # Some parameter documentations has been truncated, see
10
13
  # {Dodopayments::Models::ProductCreateParams} for more details.
11
14
  #
@@ -212,6 +215,7 @@ module Dodopayments
212
215
  def initialize(client:)
213
216
  @client = client
214
217
  @images = Dodopayments::Resources::Products::Images.new(client: client)
218
+ @short_links = Dodopayments::Resources::Products::ShortLinks.new(client: client)
215
219
  end
216
220
  end
217
221
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "1.68.0"
4
+ VERSION = "1.69.0"
5
5
  end
data/lib/dodopayments.rb CHANGED
@@ -192,6 +192,10 @@ require_relative "dodopayments/models/product_list_response"
192
192
  require_relative "dodopayments/models/product_retrieve_params"
193
193
  require_relative "dodopayments/models/products/image_update_params"
194
194
  require_relative "dodopayments/models/products/image_update_response"
195
+ require_relative "dodopayments/models/products/short_link_create_params"
196
+ require_relative "dodopayments/models/products/short_link_create_response"
197
+ require_relative "dodopayments/models/products/short_link_list_params"
198
+ require_relative "dodopayments/models/products/short_link_list_response"
195
199
  require_relative "dodopayments/models/product_unarchive_params"
196
200
  require_relative "dodopayments/models/product_update_files_params"
197
201
  require_relative "dodopayments/models/product_update_files_response"
@@ -281,6 +285,7 @@ require_relative "dodopayments/resources/payments"
281
285
  require_relative "dodopayments/resources/payouts"
282
286
  require_relative "dodopayments/resources/products"
283
287
  require_relative "dodopayments/resources/products/images"
288
+ require_relative "dodopayments/resources/products/short_links"
284
289
  require_relative "dodopayments/resources/refunds"
285
290
  require_relative "dodopayments/resources/subscriptions"
286
291
  require_relative "dodopayments/resources/usage_events"
@@ -0,0 +1,56 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkCreateParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::Products::ShortLinkCreateParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Slug for the short link.
19
+ sig { returns(String) }
20
+ attr_accessor :slug
21
+
22
+ # Static Checkout URL parameters to apply to the resulting short URL.
23
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
24
+ attr_accessor :static_checkout_params
25
+
26
+ sig do
27
+ params(
28
+ slug: String,
29
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
30
+ request_options: Dodopayments::RequestOptions::OrHash
31
+ ).returns(T.attached_class)
32
+ end
33
+ def self.new(
34
+ # Slug for the short link.
35
+ slug:,
36
+ # Static Checkout URL parameters to apply to the resulting short URL.
37
+ static_checkout_params: nil,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ sig do
43
+ override.returns(
44
+ {
45
+ slug: String,
46
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
47
+ request_options: Dodopayments::RequestOptions
48
+ }
49
+ )
50
+ end
51
+ def to_hash
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkCreateResponse < Dodopayments::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Dodopayments::Models::Products::ShortLinkCreateResponse,
11
+ Dodopayments::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Full URL.
16
+ sig { returns(String) }
17
+ attr_accessor :full_url
18
+
19
+ # Short URL.
20
+ sig { returns(String) }
21
+ attr_accessor :short_url
22
+
23
+ sig do
24
+ params(full_url: String, short_url: String).returns(T.attached_class)
25
+ end
26
+ def self.new(
27
+ # Full URL.
28
+ full_url:,
29
+ # Short URL.
30
+ short_url:
31
+ )
32
+ end
33
+
34
+ sig { override.returns({ full_url: String, short_url: String }) }
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,73 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkListParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Dodopayments::Products::ShortLinkListParams,
14
+ Dodopayments::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # Page number default is 0
19
+ sig { returns(T.nilable(Integer)) }
20
+ attr_reader :page_number
21
+
22
+ sig { params(page_number: Integer).void }
23
+ attr_writer :page_number
24
+
25
+ # Page size default is 10 max is 100
26
+ sig { returns(T.nilable(Integer)) }
27
+ attr_reader :page_size
28
+
29
+ sig { params(page_size: Integer).void }
30
+ attr_writer :page_size
31
+
32
+ # Filter by product ID
33
+ sig { returns(T.nilable(String)) }
34
+ attr_reader :product_id
35
+
36
+ sig { params(product_id: String).void }
37
+ attr_writer :product_id
38
+
39
+ sig do
40
+ params(
41
+ page_number: Integer,
42
+ page_size: Integer,
43
+ product_id: String,
44
+ request_options: Dodopayments::RequestOptions::OrHash
45
+ ).returns(T.attached_class)
46
+ end
47
+ def self.new(
48
+ # Page number default is 0
49
+ page_number: nil,
50
+ # Page size default is 10 max is 100
51
+ page_size: nil,
52
+ # Filter by product ID
53
+ product_id: nil,
54
+ request_options: {}
55
+ )
56
+ end
57
+
58
+ sig do
59
+ override.returns(
60
+ {
61
+ page_number: Integer,
62
+ page_size: Integer,
63
+ product_id: String,
64
+ request_options: Dodopayments::RequestOptions
65
+ }
66
+ )
67
+ end
68
+ def to_hash
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,66 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ module Products
6
+ class ShortLinkListResponse < Dodopayments::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Dodopayments::Models::Products::ShortLinkListResponse,
11
+ Dodopayments::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # When the short url was created
16
+ sig { returns(Time) }
17
+ attr_accessor :created_at
18
+
19
+ # Full URL the short url redirects to
20
+ sig { returns(String) }
21
+ attr_accessor :full_url
22
+
23
+ # Product ID associated with the short link
24
+ sig { returns(String) }
25
+ attr_accessor :product_id
26
+
27
+ # Short URL
28
+ sig { returns(String) }
29
+ attr_accessor :short_url
30
+
31
+ sig do
32
+ params(
33
+ created_at: Time,
34
+ full_url: String,
35
+ product_id: String,
36
+ short_url: String
37
+ ).returns(T.attached_class)
38
+ end
39
+ def self.new(
40
+ # When the short url was created
41
+ created_at:,
42
+ # Full URL the short url redirects to
43
+ full_url:,
44
+ # Product ID associated with the short link
45
+ product_id:,
46
+ # Short URL
47
+ short_url:
48
+ )
49
+ end
50
+
51
+ sig do
52
+ override.returns(
53
+ {
54
+ created_at: Time,
55
+ full_url: String,
56
+ product_id: String,
57
+ short_url: String
58
+ }
59
+ )
60
+ end
61
+ def to_hash
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Resources
5
+ class Products
6
+ class ShortLinks
7
+ # Gives a Short Checkout URL with custom slug for a product. Uses a Static
8
+ # Checkout URL under the hood.
9
+ sig do
10
+ params(
11
+ id: String,
12
+ slug: String,
13
+ static_checkout_params: T.nilable(T::Hash[Symbol, String]),
14
+ request_options: Dodopayments::RequestOptions::OrHash
15
+ ).returns(Dodopayments::Models::Products::ShortLinkCreateResponse)
16
+ end
17
+ def create(
18
+ # Product Id
19
+ id,
20
+ # Slug for the short link.
21
+ slug:,
22
+ # Static Checkout URL parameters to apply to the resulting short URL.
23
+ static_checkout_params: nil,
24
+ request_options: {}
25
+ )
26
+ end
27
+
28
+ # Lists all short links created by the business.
29
+ sig do
30
+ params(
31
+ page_number: Integer,
32
+ page_size: Integer,
33
+ product_id: String,
34
+ request_options: Dodopayments::RequestOptions::OrHash
35
+ ).returns(
36
+ Dodopayments::Internal::DefaultPageNumberPagination[
37
+ Dodopayments::Models::Products::ShortLinkListResponse
38
+ ]
39
+ )
40
+ end
41
+ def list(
42
+ # Page number default is 0
43
+ page_number: nil,
44
+ # Page size default is 10 max is 100
45
+ page_size: nil,
46
+ # Filter by product ID
47
+ product_id: nil,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ # @api private
53
+ sig { params(client: Dodopayments::Client).returns(T.attached_class) }
54
+ def self.new(client:)
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end
@@ -6,6 +6,9 @@ module Dodopayments
6
6
  sig { returns(Dodopayments::Resources::Products::Images) }
7
7
  attr_reader :images
8
8
 
9
+ sig { returns(Dodopayments::Resources::Products::ShortLinks) }
10
+ attr_reader :short_links
11
+
9
12
  sig do
10
13
  params(
11
14
  name: String,
@@ -0,0 +1,30 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_create_params =
5
+ { slug: String, static_checkout_params: ::Hash[Symbol, String]? }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class ShortLinkCreateParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor slug: String
13
+
14
+ attr_accessor static_checkout_params: ::Hash[Symbol, String]?
15
+
16
+ def initialize: (
17
+ slug: String,
18
+ ?static_checkout_params: ::Hash[Symbol, String]?,
19
+ ?request_options: Dodopayments::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ slug: String,
24
+ static_checkout_params: ::Hash[Symbol, String]?,
25
+ request_options: Dodopayments::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,17 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_create_response = { full_url: String, short_url: String }
5
+
6
+ class ShortLinkCreateResponse < Dodopayments::Internal::Type::BaseModel
7
+ attr_accessor full_url: String
8
+
9
+ attr_accessor short_url: String
10
+
11
+ def initialize: (full_url: String, short_url: String) -> void
12
+
13
+ def to_hash: -> { full_url: String, short_url: String }
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,40 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_list_params =
5
+ { page_number: Integer, page_size: Integer, product_id: String }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class ShortLinkListParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_reader page_number: Integer?
13
+
14
+ def page_number=: (Integer) -> Integer
15
+
16
+ attr_reader page_size: Integer?
17
+
18
+ def page_size=: (Integer) -> Integer
19
+
20
+ attr_reader product_id: String?
21
+
22
+ def product_id=: (String) -> String
23
+
24
+ def initialize: (
25
+ ?page_number: Integer,
26
+ ?page_size: Integer,
27
+ ?product_id: String,
28
+ ?request_options: Dodopayments::request_opts
29
+ ) -> void
30
+
31
+ def to_hash: -> {
32
+ page_number: Integer,
33
+ page_size: Integer,
34
+ product_id: String,
35
+ request_options: Dodopayments::RequestOptions
36
+ }
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,37 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type short_link_list_response =
5
+ {
6
+ created_at: Time,
7
+ full_url: String,
8
+ product_id: String,
9
+ short_url: String
10
+ }
11
+
12
+ class ShortLinkListResponse < Dodopayments::Internal::Type::BaseModel
13
+ attr_accessor created_at: Time
14
+
15
+ attr_accessor full_url: String
16
+
17
+ attr_accessor product_id: String
18
+
19
+ attr_accessor short_url: String
20
+
21
+ def initialize: (
22
+ created_at: Time,
23
+ full_url: String,
24
+ product_id: String,
25
+ short_url: String
26
+ ) -> void
27
+
28
+ def to_hash: -> {
29
+ created_at: Time,
30
+ full_url: String,
31
+ product_id: String,
32
+ short_url: String
33
+ }
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,23 @@
1
+ module Dodopayments
2
+ module Resources
3
+ class Products
4
+ class ShortLinks
5
+ def create: (
6
+ String id,
7
+ slug: String,
8
+ ?static_checkout_params: ::Hash[Symbol, String]?,
9
+ ?request_options: Dodopayments::request_opts
10
+ ) -> Dodopayments::Models::Products::ShortLinkCreateResponse
11
+
12
+ def list: (
13
+ ?page_number: Integer,
14
+ ?page_size: Integer,
15
+ ?product_id: String,
16
+ ?request_options: Dodopayments::request_opts
17
+ ) -> Dodopayments::Internal::DefaultPageNumberPagination[Dodopayments::Models::Products::ShortLinkListResponse]
18
+
19
+ def initialize: (client: Dodopayments::Client) -> void
20
+ end
21
+ end
22
+ end
23
+ end
@@ -3,6 +3,8 @@ module Dodopayments
3
3
  class Products
4
4
  attr_reader images: Dodopayments::Resources::Products::Images
5
5
 
6
+ attr_reader short_links: Dodopayments::Resources::Products::ShortLinks
7
+
6
8
  def create: (
7
9
  name: String,
8
10
  price: Dodopayments::Models::price,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dodopayments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.68.0
4
+ version: 1.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dodo Payments
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-19 00:00:00.000000000 Z
11
+ date: 2025-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -185,6 +185,10 @@ files:
185
185
  - lib/dodopayments/models/product_update_params.rb
186
186
  - lib/dodopayments/models/products/image_update_params.rb
187
187
  - lib/dodopayments/models/products/image_update_response.rb
188
+ - lib/dodopayments/models/products/short_link_create_params.rb
189
+ - lib/dodopayments/models/products/short_link_create_response.rb
190
+ - lib/dodopayments/models/products/short_link_list_params.rb
191
+ - lib/dodopayments/models/products/short_link_list_response.rb
188
192
  - lib/dodopayments/models/refund.rb
189
193
  - lib/dodopayments/models/refund_create_params.rb
190
194
  - lib/dodopayments/models/refund_failed_webhook_event.rb
@@ -262,6 +266,7 @@ files:
262
266
  - lib/dodopayments/resources/payouts.rb
263
267
  - lib/dodopayments/resources/products.rb
264
268
  - lib/dodopayments/resources/products/images.rb
269
+ - lib/dodopayments/resources/products/short_links.rb
265
270
  - lib/dodopayments/resources/refunds.rb
266
271
  - lib/dodopayments/resources/subscriptions.rb
267
272
  - lib/dodopayments/resources/usage_events.rb
@@ -419,6 +424,10 @@ files:
419
424
  - rbi/dodopayments/models/product_update_params.rbi
420
425
  - rbi/dodopayments/models/products/image_update_params.rbi
421
426
  - rbi/dodopayments/models/products/image_update_response.rbi
427
+ - rbi/dodopayments/models/products/short_link_create_params.rbi
428
+ - rbi/dodopayments/models/products/short_link_create_response.rbi
429
+ - rbi/dodopayments/models/products/short_link_list_params.rbi
430
+ - rbi/dodopayments/models/products/short_link_list_response.rbi
422
431
  - rbi/dodopayments/models/refund.rbi
423
432
  - rbi/dodopayments/models/refund_create_params.rbi
424
433
  - rbi/dodopayments/models/refund_failed_webhook_event.rbi
@@ -496,6 +505,7 @@ files:
496
505
  - rbi/dodopayments/resources/payouts.rbi
497
506
  - rbi/dodopayments/resources/products.rbi
498
507
  - rbi/dodopayments/resources/products/images.rbi
508
+ - rbi/dodopayments/resources/products/short_links.rbi
499
509
  - rbi/dodopayments/resources/refunds.rbi
500
510
  - rbi/dodopayments/resources/subscriptions.rbi
501
511
  - rbi/dodopayments/resources/usage_events.rbi
@@ -652,6 +662,10 @@ files:
652
662
  - sig/dodopayments/models/product_update_params.rbs
653
663
  - sig/dodopayments/models/products/image_update_params.rbs
654
664
  - sig/dodopayments/models/products/image_update_response.rbs
665
+ - sig/dodopayments/models/products/short_link_create_params.rbs
666
+ - sig/dodopayments/models/products/short_link_create_response.rbs
667
+ - sig/dodopayments/models/products/short_link_list_params.rbs
668
+ - sig/dodopayments/models/products/short_link_list_response.rbs
655
669
  - sig/dodopayments/models/refund.rbs
656
670
  - sig/dodopayments/models/refund_create_params.rbs
657
671
  - sig/dodopayments/models/refund_failed_webhook_event.rbs
@@ -729,6 +743,7 @@ files:
729
743
  - sig/dodopayments/resources/payouts.rbs
730
744
  - sig/dodopayments/resources/products.rbs
731
745
  - sig/dodopayments/resources/products/images.rbs
746
+ - sig/dodopayments/resources/products/short_links.rbs
732
747
  - sig/dodopayments/resources/refunds.rbs
733
748
  - sig/dodopayments/resources/subscriptions.rbs
734
749
  - sig/dodopayments/resources/usage_events.rbs