dodopayments 2.19.0 → 2.20.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: 0a1c544a4176c7c0714185ca6adf9c37fb36def28490b0ab142787bc2b3adf84
4
- data.tar.gz: 526d3979f72eb82772a3fdc05d77a8a083a720dc38346e492829e6343491df90
3
+ metadata.gz: e2cd02edaf02bbba60396ecdaa61838414cc46e8358d17a40e7f1b105dc82dc5
4
+ data.tar.gz: 57d5217495e2ea04533e49716dbffc5b0407bf17f53610b53de90e7bb13293e8
5
5
  SHA512:
6
- metadata.gz: fa2892ef06e81edaf152d83e460f117ba34c634984f4321240806f531f2a4f48bcea530b0478961afaa7b6c5e0ff0fe4da306abf55307350ae720cf280d700a2
7
- data.tar.gz: e2523d71b90539c1919ea64fb6699e90e324bfdeef17567851a8d1e0fab41783f18095ecec460d02fde838c599f62ae6f633190b40e78a8a2bd819d1e3665b42
6
+ metadata.gz: c66c1e27ffe9b8b5cf488eff8c2e68fd9014db0d390fd1280f78bca1b033e5cca47a1676c54059cebd7c338f83bc0cc052c55a3c33e27d5d7bcc063df30923ad
7
+ data.tar.gz: ea64df9520da5a12eb56386bd771376624a4bfcfdda8225d823270d6fb687e5876b53c1435f3d3479197f8df4127f20e4a652357af15b369d24b5a594b406c3a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.20.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.19.0...v2.20.0) (2026-07-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add subscription period override fields to subscription update ([78fe4eb](https://github.com/dodopayments/dodopayments-ruby/commit/78fe4ebc8d7a9af07327b52ab68dc518d46386bd))
9
+ * **api:** add subscription period override fields to subscription update ([31f78a6](https://github.com/dodopayments/dodopayments-ruby/commit/31f78a62a6a27270e94d785e75ad7c686efba7e8))
10
+
3
11
  ## [2.19.0](https://github.com/dodopayments/dodopayments-ruby/compare/v2.18.1...v2.19.0) (2026-07-04)
4
12
 
5
13
 
data/README.md CHANGED
@@ -23,7 +23,7 @@ To use this gem, install via Bundler by adding the following to your application
23
23
  <!-- x-release-please-start-version -->
24
24
 
25
25
  ```ruby
26
- gem "dodopayments", "~> 2.19.0"
26
+ gem "dodopayments", "~> 2.20.0"
27
27
  ```
28
28
 
29
29
  <!-- x-release-please-end -->
@@ -25,7 +25,8 @@ module Dodopayments
25
25
  optional :description, String, nil?: true
26
26
 
27
27
  # @!attribute image_id
28
- # Addon image id after its uploaded to S3
28
+ # Addon image id after its uploaded to S3. Pass `null` to remove the existing
29
+ # image, omit to keep it unchanged.
29
30
  #
30
31
  # @return [String, nil]
31
32
  optional :image_id, String, nil?: true
@@ -49,13 +50,16 @@ module Dodopayments
49
50
  optional :tax_category, enum: -> { Dodopayments::TaxCategory }, nil?: true
50
51
 
51
52
  # @!method initialize(id:, currency: nil, description: nil, image_id: nil, name: nil, price: nil, tax_category: nil, request_options: {})
53
+ # Some parameter documentations has been truncated, see
54
+ # {Dodopayments::Models::AddonUpdateParams} for more details.
55
+ #
52
56
  # @param id [String]
53
57
  #
54
58
  # @param currency [Symbol, Dodopayments::Models::Currency, nil] The currency of the Addon
55
59
  #
56
60
  # @param description [String, nil] Description of the Addon, optional and must be at most 1000 characters.
57
61
  #
58
- # @param image_id [String, nil] Addon image id after its uploaded to S3
62
+ # @param image_id [String, nil] Addon image id after its uploaded to S3.
59
63
  #
60
64
  # @param name [String, nil] Name of the Addon, optional and must be at most 100 characters.
61
65
  #
@@ -89,12 +89,29 @@ module Dodopayments
89
89
  # @return [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
90
90
  optional :status, enum: -> { Dodopayments::SubscriptionStatus }, nil?: true
91
91
 
92
+ # @!attribute subscription_period_count
93
+ # New number of `subscription_period_interval` units the subscription entitlement
94
+ # should span. Used together with `subscription_period_interval` to extend the
95
+ # subscription period. The resulting period must not be shorter than the current
96
+ # one (this endpoint only extends).
97
+ #
98
+ # @return [Integer, nil]
99
+ optional :subscription_period_count, Integer, nil?: true
100
+
101
+ # @!attribute subscription_period_interval
102
+ # New interval unit for the subscription period. When changing the period, this
103
+ # may be supplied alongside `subscription_period_count`; if omitted the existing
104
+ # interval is retained.
105
+ #
106
+ # @return [Symbol, Dodopayments::Models::TimeInterval, nil]
107
+ optional :subscription_period_interval, enum: -> { Dodopayments::TimeInterval }, nil?: true
108
+
92
109
  # @!attribute tax_id
93
110
  #
94
111
  # @return [String, nil]
95
112
  optional :tax_id, String, nil?: true
96
113
 
97
- # @!method initialize(subscription_id:, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
114
+ # @!method initialize(subscription_id:, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, subscription_period_count: nil, subscription_period_interval: nil, tax_id: nil, request_options: {})
98
115
  # Some parameter documentations has been truncated, see
99
116
  # {Dodopayments::Models::SubscriptionUpdateParams} for more details.
100
117
  #
@@ -124,6 +141,10 @@ module Dodopayments
124
141
  #
125
142
  # @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
126
143
  #
144
+ # @param subscription_period_count [Integer, nil] New number of `subscription_period_interval` units the subscription
145
+ #
146
+ # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval, nil] New interval unit for the subscription period. When changing the period,
147
+ #
127
148
  # @param tax_id [String, nil]
128
149
  #
129
150
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
@@ -49,6 +49,9 @@ module Dodopayments
49
49
  )
50
50
  end
51
51
 
52
+ # Some parameter documentations has been truncated, see
53
+ # {Dodopayments::Models::AddonUpdateParams} for more details.
54
+ #
52
55
  # @overload update(id, currency: nil, description: nil, image_id: nil, name: nil, price: nil, tax_category: nil, request_options: {})
53
56
  #
54
57
  # @param id [String] Addon Id
@@ -57,7 +60,7 @@ module Dodopayments
57
60
  #
58
61
  # @param description [String, nil] Description of the Addon, optional and must be at most 1000 characters.
59
62
  #
60
- # @param image_id [String, nil] Addon image id after its uploaded to S3
63
+ # @param image_id [String, nil] Addon image id after its uploaded to S3.
61
64
  #
62
65
  # @param name [String, nil] Name of the Addon, optional and must be at most 100 characters.
63
66
  #
@@ -95,7 +95,7 @@ module Dodopayments
95
95
  # Some parameter documentations has been truncated, see
96
96
  # {Dodopayments::Models::SubscriptionUpdateParams} for more details.
97
97
  #
98
- # @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
98
+ # @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, cancel_reason: nil, cancellation_comment: nil, cancellation_feedback: nil, credit_entitlement_cart: nil, customer_business_name: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, subscription_period_count: nil, subscription_period_interval: nil, tax_id: nil, request_options: {})
99
99
  #
100
100
  # @param subscription_id [String] Subscription Id
101
101
  #
@@ -123,6 +123,10 @@ module Dodopayments
123
123
  #
124
124
  # @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
125
125
  #
126
+ # @param subscription_period_count [Integer, nil] New number of `subscription_period_interval` units the subscription
127
+ #
128
+ # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval, nil] New interval unit for the subscription period. When changing the period,
129
+ #
126
130
  # @param tax_id [String, nil]
127
131
  #
128
132
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "2.19.0"
4
+ VERSION = "2.20.0"
5
5
  end
@@ -25,7 +25,8 @@ module Dodopayments
25
25
  sig { returns(T.nilable(String)) }
26
26
  attr_accessor :description
27
27
 
28
- # Addon image id after its uploaded to S3
28
+ # Addon image id after its uploaded to S3. Pass `null` to remove the existing
29
+ # image, omit to keep it unchanged.
29
30
  sig { returns(T.nilable(String)) }
30
31
  attr_accessor :image_id
31
32
 
@@ -59,7 +60,8 @@ module Dodopayments
59
60
  currency: nil,
60
61
  # Description of the Addon, optional and must be at most 1000 characters.
61
62
  description: nil,
62
- # Addon image id after its uploaded to S3
63
+ # Addon image id after its uploaded to S3. Pass `null` to remove the existing
64
+ # image, omit to keep it unchanged.
63
65
  image_id: nil,
64
66
  # Name of the Addon, optional and must be at most 100 characters.
65
67
  name: nil,
@@ -101,6 +101,19 @@ module Dodopayments
101
101
  sig { returns(T.nilable(Dodopayments::SubscriptionStatus::OrSymbol)) }
102
102
  attr_accessor :status
103
103
 
104
+ # New number of `subscription_period_interval` units the subscription entitlement
105
+ # should span. Used together with `subscription_period_interval` to extend the
106
+ # subscription period. The resulting period must not be shorter than the current
107
+ # one (this endpoint only extends).
108
+ sig { returns(T.nilable(Integer)) }
109
+ attr_accessor :subscription_period_count
110
+
111
+ # New interval unit for the subscription period. When changing the period, this
112
+ # may be supplied alongside `subscription_period_count`; if omitted the existing
113
+ # interval is retained.
114
+ sig { returns(T.nilable(Dodopayments::TimeInterval::OrSymbol)) }
115
+ attr_accessor :subscription_period_interval
116
+
104
117
  sig { returns(T.nilable(String)) }
105
118
  attr_accessor :tax_id
106
119
 
@@ -132,6 +145,9 @@ module Dodopayments
132
145
  T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
133
146
  next_billing_date: T.nilable(Time),
134
147
  status: T.nilable(Dodopayments::SubscriptionStatus::OrSymbol),
148
+ subscription_period_count: T.nilable(Integer),
149
+ subscription_period_interval:
150
+ T.nilable(Dodopayments::TimeInterval::OrSymbol),
135
151
  tax_id: T.nilable(String),
136
152
  request_options: Dodopayments::RequestOptions::OrHash
137
153
  ).returns(T.attached_class)
@@ -161,6 +177,15 @@ module Dodopayments
161
177
  metadata: nil,
162
178
  next_billing_date: nil,
163
179
  status: nil,
180
+ # New number of `subscription_period_interval` units the subscription entitlement
181
+ # should span. Used together with `subscription_period_interval` to extend the
182
+ # subscription period. The resulting period must not be shorter than the current
183
+ # one (this endpoint only extends).
184
+ subscription_period_count: nil,
185
+ # New interval unit for the subscription period. When changing the period, this
186
+ # may be supplied alongside `subscription_period_count`; if omitted the existing
187
+ # interval is retained.
188
+ subscription_period_interval: nil,
164
189
  tax_id: nil,
165
190
  request_options: {}
166
191
  )
@@ -195,6 +220,9 @@ module Dodopayments
195
220
  T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
196
221
  next_billing_date: T.nilable(Time),
197
222
  status: T.nilable(Dodopayments::SubscriptionStatus::OrSymbol),
223
+ subscription_period_count: T.nilable(Integer),
224
+ subscription_period_interval:
225
+ T.nilable(Dodopayments::TimeInterval::OrSymbol),
198
226
  tax_id: T.nilable(String),
199
227
  request_options: Dodopayments::RequestOptions
200
228
  }
@@ -60,7 +60,8 @@ module Dodopayments
60
60
  currency: nil,
61
61
  # Description of the Addon, optional and must be at most 1000 characters.
62
62
  description: nil,
63
- # Addon image id after its uploaded to S3
63
+ # Addon image id after its uploaded to S3. Pass `null` to remove the existing
64
+ # image, omit to keep it unchanged.
64
65
  image_id: nil,
65
66
  # Name of the Addon, optional and must be at most 100 characters.
66
67
  name: nil,
@@ -154,6 +154,9 @@ module Dodopayments
154
154
  T.nilable(T::Hash[Symbol, Dodopayments::MetadataItem::Variants]),
155
155
  next_billing_date: T.nilable(Time),
156
156
  status: T.nilable(Dodopayments::SubscriptionStatus::OrSymbol),
157
+ subscription_period_count: T.nilable(Integer),
158
+ subscription_period_interval:
159
+ T.nilable(Dodopayments::TimeInterval::OrSymbol),
157
160
  tax_id: T.nilable(String),
158
161
  request_options: Dodopayments::RequestOptions::OrHash
159
162
  ).returns(Dodopayments::Subscription)
