dodopayments 2.17.0 → 2.18.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.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/internal/cursor_page_pagination.rb +1 -1
  5. data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +14 -1
  6. data/lib/dodopayments/models/entitlements/grant_fulfill_license_key_params.rb +53 -0
  7. data/lib/dodopayments/models/metadata.rb +8 -0
  8. data/lib/dodopayments/models/payment_method_types.rb +1 -0
  9. data/lib/dodopayments/models/product.rb +3 -17
  10. data/lib/dodopayments/models/product_create_params.rb +3 -16
  11. data/lib/dodopayments/models/product_list_response.rb +3 -17
  12. data/lib/dodopayments/models/product_update_params.rb +3 -16
  13. data/lib/dodopayments/models/products/list_localized_prices_response.rb +18 -0
  14. data/lib/dodopayments/models/products/localized_price.rb +75 -0
  15. data/lib/dodopayments/models/products/localized_price_archive_params.rb +28 -0
  16. data/lib/dodopayments/models/products/localized_price_create_params.rb +51 -0
  17. data/lib/dodopayments/models/products/localized_price_list_params.rb +22 -0
  18. data/lib/dodopayments/models/products/localized_price_retrieve_params.rb +28 -0
  19. data/lib/dodopayments/models/products/localized_price_update_params.rb +42 -0
  20. data/lib/dodopayments/models/products/pricing_mode.rb +17 -0
  21. data/lib/dodopayments/models.rb +3 -0
  22. data/lib/dodopayments/resources/checkout_sessions.rb +2 -1
  23. data/lib/dodopayments/resources/entitlements/grants.rb +35 -0
  24. data/lib/dodopayments/resources/invoices/payments.rb +6 -3
  25. data/lib/dodopayments/resources/products/localized_prices.rb +144 -0
  26. data/lib/dodopayments/resources/products.rb +11 -5
  27. data/lib/dodopayments/resources/webhooks/headers.rb +3 -2
  28. data/lib/dodopayments/resources/webhooks.rb +7 -4
  29. data/lib/dodopayments/version.rb +1 -1
  30. data/lib/dodopayments.rb +11 -0
  31. data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +12 -0
  32. data/rbi/dodopayments/models/entitlements/grant_fulfill_license_key_params.rbi +74 -0
  33. data/rbi/dodopayments/models/metadata.rbi +11 -0
  34. data/rbi/dodopayments/models/payment_method_types.rbi +2 -0
  35. data/rbi/dodopayments/models/product.rbi +4 -26
  36. data/rbi/dodopayments/models/product_create_params.rbi +3 -43
  37. data/rbi/dodopayments/models/product_list_response.rbi +3 -47
  38. data/rbi/dodopayments/models/product_update_params.rbi +3 -43
  39. data/rbi/dodopayments/models/products/list_localized_prices_response.rbi +36 -0
  40. data/rbi/dodopayments/models/products/localized_price.rbi +98 -0
  41. data/rbi/dodopayments/models/products/localized_price_archive_params.rbi +48 -0
  42. data/rbi/dodopayments/models/products/localized_price_create_params.rbi +72 -0
  43. data/rbi/dodopayments/models/products/localized_price_list_params.rbi +43 -0
  44. data/rbi/dodopayments/models/products/localized_price_retrieve_params.rbi +48 -0
  45. data/rbi/dodopayments/models/products/localized_price_update_params.rbi +62 -0
  46. data/rbi/dodopayments/models/products/pricing_mode.rbi +28 -0
  47. data/rbi/dodopayments/models.rbi +6 -0
  48. data/rbi/dodopayments/resources/checkout_sessions.rbi +5 -1
  49. data/rbi/dodopayments/resources/entitlements/grants.rbi +28 -0
  50. data/rbi/dodopayments/resources/invoices/payments.rbi +15 -3
  51. data/rbi/dodopayments/resources/products/localized_prices.rbi +103 -0
  52. data/rbi/dodopayments/resources/products.rbi +16 -4
  53. data/rbi/dodopayments/resources/webhooks/headers.rbi +6 -1
  54. data/rbi/dodopayments/resources/webhooks.rbi +16 -3
  55. data/sig/dodopayments/models/checkout_session_request.rbs +4 -4
  56. data/sig/dodopayments/models/credit_entitlements/balance_create_ledger_entry_params.rbs +4 -4
  57. data/sig/dodopayments/models/credit_entitlements/balance_list_grants_response.rbs +4 -4
  58. data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +5 -0
  59. data/sig/dodopayments/models/customer.rbs +7 -5
  60. data/sig/dodopayments/models/customer_create_params.rbs +7 -5
  61. data/sig/dodopayments/models/customer_limited_details.rbs +7 -5
  62. data/sig/dodopayments/models/customer_update_params.rbs +4 -4
  63. data/sig/dodopayments/models/discount.rbs +4 -4
  64. data/sig/dodopayments/models/discount_create_params.rbs +7 -5
  65. data/sig/dodopayments/models/discount_detail.rbs +4 -4
  66. data/sig/dodopayments/models/discount_update_params.rbs +4 -4
  67. data/sig/dodopayments/models/entitlement.rbs +4 -4
  68. data/sig/dodopayments/models/entitlement_create_params.rbs +7 -5
  69. data/sig/dodopayments/models/entitlement_update_params.rbs +4 -4
  70. data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +4 -4
  71. data/sig/dodopayments/models/entitlements/grant_fulfill_license_key_params.rbs +43 -0
  72. data/sig/dodopayments/models/metadata.rbs +7 -0
  73. data/sig/dodopayments/models/payment.rbs +4 -4
  74. data/sig/dodopayments/models/payment_create_params.rbs +7 -5
  75. data/sig/dodopayments/models/payment_create_response.rbs +4 -4
  76. data/sig/dodopayments/models/payment_list_response.rbs +4 -4
  77. data/sig/dodopayments/models/payment_method_types.rbs +2 -0
  78. data/sig/dodopayments/models/product.rbs +8 -19
  79. data/sig/dodopayments/models/product_create_params.rbs +11 -20
  80. data/sig/dodopayments/models/product_list_response.rbs +8 -19
  81. data/sig/dodopayments/models/product_update_params.rbs +8 -19
  82. data/sig/dodopayments/models/products/list_localized_prices_response.rbs +20 -0
  83. data/sig/dodopayments/models/products/localized_price.rbs +57 -0
  84. data/sig/dodopayments/models/products/localized_price_archive_params.rbs +30 -0
  85. data/sig/dodopayments/models/products/localized_price_create_params.rbs +43 -0
  86. data/sig/dodopayments/models/products/localized_price_list_params.rbs +26 -0
  87. data/sig/dodopayments/models/products/localized_price_retrieve_params.rbs +30 -0
  88. data/sig/dodopayments/models/products/localized_price_update_params.rbs +34 -0
  89. data/sig/dodopayments/models/products/pricing_mode.rbs +16 -0
  90. data/sig/dodopayments/models/refund.rbs +4 -4
  91. data/sig/dodopayments/models/refund_create_params.rbs +7 -5
  92. data/sig/dodopayments/models/subscription.rbs +4 -4
  93. data/sig/dodopayments/models/subscription_charge_params.rbs +4 -4
  94. data/sig/dodopayments/models/subscription_create_params.rbs +7 -5
  95. data/sig/dodopayments/models/subscription_create_response.rbs +4 -4
  96. data/sig/dodopayments/models/subscription_list_response.rbs +4 -4
  97. data/sig/dodopayments/models/subscription_update_params.rbs +4 -4
  98. data/sig/dodopayments/models/update_subscription_plan_req.rbs +4 -4
  99. data/sig/dodopayments/models.rbs +2 -0
  100. data/sig/dodopayments/resources/checkout_sessions.rbs +2 -2
  101. data/sig/dodopayments/resources/credit_entitlements/balances.rbs +1 -1
  102. data/sig/dodopayments/resources/customers.rbs +2 -2
  103. data/sig/dodopayments/resources/discounts.rbs +2 -2
  104. data/sig/dodopayments/resources/entitlements/grants.rbs +8 -0
  105. data/sig/dodopayments/resources/entitlements.rbs +2 -2
  106. data/sig/dodopayments/resources/payments.rbs +1 -1
  107. data/sig/dodopayments/resources/products/localized_prices.rbs +41 -0
  108. data/sig/dodopayments/resources/products.rbs +6 -4
  109. data/sig/dodopayments/resources/refunds.rbs +1 -1
  110. data/sig/dodopayments/resources/subscriptions.rbs +5 -5
  111. metadata +35 -2
