dodopayments 1.14.0 → 1.17.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/.ignore +2 -0
  3. data/CHANGELOG.md +41 -0
  4. data/README.md +58 -49
  5. data/lib/dodopayments/client.rb +7 -6
  6. data/lib/dodopayments/internal/default_page_number_pagination.rb +1 -1
  7. data/lib/dodopayments/internal/transport/base_client.rb +5 -5
  8. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +1 -1
  9. data/lib/dodopayments/internal/type/array_of.rb +11 -0
  10. data/lib/dodopayments/internal/type/base_model.rb +63 -27
  11. data/lib/dodopayments/internal/type/base_page.rb +9 -1
  12. data/lib/dodopayments/internal/type/boolean.rb +4 -0
  13. data/lib/dodopayments/internal/type/enum.rb +9 -5
  14. data/lib/dodopayments/internal/type/hash_of.rb +11 -0
  15. data/lib/dodopayments/internal/type/io_like.rb +4 -0
  16. data/lib/dodopayments/internal/type/request_parameters.rb +1 -2
  17. data/lib/dodopayments/internal/type/union.rb +10 -1
  18. data/lib/dodopayments/internal/type/unknown.rb +4 -0
  19. data/lib/dodopayments/internal.rb +0 -1
  20. data/lib/dodopayments/models/attach_existing_customer.rb +2 -6
  21. data/lib/dodopayments/models/billing_address.rb +6 -10
  22. data/lib/dodopayments/models/country_code.rb +2 -5
  23. data/lib/dodopayments/models/create_new_customer.rb +6 -14
  24. data/lib/dodopayments/models/customer.rb +7 -11
  25. data/lib/dodopayments/models/customer_create_params.rb +6 -11
  26. data/lib/dodopayments/models/customer_limited_details.rb +4 -8
  27. data/lib/dodopayments/models/customer_list_params.rb +5 -10
  28. data/lib/dodopayments/models/customer_portal_session.rb +2 -6
  29. data/lib/dodopayments/models/customer_request.rb +2 -3
  30. data/lib/dodopayments/models/customer_retrieve_params.rb +3 -8
  31. data/lib/dodopayments/models/customer_update_params.rb +5 -10
  32. data/lib/dodopayments/models/customers/customer_portal_create_params.rb +4 -9
  33. data/lib/dodopayments/models/discount.rb +12 -31
  34. data/lib/dodopayments/models/discount_create_params.rb +10 -27
  35. data/lib/dodopayments/models/discount_delete_params.rb +3 -8
  36. data/lib/dodopayments/models/discount_list_params.rb +5 -10
  37. data/lib/dodopayments/models/discount_retrieve_params.rb +3 -8
  38. data/lib/dodopayments/models/discount_type.rb +2 -5
  39. data/lib/dodopayments/models/discount_update_params.rb +10 -27
  40. data/lib/dodopayments/models/dispute.rb +9 -25
  41. data/lib/dodopayments/models/dispute_list_params.rb +10 -27
  42. data/lib/dodopayments/models/dispute_retrieve_params.rb +3 -8
  43. data/lib/dodopayments/models/dispute_stage.rb +2 -5
  44. data/lib/dodopayments/models/dispute_status.rb +2 -5
  45. data/lib/dodopayments/models/intent_status.rb +2 -5
  46. data/lib/dodopayments/models/invoices/payment_retrieve_params.rb +3 -8
  47. data/lib/dodopayments/models/license_activate_params.rb +5 -10
  48. data/lib/dodopayments/models/license_deactivate_params.rb +5 -10
  49. data/lib/dodopayments/models/license_key.rb +13 -33
  50. data/lib/dodopayments/models/license_key_duration.rb +3 -7
  51. data/lib/dodopayments/models/license_key_instance.rb +6 -10
  52. data/lib/dodopayments/models/license_key_instance_list_params.rb +6 -11
  53. data/lib/dodopayments/models/license_key_instance_retrieve_params.rb +3 -8
  54. data/lib/dodopayments/models/license_key_instance_update_params.rb +4 -9
  55. data/lib/dodopayments/models/license_key_list_params.rb +8 -13
  56. data/lib/dodopayments/models/license_key_retrieve_params.rb +3 -8
  57. data/lib/dodopayments/models/license_key_status.rb +2 -5
  58. data/lib/dodopayments/models/license_key_update_params.rb +6 -11
  59. data/lib/dodopayments/models/license_validate_params.rb +5 -10
  60. data/lib/dodopayments/models/license_validate_response.rb +2 -6
  61. data/lib/dodopayments/models/misc_list_supported_countries_params.rb +3 -8
  62. data/lib/dodopayments/models/one_time_product_cart_item.rb +4 -8
  63. data/lib/dodopayments/models/payment.rb +193 -58
  64. data/lib/dodopayments/models/payment_create_params.rb +21 -55
  65. data/lib/dodopayments/models/payment_create_response.rb +9 -25
  66. data/lib/dodopayments/models/payment_list_params.rb +10 -27
  67. data/lib/dodopayments/models/payment_list_response.rb +13 -34
  68. data/lib/dodopayments/models/payment_retrieve_params.rb +3 -8
  69. data/lib/dodopayments/models/payout_list_params.rb +5 -10
  70. data/lib/dodopayments/models/payout_list_response.rb +20 -49
  71. data/lib/dodopayments/models/price.rb +29 -79
  72. data/lib/dodopayments/models/product.rb +18 -44
  73. data/lib/dodopayments/models/product_create_params.rb +14 -36
  74. data/lib/dodopayments/models/product_delete_params.rb +3 -8
  75. data/lib/dodopayments/models/product_list_params.rb +8 -17
  76. data/lib/dodopayments/models/product_list_response.rb +18 -45
  77. data/lib/dodopayments/models/product_retrieve_params.rb +3 -8
  78. data/lib/dodopayments/models/product_unarchive_params.rb +3 -8
  79. data/lib/dodopayments/models/product_update_params.rb +15 -38
  80. data/lib/dodopayments/models/products/image_update_params.rb +4 -9
  81. data/lib/dodopayments/models/products/image_update_response.rb +3 -7
  82. data/lib/dodopayments/models/refund.rb +11 -18
  83. data/lib/dodopayments/models/refund_create_params.rb +5 -10
  84. data/lib/dodopayments/models/refund_list_params.rb +9 -25
  85. data/lib/dodopayments/models/refund_retrieve_params.rb +3 -8
  86. data/lib/dodopayments/models/refund_status.rb +2 -5
  87. data/lib/dodopayments/models/subscription.rb +24 -54
  88. data/lib/dodopayments/models/subscription_charge_params.rb +4 -9
  89. data/lib/dodopayments/models/subscription_charge_response.rb +2 -6
  90. data/lib/dodopayments/models/subscription_create_params.rb +27 -68
  91. data/lib/dodopayments/models/subscription_create_response.rb +8 -23
  92. data/lib/dodopayments/models/subscription_list_params.rb +9 -25
  93. data/lib/dodopayments/models/subscription_retrieve_params.rb +3 -8
  94. data/lib/dodopayments/models/subscription_status.rb +2 -5
  95. data/lib/dodopayments/models/subscription_update_params.rb +7 -12
  96. data/lib/dodopayments/models/time_interval.rb +2 -5
  97. data/lib/dodopayments/models/webhook_event.rb +9 -25
  98. data/lib/dodopayments/models/webhook_event_list_params.rb +9 -25
  99. data/lib/dodopayments/models/webhook_event_retrieve_params.rb +3 -8
  100. data/lib/dodopayments/request_options.rb +3 -4
  101. data/lib/dodopayments/version.rb +1 -1
  102. data/lib/dodopayments.rb +0 -9
  103. data/rbi/lib/dodopayments/client.rbi +4 -4
  104. data/rbi/lib/dodopayments/internal/type/array_of.rbi +3 -0
  105. data/rbi/lib/dodopayments/internal/type/base_model.rbi +17 -0
  106. data/rbi/lib/dodopayments/internal/type/base_page.rbi +2 -0
  107. data/rbi/lib/dodopayments/internal/type/enum.rbi +3 -6
  108. data/rbi/lib/dodopayments/internal/type/hash_of.rbi +3 -0
  109. data/rbi/lib/dodopayments/internal/type/union.rbi +3 -0
  110. data/rbi/lib/dodopayments/internal.rbi +0 -1
  111. data/rbi/lib/dodopayments/models/country_code.rbi +1 -1
  112. data/rbi/lib/dodopayments/models/discount_type.rbi +1 -1
  113. data/rbi/lib/dodopayments/models/dispute_stage.rbi +1 -1
  114. data/rbi/lib/dodopayments/models/dispute_status.rbi +1 -1
  115. data/rbi/lib/dodopayments/models/intent_status.rbi +1 -1
  116. data/rbi/lib/dodopayments/models/license_key_status.rbi +1 -1
  117. data/rbi/lib/dodopayments/models/payment.rbi +172 -1
  118. data/rbi/lib/dodopayments/models/payment_create_params.rbi +7 -4
  119. data/rbi/lib/dodopayments/models/payment_list_response.rbi +1 -2
  120. data/rbi/lib/dodopayments/models/payout_list_response.rbi +2 -4
  121. data/rbi/lib/dodopayments/models/price.rbi +2 -4
  122. data/rbi/lib/dodopayments/models/product.rbi +1 -2
  123. data/rbi/lib/dodopayments/models/product_create_params.rbi +1 -2
  124. data/rbi/lib/dodopayments/models/product_list_response.rbi +2 -4
  125. data/rbi/lib/dodopayments/models/product_update_params.rbi +1 -2
  126. data/rbi/lib/dodopayments/models/refund.rbi +1 -1
  127. data/rbi/lib/dodopayments/models/refund_status.rbi +1 -1
  128. data/rbi/lib/dodopayments/models/subscription.rbi +1 -2
  129. data/rbi/lib/dodopayments/models/subscription_create_params.rbi +7 -10
  130. data/rbi/lib/dodopayments/models/subscription_status.rbi +1 -1
  131. data/rbi/lib/dodopayments/models/time_interval.rbi +1 -1
  132. data/sig/dodopayments/internal/type/array_of.rbs +2 -0
  133. data/sig/dodopayments/internal/type/base_model.rbs +10 -0
  134. data/sig/dodopayments/internal/type/enum.rbs +2 -2
  135. data/sig/dodopayments/internal/type/hash_of.rbs +2 -0
  136. data/sig/dodopayments/internal/type/union.rbs +2 -0
  137. data/sig/dodopayments/models/payment.rbs +307 -0
  138. data/sig/dodopayments/models/payment_create_params.rbs +2 -0
  139. data/sig/dodopayments/models/subscription_create_params.rbs +2 -0
  140. metadata +3 -2