@@ -184,6 +187,15 @@ module Dodopayments
184
187
  metadata: nil,
185
188
  next_billing_date: nil,
186
189
  status: nil,
190
+ # New number of `subscription_period_interval` units the subscription entitlement
191
+ # should span. Used together with `subscription_period_interval` to extend the
192
+ # subscription period. The resulting period must not be shorter than the current
193
+ # one (this endpoint only extends).
194
+ subscription_period_count: nil,
195
+ # New interval unit for the subscription period. When changing the period, this
196
+ # may be supplied alongside `subscription_period_count`; if omitted the existing
197
+ # interval is retained.
198
+ subscription_period_interval: nil,
187
199
  tax_id: nil,
188
200
  request_options: {}
189
201
  )
@@ -15,6 +15,8 @@ module Dodopayments
15
15
  metadata: Dodopayments::Models::metadata?,
16
16
  next_billing_date: Time?,
17
17
  status: Dodopayments::Models::subscription_status?,
18
+ subscription_period_count: Integer?,
19
+ subscription_period_interval: Dodopayments::Models::time_interval?,
18
20
  tax_id: String?
19
21
  }
20
22
  & Dodopayments::Internal::Type::request_parameters
@@ -49,6 +51,10 @@ module Dodopayments
49
51
 
50
52
  attr_accessor status: Dodopayments::Models::subscription_status?