@@ -0,0 +1,20 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type list_localized_prices_response =
5
+ { items: ::Array[Dodopayments::Products::LocalizedPrice] }
6
+
7
+ class ListLocalizedPricesResponse < Dodopayments::Internal::Type::BaseModel
8
+ attr_accessor items: ::Array[Dodopayments::Products::LocalizedPrice]
9
+
10
+ def initialize: (
11
+ items: ::Array[Dodopayments::Products::LocalizedPrice]
12
+ ) -> void
13
+
14
+ def to_hash: -> {
15
+ items: ::Array[Dodopayments::Products::LocalizedPrice]
16
+ }
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,57 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price =
5
+ {
6
+ id: String,
7
+ amount: Integer,
8
+ created_at: Time,
9
+ currency: Dodopayments::Models::currency,
10
+ mode: Dodopayments::Models::Products::pricing_mode,
11
+ product_id: String,
12
+ updated_at: Time,
13
+ country_code: Dodopayments::Models::country_code?
14
+ }
15
+
16
+ class LocalizedPrice < Dodopayments::Internal::Type::BaseModel
17
+ attr_accessor id: String
18
+
19
+ attr_accessor amount: Integer
20
+
21
+ attr_accessor created_at: Time
22
+
23
+ attr_accessor currency: Dodopayments::Models::currency
24
+
25
+ attr_accessor mode: Dodopayments::Models::Products::pricing_mode
26
+
27
+ attr_accessor product_id: String
28
+
29
+ attr_accessor updated_at: Time
30
+
31
+ attr_accessor country_code: Dodopayments::Models::country_code?
32
+
33
+ def initialize: (
34
+ id: String,
35
+ amount: Integer,
36
+ created_at: Time,
37
+ currency: Dodopayments::Models::currency,
38
+ mode: Dodopayments::Models::Products::pricing_mode,
39
+ product_id: String,
40
+ updated_at: Time,
41
+ ?country_code: Dodopayments::Models::country_code?
42
+ ) -> void
43
+
44
+ def to_hash: -> {
45
+ id: String,
46
+ amount: Integer,
47
+ created_at: Time,
48
+ currency: Dodopayments::Models::currency,
49
+ mode: Dodopayments::Models::Products::pricing_mode,
50
+ product_id: String,
51
+ updated_at: Time,
52
+ country_code: Dodopayments::Models::country_code?
53
+ }
54
+ end
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,30 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price_archive_params =
5
+ { product_id: String, id: String }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class LocalizedPriceArchiveParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor product_id: String
13
+
14
+ attr_accessor id: String
15
+
16
+ def initialize: (
17
+ product_id: String,
18
+ id: String,
19
+ ?request_options: Dodopayments::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ product_id: String,
24
+ id: String,
25
+ request_options: Dodopayments::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,43 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price_create_params =
5
+ {
6
+ product_id: String,
7
+ amount: Integer,
8
+ currency: Dodopayments::Models::currency,
9
+ country_code: Dodopayments::Models::country_code?
10
+ }
11
+ & Dodopayments::Internal::Type::request_parameters
12
+
13
+ class LocalizedPriceCreateParams < Dodopayments::Internal::Type::BaseModel
14
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
15
+ include Dodopayments::Internal::Type::RequestParameters
16
+
17
+ attr_accessor product_id: String
18
+
19
+ attr_accessor amount: Integer
20
+
21
+ attr_accessor currency: Dodopayments::Models::currency
22
+
23
+ attr_accessor country_code: Dodopayments::Models::country_code?
24
+
25
+ def initialize: (
26
+ product_id: String,
27
+ amount: Integer,
28
+ currency: Dodopayments::Models::currency,
29
+ ?country_code: Dodopayments::Models::country_code?,
30
+ ?request_options: Dodopayments::request_opts
31
+ ) -> void
32
+
33
+ def to_hash: -> {
34
+ product_id: String,
35
+ amount: Integer,
36
+ currency: Dodopayments::Models::currency,
37
+ country_code: Dodopayments::Models::country_code?,
38
+ request_options: Dodopayments::RequestOptions
39
+ }
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,26 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price_list_params =
5
+ { product_id: String }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class LocalizedPriceListParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor product_id: String
13
+
14
+ def initialize: (
15
+ product_id: String,
16
+ ?request_options: Dodopayments::request_opts
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ product_id: String,
21
+ request_options: Dodopayments::RequestOptions
22
+ }
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,30 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price_retrieve_params =
5
+ { product_id: String, id: String }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class LocalizedPriceRetrieveParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor product_id: String
13
+
14
+ attr_accessor id: String
15
+
16
+ def initialize: (
17
+ product_id: String,
18
+ id: String,
19
+ ?request_options: Dodopayments::request_opts
20
+ ) -> void
21
+
22
+ def to_hash: -> {
23
+ product_id: String,
24
+ id: String,
25
+ request_options: Dodopayments::RequestOptions
26
+ }
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,34 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type localized_price_update_params =
5
+ { product_id: String, id: String, amount: Integer? }
6
+ & Dodopayments::Internal::Type::request_parameters
7
+
8
+ class LocalizedPriceUpdateParams < Dodopayments::Internal::Type::BaseModel
9
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
10
+ include Dodopayments::Internal::Type::RequestParameters
11
+
12
+ attr_accessor product_id: String
13
+
14
+ attr_accessor id: String
15
+
16
+ attr_accessor amount: Integer?
17
+
18
+ def initialize: (
19
+ product_id: String,
20
+ id: String,
21
+ ?amount: Integer?,
22
+ ?request_options: Dodopayments::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ product_id: String,
27
+ id: String,
28
+ amount: Integer?,
29
+ request_options: Dodopayments::RequestOptions
30
+ }
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,16 @@
1
+ module Dodopayments
2
+ module Models
3
+ module Products
4
+ type pricing_mode = :by_currency | :by_country
5
+
6
+ module PricingMode
7
+ extend Dodopayments::Internal::Type::Enum
8
+
9
+ BY_CURRENCY: :by_currency
10
+ BY_COUNTRY: :by_country
11
+
12
+ def self?.values: -> ::Array[Dodopayments::Models::Products::pricing_mode]
13
+ end
14
+ end
15
+ end
16
+ end
@@ -7,7 +7,7 @@ module Dodopayments
7
7
  created_at: Time,
8
8
  customer: Dodopayments::CustomerLimitedDetails,
9
9
  is_partial: bool,
10
- metadata: ::Hash[Symbol, String],
10
+ metadata: Dodopayments::Models::metadata,
11
11
  payment_id: String,
12
12
  refund_id: String,
13
13
  status: Dodopayments::Models::refund_status,
@@ -27,7 +27,7 @@ module Dodopayments
27
27
 
28
28
  attr_accessor is_partial: bool
29
29
 
30
- attr_accessor metadata: ::Hash[Symbol, String]
30
+ attr_accessor metadata: Dodopayments::Models::metadata
31
31
 
32
32
  attr_accessor payment_id: String
33
33
 
@@ -47,7 +47,7 @@ module Dodopayments
47
47
  created_at: Time,
48
48
  customer: Dodopayments::CustomerLimitedDetails,
49
49
  is_partial: bool,
50
- metadata: ::Hash[Symbol, String],
50
+ metadata: Dodopayments::Models::metadata,
51
51
  payment_id: String,
52
52
  refund_id: String,
53
53
  status: Dodopayments::Models::refund_status,
@@ -62,7 +62,7 @@ module Dodopayments
62
62
  created_at: Time,
63
63
  customer: Dodopayments::CustomerLimitedDetails,
64
64
  is_partial: bool,
65
- metadata: ::Hash[Symbol, String],
65
+ metadata: Dodopayments::Models::metadata,
66
66
  payment_id: String,
67
67
  refund_id: String,
68
68
  status: Dodopayments::Models::refund_status,
@@ -4,7 +4,7 @@ module Dodopayments
4
4
  {
5
5
  payment_id: String,
6
6
  items: ::Array[Dodopayments::RefundCreateParams::Item]?,
7
- metadata: ::Hash[Symbol, String],
7
+ metadata: Dodopayments::Models::metadata,
8
8
  reason: String?
9
9
  }
10
10
  & Dodopayments::Internal::Type::request_parameters
@@ -17,16 +17,18 @@ module Dodopayments
17
17
 
18
18
  attr_accessor items: ::Array[Dodopayments::RefundCreateParams::Item]?
19
19
 
20
- attr_reader metadata: ::Hash[Symbol, String]?
20
+ attr_reader metadata: Dodopayments::Models::metadata?
21
21
 
22
- def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
22
+ def metadata=: (
23
+ Dodopayments::Models::metadata
24
+ ) -> Dodopayments::Models::metadata
23
25
 
24
26
  attr_accessor reason: String?
25
27
 
26
28
  def initialize: (
27
29
  payment_id: String,
28
30
  ?items: ::Array[Dodopayments::RefundCreateParams::Item]?,
29
- ?metadata: ::Hash[Symbol, String],
31
+ ?metadata: Dodopayments::Models::metadata,
30
32
  ?reason: String?,
31
33
  ?request_options: Dodopayments::request_opts
32
34
  ) -> void
@@ -34,7 +36,7 @@ module Dodopayments
34
36
  def to_hash: -> {
35
37
  payment_id: String,
36
38
  items: ::Array[Dodopayments::RefundCreateParams::Item]?,
37
- metadata: ::Hash[Symbol, String],
39
+ metadata: Dodopayments::Models::metadata,
38
40
  reason: String?,
39
41
  request_options: Dodopayments::RequestOptions
40
42
  }
@@ -10,7 +10,7 @@ module Dodopayments
10
10
  credit_entitlement_cart: ::Array[Dodopayments::CreditEntitlementCartResponse],
11
11
  currency: Dodopayments::Models::currency,
12
12
  customer: Dodopayments::CustomerLimitedDetails,
13
- metadata: ::Hash[Symbol, String],
13
+ metadata: Dodopayments::Models::metadata,
14
14
  meter_credit_entitlement_cart: ::Array[Dodopayments::MeterCreditEntitlementCartResponse],
15
15
  meters: ::Array[Dodopayments::MeterCartResponseItem],
16
16
  next_billing_date: Time,
@@ -58,7 +58,7 @@ module Dodopayments
58
58
 
59
59
  attr_accessor customer: Dodopayments::CustomerLimitedDetails
60
60
 
61
- attr_accessor metadata: ::Hash[Symbol, String]
61
+ attr_accessor metadata: Dodopayments::Models::metadata
62
62
 
63
63
  attr_accessor meter_credit_entitlement_cart: ::Array[Dodopayments::MeterCreditEntitlementCartResponse]
64
64
 
@@ -125,7 +125,7 @@ module Dodopayments
125
125
  credit_entitlement_cart: ::Array[Dodopayments::CreditEntitlementCartResponse],
126
126
  currency: Dodopayments::Models::currency,
127
127
  customer: Dodopayments::CustomerLimitedDetails,
128
- metadata: ::Hash[Symbol, String],
128
+ metadata: Dodopayments::Models::metadata,
129
129
  meter_credit_entitlement_cart: ::Array[Dodopayments::MeterCreditEntitlementCartResponse],
130
130
  meters: ::Array[Dodopayments::MeterCartResponseItem],
131
131
  next_billing_date: Time,
@@ -165,7 +165,7 @@ module Dodopayments
165
165
  credit_entitlement_cart: ::Array[Dodopayments::CreditEntitlementCartResponse],
166
166
  currency: Dodopayments::Models::currency,
167
167
  customer: Dodopayments::CustomerLimitedDetails,
168
- metadata: ::Hash[Symbol, String],
168
+ metadata: Dodopayments::Models::metadata,
169
169
  meter_credit_entitlement_cart: ::Array[Dodopayments::MeterCreditEntitlementCartResponse],
170
170
  meters: ::Array[Dodopayments::MeterCartResponseItem],
171
171
  next_billing_date: Time,
@@ -6,7 +6,7 @@ module Dodopayments
6
6
  product_price: Integer,
7
7
  adaptive_currency_fees_inclusive: bool?,
8
8
  customer_balance_config: Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig?,
9
- metadata: ::Hash[Symbol, String]?,
9
+ metadata: Dodopayments::Models::metadata?,
10
10
  product_currency: Dodopayments::Models::currency?,
11
11
  product_description: String?
12
12
  }