@@ -92,45 +92,22 @@ module Dodopayments
92
92
  # @return [String, nil]
93
93
  optional :remarks, String, nil?: true
94
94
 
95
- # @!parse
96
- # # @param amount [Integer]
97
- # # @param business_id [String]
98
- # # @param chargebacks [Integer]
99
- # # @param created_at [Time]
100
- # # @param currency [Symbol, Dodopayments::Models::PayoutListResponse::Currency]
101
- # # @param fee [Integer]
102
- # # @param payment_method [String]
103
- # # @param payout_id [String]
104
- # # @param refunds [Integer]
105
- # # @param status [Symbol, Dodopayments::Models::PayoutListResponse::Status]
106
- # # @param tax [Integer]
107
- # # @param updated_at [Time]
108
- # # @param name [String, nil]
109
- # # @param payout_document_url [String, nil]
110
- # # @param remarks [String, nil]
111
- # #
112
- # def initialize(
113
- # amount:,
114
- # business_id:,
115
- # chargebacks:,
116
- # created_at:,
117
- # currency:,
118
- # fee:,
119
- # payment_method:,
120
- # payout_id:,
121
- # refunds:,
122
- # status:,
123
- # tax:,
124
- # updated_at:,
125
- # name: nil,
126
- # payout_document_url: nil,
127
- # remarks: nil,
128
- # **
129
- # )
130
- # super
131
- # end
132
-
133
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
95
+ # @!method initialize(amount:, business_id:, chargebacks:, created_at:, currency:, fee:, payment_method:, payout_id:, refunds:, status:, tax:, updated_at:, name: nil, payout_document_url: nil, remarks: nil)
96
+ # @param amount [Integer]
97
+ # @param business_id [String]
98
+ # @param chargebacks [Integer]
99
+ # @param created_at [Time]
100
+ # @param currency [Symbol, Dodopayments::Models::PayoutListResponse::Currency]
101
+ # @param fee [Integer]
102
+ # @param payment_method [String]
103
+ # @param payout_id [String]
104
+ # @param refunds [Integer]
105
+ # @param status [Symbol, Dodopayments::Models::PayoutListResponse::Status]
106
+ # @param tax [Integer]
107
+ # @param updated_at [Time]
108
+ # @param name [String, nil]
109
+ # @param payout_document_url [String, nil]
110
+ # @param remarks [String, nil]
134
111
 