51
53
 
54
+ attr_accessor subscription_period_count: Integer?
55
+
56
+ attr_accessor subscription_period_interval: Dodopayments::Models::time_interval?
57
+
52
58
  attr_accessor tax_id: String?
53
59
 
54
60
  def initialize: (
@@ -65,6 +71,8 @@ module Dodopayments
65
71
  ?metadata: Dodopayments::Models::metadata?,
66
72
  ?next_billing_date: Time?,
67
73
  ?status: Dodopayments::Models::subscription_status?,
74
+ ?subscription_period_count: Integer?,
75
+ ?subscription_period_interval: Dodopayments::Models::time_interval?,
68
76
  ?tax_id: String?,
69
77
  ?request_options: Dodopayments::request_opts
70
78
  ) -> void
@@ -83,6 +91,8 @@ module Dodopayments
83
91
  metadata: Dodopayments::Models::metadata?,
84
92
  next_billing_date: Time?,
85
93
  status: Dodopayments::Models::subscription_status?,
94
+ subscription_period_count: Integer?,
95
+ subscription_period_interval: Dodopayments::Models::time_interval?,
86
96
  tax_id: String?,
87
97
  request_options: Dodopayments::RequestOptions
88
98
  }
@@ -48,6 +48,8 @@ module Dodopayments
48
48
  ?metadata: Dodopayments::Models::metadata?,
49
49
  ?next_billing_date: Time?,
50
50
  ?status: Dodopayments::Models::subscription_status?,
51
+ ?subscription_period_count: Integer?,
52
+ ?subscription_period_interval: Dodopayments::Models::time_interval?,
51
53
  ?tax_id: String?,
52
54
  ?request_options: Dodopayments::request_opts
53
55
  ) -> Dodopayments::Subscription
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: 2.19.0
4
+ version: 2.20.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: 2026-07-04 00:00:00.000000000 Z
11
+ date: 2026-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi