dodopayments 1.17.0 → 1.18.1

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 (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +32 -0
  3. data/README.md +1 -1
  4. data/lib/dodopayments/file_part.rb +55 -0
  5. data/lib/dodopayments/internal/transport/base_client.rb +3 -3
  6. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +1 -1
  7. data/lib/dodopayments/internal/type/converter.rb +1 -1
  8. data/lib/dodopayments/internal/type/{io_like.rb → file_input.rb} +8 -4
  9. data/lib/dodopayments/internal/util.rb +69 -61
  10. data/lib/dodopayments/models/billing_address.rb +9 -5
  11. data/lib/dodopayments/models/create_new_customer.rb +8 -1
  12. data/lib/dodopayments/models/customer_limited_details.rb +5 -3
  13. data/lib/dodopayments/models/customer_list_params.rb +4 -2
  14. data/lib/dodopayments/models/customers/customer_portal_create_params.rb +2 -1
  15. data/lib/dodopayments/models/discount.rb +23 -10
  16. data/lib/dodopayments/models/discount_create_params.rb +15 -5
  17. data/lib/dodopayments/models/discount_list_params.rb +4 -2
  18. data/lib/dodopayments/models/discount_update_params.rb +13 -3
  19. data/lib/dodopayments/models/dispute.rb +17 -6
  20. data/lib/dodopayments/models/dispute_list_params.rb +14 -7
  21. data/lib/dodopayments/models/license_key.rb +26 -11
  22. data/lib/dodopayments/models/license_key_instance_list_params.rb +6 -3
  23. data/lib/dodopayments/models/license_key_list_params.rb +10 -5
  24. data/lib/dodopayments/models/license_key_update_params.rb +9 -3
  25. data/lib/dodopayments/models/one_time_product_cart_item.rb +7 -1
  26. data/lib/dodopayments/models/payment.rb +41 -16
  27. data/lib/dodopayments/models/payment_create_params.rb +22 -7
  28. data/lib/dodopayments/models/payment_create_response.rb +16 -6
  29. data/lib/dodopayments/models/payment_list_params.rb +14 -7
  30. data/lib/dodopayments/models/payout_list_params.rb +4 -2
  31. data/lib/dodopayments/models/payout_list_response.rb +27 -13
  32. data/lib/dodopayments/models/price.rb +38 -13
  33. data/lib/dodopayments/models/product.rb +31 -13
  34. data/lib/dodopayments/models/product_create_params.rb +20 -7
  35. data/lib/dodopayments/models/product_list_params.rb +11 -4
  36. data/lib/dodopayments/models/product_list_response.rb +27 -11
  37. data/lib/dodopayments/models/product_update_params.rb +22 -8
  38. data/lib/dodopayments/models/refund.rb +13 -6
  39. data/lib/dodopayments/models/refund_create_params.rb +4 -2
  40. data/lib/dodopayments/models/refund_list_params.rb +12 -6
  41. data/lib/dodopayments/models/subscription.rb +46 -14
  42. data/lib/dodopayments/models/subscription_change_plan_params.rb +47 -0
  43. data/lib/dodopayments/models/subscription_charge_params.rb +6 -1
  44. data/lib/dodopayments/models/subscription_create_params.rb +34 -11
  45. data/lib/dodopayments/models/subscription_create_response.rb +15 -5
  46. data/lib/dodopayments/models/subscription_list_params.rb +12 -6
  47. data/lib/dodopayments/models/webhook_event_list_params.rb +16 -6
  48. data/lib/dodopayments/resources/customers/customer_portal.rb +4 -2
  49. data/lib/dodopayments/resources/customers.rb +10 -4
  50. data/lib/dodopayments/resources/discounts.rb +38 -13
  51. data/lib/dodopayments/resources/disputes.rb +16 -8
  52. data/lib/dodopayments/resources/license_key_instances.rb +11 -5
  53. data/lib/dodopayments/resources/license_keys.rb +23 -10
  54. data/lib/dodopayments/resources/payments.rb +38 -15
  55. data/lib/dodopayments/resources/payouts.rb +4 -2
  56. data/lib/dodopayments/resources/products/images.rb +3 -1
  57. data/lib/dodopayments/resources/products.rb +56 -20
  58. data/lib/dodopayments/resources/refunds.rb +18 -9
  59. data/lib/dodopayments/resources/subscriptions.rb +81 -19
  60. data/lib/dodopayments/resources/webhook_events.rb +16 -6
  61. data/lib/dodopayments/version.rb +1 -1
  62. data/lib/dodopayments.rb +3 -1
  63. data/rbi/lib/dodopayments/file_part.rbi +34 -0
  64. data/rbi/lib/dodopayments/internal/transport/base_client.rbi +17 -3
  65. data/rbi/lib/dodopayments/internal/type/{io_like.rbi → file_input.rbi} +6 -2
  66. data/rbi/lib/dodopayments/internal/util.rbi +24 -19
  67. data/rbi/lib/dodopayments/models/billing_address.rbi +12 -2
  68. data/rbi/lib/dodopayments/models/create_new_customer.rbi +9 -2
  69. data/rbi/lib/dodopayments/models/customer_limited_details.rbi +8 -2
  70. data/rbi/lib/dodopayments/models/customer_list_params.rbi +7 -2
  71. data/rbi/lib/dodopayments/models/customers/customer_portal_create_params.rbi +5 -2
  72. data/rbi/lib/dodopayments/models/discount.rbi +14 -0
  73. data/rbi/lib/dodopayments/models/discount_create_params.rbi +15 -0
  74. data/rbi/lib/dodopayments/models/discount_list_params.rbi +7 -2
  75. data/rbi/lib/dodopayments/models/discount_update_params.rbi +10 -0
  76. data/rbi/lib/dodopayments/models/dispute.rbi +8 -3
  77. data/rbi/lib/dodopayments/models/dispute_list_params.rbi +7 -0
  78. data/rbi/lib/dodopayments/models/license_key.rbi +12 -0
  79. data/rbi/lib/dodopayments/models/license_key_instance_list_params.rbi +9 -2
  80. data/rbi/lib/dodopayments/models/license_key_list_params.rbi +6 -3
  81. data/rbi/lib/dodopayments/models/license_key_update_params.rbi +12 -2
  82. data/rbi/lib/dodopayments/models/one_time_product_cart_item.rbi +8 -2
  83. data/rbi/lib/dodopayments/models/payment.rbi +19 -0
  84. data/rbi/lib/dodopayments/models/payment_create_params.rbi +14 -0
  85. data/rbi/lib/dodopayments/models/payment_create_response.rbi +7 -0
  86. data/rbi/lib/dodopayments/models/payment_list_params.rbi +7 -0
  87. data/rbi/lib/dodopayments/models/payout_list_params.rbi +7 -2
  88. data/rbi/lib/dodopayments/models/payout_list_response.rbi +13 -0
  89. data/rbi/lib/dodopayments/models/price.rbi +25 -0
  90. data/rbi/lib/dodopayments/models/product.rbi +14 -0
  91. data/rbi/lib/dodopayments/models/product_create_params.rbi +8 -0
  92. data/rbi/lib/dodopayments/models/product_list_params.rbi +15 -2
  93. data/rbi/lib/dodopayments/models/product_list_response.rbi +21 -0
  94. data/rbi/lib/dodopayments/models/product_update_params.rbi +18 -0
  95. data/rbi/lib/dodopayments/models/refund.rbi +7 -3
  96. data/rbi/lib/dodopayments/models/refund_create_params.rbi +7 -2
  97. data/rbi/lib/dodopayments/models/refund_list_params.rbi +6 -0
  98. data/rbi/lib/dodopayments/models/subscription.rbi +24 -1
  99. data/rbi/lib/dodopayments/models/subscription_change_plan_params.rbi +71 -0
  100. data/rbi/lib/dodopayments/models/subscription_charge_params.rbi +6 -2
  101. data/rbi/lib/dodopayments/models/subscription_create_params.rbi +25 -2
  102. data/rbi/lib/dodopayments/models/subscription_create_response.rbi +7 -0
  103. data/rbi/lib/dodopayments/models/subscription_list_params.rbi +6 -0
  104. data/rbi/lib/dodopayments/models/webhook_event_list_params.rbi +6 -0
  105. data/rbi/lib/dodopayments/resources/subscriptions.rbi +20 -0
  106. data/sig/dodopayments/file_part.rbs +21 -0
  107. data/sig/dodopayments/internal/transport/base_client.rbs +9 -3
  108. data/sig/dodopayments/internal/type/{io_like.rbs → file_input.rbs} +1 -1
  109. data/sig/dodopayments/internal/util.rbs +14 -12
  110. data/sig/dodopayments/models/subscription.rbs +4 -0
  111. data/sig/dodopayments/models/subscription_change_plan_params.rbs +41 -0
  112. data/sig/dodopayments/resources/subscriptions.rbs +8 -0
  113. metadata +11 -5
@@ -76,16 +76,30 @@ module Dodopayments
76
76
  optional :tax_category, enum: -> { Dodopayments::Models::ProductUpdateParams::TaxCategory }, nil?: true
77
77
 
78
78
  # @!method initialize(addons: nil, description: nil, image_id: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, name: nil, price: nil, tax_category: nil, request_options: {})
79
- # @param addons [Array<String>, nil]
80
- # @param description [String, nil]
81
- # @param image_id [String, nil]
82
- # @param license_key_activation_message [String, nil]
83
- # @param license_key_activations_limit [Integer, nil]
79
+ # Some parameter documentations has been truncated, see
80
+ # {Dodopayments::Models::ProductUpdateParams} for more details.
81
+ #
82
+ # @param addons [Array<String>, nil] Available Addons for subscription products
83
+ #
84
+ # @param description [String, nil] Description of the product, optional and must be at most 1000 characters.
85
+ #
86
+ # @param image_id [String, nil] Product image id after its uploaded to S3
87
+ #
88
+ # @param license_key_activation_message [String, nil] Message sent to the customer upon license key activation. ...
89
+ #
90
+ # @param license_key_activations_limit [Integer, nil] Limit for the number of activations for the license key. ...
91
+ #
84
92
  # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
85
- # @param license_key_enabled [Boolean, nil]
86
- # @param name [String, nil]
93
+ #
94
+ # @param license_key_enabled [Boolean, nil] Whether the product requires a license key. ...
95
+ #
96
+ # @param name [String, nil] Name of the product, optional and must be at most 100 characters.
97
+ #
87
98
  # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
88
- # @param tax_category [Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory, nil]
99
+ #
100
+ # @param tax_category [Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
101
+ # ...
102
+ #
89
103
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
90
104
 
91
105
  # Represents the different categories of taxation applicable to various products
@@ -51,14 +51,21 @@ module Dodopayments
51
51
  optional :reason, String, nil?: true
52
52
 
53
53
  # @!method initialize(business_id:, created_at:, payment_id:, refund_id:, status:, amount: nil, currency: nil, reason: nil)
54
- # @param business_id [String]
55
- # @param created_at [Time]
56
- # @param payment_id [String]
57
- # @param refund_id [String]
54
+ # @param business_id [String] The unique identifier of the business issuing the refund.
55
+ #
56
+ # @param created_at [Time] The timestamp of when the refund was created in UTC.
57
+ #
58
+ # @param payment_id [String] The unique identifier of the payment associated with the refund.
59
+ #
60
+ # @param refund_id [String] The unique identifier of the refund.
61
+ #
58
62
  # @param status [Symbol, Dodopayments::Models::RefundStatus]
59
- # @param amount [Integer, nil]
63
+ #
64
+ # @param amount [Integer, nil] The refunded amount.
65
+ #
60
66
  # @param currency [Symbol, Dodopayments::Models::Refund::Currency, nil]
61
- # @param reason [String, nil]
67
+ #
68
+ # @param reason [String, nil] The reason provided for the refund, if any. Optional.
62
69
 
63
70
  # @see Dodopayments::Models::Refund#currency
64
71
  module Currency
@@ -20,8 +20,10 @@ module Dodopayments
20
20
  optional :reason, String, nil?: true
21
21
 
22
22
  # @!method initialize(payment_id:, reason: nil, request_options: {})
23
- # @param payment_id [String]
24
- # @param reason [String, nil]
23
+ # @param payment_id [String] The unique identifier of the payment to be refunded.
24
+ #
25
+ # @param reason [String, nil] The reason for the refund, if any. Maximum length is 3000 characters. Optional.
26
+ #
25
27
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
26
28
  end
27
29
  end
@@ -44,12 +44,18 @@ module Dodopayments
44
44
  optional :status, enum: -> { Dodopayments::Models::RefundStatus }, nil?: true
45
45
 
46
46
  # @!method initialize(created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
47
- # @param created_at_gte [Time, nil]
48
- # @param created_at_lte [Time, nil]
49
- # @param customer_id [String, nil]
50
- # @param page_number [Integer, nil]
51
- # @param page_size [Integer, nil]
52
- # @param status [Symbol, Dodopayments::Models::RefundStatus, nil]
47
+ # @param created_at_gte [Time, nil] Get events after this created time
48
+ #
49
+ # @param created_at_lte [Time, nil] Get events created before this time
50
+ #
51
+ # @param customer_id [String, nil] Filter by customer_id
52
+ #
53
+ # @param page_number [Integer, nil] Page number default is 0
54
+ #
55
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
56
+ #
57
+ # @param status [Symbol, Dodopayments::Models::RefundStatus, nil] Filter by status
58
+ #
53
59
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
54
60
  end
55
61
  end
@@ -31,7 +31,8 @@ module Dodopayments
31
31
  required :metadata, Dodopayments::Internal::Type::HashOf[String]
32
32
 
33
33
  # @!attribute next_billing_date
34
- # Timestamp of the next scheduled billing
34
+ # Timestamp of the next scheduled billing. Indicates the end of current billing
35
+ # period
35
36
  #
36
37
  # @return [Time]
37
38
  required :next_billing_date, Time
@@ -47,6 +48,12 @@ module Dodopayments
47
48
  # @return [Symbol, Dodopayments::Models::TimeInterval]
48
49
  required :payment_frequency_interval, enum: -> { Dodopayments::Models::TimeInterval }
49
50
 
51
+ # @!attribute previous_billing_date
52
+ # Timestamp of the last payment. Indicates the start of current billing period
53
+ #
54
+ # @return [Time]
55
+ required :previous_billing_date, Time
56
+
50
57
  # @!attribute product_id
51
58
  # Identifier of the product associated with this subscription
52
59
  #
@@ -112,28 +119,53 @@ module Dodopayments
112
119
  # @return [String, nil]
113
120
  optional :discount_id, String, nil?: true
114
121
 
115
- # @!method initialize(billing:, created_at:, currency:, customer:, metadata:, next_billing_date:, payment_frequency_count:, payment_frequency_interval:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_id: nil)
122
+ # @!method initialize(billing:, created_at:, currency:, customer:, metadata:, next_billing_date:, payment_frequency_count:, payment_frequency_interval:, previous_billing_date:, product_id:, quantity:, recurring_pre_tax_amount:, status:, subscription_id:, subscription_period_count:, subscription_period_interval:, tax_inclusive:, trial_period_days:, cancelled_at: nil, discount_id: nil)
123
+ # Some parameter documentations has been truncated, see
124
+ # {Dodopayments::Models::Subscription} for more details.
125
+ #
116
126
  # Response struct representing subscription details
117
127
  #
118
128
  # @param billing [Dodopayments::Models::BillingAddress]
119
- # @param created_at [Time]
129
+ #
130
+ # @param created_at [Time] Timestamp when the subscription was created
131
+ #
120
132
  # @param currency [Symbol, Dodopayments::Models::Subscription::Currency]
133
+ #
121
134
  # @param customer [Dodopayments::Models::CustomerLimitedDetails]
135
+ #
122
136
  # @param metadata [Hash{Symbol=>String}]
123
- # @param next_billing_date [Time]
124
- # @param payment_frequency_count [Integer]
137
+ #
138
+ # @param next_billing_date [Time] Timestamp of the next scheduled billing. Indicates the end of current billing pe
139
+ # ...
140
+ #
141
+ # @param payment_frequency_count [Integer] Number of payment frequency intervals
142
+ #
125
143
  # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
126
- # @param product_id [String]
127
- # @param quantity [Integer]
128
- # @param recurring_pre_tax_amount [Integer]
144
+ #
145
+ # @param previous_billing_date [Time] Timestamp of the last payment. Indicates the start of current billing period
146
+ #
147
+ # @param product_id [String] Identifier of the product associated with this subscription
148
+ #
149
+ # @param quantity [Integer] Number of units/items included in the subscription
150
+ #
151
+ # @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in smallest currency unit (
152
+ # ...
153
+ #
129
154
  # @param status [Symbol, Dodopayments::Models::SubscriptionStatus]
130
- # @param subscription_id [String]
131
- # @param subscription_period_count [Integer]
155
+ #
156
+ # @param subscription_id [String] Unique identifier for the subscription
157
+ #
158
+ # @param subscription_period_count [Integer] Number of subscription period intervals
159
+ #
132
160
  # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
133
- # @param tax_inclusive [Boolean]
134
- # @param trial_period_days [Integer]
135
- # @param cancelled_at [Time, nil]
136
- # @param discount_id [String, nil]
161
+ #
162
+ # @param tax_inclusive [Boolean] Indicates if the recurring_pre_tax_amount is tax inclusive
163
+ #
164
+ # @param trial_period_days [Integer] Number of days in the trial period (0 if no trial)
165
+ #
166
+ # @param cancelled_at [Time, nil] Cancelled timestamp if the subscription is cancelled
167
+ #
168
+ # @param discount_id [String, nil] The discount id if discount is applied
137
169
 
138
170
  # @see Dodopayments::Models::Subscription#currency
139
171
  module Currency
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Dodopayments
4
+ module Models
5
+ # @see Dodopayments::Resources::Subscriptions#change_plan
6
+ class SubscriptionChangePlanParams < Dodopayments::Internal::Type::BaseModel
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
8
+ include Dodopayments::Internal::Type::RequestParameters
9
+
10
+ # @!attribute product_id
11
+ # Unique identifier of the product to subscribe to
12
+ #
13
+ # @return [String]
14
+ required :product_id, String
15
+
16
+ # @!attribute proration_billing_mode
17
+ #
18
+ # @return [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
19
+ required :proration_billing_mode,
20
+ enum: -> { Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode }
21
+
22
+ # @!attribute quantity
23
+ # Number of units to subscribe for. Must be at least 1.
24
+ #
25
+ # @return [Integer]
26
+ required :quantity, Integer
27
+
28
+ # @!method initialize(product_id:, proration_billing_mode:, quantity:, request_options: {})
29
+ # @param product_id [String] Unique identifier of the product to subscribe to
30
+ #
31
+ # @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
32
+ #
33
+ # @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
34
+ #
35
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
36
+
37
+ module ProrationBillingMode
38
+ extend Dodopayments::Internal::Type::Enum
39
+
40
+ PRORATED_IMMEDIATELY = :prorated_immediately
41
+
42
+ # @!method self.values
43
+ # @return [Array<Symbol>]
44
+ end
45
+ end
46
+ end
47
+ end
@@ -15,7 +15,12 @@ module Dodopayments
15
15
  required :product_price, Integer
16
16
 
17
17
  # @!method initialize(product_price:, request_options: {})
18
- # @param product_price [Integer]
18
+ # Some parameter documentations has been truncated, see
19
+ # {Dodopayments::Models::SubscriptionChargeParams} for more details.
20
+ #
21
+ # @param product_price [Integer] The product price. Represented in the lowest denomination of the currency (e.g.,
22
+ # ...
23
+ #
19
24
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
20
25
  end
21
26
  end
@@ -98,20 +98,38 @@ module Dodopayments
98
98
  optional :trial_period_days, Integer, nil?: true
99
99
 
100
100
  # @!method initialize(billing:, customer:, product_id:, quantity:, allowed_payment_method_types: nil, billing_currency: nil, discount_code: nil, metadata: nil, on_demand: nil, payment_link: nil, return_url: nil, show_saved_payment_methods: nil, tax_id: nil, trial_period_days: nil, request_options: {})
101
+ # Some parameter documentations has been truncated, see
102
+ # {Dodopayments::Models::SubscriptionCreateParams} for more details.
103
+ #
101
104
  # @param billing [Dodopayments::Models::BillingAddress]
105
+ #
102
106
  # @param customer [Dodopayments::Models::AttachExistingCustomer, Dodopayments::Models::CreateNewCustomer]
103
- # @param product_id [String]
104
- # @param quantity [Integer]
105
- # @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::SubscriptionCreateParams::AllowedPaymentMethodType>, nil]
107
+ #
108
+ # @param product_id [String] Unique identifier of the product to subscribe to
109
+ #
110
+ # @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
111
+ #
112
+ # @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::SubscriptionCreateParams::AllowedPaymentMethodType>, nil] List of payment methods allowed during checkout. ...
113
+ #
106
114
  # @param billing_currency [Symbol, Dodopayments::Models::SubscriptionCreateParams::BillingCurrency, nil]
107
- # @param discount_code [String, nil]
115
+ #
116
+ # @param discount_code [String, nil] Discount Code to apply to the subscription
117
+ #
108
118
  # @param metadata [Hash{Symbol=>String}]
119
+ #
109
120
  # @param on_demand [Dodopayments::Models::SubscriptionCreateParams::OnDemand, nil]
110
- # @param payment_link [Boolean, nil]
111
- # @param return_url [String, nil]
112
- # @param show_saved_payment_methods [Boolean]
113
- # @param tax_id [String, nil]
114
- # @param trial_period_days [Integer, nil]
121
+ #
122
+ # @param payment_link [Boolean, nil] If true, generates a payment link. ...
123
+ #
124
+ # @param return_url [String, nil] Optional URL to redirect after successful subscription creation
125
+ #
126
+ # @param show_saved_payment_methods [Boolean] Display saved payment methods of a returning customer ...
127
+ #
128
+ # @param tax_id [String, nil] Tax ID in case the payment is B2B. If tax id validation fails the payment creati
129
+ # ...
130
+ #
131
+ # @param trial_period_days [Integer, nil] Optional trial period in days ...
132
+ #
115
133
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
116
134
 
117
135
  module AllowedPaymentMethodType
@@ -310,8 +328,13 @@ module Dodopayments
310
328
  optional :product_price, Integer, nil?: true
311
329
 
312
330
  # @!method initialize(mandate_only:, product_price: nil)
313
- # @param mandate_only [Boolean]
314
- # @param product_price [Integer, nil]
331
+ # Some parameter documentations has been truncated, see
332
+ # {Dodopayments::Models::SubscriptionCreateParams::OnDemand} for more details.
333
+ #
334
+ # @param mandate_only [Boolean] If set as True, does not perform any charge and only authorizes payment method d
335
+ # ...
336
+ #
337
+ # @param product_price [Integer, nil] Product price for the initial charge to customer ...
315
338
  end
316
339
  end
317
340
  end
@@ -47,13 +47,23 @@ module Dodopayments
47
47
  optional :payment_link, String, nil?: true
48
48
 
49
49
  # @!method initialize(customer:, metadata:, recurring_pre_tax_amount:, subscription_id:, client_secret: nil, discount_id: nil, payment_link: nil)
50
+ # Some parameter documentations has been truncated, see
51
+ # {Dodopayments::Models::SubscriptionCreateResponse} for more details.
52
+ #
50
53
  # @param customer [Dodopayments::Models::CustomerLimitedDetails]
54
+ #
51
55
  # @param metadata [Hash{Symbol=>String}]
52
- # @param recurring_pre_tax_amount [Integer]
53
- # @param subscription_id [String]
54
- # @param client_secret [String, nil]
55
- # @param discount_id [String, nil]
56
- # @param payment_link [String, nil]
56
+ #
57
+ # @param recurring_pre_tax_amount [Integer] Tax will be added to the amount and charged to the customer on each billing cycl
58
+ # ...
59
+ #
60
+ # @param subscription_id [String] Unique identifier for the subscription
61
+ #
62
+ # @param client_secret [String, nil] Client secret used to load Dodo checkout SDK ...
63
+ #
64
+ # @param discount_id [String, nil] The discount id if discount is applied
65
+ #
66
+ # @param payment_link [String, nil] URL to checkout page
57
67
  end
58
68
  end
59
69
  end
@@ -44,12 +44,18 @@ module Dodopayments
44
44
  optional :status, enum: -> { Dodopayments::Models::SubscriptionStatus }, nil?: true
45
45
 
46
46
  # @!method initialize(created_at_gte: nil, created_at_lte: nil, customer_id: nil, page_number: nil, page_size: nil, status: nil, request_options: {})
47
- # @param created_at_gte [Time, nil]
48
- # @param created_at_lte [Time, nil]
49
- # @param customer_id [String, nil]
50
- # @param page_number [Integer, nil]
51
- # @param page_size [Integer, nil]
52
- # @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
47
+ # @param created_at_gte [Time, nil] Get events after this created time
48
+ #
49
+ # @param created_at_lte [Time, nil] Get events created before this time
50
+ #
51
+ # @param customer_id [String, nil] Filter by customer id
52
+ #
53
+ # @param page_number [Integer, nil] Page number default is 0
54
+ #
55
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
56
+ #
57
+ # @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil] Filter by status
58
+ #
53
59
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
54
60
  end
55
61
  end
@@ -44,12 +44,22 @@ module Dodopayments
44
44
  optional :page_size, Integer, nil?: true
45
45
 
46
46
  # @!method initialize(created_at_gte: nil, created_at_lte: nil, limit: nil, object_id_: nil, page_number: nil, page_size: nil, request_options: {})
47
- # @param created_at_gte [Time, nil]
48
- # @param created_at_lte [Time, nil]
49
- # @param limit [Integer, nil]
50
- # @param object_id_ [String, nil]
51
- # @param page_number [Integer, nil]
52
- # @param page_size [Integer, nil]
47
+ # Some parameter documentations has been truncated, see
48
+ # {Dodopayments::Models::WebhookEventListParams} for more details.
49
+ #
50
+ # @param created_at_gte [Time, nil] Get events after this created time
51
+ #
52
+ # @param created_at_lte [Time, nil] Get events created before this time
53
+ #
54
+ # @param limit [Integer, nil] Min : 1, Max : 100, default 10
55
+ #
56
+ # @param object_id_ [String, nil] Get events history of a specific object like payment/subscription/refund/dispute
57
+ # ...
58
+ #
59
+ # @param page_number [Integer, nil] Page number default is 0
60
+ #
61
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
62
+ #
53
63
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
54
64
  end
55
65
  end
@@ -6,8 +6,10 @@ module Dodopayments
6
6
  class CustomerPortal
7
7
  # @overload create(customer_id, send_email: nil, request_options: {})
8
8
  #
9
- # @param customer_id [String]
10
- # @param send_email [Boolean, nil]
9
+ # @param customer_id [String] Customer Id
10
+ #
11
+ # @param send_email [Boolean, nil] If true, will send link to user.
12
+ #
11
13
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
12
14
  #
13
15
  # @return [Dodopayments::Models::CustomerPortalSession]
@@ -29,7 +29,8 @@ module Dodopayments
29
29
 
30
30
  # @overload retrieve(customer_id, request_options: {})
31
31
  #
32
- # @param customer_id [String]
32
+ # @param customer_id [String] Customer Id
33
+ #
33
34
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
34
35
  #
35
36
  # @return [Dodopayments::Models::Customer]
@@ -46,9 +47,12 @@ module Dodopayments
46
47
 
47
48
  # @overload update(customer_id, name: nil, phone_number: nil, request_options: {})
48
49
  #
49
- # @param customer_id [String]
50
+ # @param customer_id [String] Customer Id
51
+ #
50
52
  # @param name [String, nil]
53
+ #
51
54
  # @param phone_number [String, nil]
55
+ #
52
56
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
53
57
  #
54
58
  # @return [Dodopayments::Models::Customer]
@@ -67,8 +71,10 @@ module Dodopayments
67
71
 
68
72
  # @overload list(page_number: nil, page_size: nil, request_options: {})
69
73
  #
70
- # @param page_number [Integer, nil]
71
- # @param page_size [Integer, nil]
74
+ # @param page_number [Integer, nil] Page number default is 0
75
+ #
76
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
77
+ #
72
78
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
73
79
  #
74
80
  # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::Customer>]
@@ -3,17 +3,27 @@
3
3
  module Dodopayments
4
4
  module Resources
5
5
  class Discounts
6
+ # Some parameter documentations has been truncated, see
7
+ # {Dodopayments::Models::DiscountCreateParams} for more details.
8
+ #
6
9
  # If `code` is omitted or empty, a random 16-char uppercase code is generated.
7
10
  #
8
11
  # @overload create(amount:, type:, code: nil, expires_at: nil, name: nil, restricted_to: nil, usage_limit: nil, request_options: {})
9
12
  #
10
- # @param amount [Integer]
13
+ # @param amount [Integer] The discount amount. ...
14
+ #
11
15
  # @param type [Symbol, Dodopayments::Models::DiscountType]
12
- # @param code [String, nil]
13
- # @param expires_at [Time, nil]
16
+ #
17
+ # @param code [String, nil] Optionally supply a code (will be uppercased). ...
18
+ #
19
+ # @param expires_at [Time, nil] When the discount expires, if ever.
20
+ #
14
21
  # @param name [String, nil]
15
- # @param restricted_to [Array<String>, nil]
16
- # @param usage_limit [Integer, nil]
22
+ #
23
+ # @param restricted_to [Array<String>, nil] List of product IDs to restrict usage (if any).
24
+ #
25
+ # @param usage_limit [Integer, nil] How many times this discount can be used (if any). ...
26
+ #
17
27
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
18
28
  #
19
29
  # @return [Dodopayments::Models::Discount]
@@ -34,7 +44,8 @@ module Dodopayments
34
44
  #
35
45
  # @overload retrieve(discount_id, request_options: {})
36
46
  #
37
- # @param discount_id [String]
47
+ # @param discount_id [String] Discount Id
48
+ #
38
49
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
39
50
  #
40
51
  # @return [Dodopayments::Models::Discount]
@@ -49,18 +60,29 @@ module Dodopayments
49
60
  )