135
112
  # @see Dodopayments::Models::PayoutListResponse#currency
136
113
  module Currency
@@ -282,11 +259,8 @@ module Dodopayments
282
259
  ZAR = :ZAR
283
260
  ZMW = :ZMW
284
261
 
285
- finalize!
286
-
287
- # @!parse
288
- # # @return [Array<Symbol>]
289
- # def self.values; end
262
+ # @!method self.values
263
+ # @return [Array<Symbol>]
290
264
  end
291
265
 
292
266
  # @see Dodopayments::Models::PayoutListResponse#status
@@ -299,11 +273,8 @@ module Dodopayments
299
273
  FAILED = :failed
300
274
  SUCCESS = :success
301
275
 
302
- finalize!
303
-
304
- # @!parse
305
- # # @return [Array<Symbol>]
306
- # def self.values; end
276
+ # @!method self.values
277
+ # @return [Array<Symbol>]
307
278
  end
308
279
  end
309
280
  end
@@ -45,17 +45,13 @@ module Dodopayments
45
45
  # @return [Symbol, :one_time_price]
46
46
  required :type, const: :one_time_price
47
47
 
48
- # @!attribute [r] pay_what_you_want
48
+ # @!attribute pay_what_you_want
49
49
  # Indicates whether the customer can pay any amount they choose. If set to `true`,