@@ -24,7 +24,7 @@ module Dodopayments
24
24
 
25
25
  attr_accessor customer_balance_config: Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig?
26
26
 
27
- attr_accessor metadata: ::Hash[Symbol, String]?
27
+ attr_accessor metadata: Dodopayments::Models::metadata?
28
28
 
29
29
  attr_accessor product_currency: Dodopayments::Models::currency?
30
30
 
@@ -35,7 +35,7 @@ module Dodopayments
35
35
  product_price: Integer,
36
36
  ?adaptive_currency_fees_inclusive: bool?,
37
37
  ?customer_balance_config: Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig?,
38
- ?metadata: ::Hash[Symbol, String]?,
38
+ ?metadata: Dodopayments::Models::metadata?,
39
39
  ?product_currency: Dodopayments::Models::currency?,
40
40
  ?product_description: String?,
41
41
  ?request_options: Dodopayments::request_opts
@@ -46,7 +46,7 @@ module Dodopayments
46
46
  product_price: Integer,
47
47
  adaptive_currency_fees_inclusive: bool?,
48
48
  customer_balance_config: Dodopayments::SubscriptionChargeParams::CustomerBalanceConfig?,
49
- metadata: ::Hash[Symbol, String]?,
49
+ metadata: Dodopayments::Models::metadata?,
50
50
  product_currency: Dodopayments::Models::currency?,
