dodopayments 1.18.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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -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 +37 -13
  42. data/lib/dodopayments/models/subscription_change_plan_params.rb +5 -2
  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 +62 -22
  60. data/lib/dodopayments/resources/webhook_events.rb +16 -6
  61. data/lib/dodopayments/version.rb +1 -1
  62. data/lib/dodopayments.rb +2 -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 +15 -0
  99. data/rbi/lib/dodopayments/models/subscription_change_plan_params.rbi +8 -2
  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/sig/dodopayments/file_part.rbs +21 -0
  106. data/sig/dodopayments/internal/transport/base_client.rbs +9 -3
  107. data/sig/dodopayments/internal/type/{io_like.rbs → file_input.rbs} +1 -1
  108. data/sig/dodopayments/internal/util.rbs +14 -12
  109. metadata +8 -5
@@ -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
@@ -120,28 +120,52 @@ module Dodopayments
120
120
  optional :discount_id, String, nil?: true
121
121
 
122
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
+ #
123
126
  # Response struct representing subscription details
124
127
  #
125
128
  # @param billing [Dodopayments::Models::BillingAddress]
126
- # @param created_at [Time]
129
+ #
130
+ # @param created_at [Time] Timestamp when the subscription was created
131
+ #
127
132
  # @param currency [Symbol, Dodopayments::Models::Subscription::Currency]
133
+ #
128
134
  # @param customer [Dodopayments::Models::CustomerLimitedDetails]
135
+ #
129
136
  # @param metadata [Hash{Symbol=>String}]
130
- # @param next_billing_date [Time]
131
- # @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
+ #
132
143
  # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
133
- # @param previous_billing_date [Time]
134
- # @param product_id [String]
135
- # @param quantity [Integer]
136
- # @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
+ #
137
154
  # @param status [Symbol, Dodopayments::Models::SubscriptionStatus]
138
- # @param subscription_id [String]
139
- # @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
+ #
140
160
  # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
141
- # @param tax_inclusive [Boolean]
142
- # @param trial_period_days [Integer]
143
- # @param cancelled_at [Time, nil]
144
- # @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
145
169
 
146
170
  # @see Dodopayments::Models::Subscription#currency
147
171
  module Currency
@@ -26,9 +26,12 @@ module Dodopayments
26
26
  required :quantity, Integer
27
27
 
28
28
  # @!method initialize(product_id:, proration_billing_mode:, quantity:, request_options: {})
29
- # @param product_id [String]
29
+ # @param product_id [String] Unique identifier of the product to subscribe to
30
+ #
30
31
  # @param proration_billing_mode [Symbol, Dodopayments::Models::SubscriptionChangePlanParams::ProrationBillingMode]
31
- # @param quantity [Integer]
32
+ #
33
+ # @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
34
+ #
32
35
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
33
36
 
34
37
  module ProrationBillingMode
@@ -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>]
@@ -5,7 +5,8 @@ module Dodopayments
5
5
  class LicenseKeys
6
6
  # @overload retrieve(id, request_options: {})
7
7
  #
8
- # @param id [String]
8
+ # @param id [String] License key ID
9
+ #
9
10
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
10
11
  #
11
12
  # @return [Dodopayments::Models::LicenseKey]
@@ -20,12 +21,19 @@ module Dodopayments
20
21
  )
21
22
  end
22
23
 
24
+ # Some parameter documentations has been truncated, see
25
+ # {Dodopayments::Models::LicenseKeyUpdateParams} for more details.
26
+ #
23
27
  # @overload update(id, activations_limit: nil, disabled: nil, expires_at: nil, request_options: {})
24
28
  #
25
- # @param id [String]
26
- # @param activations_limit [Integer, nil]
27
- # @param disabled [Boolean, nil]
28
- # @param expires_at [Time, nil]
29
+ # @param id [String] License key ID
30
+ #
31
+ # @param activations_limit [Integer, nil] The updated activation limit for the license key. ...
32
+ #
33
+ # @param disabled [Boolean, nil] Indicates whether the license key should be disabled. ...
34
+ #
35
+ # @param expires_at [Time, nil] The updated expiration timestamp for the license key in UTC. ...
36
+ #
29
37
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
30
38
  #
31
39
  # @return [Dodopayments::Models::LicenseKey]
@@ -44,11 +52,16 @@ module Dodopayments
44
52
 
45
53
  # @overload list(customer_id: nil, page_number: nil, page_size: nil, product_id: nil, status: nil, request_options: {})
46
54
  #
47
- # @param customer_id [String, nil]
48
- # @param page_number [Integer, nil]
49
- # @param page_size [Integer, nil]
50
- # @param product_id [String, nil]
51
- # @param status [Symbol, Dodopayments::Models::LicenseKeyStatus, nil]
55
+ # @param customer_id [String, nil] Filter by customer ID
56
+ #
57
+ # @param page_number [Integer, nil] Page number default is 0
58
+ #
59
+ # @param page_size [Integer, nil] Page size default is 10 max is 100
60
+ #
61
+ # @param product_id [String, nil] Filter by product ID
62
+ #
63
+ # @param status [Symbol, Dodopayments::Models::LicenseKeyStatus, nil] Filter by license key status
64
+ #
52
65
  # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
53
66
  #
54
67
  # @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::LicenseKey>]