50
50
  # the [`price`](Self::price) field is the minimum amount.
51
51
  #
52
52
  # @return [Boolean, nil]
53
53
  optional :pay_what_you_want, Dodopayments::Internal::Type::Boolean
54
54
 
55
- # @!parse
56
- # # @return [Boolean]
57
- # attr_writer :pay_what_you_want
58
-
59
55
  # @!attribute suggested_price
60
56
  # A suggested price for the user to pay. This value is only considered if
61
57
  # [`pay_what_you_want`](Self::pay_what_you_want) is `true`. Otherwise, it is
@@ -70,31 +66,15 @@ module Dodopayments
70
66
  # @return [Boolean, nil]
71
67
  optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
72
68
 
73
- # @!parse
74
- # # @param currency [Symbol, Dodopayments::Models::Price::OneTimePrice::Currency]
75
- # # @param discount [Float]
76
- # # @param price [Integer]
77
- # # @param purchasing_power_parity [Boolean]
78
- # # @param pay_what_you_want [Boolean]
79
- # # @param suggested_price [Integer, nil]
80
- # # @param tax_inclusive [Boolean, nil]
81
- # # @param type [Symbol, :one_time_price]
82
- # #
83
- # def initialize(
84
- # currency:,
85
- # discount:,
86
- # price:,
87
- # purchasing_power_parity:,
88
- # pay_what_you_want: nil,
89
- # suggested_price: nil,
90
- # tax_inclusive: nil,
91
- # type: :one_time_price,
92
- # **
93
- # )
94
- # super
95
- # end
96
-
97
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
69
+ # @!method initialize(currency:, discount:, price:, purchasing_power_parity:, pay_what_you_want: nil, suggested_price: nil, tax_inclusive: nil, type: :one_time_price)
70
+ # @param currency [Symbol, Dodopayments::Models::Price::OneTimePrice::Currency]
71
+ # @param discount [Float]
72
+ # @param price [Integer]
73
+ # @param purchasing_power_parity [Boolean]
74
+ # @param pay_what_you_want [Boolean]
75
+ # @param suggested_price [Integer, nil]
76
+ # @param tax_inclusive [Boolean, nil]
77
+ # @param type [Symbol, :one_time_price]
98
78
 