51
51
  product_description: String?,
52
52
  request_options: Dodopayments::RequestOptions
@@ -14,7 +14,7 @@ module Dodopayments
14
14
  discount_codes: ::Array[String]?,
15
15
  :force_3ds => bool?,
16
16
  mandate_min_amount_inr_paise: Integer?,
17
- metadata: ::Hash[Symbol, String],
17
+ metadata: Dodopayments::Models::metadata,
18
18
  on_demand: Dodopayments::OnDemandSubscription?,
19
19
  one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
20
20
  payment_link: bool?,
@@ -57,9 +57,11 @@ module Dodopayments
57
57
 
58
58
  attr_accessor mandate_min_amount_inr_paise: Integer?
59
59
 
60
- attr_reader metadata: ::Hash[Symbol, String]?
60
+ attr_reader metadata: Dodopayments::Models::metadata?
61
61
 
62
- def metadata=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
62
+ def metadata=: (
63
+ Dodopayments::Models::metadata
64
+ ) -> Dodopayments::Models::metadata
63
65
 
64
66
  attr_accessor on_demand: Dodopayments::OnDemandSubscription?
65
67
 
@@ -102,7 +104,7 @@ module Dodopayments
102
104
  ?discount_codes: ::Array[String]?,
103
105
  ?force_3ds: bool?,