50
61
  end
51
62
 
63
+ # Some parameter documentations has been truncated, see
64
+ # {Dodopayments::Models::DiscountUpdateParams} for more details.
65
+ #
52
66
  # PATCH /discounts/{discount_id}
53
67
  #
54
68
  # @overload update(discount_id, amount: nil, code: nil, expires_at: nil, name: nil, restricted_to: nil, type: nil, usage_limit: nil, request_options: {})
55
69
  #
56
- # @param discount_id [String]
57
- # @param amount [Integer, nil]
58
- # @param code [String, nil]
70
+ # @param discount_id [String] Discount Id
71
+ #
72
+ # @param amount [Integer, nil] If present, update the discount amount: ...
73
+ #
74
+ # @param code [String, nil] If present, update the discount code (uppercase).
75
+ #
59
76
  # @param expires_at [Time, nil]
77
+ #
60
78
  # @param name [String, nil]
61
- # @param restricted_to [Array<String>, nil]
79
+ #
80
+ # @param restricted_to [Array<String>, nil] If present, replaces all restricted product IDs with this new set. ...
81
+ #
62
82
  # @param type [Symbol, Dodopayments::Models::DiscountType, nil]
83
+ #
63
84
  # @param usage_limit [Integer, nil]
85
+ #
64
86
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
65
87
  #