99
79
  # @see Dodopayments::Models::Price::OneTimePrice#currency
100
80
  module Currency
@@ -246,11 +226,8 @@ module Dodopayments
246
226
  ZAR = :ZAR
247
227
  ZMW = :ZMW
248
228
 
249
- finalize!
250
-
251
- # @!parse
252
- # # @return [Array<Symbol>]
253
- # def self.values; end
229
+ # @!method self.values
230
+ # @return [Array<Symbol>]
254
231
  end
255
232
  end
256
233
 
@@ -315,47 +292,24 @@ module Dodopayments
315
292
  # @return [Boolean, nil]
316
293
  optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
317
294
 
318
- # @!attribute [r] trial_period_days
295
+ # @!attribute trial_period_days
319
296
  # Number of days for the trial period. A value of `0` indicates no trial period.
320
297
  #
321
298
  # @return [Integer, nil]
322
299
  optional :trial_period_days, Integer
323
300
 
324
- # @!parse
325
- # # @return [Integer]
326
- # attr_writer :trial_period_days
327
-
328
- # @!parse
329
- # # @param currency [Symbol, Dodopayments::Models::Price::RecurringPrice::Currency]
330
- # # @param discount [Float]
331
- # # @param payment_frequency_count [Integer]
332
- # # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
333
- # # @param price [Integer]
334
- # # @param purchasing_power_parity [Boolean]
335
- # # @param subscription_period_count [Integer]
336
- # # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
337
- # # @param tax_inclusive [Boolean, nil]
338
- # # @param trial_period_days [Integer]
339
- # # @param type [Symbol, :recurring_price]
340
- # #
341
- # def initialize(
342
- # currency:,
343
- # discount:,
344
- # payment_frequency_count:,
345
- # payment_frequency_interval:,
346
- # price:,
347
- # purchasing_power_parity:,
348
- # subscription_period_count:,
349
- # subscription_period_interval:,
350
- # tax_inclusive: nil,
351
- # trial_period_days: nil,
352
- # type: :recurring_price,
353
- # **
354
- # )
355
- # super
356
- # end
357
-
358
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
301
+ # @!method initialize(currency:, discount:, payment_frequency_count:, payment_frequency_interval:, price:, purchasing_power_parity:, subscription_period_count:, subscription_period_interval:, tax_inclusive: nil, trial_period_days: nil, type: :recurring_price)
302
+ # @param currency [Symbol, Dodopayments::Models::Price::RecurringPrice::Currency]
303
+ # @param discount [Float]
304
+ # @param payment_frequency_count [Integer]
305
+ # @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
306
+ # @param price [Integer]
307
+ # @param purchasing_power_parity [Boolean]
308
+ # @param subscription_period_count [Integer]
309
+ # @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
310
+ # @param tax_inclusive [Boolean, nil]
311
+ # @param trial_period_days [Integer]
312
+ # @param type [Symbol, :recurring_price]
359
313
 
360
314
  # @see Dodopayments::Models::Price::RecurringPrice#currency
361
315
  module Currency
@@ -507,17 +461,13 @@ module Dodopayments
507
461
  ZAR = :ZAR
508
462
  ZMW = :ZMW
509
463
 
510
- finalize!
511
-
512
- # @!parse
513
- # # @return [Array<Symbol>]
514
- # def self.values; end
464
+ # @!method self.values
465
+ # @return [Array<Symbol>]
515
466
  end
516
467
  end
517
468
 
518
- # @!parse
519
- # # @return [Array(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice)]
520
- # def self.variants; end
469
+ # @!method self.variants
470
+ # @return [Array(Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice)]
521
471
  end
522
472
  end
523
473
  end
@@ -93,45 +93,22 @@ module Dodopayments
93
93
  # @return [String, nil]
94
94
  optional :name, String, nil?: true
95
95
 