104
106
  ?mandate_min_amount_inr_paise: Integer?,
105
- ?metadata: ::Hash[Symbol, String],
107
+ ?metadata: Dodopayments::Models::metadata,
106
108
  ?on_demand: Dodopayments::OnDemandSubscription?,
107
109
  ?one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
108
110
  ?payment_link: bool?,
@@ -130,7 +132,7 @@ module Dodopayments
130
132
  discount_codes: ::Array[String]?,
131
133
  :force_3ds => bool?,
132
134
  mandate_min_amount_inr_paise: Integer?,
133
- metadata: ::Hash[Symbol, String],
135
+ metadata: Dodopayments::Models::metadata,
134
136
  on_demand: Dodopayments::OnDemandSubscription?,
135
137
  one_time_product_cart: ::Array[Dodopayments::OneTimeProductCartItem]?,
136
138
  payment_link: bool?,
@@ -4,7 +4,7 @@ module Dodopayments
4
4
  {
5
5
  addons: ::Array[Dodopayments::AddonCartResponseItem],
6
6
  customer: Dodopayments::CustomerLimitedDetails,
7
- metadata: ::Hash[Symbol, String],
7
+ metadata: Dodopayments::Models::metadata,
8
8
  payment_id: String,
9
9
  recurring_pre_tax_amount: Integer,
10
10
  subscription_id: String,
@@ -21,7 +21,7 @@ module Dodopayments
21
21
 
22
22
  attr_accessor customer: Dodopayments::CustomerLimitedDetails
23
23
 
24
- attr_accessor metadata: ::Hash[Symbol, String]
24
+ attr_accessor metadata: Dodopayments::Models::metadata
25
25
 
26
26
  attr_accessor payment_id: String
27
27
 
@@ -44,7 +44,7 @@ module Dodopayments
44
44
  def initialize: (
45
45
  addons: ::Array[Dodopayments::AddonCartResponseItem],
46
46
  customer: Dodopayments::CustomerLimitedDetails,
47
- metadata: ::Hash[Symbol, String],
47
+ metadata: Dodopayments::Models::metadata,
48
48
  payment_id: String,
49
49
  recurring_pre_tax_amount: Integer,
50
50
  subscription_id: String,
@@ -59,7 +59,7 @@ module Dodopayments
59
59
  def to_hash: -> {
60
60
  addons: ::Array[Dodopayments::AddonCartResponseItem],
61
61
  customer: Dodopayments::CustomerLimitedDetails,
62
- metadata: ::Hash[Symbol, String],
62
+ metadata: Dodopayments::Models::metadata,
63
63
  payment_id: String,
64
64
  recurring_pre_tax_amount: Integer,
65
65
  subscription_id: String,
@@ -8,7 +8,7 @@ module Dodopayments
8
8
  currency: Dodopayments::Models::currency,
9
9
  customer: Dodopayments::CustomerLimitedDetails,
10
10
  discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
11
- metadata: ::Hash[Symbol, String],
11
+ metadata: Dodopayments::Models::metadata,
12
12
  next_billing_date: Time,
13
13
  on_demand: bool,
14
14
  payment_frequency_count: Integer,
@@ -46,7 +46,7 @@ module Dodopayments
46
46
 
47
47
  attr_accessor discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount]
48
48
 
49
- attr_accessor metadata: ::Hash[Symbol, String]
49
+ attr_accessor metadata: Dodopayments::Models::metadata
50
50
 
51
51
  attr_accessor next_billing_date: Time
52
52
 
@@ -99,7 +99,7 @@ module Dodopayments
99
99
  currency: Dodopayments::Models::currency,
100
100
  customer: Dodopayments::CustomerLimitedDetails,
101
101
  discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
102
- metadata: ::Hash[Symbol, String],
102
+ metadata: Dodopayments::Models::metadata,
103
103
  next_billing_date: Time,
104
104
  on_demand: bool,
105
105
  payment_frequency_count: Integer,
@@ -131,7 +131,7 @@ module Dodopayments
131
131
  currency: Dodopayments::Models::currency,
132
132
  customer: Dodopayments::CustomerLimitedDetails,
133
133
  discounts: ::Array[Dodopayments::Models::SubscriptionListResponse::Discount],
134
- metadata: ::Hash[Symbol, String],
134
+ metadata: Dodopayments::Models::metadata,
135
135
  next_billing_date: Time,
136
136
  on_demand: bool,
137
137
  payment_frequency_count: Integer,
@@ -12,7 +12,7 @@ module Dodopayments
12
12
  customer_business_name: String?,
13
13
  customer_name: String?,
14
14
  disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
15
- metadata: ::Hash[Symbol, String]?,
15
+ metadata: Dodopayments::Models::metadata?,
16
16
  next_billing_date: Time?,
17
17
  status: Dodopayments::Models::subscription_status?,
18
18
  tax_id: String?
@@ -43,7 +43,7 @@ module Dodopayments
43
43
 
44
44
  attr_accessor disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?
45
45
 
46
- attr_accessor metadata: ::Hash[Symbol, String]?
46
+ attr_accessor metadata: Dodopayments::Models::metadata?
47
47
 
48
48
  attr_accessor next_billing_date: Time?
49
49
 
@@ -62,7 +62,7 @@ module Dodopayments
62
62
  ?customer_business_name: String?,
63
63
  ?customer_name: String?,
64
64
  ?disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
65
- ?metadata: ::Hash[Symbol, String]?,
65
+ ?metadata: Dodopayments::Models::metadata?,
66
66
  ?next_billing_date: Time?,
67
67
  ?status: Dodopayments::Models::subscription_status?,
68
68
  ?tax_id: String?,
@@ -80,7 +80,7 @@ module Dodopayments
80
80
  customer_business_name: String?,
81
81
  customer_name: String?,
82
82
  disable_on_demand: Dodopayments::SubscriptionUpdateParams::DisableOnDemand?,
83
- metadata: ::Hash[Symbol, String]?,
83
+ metadata: Dodopayments::Models::metadata?,
84
84
  next_billing_date: Time?,
85
85
  status: Dodopayments::Models::subscription_status?,
86
86
  tax_id: String?,
@@ -10,7 +10,7 @@ module Dodopayments
10
10
  discount_code: String?,
11
11
  discount_codes: ::Array[String]?,
12
12
  effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
13
- metadata: ::Hash[Symbol, String]?,
13
+ metadata: Dodopayments::Models::metadata?,
14
14
  on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
15
15
  }
16
16
 
@@ -35,7 +35,7 @@ module Dodopayments
35
35
  Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at
36
36
  ) -> Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at