66
88
  # @return [Dodopayments::Models::Discount]
@@ -81,8 +103,10 @@ module Dodopayments
81
103
  #
82
104
  # @overload list(page_number: nil, page_size: nil, request_options: {})
83
105
  #
84
- # @param page_number [Integer, nil]
85
- # @param page_size [Integer, nil]
106
+ # @param page_number [Integer, nil] Page number (default = 0).
107
+ #
108
+ # @param page_size [Integer, nil] Page size (default = 10, max = 100).
109
+ #
86
110
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
87
111
  #
88
112
  # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::Discount>]
@@ -104,7 +128,8 @@ module Dodopayments
104
128
  #
105
129
  # @overload delete(discount_id, request_options: {})
106
130
  #
107
- # @param discount_id [String]
131
+ # @param discount_id [String] Discount Id
132
+ #
108
133
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
109
134
  #
110
135
  # @return [nil]
@@ -5,7 +5,8 @@ module Dodopayments
5
5
  class Disputes
6
6
  # @overload retrieve(dispute_id, request_options: {})
7
7
  #
8
- # @param dispute_id [String]
8
+ # @param dispute_id [String] Dispute Id
9
+ #
9
10
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
10
11
  #
11
12
  # @return [Dodopayments::Models::Dispute]
@@ -22,13 +23,20 @@ module Dodopayments
22
23
 