96
- # @!parse
97
- # # @param business_id [String]
98
- # # @param created_at [Time]
99
- # # @param is_recurring [Boolean]
100
- # # @param license_key_enabled [Boolean]
101
- # # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
102
- # # @param product_id [String]
103
- # # @param tax_category [Symbol, Dodopayments::Models::Product::TaxCategory]
104
- # # @param updated_at [Time]
105
- # # @param addons [Array<String>, nil]
106
- # # @param description [String, nil]
107
- # # @param image [String, nil]
108
- # # @param license_key_activation_message [String, nil]
109
- # # @param license_key_activations_limit [Integer, nil]
110
- # # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
111
- # # @param name [String, nil]
112
- # #
113
- # def initialize(
114
- # business_id:,
115
- # created_at:,
116
- # is_recurring:,
117
- # license_key_enabled:,
118
- # price:,
119
- # product_id:,
120
- # tax_category:,
121
- # updated_at:,
122
- # addons: nil,
123
- # description: nil,
124
- # image: nil,
125
- # license_key_activation_message: nil,
126
- # license_key_activations_limit: nil,
127
- # license_key_duration: nil,
128
- # name: nil,
129
- # **
130
- # )
131
- # super
132
- # end
133
-
134
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
96
+ # @!method initialize(business_id:, created_at:, is_recurring:, license_key_enabled:, price:, product_id:, tax_category:, updated_at:, addons: nil, description: nil, image: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, name: nil)
97
+ # @param business_id [String]
98
+ # @param created_at [Time]
99
+ # @param is_recurring [Boolean]
100
+ # @param license_key_enabled [Boolean]
101
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
102
+ # @param product_id [String]
103
+ # @param tax_category [Symbol, Dodopayments::Models::Product::TaxCategory]
104
+ # @param updated_at [Time]
105
+ # @param addons [Array<String>, nil]
106
+ # @param description [String, nil]
107
+ # @param image [String, nil]
108
+ # @param license_key_activation_message [String, nil]
109
+ # @param license_key_activations_limit [Integer, nil]
110
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
111
+ # @param name [String, nil]
135
112
 
136
113
  # Represents the different categories of taxation applicable to various products
137
114
  # and services.
@@ -145,11 +122,8 @@ module Dodopayments
145
122
  E_BOOK = :e_book
146
123
  EDTECH = :edtech
147
124
 
148
- finalize!
149
-
150
- # @!parse
151
- # # @return [Array<Symbol>]
152
- # def self.values; end
125
+ # @!method self.values
126
+ # @return [Array<Symbol>]
153
127
  end
154
128
  end
155
129
  end
@@ -4,8 +4,7 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#create
6
6
  class ProductCreateParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
10
  # @!attribute price
@@ -61,35 +60,17 @@ module Dodopayments
61
60
  # @return [String, nil]
62
61
  optional :name, String, nil?: true
63
62
 
64
- # @!parse
65
- # # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
66
- # # @param tax_category [Symbol, Dodopayments::Models::ProductCreateParams::TaxCategory]
67
- # # @param addons [Array<String>, nil]
68
- # # @param description [String, nil]
69
- # # @param license_key_activation_message [String, nil]
70
- # # @param license_key_activations_limit [Integer, nil]
71
- # # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
72
- # # @param license_key_enabled [Boolean, nil]
73
- # # @param name [String, nil]
74
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
75
- # #
76
- # def initialize(
77
- # price:,
78
- # tax_category:,
79
- # addons: nil,
80
- # description: nil,
81
- # license_key_activation_message: nil,
82
- # license_key_activations_limit: nil,
83
- # license_key_duration: nil,
84
- # license_key_enabled: nil,
85
- # name: nil,
86
- # request_options: {},
87
- # **
88
- # )
89
- # super
90
- # end
91
-
92
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
63
+ # @!method initialize(price:, tax_category:, addons: nil, description: nil, license_key_activation_message: nil, license_key_activations_limit: nil, license_key_duration: nil, license_key_enabled: nil, name: nil, request_options: {})
64
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
65
+ # @param tax_category [Symbol, Dodopayments::Models::ProductCreateParams::TaxCategory]
66
+ # @param addons [Array<String>, nil]
67
+ # @param description [String, nil]
68
+ # @param license_key_activation_message [String, nil]
69
+ # @param license_key_activations_limit [Integer, nil]
70
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
71
+ # @param license_key_enabled [Boolean, nil]
72
+ # @param name [String, nil]
73
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
93
74
 
94
75
  # Represents the different categories of taxation applicable to various products
95
76
  # and services.
@@ -101,11 +82,8 @@ module Dodopayments
101
82
  E_BOOK = :e_book