37
37
 
38
- attr_accessor metadata: ::Hash[Symbol, String]?
38
+ attr_accessor metadata: Dodopayments::Models::metadata?
39
39
 
40
40
  attr_accessor on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
41
41
 
@@ -48,7 +48,7 @@ module Dodopayments
48
48
  ?discount_code: String?,
49
49
  ?discount_codes: ::Array[String]?,
50
50
  ?effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
51
- ?metadata: ::Hash[Symbol, String]?,
51
+ ?metadata: Dodopayments::Models::metadata?,
52
52
  ?on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
53
53
  ) -> void
54
54
 
@@ -61,7 +61,7 @@ module Dodopayments
61
61
  discount_code: String?,
62
62
  discount_codes: ::Array[String]?,
63
63
  effective_at: Dodopayments::Models::UpdateSubscriptionPlanReq::effective_at,
64
- metadata: ::Hash[Symbol, String]?,
64
+ metadata: Dodopayments::Models::metadata?,
65
65
  on_payment_failure: Dodopayments::Models::UpdateSubscriptionPlanReq::on_payment_failure?
66
66
  }
67
67
 
@@ -269,6 +269,8 @@ module Dodopayments
269
269
 
270
270
  class LicenseValidateParams = Dodopayments::Models::LicenseValidateParams