23
24
  # @overload list(created_at_gte: nil, created_at_lte: nil, customer_id: nil, dispute_stage: nil, dispute_status: nil, page_number: nil, page_size: nil, request_options: {})
24
25
  #
25
- # @param created_at_gte [Time, nil]
26
- # @param created_at_lte [Time, nil]
27
- # @param customer_id [String, nil]
28
- # @param dispute_stage [Symbol, Dodopayments::Models::DisputeStage, nil]
29
- # @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus, nil]
30
- # @param page_number [Integer, nil]
31
- # @param page_size [Integer, nil]
26
+ # @param created_at_gte [Time, nil] Get events after this created time
27
+ #
28
+ # @param created_at_lte [Time, nil] Get events created before this time
29
+ #
30
+ # @param customer_id [String, nil] Filter by customer_id
31
+ #
32
+ # @param dispute_stage [Symbol, Dodopayments::Models::DisputeStage, nil] Filter by dispute stage
33
+ #
34
+ # @param dispute_status [Symbol, Dodopayments::Models::DisputeStatus, nil] Filter by dispute status
35
+ #
36
+ # @param page_number [Integer, nil] Page number default is 0
37
+ #
38
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
39
+ #
32
40
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
33
41
  #
34
42
  # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::Dispute>]
@@ -5,7 +5,8 @@ module Dodopayments
5
5
  class LicenseKeyInstances
6
6
  # @overload retrieve(id, request_options: {})
7
7
  #
8
- # @param id [String]
8
+ # @param id [String] License key instance ID
9
+ #
9
10
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
10
11
  #
11
12
  # @return [Dodopayments::Models::LicenseKeyInstance]
@@ -22,8 +23,10 @@ module Dodopayments
22
23
 
23
24
  # @overload update(id, name:, request_options: {})
24
25
  #
25
- # @param id [String]
26
+ # @param id [String] License key instance ID
27
+ #
26
28
  # @param name [String]
29
+ #
27
30
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
28
31
  #
29
32
  # @return [Dodopayments::Models::LicenseKeyInstance]
@@ -42,9 +45,12 @@ module Dodopayments
42
45
 
43
46
  # @overload list(license_key_id: nil, page_number: nil, page_size: nil, request_options: {})
44
47
  #
45
- # @param license_key_id [String, nil]
46
- # @param page_number [Integer, nil]
47
- # @param page_size [Integer, nil]
48
+ # @param license_key_id [String, nil] Filter by license key ID
49
+ #
50
+ # @param page_number [Integer, nil] Page number default is 0
51
+ #
52
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
53
+ #
48
54
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
49
55
  #
50
56
  # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::LicenseKeyInstance>]