102
83
  EDTECH = :edtech
103
84
 
104
- finalize!
105
-
106
- # @!parse
107
- # # @return [Array<Symbol>]
108
- # def self.values; end
85
+ # @!method self.values
86
+ # @return [Array<Symbol>]
109
87
  end
110
88
  end
111
89
  end
@@ -4,16 +4,11 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#delete
6
6
  class ProductDeleteParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
- # @!parse
12
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
13
- # #
14
- # def initialize(request_options: {}, **) = super
15
-
16
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
17
12
  end
18
13
  end
19
14
  end
@@ -4,20 +4,15 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#list
6
6
  class ProductListParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
- # @!attribute [r] archived
10
+ # @!attribute archived
12
11
  # List archived products
13
12
  #
14
13
  # @return [Boolean, nil]
15
14
  optional :archived, Dodopayments::Internal::Type::Boolean
16
15
 
17
- # @!parse
18
- # # @return [Boolean]
19
- # attr_writer :archived
20
-
21
16
  # @!attribute page_number
22
17
  # Page number default is 0
23
18
  #
@@ -40,16 +35,12 @@ module Dodopayments
40
35
  # @return [Boolean, nil]
41
36
  optional :recurring, Dodopayments::Internal::Type::Boolean, nil?: true
42
37
 
43
- # @!parse
44
- # # @param archived [Boolean]
45
- # # @param page_number [Integer, nil]
46
- # # @param page_size [Integer, nil]
47
- # # @param recurring [Boolean, nil]
48
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
49
- # #
50
- # def initialize(archived: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {}, **) = super
51
-
52
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
38
+ # @!method initialize(archived: nil, page_number: nil, page_size: nil, recurring: nil, request_options: {})
39
+ # @param archived [Boolean]
40
+ # @param page_number [Integer, nil]
41
+ # @param page_size [Integer, nil]
42
+ # @param recurring [Boolean, nil]
43
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
53
44
  end
54
45
  end
55
46
  end
@@ -90,41 +90,20 @@ module Dodopayments
90
90
  # @return [Boolean, nil]
91
91
  optional :tax_inclusive, Dodopayments::Internal::Type::Boolean, nil?: true
92
92
 
93
- # @!parse
94
- # # @param business_id [String]
95
- # # @param created_at [Time]
96
- # # @param is_recurring [Boolean]
97
- # # @param product_id [String]
98
- # # @param tax_category [Symbol, Dodopayments::Models::ProductListResponse::TaxCategory]
99
- # # @param updated_at [Time]
100
- # # @param currency [Symbol, Dodopayments::Models::ProductListResponse::Currency, nil]
101
- # # @param description [String, nil]
102
- # # @param image [String, nil]
103
- # # @param name [String, nil]
104
- # # @param price [Integer, nil]
105
- # # @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
106
- # # @param tax_inclusive [Boolean, nil]
107
- # #
108
- # def initialize(
109
- # business_id:,
110
- # created_at:,
111
- # is_recurring:,
112
- # product_id:,
113
- # tax_category:,
114
- # updated_at:,
115
- # currency: nil,
116
- # description: nil,
117
- # image: nil,
118
- # name: nil,
119
- # price: nil,
120
- # price_detail: nil,
121
- # tax_inclusive: nil,
122
- # **
123
- # )
124
- # super
125
- # end
126
-
127
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
93
+ # @!method initialize(business_id:, created_at:, is_recurring:, product_id:, tax_category:, updated_at:, currency: nil, description: nil, image: nil, name: nil, price: nil, price_detail: nil, tax_inclusive: nil)
94
+ # @param business_id [String]
95
+ # @param created_at [Time]
96
+ # @param is_recurring [Boolean]
97
+ # @param product_id [String]
98
+ # @param tax_category [Symbol, Dodopayments::Models::ProductListResponse::TaxCategory]
99
+ # @param updated_at [Time]
100
+ # @param currency [Symbol, Dodopayments::Models::ProductListResponse::Currency, nil]
101
+ # @param description [String, nil]
102
+ # @param image [String, nil]
103
+ # @param name [String, nil]
104
+ # @param price [Integer, nil]
105
+ # @param price_detail [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
106
+ # @param tax_inclusive [Boolean, nil]
128
107
 