271
271
 
272
+ Metadata: Dodopayments::Internal::Type::Converter
273
+
272
274
  class Meter = Dodopayments::Models::Meter
273
275
 
274
276
  class MeterAggregation = Dodopayments::Models::MeterAggregation
@@ -17,7 +17,7 @@ module Dodopayments
17
17
  ?feature_flags: Dodopayments::CheckoutSessionFlags,
18
18
  ?force_3ds: bool?,
19
19
  ?mandate_min_amount_inr_paise: Integer?,
20
- ?metadata: ::Hash[Symbol, String]?,
20
+ ?metadata: Dodopayments::Models::metadata?,
21
21
  ?minimal_address: bool,
22
22
  ?payment_method_id: String?,
23
23
  ?product_collection_id: String?,
@@ -50,7 +50,7 @@ module Dodopayments
50
50
  ?feature_flags: Dodopayments::CheckoutSessionFlags,
51
51
  ?force_3ds: bool?,
52
52
  ?mandate_min_amount_inr_paise: Integer?,
53
- ?metadata: ::Hash[Symbol, String]?,
53
+ ?metadata: Dodopayments::Models::metadata?,
54
54
  ?minimal_address: bool,
55
55
  ?payment_method_id: String?,
56
56
  ?product_collection_id: String?,
