dodopayments 1.56.0 → 1.56.3

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.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/models/checkout_session_retrieve_params.rb +14 -0
  5. data/lib/dodopayments/models/checkout_session_status.rb +64 -0
  6. data/lib/dodopayments/models/payment_method_types.rb +1 -0
  7. data/lib/dodopayments/models/refund.rb +9 -1
  8. data/lib/dodopayments/models/refund_create_params.rb +9 -1
  9. data/lib/dodopayments/models/subscription_update_params.rb +8 -1
  10. data/lib/dodopayments/models.rb +4 -0
  11. data/lib/dodopayments/resources/checkout_sessions.rb +17 -0
  12. data/lib/dodopayments/resources/refunds.rb +3 -1
  13. data/lib/dodopayments/resources/subscriptions.rb +3 -1
  14. data/lib/dodopayments/version.rb +1 -1
  15. data/lib/dodopayments.rb +2 -0
  16. data/rbi/dodopayments/models/checkout_session_retrieve_params.rbi +32 -0
  17. data/rbi/dodopayments/models/checkout_session_status.rbi +88 -0
  18. data/rbi/dodopayments/models/payment_method_types.rbi +1 -0
  19. data/rbi/dodopayments/models/refund.rbi +8 -0
  20. data/rbi/dodopayments/models/refund_create_params.rbi +11 -0
  21. data/rbi/dodopayments/models/subscription_update_params.rbi +6 -0
  22. data/rbi/dodopayments/models.rbi +5 -0
  23. data/rbi/dodopayments/resources/checkout_sessions.rbi +9 -0
  24. data/rbi/dodopayments/resources/refunds.rbi +3 -0
  25. data/rbi/dodopayments/resources/subscriptions.rbi +2 -0
  26. data/sig/dodopayments/models/checkout_session_retrieve_params.rbs +15 -0
  27. data/sig/dodopayments/models/checkout_session_status.rbs +45 -0
  28. data/sig/dodopayments/models/payment_method_types.rbs +2 -0
  29. data/sig/dodopayments/models/refund.rbs +5 -0
  30. data/sig/dodopayments/models/refund_create_params.rbs +7 -0
  31. data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
  32. data/sig/dodopayments/models.rbs +4 -0
  33. data/sig/dodopayments/resources/checkout_sessions.rbs +5 -0
  34. data/sig/dodopayments/resources/refunds.rbs +1 -0
  35. data/sig/dodopayments/resources/subscriptions.rbs +1 -0
  36. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce3e5943f7a051da09468b89769723b9a1ec3c8e985572676ac5ccbf1b9d6ad4
4
- data.tar.gz: 244eb00a4c80ec77cf6aaffe5dea51207b4ebecf2afc310a26791f9471dcf997
3
+ metadata.gz: cce501b48b61829f70d3d0d1e8e03862a505cdf2a1c628e146f951085c9df0b9
4
+ data.tar.gz: f0412008c77faed9c7e8ec7ada5fdd4c4030364de29fe3b9b2a31dac5c13a5c9
5
5
  SHA512:
