dodopayments 1.18.3 → 1.20.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/README.md +5 -5
- data/lib/dodopayments/client.rb +12 -9
- data/lib/dodopayments/errors.rb +9 -9
- data/lib/dodopayments/file_part.rb +5 -5
- data/lib/dodopayments/internal/transport/base_client.rb +1 -1
- data/lib/dodopayments/internal/type/boolean.rb +10 -11
- data/lib/dodopayments/internal/type/converter.rb +3 -0
- data/lib/dodopayments/internal/type/enum.rb +10 -11
- data/lib/dodopayments/internal/type/file_input.rb +22 -11
- data/lib/dodopayments/internal/type/unknown.rb +10 -11
- data/lib/dodopayments/internal/util.rb +3 -3
- data/lib/dodopayments/models/addon_cart_response_item.rb +23 -0
- data/lib/dodopayments/models/addon_create_params.rb +58 -0
- data/lib/dodopayments/models/addon_list_params.rb +30 -0
- data/lib/dodopayments/models/addon_response.rb +93 -0
- data/lib/dodopayments/models/addon_retrieve_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_params.rb +14 -0
- data/lib/dodopayments/models/addon_update_images_response.rb +22 -0
- data/lib/dodopayments/models/addon_update_params.rb +66 -0
- data/lib/dodopayments/models/currency.rb +158 -0
- data/lib/dodopayments/models/misc_list_supported_countries_response.rb +1 -0
- data/lib/dodopayments/models/payment.rb +14 -315
- data/lib/dodopayments/models/payment_create_params.rb +3 -158
- data/lib/dodopayments/models/payment_list_response.rb +3 -157
- data/lib/dodopayments/models/payout_list_response.rb +3 -157
- data/lib/dodopayments/models/price.rb +6 -314
- data/lib/dodopayments/models/product.rb +3 -19
- data/lib/dodopayments/models/product_create_params.rb +3 -17
- data/lib/dodopayments/models/product_list_response.rb +6 -176
- data/lib/dodopayments/models/product_update_params.rb +3 -17
- data/lib/dodopayments/models/refund.rb +3 -157
- data/lib/dodopayments/models/subscription.rb +21 -158
- data/lib/dodopayments/models/subscription_create_params.rb +30 -159
- data/lib/dodopayments/models/subscription_create_response.rb +10 -1
- data/lib/dodopayments/models/subscription_list_response.rb +179 -0
- data/lib/dodopayments/models/subscription_update_params.rb +19 -1
- data/lib/dodopayments/models/tax_category.rb +19 -0
- data/lib/dodopayments/request_options.rb +4 -5
- data/lib/dodopayments/resources/addons.rb +141 -0
- data/lib/dodopayments/resources/payments.rb +1 -1
- data/lib/dodopayments/resources/products.rb +2 -2
- data/lib/dodopayments/resources/subscriptions.rb +9 -5
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +12 -0
- data/rbi/{lib/dodopayments → dodopayments}/client.rbi +7 -5
- data/rbi/{lib/dodopayments → dodopayments}/errors.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/internal/transport/base_client.rbi +2 -2
- data/rbi/{lib/dodopayments → dodopayments}/internal/type/request_parameters.rbi +1 -1
- data/rbi/dodopayments/models/addon_cart_response_item.rbi +20 -0
- data/rbi/dodopayments/models/addon_create_params.rbi +69 -0
- data/rbi/dodopayments/models/addon_list_params.rbi +45 -0
- data/rbi/dodopayments/models/addon_response.rbi +103 -0
- data/rbi/dodopayments/models/addon_retrieve_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_params.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_images_response.rbi +19 -0
- data/rbi/dodopayments/models/addon_update_params.rbi +77 -0
- data/rbi/dodopayments/models/currency.rbi +161 -0
- data/rbi/dodopayments/models/payment.rbi +227 -0
- data/rbi/dodopayments/models/payment_create_params.rbi +189 -0
- data/rbi/dodopayments/models/payment_list_response.rbi +88 -0
- data/rbi/dodopayments/models/payout_list_response.rbi +155 -0
- data/rbi/dodopayments/models/price.rbi +218 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/product.rbi +3 -20
- data/rbi/{lib/dodopayments → dodopayments}/models/product_create_params.rbi +3 -21
- data/rbi/dodopayments/models/product_list_response.rbi +153 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/product_update_params.rbi +3 -21
- data/rbi/dodopayments/models/refund.rbi +83 -0
- data/rbi/dodopayments/models/subscription.rbi +198 -0
- data/rbi/dodopayments/models/subscription_create_params.rbi +282 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/subscription_create_response.rbi +8 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +190 -0
- data/rbi/{lib/dodopayments → dodopayments}/models/subscription_update_params.rbi +37 -1
- data/rbi/dodopayments/models/tax_category.rbi +22 -0
- data/rbi/{lib/dodopayments → dodopayments}/request_options.rbi +2 -0
- data/rbi/dodopayments/resources/addons.rbi +97 -0
- data/rbi/{lib/dodopayments → dodopayments}/resources/customers/customer_portal.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/resources/customers.rbi +4 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/discounts.rbi +5 -14
- data/rbi/{lib/dodopayments → dodopayments}/resources/disputes.rbi +2 -5
- data/rbi/{lib/dodopayments → dodopayments}/resources/invoices/payments.rbi +1 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/license_key_instances.rbi +3 -10
- data/rbi/{lib/dodopayments → dodopayments}/resources/license_keys.rbi +3 -9
- data/rbi/{lib/dodopayments → dodopayments}/resources/licenses.rbi +3 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/misc.rbi +1 -8
- data/rbi/{lib/dodopayments → dodopayments}/resources/payments.rbi +4 -7
- data/rbi/{lib/dodopayments → dodopayments}/resources/payouts.rbi +1 -1
- data/rbi/{lib/dodopayments → dodopayments}/resources/products/images.rbi +1 -5
- data/rbi/{lib/dodopayments → dodopayments}/resources/products.rbi +8 -26
- data/rbi/{lib/dodopayments → dodopayments}/resources/refunds.rbi +3 -11
- data/rbi/{lib/dodopayments → dodopayments}/resources/subscriptions.rbi +19 -15
- data/rbi/{lib/dodopayments → dodopayments}/resources/webhook_events.rbi +2 -5
- data/sig/dodopayments/client.rbs +4 -2
- data/sig/dodopayments/models/addon_cart_response_item.rbs +15 -0
- data/sig/dodopayments/models/addon_create_params.rbs +39 -0
- data/sig/dodopayments/models/addon_list_params.rbs +24 -0
- data/sig/dodopayments/models/addon_response.rbs +54 -0
- data/sig/dodopayments/models/addon_retrieve_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_params.rbs +15 -0
- data/sig/dodopayments/models/addon_update_images_response.rbs +15 -0
- data/sig/dodopayments/models/addon_update_params.rbs +43 -0
- data/sig/dodopayments/models/currency.rbs +302 -0
- data/sig/dodopayments/models/misc_list_supported_countries_response.rbs +1 -1
- data/sig/dodopayments/models/payment.rbs +10 -604
- data/sig/dodopayments/models/payment_create_params.rbs +3 -302
- data/sig/dodopayments/models/payment_list_response.rbs +3 -302
- data/sig/dodopayments/models/payout_list_response.rbs +3 -302
- data/sig/dodopayments/models/price.rbs +6 -604
- data/sig/dodopayments/models/product.rbs +3 -16
- data/sig/dodopayments/models/product_create_params.rbs +3 -16
- data/sig/dodopayments/models/product_list_response.rbs +6 -318
- data/sig/dodopayments/models/product_update_params.rbs +3 -16
- data/sig/dodopayments/models/refund.rbs +3 -302
- data/sig/dodopayments/models/subscription.rbs +11 -302
- data/sig/dodopayments/models/subscription_create_params.rbs +19 -302
- data/sig/dodopayments/models/subscription_create_response.rbs +4 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +98 -0
- data/sig/dodopayments/models/subscription_update_params.rbs +14 -0
- data/sig/dodopayments/models/tax_category.rbs +16 -0
- data/sig/dodopayments/resources/addons.rbs +43 -0
- data/sig/dodopayments/resources/payments.rbs +1 -1
- data/sig/dodopayments/resources/products.rbs +2 -2
- data/sig/dodopayments/resources/subscriptions.rbs +4 -2
- metadata +160 -124
- data/rbi/lib/dodopayments/models/payment.rbi +0 -530
- data/rbi/lib/dodopayments/models/payment_create_params.rbi +0 -345
- data/rbi/lib/dodopayments/models/payment_list_response.rbi +0 -244
- data/rbi/lib/dodopayments/models/payout_list_response.rbi +0 -311
- data/rbi/lib/dodopayments/models/price.rbi +0 -530
- data/rbi/lib/dodopayments/models/product_list_response.rbi +0 -327
- data/rbi/lib/dodopayments/models/refund.rbi +0 -239
- data/rbi/lib/dodopayments/models/subscription.rbi +0 -338
- data/rbi/lib/dodopayments/models/subscription_create_params.rbi +0 -415
- /data/rbi/{lib/dodopayments → dodopayments}/file_part.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/default_page_number_pagination.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/transport/pooled_net_requester.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/array_of.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/base_model.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/base_page.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/boolean.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/converter.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/enum.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/file_input.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/hash_of.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/union.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/type/unknown.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal/util.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/internal.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/attach_existing_customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/billing_address.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/country_code.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/create_new_customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_limited_details.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_portal_session.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_request.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customer_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/customers/customer_portal_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_delete_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_type.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/discount_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_stage.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/dispute_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/intent_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/invoices/payment_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_activate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_deactivate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_duration.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_instance_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_key_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_validate_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/license_validate_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/misc_list_supported_countries_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/misc_list_supported_countries_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/one_time_product_cart_item.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_create_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payment_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/payout_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_delete_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/product_unarchive_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/products/image_update_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/products/image_update_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_create_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/refund_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_change_plan_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_charge_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_charge_response.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/subscription_status.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/time_interval.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event_list_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/models/webhook_event_retrieve_params.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/resources/invoices.rbi +0 -0
- /data/rbi/{lib/dodopayments → dodopayments}/version.rbi +0 -0
@@ -0,0 +1,179 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# @see Dodopayments::Resources::Subscriptions#list
|
6
|
+
class SubscriptionListResponse < Dodopayments::Internal::Type::BaseModel
|
7
|
+
# @!attribute billing
|
8
|
+
#
|
9
|
+
# @return [Dodopayments::Models::BillingAddress]
|
10
|
+
required :billing, -> { Dodopayments::Models::BillingAddress }
|
11
|
+
|
12
|
+
# @!attribute created_at
|
13
|
+
# Timestamp when the subscription was created
|
14
|
+
#
|
15
|
+
# @return [Time]
|
16
|
+
required :created_at, Time
|
17
|
+
|
18
|
+
# @!attribute currency
|
19
|
+
#
|
20
|
+
# @return [Symbol, Dodopayments::Models::Currency]
|
21
|
+
required :currency, enum: -> { Dodopayments::Models::Currency }
|
22
|
+
|
23
|
+
# @!attribute customer
|
24
|
+
#
|
25
|
+
# @return [Dodopayments::Models::CustomerLimitedDetails]
|
26
|
+
required :customer, -> { Dodopayments::Models::CustomerLimitedDetails }
|
27
|
+
|
28
|
+
# @!attribute metadata
|
29
|
+
#
|
30
|
+
# @return [Hash{Symbol=>String}]
|
31
|
+
required :metadata, Dodopayments::Internal::Type::HashOf[String]
|
32
|
+
|
33
|
+
# @!attribute next_billing_date
|
34
|
+
# Timestamp of the next scheduled billing. Indicates the end of current billing
|
35
|
+
# period
|
36
|
+
#
|
37
|
+
# @return [Time]
|
38
|
+
required :next_billing_date, Time
|
39
|
+
|
40
|
+
# @!attribute on_demand
|
41
|
+
# Wether the subscription is on-demand or not
|
42
|
+
#
|
43
|
+
# @return [Boolean]
|
44
|
+
required :on_demand, Dodopayments::Internal::Type::Boolean
|
45
|
+
|
46
|
+
# @!attribute payment_frequency_count
|
47
|
+
# Number of payment frequency intervals
|
48
|
+
#
|
49
|
+
# @return [Integer]
|
50
|
+
required :payment_frequency_count, Integer
|
51
|
+
|
52
|
+
# @!attribute payment_frequency_interval
|
53
|
+
#
|
54
|
+
# @return [Symbol, Dodopayments::Models::TimeInterval]
|
55
|
+
required :payment_frequency_interval, enum: -> { Dodopayments::Models::TimeInterval }
|
56
|
+
|
57
|
+
# @!attribute previous_billing_date
|
58
|
+
# Timestamp of the last payment. Indicates the start of current billing period
|
59
|
+
#
|
60
|
+
# @return [Time]
|
61
|
+
required :previous_billing_date, Time
|
62
|
+
|
63
|
+
# @!attribute product_id
|
64
|
+
# Identifier of the product associated with this subscription
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
required :product_id, String
|
68
|
+
|
69
|
+
# @!attribute quantity
|
70
|
+
# Number of units/items included in the subscription
|
71
|
+
#
|
72
|
+
# @return [Integer]
|
73
|
+
required :quantity, Integer
|
74
|
+
|
75
|
+
# @!attribute recurring_pre_tax_amount
|
76
|
+
# Amount charged before tax for each recurring payment in smallest currency unit
|
77
|
+
# (e.g. cents)
|
78
|
+
#
|
79
|
+
# @return [Integer]
|
80
|
+
required :recurring_pre_tax_amount, Integer
|
81
|
+
|
82
|
+
# @!attribute status
|
83
|
+
#
|
84
|
+
# @return [Symbol, Dodopayments::Models::SubscriptionStatus]
|
85
|
+
required :status, enum: -> { Dodopayments::Models::SubscriptionStatus }
|
86
|
+
|
87
|
+
# @!attribute subscription_id
|
88
|
+
# Unique identifier for the subscription
|
89
|
+
#
|
90
|
+
# @return [String]
|
91
|
+
required :subscription_id, String
|
92
|
+
|
93
|
+
# @!attribute subscription_period_count
|
94
|
+
# Number of subscription period intervals
|
95
|
+
#
|
96
|
+
# @return [Integer]
|
97
|
+
required :subscription_period_count, Integer
|
98
|
+
|
99
|
+
# @!attribute subscription_period_interval
|
100
|
+
#
|
101
|
+
# @return [Symbol, Dodopayments::Models::TimeInterval]
|
102
|
+
required :subscription_period_interval, enum: -> { Dodopayments::Models::TimeInterval }
|
103
|
+
|
104
|
+
# @!attribute tax_inclusive
|
105
|
+
# Indicates if the recurring_pre_tax_amount is tax inclusive
|
106
|
+
#
|
107
|
+
# @return [Boolean]
|
108
|
+
required :tax_inclusive, Dodopayments::Internal::Type::Boolean
|
109
|
+
|
110
|
+
# @!attribute trial_period_days
|
111
|
+
# Number of days in the trial period (0 if no trial)
|
112
|
+
#
|
113
|
+
# @return [Integer]
|
114
|
+
required :trial_period_days, Integer
|
115
|
+
|
116
|
+
# @!attribute cancelled_at
|
117
|
+
# Cancelled timestamp if the subscription is cancelled
|
118
|
+
#
|
119
|
+
# @return [Time, nil]
|
120
|
+
optional :cancelled_at, Time, nil?: true
|
121
|
+
|
122
|
+
# @!attribute discount_id
|
123
|
+
# The discount id if discount is applied
|
124
|
+
#
|
125
|
+
# @return [String, nil]
|
126
|
+
optional :discount_id, String, nil?: true
|
127
|
+
|
128
|
+
# @!method initialize(billing:, created_at:, currency:, customer:, metadata:, next_billing_date:, on_demand:, 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)
|
129
|
+
# Some parameter documentations has been truncated, see
|
130
|
+
# {Dodopayments::Models::SubscriptionListResponse} for more details.
|
131
|
+
#
|
132
|
+
# Response struct representing subscription details
|
133
|
+
#
|
134
|
+
# @param billing [Dodopayments::Models::BillingAddress]
|
135
|
+
#
|
136
|
+
# @param created_at [Time] Timestamp when the subscription was created
|
137
|
+
#
|
138
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
139
|
+
#
|
140
|
+
# @param customer [Dodopayments::Models::CustomerLimitedDetails]
|
141
|
+
#
|
142
|
+
# @param metadata [Hash{Symbol=>String}]
|
143
|
+
#
|
144
|
+
# @param next_billing_date [Time] Timestamp of the next scheduled billing. Indicates the end of current billing pe
|
145
|
+
# ...
|
146
|
+
#
|
147
|
+
# @param on_demand [Boolean] Wether the subscription is on-demand or not
|
148
|
+
#
|
149
|
+
# @param payment_frequency_count [Integer] Number of payment frequency intervals
|
150
|
+
#
|
151
|
+
# @param payment_frequency_interval [Symbol, Dodopayments::Models::TimeInterval]
|
152
|
+
#
|
153
|
+
# @param previous_billing_date [Time] Timestamp of the last payment. Indicates the start of current billing period
|
154
|
+
#
|
155
|
+
# @param product_id [String] Identifier of the product associated with this subscription
|
156
|
+
#
|
157
|
+
# @param quantity [Integer] Number of units/items included in the subscription
|
158
|
+
#
|
159
|
+
# @param recurring_pre_tax_amount [Integer] Amount charged before tax for each recurring payment in smallest currency unit (
|
160
|
+
# ...
|
161
|
+
#
|
162
|
+
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus]
|
163
|
+
#
|
164
|
+
# @param subscription_id [String] Unique identifier for the subscription
|
165
|
+
#
|
166
|
+
# @param subscription_period_count [Integer] Number of subscription period intervals
|
167
|
+
#
|
168
|
+
# @param subscription_period_interval [Symbol, Dodopayments::Models::TimeInterval]
|
169
|
+
#
|
170
|
+
# @param tax_inclusive [Boolean] Indicates if the recurring_pre_tax_amount is tax inclusive
|
171
|
+
#
|
172
|
+
# @param trial_period_days [Integer] Number of days in the trial period (0 if no trial)
|
173
|
+
#
|
174
|
+
# @param cancelled_at [Time, nil] Cancelled timestamp if the subscription is cancelled
|
175
|
+
#
|
176
|
+
# @param discount_id [String, nil] The discount id if discount is applied
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
@@ -12,6 +12,13 @@ module Dodopayments
|
|
12
12
|
# @return [Dodopayments::Models::BillingAddress, nil]
|
13
13
|
optional :billing, -> { Dodopayments::Models::BillingAddress }, nil?: true
|
14
14
|
|
15
|
+
# @!attribute disable_on_demand
|
16
|
+
#
|
17
|
+
# @return [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
18
|
+
optional :disable_on_demand,
|
19
|
+
-> { Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand },
|
20
|
+
nil?: true
|
21
|
+
|
15
22
|
# @!attribute metadata
|
16
23
|
#
|
17
24
|
# @return [Hash{Symbol=>String}, nil]
|
@@ -27,12 +34,23 @@ module Dodopayments
|
|
27
34
|
# @return [String, nil]
|
28
35
|
optional :tax_id, String, nil?: true
|
29
36
|
|
30
|
-
# @!method initialize(billing: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
37
|
+
# @!method initialize(billing: nil, disable_on_demand: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
31
38
|
# @param billing [Dodopayments::Models::BillingAddress, nil]
|
39
|
+
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
32
40
|
# @param metadata [Hash{Symbol=>String}, nil]
|
33
41
|
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
|
34
42
|
# @param tax_id [String, nil]
|
35
43
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
|
44
|
+
|
45
|
+
class DisableOnDemand < Dodopayments::Internal::Type::BaseModel
|
46
|
+
# @!attribute next_billing_date
|
47
|
+
#
|
48
|
+
# @return [Time]
|
49
|
+
required :next_billing_date, Time
|
50
|
+
|
51
|
+
# @!method initialize(next_billing_date:)
|
52
|
+
# @param next_billing_date [Time]
|
53
|
+
end
|
36
54
|
end
|
37
55
|
end
|
38
56
|
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
# Represents the different categories of taxation applicable to various products
|
6
|
+
# and services.
|
7
|
+
module TaxCategory
|
8
|
+
extend Dodopayments::Internal::Type::Enum
|
9
|
+
|
10
|
+
DIGITAL_PRODUCTS = :digital_products
|
11
|
+
SAAS = :saas
|
12
|
+
E_BOOK = :e_book
|
13
|
+
EDTECH = :edtech
|
14
|
+
|
15
|
+
# @!method self.values
|
16
|
+
# @return [Array<Symbol>]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -65,10 +65,9 @@ module Dodopayments
|
|
65
65
|
# @return [Float, nil]
|
66
66
|
optional :timeout, Float
|
67
67
|
|
68
|
-
# @!
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
# # @param values [Hash{Symbol=>Object}]
|
68
|
+
# @!method initialize(values = {})
|
69
|
+
# Returns a new instance of RequestOptions.
|
70
|
+
#
|
71
|
+
# @param values [Hash{Symbol=>Object}]
|
73
72
|
end
|
74
73
|
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Resources
|
5
|
+
class Addons
|
6
|
+
# Some parameter documentations has been truncated, see
|
7
|
+
# {Dodopayments::Models::AddonCreateParams} for more details.
|
8
|
+
#
|
9
|
+
# @overload create(currency:, name:, price:, tax_category:, description: nil, request_options: {})
|
10
|
+
#
|
11
|
+
# @param currency [Symbol, Dodopayments::Models::Currency]
|
12
|
+
#
|
13
|
+
# @param name [String] Name of the Addon
|
14
|
+
#
|
15
|
+
# @param price [Integer] Amount of the addon
|
16
|
+
#
|
17
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
|
18
|
+
# ...
|
19
|
+
#
|
20
|
+
# @param description [String, nil] Optional description of the Addon
|
21
|
+
#
|
22
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
23
|
+
#
|
24
|
+
# @return [Dodopayments::Models::AddonResponse]
|
25
|
+
#
|
26
|
+
# @see Dodopayments::Models::AddonCreateParams
|
27
|
+
def create(params)
|
28
|
+
parsed, options = Dodopayments::Models::AddonCreateParams.dump_request(params)
|
29
|
+
@client.request(
|
30
|
+
method: :post,
|
31
|
+
path: "addons",
|
32
|
+
body: parsed,
|
33
|
+
model: Dodopayments::Models::AddonResponse,
|
34
|
+
options: options
|
35
|
+
)
|
36
|
+
end
|
37
|
+
|
38
|
+
# @overload retrieve(id, request_options: {})
|
39
|
+
#
|
40
|
+
# @param id [String] Addon Id
|
41
|
+
#
|
42
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
43
|
+
#
|
44
|
+
# @return [Dodopayments::Models::AddonResponse]
|
45
|
+
#
|
46
|
+
# @see Dodopayments::Models::AddonRetrieveParams
|
47
|
+
def retrieve(id, params = {})
|
48
|
+
@client.request(
|
49
|
+
method: :get,
|
50
|
+
path: ["addons/%1$s", id],
|
51
|
+
model: Dodopayments::Models::AddonResponse,
|
52
|
+
options: params[:request_options]
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
# Some parameter documentations has been truncated, see
|
57
|
+
# {Dodopayments::Models::AddonUpdateParams} for more details.
|
58
|
+
#
|
59
|
+
# @overload update(id, currency: nil, description: nil, image_id: nil, name: nil, price: nil, tax_category: nil, request_options: {})
|
60
|
+
#
|
61
|
+
# @param id [String] Addon Id
|
62
|
+
#
|
63
|
+
# @param currency [Symbol, Dodopayments::Models::Currency, nil]
|
64
|
+
#
|
65
|
+
# @param description [String, nil] Description of the Addon, optional and must be at most 1000 characters.
|
66
|
+
#
|
67
|
+
# @param image_id [String, nil] Addon image id after its uploaded to S3
|
68
|
+
#
|
69
|
+
# @param name [String, nil] Name of the Addon, optional and must be at most 100 characters.
|
70
|
+
#
|
71
|
+
# @param price [Integer, nil] Amount of the addon
|
72
|
+
#
|
73
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
|
74
|
+
# ...
|
75
|
+
#
|
76
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
77
|
+
#
|
78
|
+
# @return [Dodopayments::Models::AddonResponse]
|
79
|
+
#
|
80
|
+
# @see Dodopayments::Models::AddonUpdateParams
|
81
|
+
def update(id, params = {})
|
82
|
+
parsed, options = Dodopayments::Models::AddonUpdateParams.dump_request(params)
|
83
|
+
@client.request(
|
84
|
+
method: :patch,
|
85
|
+
path: ["addons/%1$s", id],
|
86
|
+
body: parsed,
|
87
|
+
model: Dodopayments::Models::AddonResponse,
|
88
|
+
options: options
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
# @overload list(page_number: nil, page_size: nil, request_options: {})
|
93
|
+
#
|
94
|
+
# @param page_number [Integer, nil] Page number default is 0
|
95
|
+
#
|
96
|
+
# @param page_size [Integer, nil] Page size default is 10 max is 100
|
97
|
+
#
|
98
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
99
|
+
#
|
100
|
+
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::AddonResponse>]
|
101
|
+
#
|
102
|
+
# @see Dodopayments::Models::AddonListParams
|
103
|
+
def list(params = {})
|
104
|
+
parsed, options = Dodopayments::Models::AddonListParams.dump_request(params)
|
105
|
+
@client.request(
|
106
|
+
method: :get,
|
107
|
+
path: "addons",
|
108
|
+
query: parsed,
|
109
|
+
page: Dodopayments::Internal::DefaultPageNumberPagination,
|
110
|
+
model: Dodopayments::Models::AddonResponse,
|
111
|
+
options: options
|
112
|
+
)
|
113
|
+
end
|
114
|
+
|
115
|
+
# @overload update_images(id, request_options: {})
|
116
|
+
#
|
117
|
+
# @param id [String] Addon Id
|
118
|
+
#
|
119
|
+
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
120
|
+
#
|
121
|
+
# @return [Dodopayments::Models::AddonUpdateImagesResponse]
|
122
|
+
#
|
123
|
+
# @see Dodopayments::Models::AddonUpdateImagesParams
|
124
|
+
def update_images(id, params = {})
|
125
|
+
@client.request(
|
126
|
+
method: :put,
|
127
|
+
path: ["addons/%1$s/images", id],
|
128
|
+
model: Dodopayments::Models::AddonUpdateImagesResponse,
|
129
|
+
options: params[:request_options]
|
130
|
+
)
|
131
|
+
end
|
132
|
+
|
133
|
+
# @api private
|
134
|
+
#
|
135
|
+
# @param client [Dodopayments::Client]
|
136
|
+
def initialize(client:)
|
137
|
+
@client = client
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
@@ -16,7 +16,7 @@ module Dodopayments
|
|
16
16
|
#
|
17
17
|
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::PaymentCreateParams::AllowedPaymentMethodType>, nil] List of payment methods allowed during checkout. ...
|
18
18
|
#
|
19
|
-
# @param billing_currency [Symbol, Dodopayments::Models::
|
19
|
+
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil]
|
20
20
|
#
|
21
21
|
# @param discount_code [String, nil] Discount Code to apply to the transaction
|
22
22
|
#
|
@@ -13,7 +13,7 @@ module Dodopayments
|
|
13
13
|
#
|
14
14
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice]
|
15
15
|
#
|
16
|
-
# @param tax_category [Symbol, Dodopayments::Models::
|
16
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory] Represents the different categories of taxation applicable to various products a
|
17
17
|
# ...
|
18
18
|
#
|
19
19
|
# @param addons [Array<String>, nil] Addons available for subscription product
|
@@ -89,7 +89,7 @@ module Dodopayments
|
|
89
89
|
#
|
90
90
|
# @param price [Dodopayments::Models::Price::OneTimePrice, Dodopayments::Models::Price::RecurringPrice, nil]
|
91
91
|
#
|
92
|
-
# @param tax_category [Symbol, Dodopayments::Models::
|
92
|
+
# @param tax_category [Symbol, Dodopayments::Models::TaxCategory, nil] Represents the different categories of taxation applicable to various products a
|
93
93
|
# ...
|
94
94
|
#
|
95
95
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
@@ -6,7 +6,7 @@ module Dodopayments
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
7
7
|
# {Dodopayments::Models::SubscriptionCreateParams} for more details.
|
8
8
|
#
|
9
|
-
# @overload create(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: {})
|
9
|
+
# @overload create(billing:, customer:, product_id:, quantity:, addons: nil, 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: {})
|
10
10
|
#
|
11
11
|
# @param billing [Dodopayments::Models::BillingAddress]
|
12
12
|
#
|
@@ -16,9 +16,11 @@ module Dodopayments
|
|
16
16
|
#
|
17
17
|
# @param quantity [Integer] Number of units to subscribe for. Must be at least 1.
|
18
18
|
#
|
19
|
+
# @param addons [Array<Dodopayments::Models::SubscriptionCreateParams::Addon>, nil] Attach addons to this subscription
|
20
|
+
#
|
19
21
|
# @param allowed_payment_method_types [Array<Symbol, Dodopayments::Models::SubscriptionCreateParams::AllowedPaymentMethodType>, nil] List of payment methods allowed during checkout. ...
|
20
22
|
#
|
21
|
-
# @param billing_currency [Symbol, Dodopayments::Models::
|
23
|
+
# @param billing_currency [Symbol, Dodopayments::Models::Currency, nil]
|
22
24
|
#
|
23
25
|
# @param discount_code [String, nil] Discount Code to apply to the subscription
|
24
26
|
#
|
@@ -71,12 +73,14 @@ module Dodopayments
|
|
71
73
|
)
|
72
74
|
end
|
73
75
|
|
74
|
-
# @overload update(subscription_id, billing: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
76
|
+
# @overload update(subscription_id, billing: nil, disable_on_demand: nil, metadata: nil, status: nil, tax_id: nil, request_options: {})
|
75
77
|
#
|
76
78
|
# @param subscription_id [String] Subscription Id
|
77
79
|
#
|
78
80
|
# @param billing [Dodopayments::Models::BillingAddress, nil]
|
79
81
|
#
|
82
|
+
# @param disable_on_demand [Dodopayments::Models::SubscriptionUpdateParams::DisableOnDemand, nil]
|
83
|
+
#
|
80
84
|
# @param metadata [Hash{Symbol=>String}, nil]
|
81
85
|
#
|
82
86
|
# @param status [Symbol, Dodopayments::Models::SubscriptionStatus, nil]
|
@@ -115,7 +119,7 @@ module Dodopayments
|
|
115
119
|
#
|
116
120
|
# @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
|
117
121
|
#
|
118
|
-
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::
|
122
|
+
# @return [Dodopayments::Internal::DefaultPageNumberPagination<Dodopayments::Models::SubscriptionListResponse>]
|
119
123
|
#
|
120
124
|
# @see Dodopayments::Models::SubscriptionListParams
|
121
125
|
def list(params = {})
|
@@ -125,7 +129,7 @@ module Dodopayments
|
|
125
129
|
path: "subscriptions",
|
126
130
|
query: parsed,
|
127
131
|
page: Dodopayments::Internal::DefaultPageNumberPagination,
|
128
|
-
model: Dodopayments::Models::
|
132
|
+
model: Dodopayments::Models::SubscriptionListResponse,
|
129
133
|
options: options
|
130
134
|
)
|
131
135
|
end
|
data/lib/dodopayments/version.rb
CHANGED
data/lib/dodopayments.rb
CHANGED
@@ -47,10 +47,19 @@ require_relative "dodopayments/internal/transport/base_client"
|
|
47
47
|
require_relative "dodopayments/internal/transport/pooled_net_requester"
|
48
48
|
require_relative "dodopayments/client"
|
49
49
|
require_relative "dodopayments/internal/default_page_number_pagination"
|
50
|
+
require_relative "dodopayments/models/addon_cart_response_item"
|
51
|
+
require_relative "dodopayments/models/addon_create_params"
|
52
|
+
require_relative "dodopayments/models/addon_list_params"
|
53
|
+
require_relative "dodopayments/models/addon_response"
|
54
|
+
require_relative "dodopayments/models/addon_retrieve_params"
|
55
|
+
require_relative "dodopayments/models/addon_update_images_params"
|
56
|
+
require_relative "dodopayments/models/addon_update_images_response"
|
57
|
+
require_relative "dodopayments/models/addon_update_params"
|
50
58
|
require_relative "dodopayments/models/attach_existing_customer"
|
51
59
|
require_relative "dodopayments/models/billing_address"
|
52
60
|
require_relative "dodopayments/models/country_code"
|
53
61
|
require_relative "dodopayments/models/create_new_customer"
|
62
|
+
require_relative "dodopayments/models/currency"
|
54
63
|
require_relative "dodopayments/models/customer"
|
55
64
|
require_relative "dodopayments/models/customer_create_params"
|
56
65
|
require_relative "dodopayments/models/customer_limited_details"
|
@@ -122,13 +131,16 @@ require_relative "dodopayments/models/subscription_charge_response"
|
|
122
131
|
require_relative "dodopayments/models/subscription_create_params"
|
123
132
|
require_relative "dodopayments/models/subscription_create_response"
|
124
133
|
require_relative "dodopayments/models/subscription_list_params"
|
134
|
+
require_relative "dodopayments/models/subscription_list_response"
|
125
135
|
require_relative "dodopayments/models/subscription_retrieve_params"
|
126
136
|
require_relative "dodopayments/models/subscription_status"
|
127
137
|
require_relative "dodopayments/models/subscription_update_params"
|
138
|
+
require_relative "dodopayments/models/tax_category"
|
128
139
|
require_relative "dodopayments/models/time_interval"
|
129
140
|
require_relative "dodopayments/models/webhook_event"
|
130
141
|
require_relative "dodopayments/models/webhook_event_list_params"
|
131
142
|
require_relative "dodopayments/models/webhook_event_retrieve_params"
|
143
|
+
require_relative "dodopayments/resources/addons"
|
132
144
|
require_relative "dodopayments/resources/customers"
|
133
145
|
require_relative "dodopayments/resources/customers/customer_portal"
|
134
146
|
require_relative "dodopayments/resources/discounts"
|
@@ -16,9 +16,8 @@ module Dodopayments
|
|
16
16
|
T::Hash[Symbol, String]
|
17
17
|
)
|
18
18
|
|
19
|
-
# Bearer Token for API authentication
|
20
19
|
sig { returns(String) }
|
21
|
-
attr_reader :
|
20
|
+
attr_reader :api_key
|
22
21
|
|
23
22
|
sig { returns(Dodopayments::Resources::Payments) }
|
24
23
|
attr_reader :payments
|
@@ -62,6 +61,9 @@ module Dodopayments
|
|
62
61
|
sig { returns(Dodopayments::Resources::Discounts) }
|
63
62
|
attr_reader :discounts
|
64
63
|
|
64
|
+
sig { returns(Dodopayments::Resources::Addons) }
|
65
|
+
attr_reader :addons
|
66
|
+
|
65
67
|
# @api private
|
66
68
|
sig { override.returns(T::Hash[String, String]) }
|
67
69
|
private def auth_headers; end
|
@@ -69,7 +71,7 @@ module Dodopayments
|
|
69
71
|
# Creates and returns a new client for interacting with the API.
|
70
72
|
sig do
|
71
73
|
params(
|
72
|
-
|
74
|
+
api_key: T.nilable(String),
|
73
75
|
environment: NilClass,
|
74
76
|
base_url: T.nilable(String),
|
75
77
|
max_retries: Integer,
|
@@ -80,8 +82,8 @@ module Dodopayments
|
|
80
82
|
.returns(T.attached_class)
|
81
83
|
end
|
82
84
|
def self.new(
|
83
|
-
#
|
84
|
-
|
85
|
+
# Defaults to `ENV["DODO_PAYMENTS_API_KEY"]`
|
86
|
+
api_key: ENV["DODO_PAYMENTS_API_KEY"],
|
85
87
|
# Specifies the environment to use for the API.
|
86
88
|
#
|
87
89
|
# Each environment maps to a different base URL:
|
@@ -35,7 +35,7 @@ module Dodopayments
|
|
35
35
|
page: T.nilable(T::Class[Dodopayments::Internal::Type::BasePage[Dodopayments::Internal::Type::BaseModel]]),
|
36
36
|
stream: T.nilable(T::Class[T.anything]),
|
37
37
|
model: T.nilable(Dodopayments::Internal::Type::Converter::Input),
|
38
|
-
options: T.nilable(
|
38
|
+
options: T.nilable(Dodopayments::RequestOpts)
|
39
39
|
}
|
40
40
|
end
|
41
41
|
|
@@ -188,7 +188,7 @@ module Dodopayments
|
|
188
188
|
page: T.nilable(T::Class[Dodopayments::Internal::Type::BasePage[Dodopayments::Internal::Type::BaseModel]]),
|
189
189
|
stream: T.nilable(T::Class[T.anything]),
|
190
190
|
model: T.nilable(Dodopayments::Internal::Type::Converter::Input),
|
191
|
-
options: T.nilable(
|
191
|
+
options: T.nilable(Dodopayments::RequestOpts)
|
192
192
|
)
|
193
193
|
.returns(T.anything)
|
194
194
|
end
|
@@ -6,7 +6,7 @@ module Dodopayments
|
|
6
6
|
# @api private
|
7
7
|
module RequestParameters
|
8
8
|
# Options to specify HTTP behaviour for this request.
|
9
|
-
sig { returns(
|
9
|
+
sig { returns(Dodopayments::RequestOpts) }
|
10
10
|
attr_accessor :request_options
|
11
11
|
|
12
12
|
# @api private
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Dodopayments
|
4
|
+
module Models
|
5
|
+
class AddonCartResponseItem < Dodopayments::Internal::Type::BaseModel
|
6
|
+
sig { returns(String) }
|
7
|
+
attr_accessor :addon_id
|
8
|
+
|
9
|
+
sig { returns(Integer) }
|
10
|
+
attr_accessor :quantity
|
11
|
+
|
12
|
+
# Response struct representing subscription details
|
13
|
+
sig { params(addon_id: String, quantity: Integer).returns(T.attached_class) }
|
14
|
+
def self.new(addon_id:, quantity:); end
|
15
|
+
|
16
|
+
sig { override.returns({addon_id: String, quantity: Integer}) }
|
17
|
+
def to_hash; end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|