@@ -23,7 +23,7 @@ module Dodopayments
23
23
  entry_type: Dodopayments::Models::CreditEntitlements::ledger_entry_type,
24
24
  ?expires_at: Time?,
25
25
  ?idempotency_key: String?,
26
- ?metadata: ::Hash[Symbol, String]?,
26
+ ?metadata: Dodopayments::Models::metadata?,
27
27
  ?reason: String?,
28
28
  ?request_options: Dodopayments::request_opts
29
29
  ) -> Dodopayments::Models::CreditEntitlements::BalanceCreateLedgerEntryResponse
@@ -8,7 +8,7 @@ module Dodopayments
8
8
  def create: (
9
9
  email: String,
10
10
  name: String,
11
- ?metadata: ::Hash[Symbol, String],
11
+ ?metadata: Dodopayments::Models::metadata,
12
12
  ?phone_number: String?,
13
13
  ?request_options: Dodopayments::request_opts
14
14
  ) -> Dodopayments::Customer
@@ -21,7 +21,7 @@ module Dodopayments
21
21
  def update: (
22
22
  String customer_id,
23
23
  ?email: String?,
24
- ?metadata: ::Hash[Symbol, String]?,
24
+ ?metadata: Dodopayments::Models::metadata?,
25
25
  ?name: String?,
26
26
  ?phone_number: String?,
27
27
  ?request_options: Dodopayments::request_opts
@@ -6,7 +6,7 @@ module Dodopayments
6
6
  type: Dodopayments::Models::discount_type,
7
7
  ?code: String?,
8
8
  ?expires_at: Time?,
9
- ?metadata: ::Hash[Symbol, String],
9
+ ?metadata: Dodopayments::Models::metadata,
10
10
  ?name: String?,
11
11
  ?preserve_on_plan_change: bool,
12
12
  ?restricted_to: ::Array[String]?,
@@ -25,7 +25,7 @@ module Dodopayments
25
25
  ?amount: Integer?,
26
26
  ?code: String?,
27
27
  ?expires_at: Time?,
28
- ?metadata: ::Hash[Symbol, String]?,
28
+ ?metadata: Dodopayments::Models::metadata?,
29
29
  ?name: String?,
30
30
  ?preserve_on_plan_change: bool?,
31
31
  ?restricted_to: ::Array[String]?,