6
- metadata.gz: a5ce6a84b5bf1224822d61c145e43ff3061bfbb5c8b7e8193e7ee929e94bf968e0129db2320c08862b49d21f2a2e53be13b0ace6f484d27b0b287d111a60f667
7
- data.tar.gz: 78ff2e68c238a62dc345a945ac0f0c36123043cc36a83dccbc78143d6d5ac71667334b5af3d981203d8425e79162daede453b00f0d40c8e8ab58a830e8e99b3e
6
+ metadata.gz: ede618c7672f91de7e1d0237c965398a76e46acfdb31091547d8a4a32c2db22c66e44f1420ea55b35bf5287c5f0d38d58721cd8b6af3c3420ab7848fc1dce6ad
7
+ data.tar.gz: acac1e750dab7664afd9c898a4166a1aaa2336ea12d7c1388e1cfa233e35999a6e95000528e9868f0df8c20a0f28e0daa115b2e7e1f25a635e2d4fc6fb68da63
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.56.3 (2025-10-29)
4
+
5
+ Full Changelog: [v1.56.2...v1.56.3](https://github.com/dodopayments/dodopayments-ruby/compare/v1.56.2...v1.56.3)
6
+
7
+ ### Features
8
+
9
+ * **api:** updated openapi spec to v1.56.3 ([b4f67da](https://github.com/dodopayments/dodopayments-ruby/commit/b4f67dac21364d32b4d4f8de5a14a237747edf1a))
10
+
11
+ ## 1.56.2 (2025-10-27)
12
+
13
+ Full Changelog: [v1.56.0...v1.56.2](https://github.com/dodopayments/dodopayments-ruby/compare/v1.56.0...v1.56.2)
14
+
15
+ ### Features
16
+
17
+ * **api:** updated to openapi spec v1.56.0 ([e734ebf](https://github.com/dodopayments/dodopayments-ruby/commit/e734ebfd1718a0cfda521a01c71dc0b7faf4a1cd))
18
+
3
19
  ## 1.56.0 (2025-10-25)
4
20
 
5
21
  Full Changelog: [v1.55.8...v1.56.0](https://github.com/dodopayments/dodopayments-ruby/compare/v1.55.8...v1.56.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.56.0"
20
+ gem "dodopayments", "~> 1.56.3"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::CheckoutSessions#retrieve
6
+ class CheckoutSessionRetrieveParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::CheckoutSessions#retrieve
6
+ class CheckoutSessionStatus < Dodopayments::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # Id of the checkout session
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute created_at
14
+ # Created at timestamp
15
+ #
16
+ # @return [Time]
17
+ required :created_at, Time
18
+
19
+ # @!attribute customer_email
20
+ # Customer email: prefers payment's customer, falls back to session
21
+ #
22
+ # @return [String, nil]
23
+ optional :customer_email, String, nil?: true
24
+
25
+ # @!attribute customer_name
26
+ # Customer name: prefers payment's customer, falls back to session
27
+ #
28
+ # @return [String, nil]
29
+ optional :customer_name, String, nil?: true
30
+
31
+ # @!attribute payment_id
32
+ # Id of the payment created by the checkout sessions.
33
+ #
34
+ # Null if checkout sessions is still at the details collection stage.
35
+ #
36
+ # @return [String, nil]
37
+ optional :payment_id, String, nil?: true
38
+
39
+ # @!attribute payment_status
40
+ # status of the payment.
41
+ #
42
+ # Null if checkout sessions is still at the details collection stage.
43
+ #
44
+ # @return [Symbol, Dodopayments::Models::IntentStatus, nil]
45
+ optional :payment_status, enum: -> { Dodopayments::IntentStatus }, nil?: true
46
+
47
+ # @!method initialize(id:, created_at:, customer_email: nil, customer_name: nil, payment_id: nil, payment_status: nil)
48
+ # Some parameter documentations has been truncated, see
49
+ # {Dodopayments::Models::CheckoutSessionStatus} for more details.
50
+ #
51
+ # @param id [String] Id of the checkout session
52
+ #
53
+ # @param created_at [Time] Created at timestamp
54
+ #
55
+ # @param customer_email [String, nil] Customer email: prefers payment's customer, falls back to session
56
+ #
57
+ # @param customer_name [String, nil] Customer name: prefers payment's customer, falls back to session
58
+ #
59
+ # @param payment_id [String, nil] Id of the payment created by the checkout sessions.
60
+ #
61
+ # @param payment_status [Symbol, Dodopayments::Models::IntentStatus, nil] status of the payment.
62
+ end
63
+ end
64
+ end
@@ -17,6 +17,7 @@ module Dodopayments
17
17
  EPS = :eps
18
18
  IDEAL = :ideal
19
19
  PRZELEWY24 = :przelewy24
20
+ PAYPAL = :paypal
20
21
  AFFIRM = :affirm
21
22
  KLARNA = :klarna
22
23
  SEPA = :sepa
@@ -28,6 +28,12 @@ module Dodopayments
28
28
  # @return [Boolean]
29
29
  required :is_partial, Dodopayments::Internal::Type::Boolean
30
30
 
31
+ # @!attribute metadata
32
+ # Additional metadata stored with the refund.
33
+ #
34
+ # @return [Hash{Symbol=>String}]
35
+ required :metadata, Dodopayments::Internal::Type::HashOf[String]
36
+
31
37
  # @!attribute payment_id
32
38
  # The unique identifier of the payment associated with the refund.
33
39
  #
@@ -64,7 +70,7 @@ module Dodopayments
64
70
  # @return [String, nil]
65
71
  optional :reason, String, nil?: true
66
72
 
67
- # @!method initialize(business_id:, created_at:, customer:, is_partial:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
73
+ # @!method initialize(business_id:, created_at:, customer:, is_partial:, metadata:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
68
74
  # @param business_id [String] The unique identifier of the business issuing the refund.
69
75
  #
70
76
  # @param created_at [Time] The timestamp of when the refund was created in UTC.
@@ -73,6 +79,8 @@ module Dodopayments
73
79
  #
74
80
  # @param is_partial [Boolean] If true the refund is a partial refund
75
81
  #
82
+ # @param metadata [Hash{Symbol=>String}] Additional metadata stored with the refund.
83
+ #
76
84
  # @param payment_id [String] The unique identifier of the payment associated with the refund.
77
85
  #
78
86
  # @param refund_id [String] The unique identifier of the refund.
@@ -21,17 +21,25 @@ module Dodopayments
21
21
  -> { Dodopayments::Internal::Type::ArrayOf[Dodopayments::RefundCreateParams::Item] },
22
22
  nil?: true
23
23
 
24
+ # @!attribute metadata
25
+ # Additional metadata associated with the refund.
26
+ #
27
+ # @return [Hash{Symbol=>String}, nil]
28
+ optional :metadata, Dodopayments::Internal::Type::HashOf[String]
29
+
24
30
  # @!attribute reason
25
31
  # The reason for the refund, if any. Maximum length is 3000 characters. Optional.
26
32
  #
27
33
  # @return [String, nil]
28
34
  optional :reason, String, nil?: true
29
35
 
30
- # @!method initialize(payment_id:, items: nil, reason: nil, request_options: {})
36
+ # @!method initialize(payment_id:, items: nil, metadata: nil, reason: nil, request_options: {})
31
37
  # @param payment_id [String] The unique identifier of the payment to be refunded.
32
38
  #
33
39
  # @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
34
40
  #
41
+ # @param metadata [Hash{Symbol=>String}] Additional metadata associated with the refund.
42
+ #
35
43
  # @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
36
44
  #
37
45
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
@@ -18,6 +18,11 @@ module Dodopayments
18
18
  # @return [Boolean, nil]
19
19
  optional :cancel_at_next_billing_date, Dodopayments::Internal::Type::Boolean, nil?: true
20
20
 
21
+ # @!attribute customer_name
22
+ #
23
+ # @return [String, nil]
24
+ optional :customer_name, String, nil?: true
25
+
21
26
  # @!attribute disable_on_demand
22
27
  #
23
28
  # @return [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
@@ -43,11 +48,13 @@ module Dodopayments
43
48
  # @return [String, nil]
44
49
  optional :tax_id, String, nil?: true
45
50
 
46
- # @!method initialize(billing: nil, cancel_at_next_billing_date: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
51
+ # @!method initialize(billing: nil, cancel_at_next_billing_date: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
47
52
  # @param billing [Dodopayments::Models::BillingAddress, nil]
48
53
  #
49
54
  # @param cancel_at_next_billing_date [Boolean, nil] When set, the subscription will remain active until the end of billing period
50
55
  #
56
+ # @param customer_name [String, nil]
57
+ #
51
58
  # @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
52
59
  #
53
60
  # @param metadata [Hash{Symbol=>String}, nil]
@@ -79,6 +79,10 @@ module Dodopayments
79
79
 
80
80
  CheckoutSessionResponse = Dodopayments::Models::CheckoutSessionResponse
81
81
 
82
+ CheckoutSessionRetrieveParams = Dodopayments::Models::CheckoutSessionRetrieveParams
83
+
84
+ CheckoutSessionStatus = Dodopayments::Models::CheckoutSessionStatus
85
+
82
86
  CountryCode = Dodopayments::Models::CountryCode
83
87
 
84
88
  CreateNewCustomer = Dodopayments::Models::CreateNewCustomer
@@ -52,6 +52,23 @@ module Dodopayments
52
52
  )
53
53
  end
54
54
 
55
+ # @overload retrieve(id, request_options: {})
56
+ #
57
+ # @param id [String]
58
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
59
+ #
60
+ # @return [Dodopayments::Models::CheckoutSessionStatus]
61
+ #
62
+ # @see Dodopayments::Models::CheckoutSessionRetrieveParams
63
+ def retrieve(id, params = {})
64
+ @client.request(
65
+ method: :get,
66
+ path: ["checkouts/%1$s", id],
67
+ model: Dodopayments::CheckoutSessionStatus,
68
+ options: params[:request_options]
69
+ )
70
+ end
71
+
55
72
  # @api private
56
73
  #
57
74
  # @param client [Dodopayments::Client]
@@ -3,12 +3,14 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Refunds
6
- # @overload create(payment_id:, items: nil, reason: nil, request_options: {})
6
+ # @overload create(payment_id:, items: nil, metadata: nil, reason: nil, request_options: {})
7
7
  #
8
8
  # @param payment_id [String] The unique identifier of the payment to be refunded.
9
9
  #
10
10
  # @param items [Array<Dodopayments::Models::RefundCreateParams::Item>, nil] Partially Refund an Individual Item
11
11
  #
12
+ # @param metadata [Hash{Symbol=>String}] Additional metadata associated with the refund.
13
+ #
12
14
  # @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
13
15
  #
14
16
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -74,7 +74,7 @@ module Dodopayments
74
74
  )
75
75
  end
76
76
 
77
- # @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
77
+ # @overload update(subscription_id, billing: nil, cancel_at_next_billing_date: nil, customer_name: nil, disable_on_demand: nil, metadata: nil, next_billing_date: nil, status: nil, tax_id: nil, request_options: {})
78
78
  #
79
79
  # @param subscription_id [String] Subscription Id
80
80
  #
@@ -82,6 +82,8 @@ module Dodopayments
82
82
  #
83
83
  # @param cancel_at_next_billing_date [Boolean, nil] When set, the subscription will remain active until the end of billing period
84
84
  #
85
+ # @param customer_name [String, nil]
86
+ #
85
87
  # @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
86
88
  #
87
89
  # @param metadata [Hash{Symbol=>String}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dodopayments
4
- VERSION = "1.56.0"
4
+ VERSION = "1.56.3"
5
5
  end
data/lib/dodopayments.rb CHANGED
@@ -81,6 +81,8 @@ require_relative "dodopayments/models/brand_update_images_response"
81
81
  require_relative "dodopayments/models/brand_update_params"
82
82
  require_relative "dodopayments/models/checkout_session_create_params"
83
83
  require_relative "dodopayments/models/checkout_session_response"
84
+ require_relative "dodopayments/models/checkout_session_retrieve_params"
85
+ require_relative "dodopayments/models/checkout_session_status"
84
86
  require_relative "dodopayments/models/country_code"
85
87
  require_relative "dodopayments/models/create_new_customer"
86
88
  require_relative "dodopayments/models/currency"
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ class CheckoutSessionRetrieveParams < Dodopayments::Internal::Type::BaseModel
6
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ include Dodopayments::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Dodopayments::CheckoutSessionRetrieveParams,
13
+ Dodopayments::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ params(request_options: Dodopayments::RequestOptions::OrHash).returns(
19
+ T.attached_class
20
+ )
21
+ end
22
+ def self.new(request_options: {})
23
+ end
24
+
25
+ sig do
26
+ override.returns({ request_options: Dodopayments::RequestOptions })
27
+ end
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,88 @@
1
+ # typed: strong
2
+
3
+ module Dodopayments
4
+ module Models
5
+ class CheckoutSessionStatus < Dodopayments::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Dodopayments::CheckoutSessionStatus,
10
+ Dodopayments::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # Id of the checkout session
15
+ sig { returns(String) }
16
+ attr_accessor :id
17
+
18
+ # Created at timestamp
19
+ sig { returns(Time) }
20
+ attr_accessor :created_at
21
+
22
+ # Customer email: prefers payment's customer, falls back to session
23
+ sig { returns(T.nilable(String)) }
24
+ attr_accessor :customer_email
25
+
26
+ # Customer name: prefers payment's customer, falls back to session
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :customer_name
29
+
30
+ # Id of the payment created by the checkout sessions.
31
+ #
32
+ # Null if checkout sessions is still at the details collection stage.
33
+ sig { returns(T.nilable(String)) }
34
+ attr_accessor :payment_id
35
+
36
+ # status of the payment.
37
+ #
38
+ # Null if checkout sessions is still at the details collection stage.
39
+ sig { returns(T.nilable(Dodopayments::IntentStatus::TaggedSymbol)) }
40
+ attr_accessor :payment_status
41
+
42
+ sig do
43
+ params(
44
+ id: String,
45
+ created_at: Time,
46
+ customer_email: T.nilable(String),
47
+ customer_name: T.nilable(String),
48
+ payment_id: T.nilable(String),
49
+ payment_status: T.nilable(Dodopayments::IntentStatus::OrSymbol)
50
+ ).returns(T.attached_class)
51
+ end
52
+ def self.new(
53
+ # Id of the checkout session
54
+ id:,
55
+ # Created at timestamp
56
+ created_at:,
57
+ # Customer email: prefers payment's customer, falls back to session
58
+ customer_email: nil,
59
+ # Customer name: prefers payment's customer, falls back to session
60
+ customer_name: nil,
61
+ # Id of the payment created by the checkout sessions.
62
+ #
63
+ # Null if checkout sessions is still at the details collection stage.
64
+ payment_id: nil,
65
+ # status of the payment.
66
+ #
67
+ # Null if checkout sessions is still at the details collection stage.
68
+ payment_status: nil
69
+ )
70
+ end
71
+
72
+ sig do
73
+ override.returns(
74
+ {
75
+ id: String,
76
+ created_at: Time,
77
+ customer_email: T.nilable(String),
78
+ customer_name: T.nilable(String),
79
+ payment_id: T.nilable(String),
80
+ payment_status: T.nilable(Dodopayments::IntentStatus::TaggedSymbol)
81
+ }
82
+ )
83
+ end
84
+ def to_hash
85
+ end
86
+ end
87
+ end
88
+ end
@@ -28,6 +28,7 @@ module Dodopayments
28
28
  IDEAL = T.let(:ideal, Dodopayments::PaymentMethodTypes::TaggedSymbol)
29
29
  PRZELEWY24 =
30
30
  T.let(:przelewy24, Dodopayments::PaymentMethodTypes::TaggedSymbol)
31
+ PAYPAL = T.let(:paypal, Dodopayments::PaymentMethodTypes::TaggedSymbol)
31
32
  AFFIRM = T.let(:affirm, Dodopayments::PaymentMethodTypes::TaggedSymbol)
32
33
  KLARNA = T.let(:klarna, Dodopayments::PaymentMethodTypes::TaggedSymbol)
33
34
  SEPA = T.let(:sepa, Dodopayments::PaymentMethodTypes::TaggedSymbol)
@@ -29,6 +29,10 @@ module Dodopayments
29
29
  sig { returns(T::Boolean) }
30
30
  attr_accessor :is_partial
31
31
 
32
+ # Additional metadata stored with the refund.
33
+ sig { returns(T::Hash[Symbol, String]) }
34
+ attr_accessor :metadata
35
+
32
36
  # The unique identifier of the payment associated with the refund.
33
37
  sig { returns(String) }
34
38
  attr_accessor :payment_id
@@ -59,6 +63,7 @@ module Dodopayments
59
63
  created_at: Time,
60
64
  customer: Dodopayments::CustomerLimitedDetails::OrHash,
61
65
  is_partial: T::Boolean,
66
+ metadata: T::Hash[Symbol, String],
62
67
  payment_id: String,
63
68
  refund_id: String,
64
69
  status: Dodopayments::RefundStatus::OrSymbol,
@@ -76,6 +81,8 @@ module Dodopayments
76
81
  customer:,
77
82
  # If true the refund is a partial refund
78
83
  is_partial:,
84
+ # Additional metadata stored with the refund.
85
+ metadata:,
79
86
  # The unique identifier of the payment associated with the refund.
80
87
  payment_id:,
81
88
  # The unique identifier of the refund.
@@ -98,6 +105,7 @@ module Dodopayments
98
105
  created_at: Time,
99
106
  customer: Dodopayments::CustomerLimitedDetails,
100
107
  is_partial: T::Boolean,
108
+ metadata: T::Hash[Symbol, String],
101
109
  payment_id: String,
102
110
  refund_id: String,
103
111
  status: Dodopayments::RefundStatus::TaggedSymbol,
@@ -24,6 +24,13 @@ module Dodopayments
24
24
  end
25
25
  attr_accessor :items
26
26
 
27
+ # Additional metadata associated with the refund.
28
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
29
+ attr_reader :metadata
30
+
31
+ sig { params(metadata: T::Hash[Symbol, String]).void }
32
+ attr_writer :metadata
33
+
27
34
  # The reason for the refund, if any. Maximum length is 3000 characters. Optional.
28
35
  sig { returns(T.nilable(String)) }
29
36
  attr_accessor :reason
@@ -33,6 +40,7 @@ module Dodopayments
33
40
  payment_id: String,
34
41
  items:
35
42
  T.nilable(T::Array[Dodopayments::RefundCreateParams::Item::OrHash]),
43
+ metadata: T::Hash[Symbol, String],
36
44
  reason: T.nilable(String),
37
45
  request_options: Dodopayments::RequestOptions::OrHash
38
46
  ).returns(T.attached_class)
@@ -42,6 +50,8 @@ module Dodopayments
42
50
  payment_id:,
43
51
  # Partially Refund an Individual Item
44
52
  items: nil,
53
+ # Additional metadata associated with the refund.
54
+ metadata: nil,
45
55
  # The reason for the refund, if any. Maximum length is 3000 characters. Optional.
46
56
  reason: nil,
47
57
  request_options: {}
@@ -53,6 +63,7 @@ module Dodopayments
53
63
  {
54
64
  payment_id: String,
55
65
  items: T.nilable(T::Array[Dodopayments::RefundCreateParams::Item]),
66
+ metadata: T::Hash[Symbol, String],
56
67
  reason: T.nilable(String),
57
68
  request_options: Dodopayments::RequestOptions
58
69
  }
@@ -26,6 +26,9 @@ module Dodopayments
26
26
  sig { returns(T.nilable(T::Boolean)) }
27
27
  attr_accessor :cancel_at_next_billing_date
28
28
 
29
+ sig { returns(T.nilable(String)) }
30
+ attr_accessor :customer_name
31
+
29
32
  sig do
30
33
  returns(
31
34
  T.nilable(Dodopayments::SubscriptionUpdateParams::DisableOnDemand)
@@ -59,6 +62,7 @@ module Dodopayments
59
62
  params(
60
63
  billing: T.nilable(Dodopayments::BillingAddress::OrHash),
61
64
  cancel_at_next_billing_date: T.nilable(T::Boolean),
65
+ customer_name: T.nilable(String),
62
66
  disable_on_demand:
63
67
  T.nilable(
64
68
  Dodopayments::SubscriptionUpdateParams::DisableOnDemand::OrHash
@@ -74,6 +78,7 @@ module Dodopayments
74
78
  billing: nil,
75
79
  # When set, the subscription will remain active until the end of billing period
76
80
  cancel_at_next_billing_date: nil,
81
+ customer_name: nil,
77
82
  disable_on_demand: nil,
78
83
  metadata: nil,
79
84
  next_billing_date: nil,
@@ -88,6 +93,7 @@ module Dodopayments
88
93
  {
89
94
  billing: T.nilable(Dodopayments::BillingAddress),
90
95
  cancel_at_next_billing_date: T.nilable(T::Boolean),
96
+ customer_name: T.nilable(String),
91
97
  disable_on_demand:
92
98
  T.nilable(
93
99
  Dodopayments::SubscriptionUpdateParams::DisableOnDemand
@@ -42,6 +42,11 @@ module Dodopayments
42
42
 
43
43
  CheckoutSessionResponse = Dodopayments::Models::CheckoutSessionResponse
44
44
 
45
+ CheckoutSessionRetrieveParams =
46
+ Dodopayments::Models::CheckoutSessionRetrieveParams
47
+
48
+ CheckoutSessionStatus = Dodopayments::Models::CheckoutSessionStatus
49
+
45
50
  CountryCode = Dodopayments::Models::CountryCode
46
51
 
47
52
  CreateNewCustomer = Dodopayments::Models::CreateNewCustomer
@@ -74,6 +74,15 @@ module Dodopayments
74
74
  )
75
75
  end
76
76
 
77
+ sig do
78
+ params(
79
+ id: String,
80
+ request_options: Dodopayments::RequestOptions::OrHash
81
+ ).returns(Dodopayments::CheckoutSessionStatus)
82
+ end
83
+ def retrieve(id, request_options: {})
84
+ end
85
+
77
86
  # @api private
78
87
  sig { params(client: Dodopayments::Client).returns(T.attached_class) }
79
88
  def self.new(client:)
@@ -8,6 +8,7 @@ module Dodopayments
8
8
  payment_id: String,
9
9
  items:
10
10
  T.nilable(T::Array[Dodopayments::RefundCreateParams::Item::OrHash]),
11
+ metadata: T::Hash[Symbol, String],
11
12
  reason: T.nilable(String),
12
13
  request_options: Dodopayments::RequestOptions::OrHash
13
14
  ).returns(Dodopayments::Refund)
@@ -17,6 +18,8 @@ module Dodopayments
17
18
  payment_id:,
18
19
  # Partially Refund an Individual Item
19
20
  items: nil,
21
+ # Additional metadata associated with the refund.
22
+ metadata: nil,
20
23
  # The reason for the refund, if any. Maximum length is 3000 characters. Optional.
21
24
  reason: nil,
22
25
  request_options: {}
@@ -91,6 +91,7 @@ module Dodopayments
91
91
  subscription_id: String,
92
92
  billing: T.nilable(Dodopayments::BillingAddress::OrHash),
93
93
  cancel_at_next_billing_date: T.nilable(T::Boolean),
94
+ customer_name: T.nilable(String),
94
95
  disable_on_demand:
95
96
  T.nilable(
96
97
  Dodopayments::SubscriptionUpdateParams::DisableOnDemand::OrHash
@@ -108,6 +109,7 @@ module Dodopayments
108
109
  billing: nil,
109
110
  # When set, the subscription will remain active until the end of billing period
110
111
  cancel_at_next_billing_date: nil,
112
+ customer_name: nil,
111
113
  disable_on_demand: nil,
112
114
  metadata: nil,
113
115
  next_billing_date: nil,
@@ -0,0 +1,15 @@
1
+ module Dodopayments
2
+ module Models
3
+ type checkout_session_retrieve_params =
4
+ { } & Dodopayments::Internal::Type::request_parameters
5
+
6
+ class CheckoutSessionRetrieveParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ def initialize: (?request_options: Dodopayments::request_opts) -> void
11
+
12
+ def to_hash: -> { request_options: Dodopayments::RequestOptions }
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,45 @@
1
+ module Dodopayments
2
+ module Models
3
+ type checkout_session_status =
4
+ {
5
+ id: String,
6
+ created_at: Time,
7
+ customer_email: String?,
8
+ customer_name: String?,
9
+ payment_id: String?,
10
+ payment_status: Dodopayments::Models::intent_status?
11
+ }
12
+
13
+ class CheckoutSessionStatus < Dodopayments::Internal::Type::BaseModel
14
+ attr_accessor id: String
15
+
16
+ attr_accessor created_at: Time
17
+
18
+ attr_accessor customer_email: String?
19
+
20
+ attr_accessor customer_name: String?
21
+
22
+ attr_accessor payment_id: String?
23
+
24
+ attr_accessor payment_status: Dodopayments::Models::intent_status?
25
+
26
+ def initialize: (
27
+ id: String,
28
+ created_at: Time,
29
+ ?customer_email: String?,
30
+ ?customer_name: String?,
31
+ ?payment_id: String?,
32
+ ?payment_status: Dodopayments::Models::intent_status?
33
+ ) -> void
34
+
35
+ def to_hash: -> {
36
+ id: String,
37
+ created_at: Time,
38
+ customer_email: String?,
39
+ customer_name: String?,
40
+ payment_id: String?,
41
+ payment_status: Dodopayments::Models::intent_status?
42
+ }
43
+ end
44
+ end
45
+ end
@@ -13,6 +13,7 @@ module Dodopayments
13
13
  | :eps
14
14
  | :ideal
15
15
  | :przelewy24
16
+ | :paypal
16
17
  | :affirm
17
18
  | :klarna
18
19
  | :sepa
@@ -35,6 +36,7 @@ module Dodopayments
35
36
  EPS: :eps
36
37
  IDEAL: :ideal
37
38
  PRZELEWY24: :przelewy24
39
+ PAYPAL: :paypal
38
40
  AFFIRM: :affirm
39
41
  KLARNA: :klarna
40
42
  SEPA: :sepa
@@ -6,6 +6,7 @@ module Dodopayments
6
6
  created_at: Time,
7
7
  customer: Dodopayments::CustomerLimitedDetails,
8
8
  is_partial: bool,
9
+ metadata: ::Hash[Symbol, String],
9
10
  payment_id: String,
10
11
  refund_id: String,
11
12
  status: Dodopayments::Models::refund_status,
@@ -23,6 +24,8 @@ module Dodopayments
23
24
 
24
25
  attr_accessor is_partial: bool
25
26
 
27
+ attr_accessor metadata: ::Hash[Symbol, String]
28
+
26
29
  attr_accessor payment_id: String
27
30
 
28
31
  attr_accessor refund_id: String
@@ -40,6 +43,7 @@ module Dodopayments
40
43
  created_at: Time,
41
44
  customer: Dodopayments::CustomerLimitedDetails,
42
45
  is_partial: bool,
46
+ metadata: ::Hash[Symbol, String],
43
47
  payment_id: String,
44
48
  refund_id: String,
45
49
  status: Dodopayments::Models::refund_status,
@@ -53,6 +57,7 @@ module Dodopayments
53
57
  created_at: Time,
54
58
  customer: Dodopayments::CustomerLimitedDetails,
55
59
  is_partial: bool,
60
+ metadata: ::Hash[Symbol, String],
56
61
  payment_id: String,
57
62
  refund_id: String,
58
63
  status: Dodopayments::Models::refund_status,
@@ -4,6 +4,7 @@ module Dodopayments
4
4
  {
5
5
  payment_id: String,
6
6
  items: ::Array[Dodopayments::RefundCreateParams::Item]?,
7
+ metadata: ::Hash[Symbol, String],
7
8
  reason: String?
8
9
  }
9
10
  & Dodopayments::Internal::Type::request_parameters
@@ -16,11 +17,16 @@ module Dodopayments
16
17
 
17
18
  attr_accessor items: ::Array[Dodopayments::RefundCreateParams::Item]?
18
19
 
20
+ attr_reader metadata: ::Hash[Symbol, String]?
21
+
22
+ def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
23
+
19
24
  attr_accessor reason: String?
20
25
 
21
26
  def initialize: (
22
27
  payment_id: String,
23
28
  ?items: ::Array[Dodopayments::RefundCreateParams::Item]?,
29
+ ?metadata: ::Hash[Symbol, String],
24
30
  ?reason: String?,
25
31
  ?request_options: Dodopayments::request_opts
26
32
  ) -> void
@@ -28,6 +34,7 @@ module Dodopayments
28
34
  def to_hash: -> {
29
35
  payment_id: String,
30
36
  items: ::Array[Dodopayments::RefundCreateParams::Item]?,
37
+ metadata: ::Hash[Symbol, String],
31
38
  reason: String?,
32
39
  request_options: Dodopayments::RequestOptions
33
40
  }
@@ -4,6 +4,7 @@ module Dodopayments
4
4
  {
5
5
  billing: Dodopayments::BillingAddress?,
6
6
  cancel_at_next_billing_date: bool?,
7
+ customer_name: String?,
7
8
  disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
8
9
  metadata: ::Hash[Symbol, String]?,
9
10
  next_billing_date: Time?,
@@ -20,6 +21,8 @@ module Dodopayments
20
21
 
21
22
  attr_accessor cancel_at_next_billing_date: bool?
22
23
 
24
+ attr_accessor customer_name: String?
25
+
23
26
  attr_accessor disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?
24
27
 
25
28
  attr_accessor metadata: ::Hash[Symbol, String]?
@@ -33,6 +36,7 @@ module Dodopayments
33
36
  def initialize: (
34
37
  ?billing: Dodopayments::BillingAddress?,
35
38
  ?cancel_at_next_billing_date: bool?,
39
+ ?customer_name: String?,
36
40
  ?disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
37
41
  ?metadata: ::Hash[Symbol, String]?,
38
42
  ?next_billing_date: Time?,
@@ -44,6 +48,7 @@ module Dodopayments
44
48
  def to_hash: -> {
45
49
  billing: Dodopayments::BillingAddress?,
46
50
  cancel_at_next_billing_date: bool?,
51
+ customer_name: String?,
47
52
  disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
48
53
  metadata: ::Hash[Symbol, String]?,
49
54
  next_billing_date: Time?,
@@ -39,6 +39,10 @@ module Dodopayments
39
39
 
40
40
  class CheckoutSessionResponse = Dodopayments::Models::CheckoutSessionResponse
41
41
 
42
+ class CheckoutSessionRetrieveParams = Dodopayments::Models::CheckoutSessionRetrieveParams
43
+
44
+ class CheckoutSessionStatus = Dodopayments::Models::CheckoutSessionStatus
45
+
42
46
  module CountryCode = Dodopayments::Models::CountryCode
43
47
 
44
48
  class CreateNewCustomer = Dodopayments::Models::CreateNewCustomer
@@ -19,6 +19,11 @@ module Dodopayments
19
19
  ?request_options: Dodopayments::request_opts
20
20
  ) -> Dodopayments::CheckoutSessionResponse
21
21
 
22
+ def retrieve: (
23
+ String id,
24
+ ?request_options: Dodopayments::request_opts
25
+ ) -> Dodopayments::CheckoutSessionStatus
26
+
22
27
  def initialize: (client: Dodopayments::Client) -> void
23
28
  end
24
29
  end
@@ -4,6 +4,7 @@ module Dodopayments
4
4
  def create: (
5
5
  payment_id: String,
6
6
  ?items: ::Array[Dodopayments::RefundCreateParams::Item]?,
7
+ ?metadata: ::Hash[Symbol, String],
7
8
  ?reason: String?,
8
9
  ?request_options: Dodopayments::request_opts
9
10
  ) -> Dodopayments::Refund
@@ -30,6 +30,7 @@ module Dodopayments
30
30
  String subscription_id,
31
31
  ?billing: Dodopayments::BillingAddress?,
32
32
  ?cancel_at_next_billing_date: bool?,
33
+ ?customer_name: String?,
33
34
  ?disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
34
35
  ?metadata: ::Hash[Symbol, String]?,
35
36
  ?next_billing_date: Time?,
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.56.0
4
+ version: 1.56.3
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-10-25 00:00:00.000000000 Z
11
+ date: 2025-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -80,6 +80,8 @@ files:
80
80
  - lib/dodopayments/models/checkout_session_create_params.rb
81
81
  - lib/dodopayments/models/checkout_session_request.rb
82
82
  - lib/dodopayments/models/checkout_session_response.rb
83
+ - lib/dodopayments/models/checkout_session_retrieve_params.rb
84
+ - lib/dodopayments/models/checkout_session_status.rb
83
85
  - lib/dodopayments/models/country_code.rb
84
86
  - lib/dodopayments/models/create_new_customer.rb
85
87
  - lib/dodopayments/models/currency.rb
@@ -305,6 +307,8 @@ files:
305
307
  - rbi/dodopayments/models/checkout_session_create_params.rbi
306
308
  - rbi/dodopayments/models/checkout_session_request.rbi
307
309
  - rbi/dodopayments/models/checkout_session_response.rbi
310
+ - rbi/dodopayments/models/checkout_session_retrieve_params.rbi
311
+ - rbi/dodopayments/models/checkout_session_status.rbi
308
312
  - rbi/dodopayments/models/country_code.rbi
309
313
  - rbi/dodopayments/models/create_new_customer.rbi
310
314
  - rbi/dodopayments/models/currency.rbi
@@ -529,6 +533,8 @@ files:
529
533
  - sig/dodopayments/models/checkout_session_create_params.rbs
530
534
  - sig/dodopayments/models/checkout_session_request.rbs
531
535
  - sig/dodopayments/models/checkout_session_response.rbs
536
+ - sig/dodopayments/models/checkout_session_retrieve_params.rbs
537
+ - sig/dodopayments/models/checkout_session_status.rbs
532
538
  - sig/dodopayments/models/country_code.rbs
533
539
  - sig/dodopayments/models/create_new_customer.rbs
534
540
  - sig/dodopayments/models/currency.rbs