129
108
  # Represents the different categories of taxation applicable to various products
130
109
  # and services.
@@ -138,11 +117,8 @@ module Dodopayments
138
117
  E_BOOK = :e_book
139
118
  EDTECH = :edtech
140
119
 
141
- finalize!
142
-
143
- # @!parse
144
- # # @return [Array<Symbol>]
145
- # def self.values; end
120
+ # @!method self.values
121
+ # @return [Array<Symbol>]
146
122
  end
147
123
 
148
124
  # @see Dodopayments::Models::ProductListResponse#currency
@@ -295,11 +271,8 @@ module Dodopayments
295
271
  ZAR = :ZAR
296
272
  ZMW = :ZMW
297
273
 
298
- finalize!
299
-
300
- # @!parse
301
- # # @return [Array<Symbol>]
302
- # def self.values; end
274
+ # @!method self.values
275
+ # @return [Array<Symbol>]
303
276
  end
304
277
  end
305
278
  end
@@ -4,16 +4,11 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#retrieve
6
6
  class ProductRetrieveParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
- # @!parse
12
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
13
- # #
14
- # def initialize(request_options: {}, **) = super
15
-
16
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
17
12
  end
18
13
  end
19
14
  end
@@ -4,16 +4,11 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#unarchive
6
6
  class ProductUnarchiveParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
- # @!parse
12
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
13
- # #
14
- # def initialize(request_options: {}, **) = super
15
-
16
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
17
12
  end
18
13
  end
19
14
  end
@@ -4,8 +4,7 @@ module Dodopayments
4
4
  module Models
5
5
  # @see Dodopayments::Resources::Products#update
6
6
  class ProductUpdateParams < Dodopayments::Internal::Type::BaseModel
7
- # @!parse
8
- # extend Dodopayments::Internal::Type::RequestParameters::Converter
7
+ extend Dodopayments::Internal::Type::RequestParameters::Converter
9
8
  include Dodopayments::Internal::Type::RequestParameters
10
9
 
11
10
  # @!attribute addons
@@ -76,37 +75,18 @@ module Dodopayments
76
75
  # @return [Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory, nil]
77
76
  optional :tax_category, enum: -> { Dodopayments::Models::ProductUpdateParams::TaxCategory }, nil?: true
78
77
 
79
- # @!parse
80
- # # @param addons [Array<String>, nil]
81
- # # @param description [String, nil]
82
- # # @param image_id [String, nil]
83
- # # @param license_key_activation_message [String, nil]
84
- # # @param license_key_activations_limit [Integer, nil]
85
- # # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
86
- # # @param license_key_enabled [Boolean, nil]
87
- # # @param name [String, nil]
88
- # # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
89
- # # @param tax_category [Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory, nil]
90
- # # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
91
- # #
92
- # def initialize(
93
- # addons: nil,
94
- # description: nil,
95
- # image_id: nil,
96
- # license_key_activation_message: nil,
97
- # license_key_activations_limit: nil,
98
- # license_key_duration: nil,
99
- # license_key_enabled: nil,
100
- # name: nil,
101
- # price: nil,
102
- # tax_category: nil,
103
- # request_options: {},
104
- # **
105
- # )
106
- # super
107
- # end
108
-
109
- # def initialize: (Hash | Dodopayments::Internal::Type::BaseModel) -> void
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]
84
+ # @param license_key_duration [Dodopayments::Models::LicenseKeyDuration, nil]
85
+ # @param license_key_enabled [Boolean, nil]
86
+ # @param name [String, nil]
87
+ # @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
88
+ # @param tax_category [Symbol, Dodopayments::Models::ProductUpdateParams::TaxCategory, nil]
89
+ # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
110
90
 
111
91
  # Represents the different categories of taxation applicable to various products
112
92
  # and services.
@@ -118,11 +98,8 @@ module Dodopayments
118
98
  E_BOOK = :e_book
119
99
  EDTECH = :edtech
120
100
 
121
- finalize!
122
-
123
- # @!parse
124
- # # @return [Array<Symbol>]
125
- # def self.values; end
101
+ # @!method self.values
102
+ # @return [Array<Symbol>]
126
103
  end
127
104
  end
128
105
  end