dodopayments 2.1.2 → 2.3.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 +38 -0
- data/README.md +3 -3
- data/lib/dodopayments/client.rb +15 -0
- data/lib/dodopayments/models/checkout_session_customization.rb +4 -4
- data/lib/dodopayments/models/checkout_session_request.rb +10 -1
- data/lib/dodopayments/models/customer_retrieve_payment_methods_response.rb +13 -1
- data/lib/dodopayments/models/customers/customer_portal_create_params.rb +13 -1
- data/lib/dodopayments/models/invoices/payment_retrieve_payout_params.rb +22 -0
- data/lib/dodopayments/models/payment_method_types.rb +3 -0
- data/lib/dodopayments/models/product_collection_create_params.rb +98 -0
- data/lib/dodopayments/models/product_collection_create_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_delete_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_list_params.rb +46 -0
- data/lib/dodopayments/models/product_collection_list_response.rb +65 -0
- data/lib/dodopayments/models/product_collection_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_retrieve_response.rb +226 -0
- data/lib/dodopayments/models/product_collection_unarchive_params.rb +20 -0
- data/lib/dodopayments/models/product_collection_unarchive_response.rb +33 -0
- data/lib/dodopayments/models/product_collection_update_images_params.rb +29 -0
- data/lib/dodopayments/models/product_collection_update_images_response.rb +25 -0
- data/lib/dodopayments/models/product_collection_update_params.rb +61 -0
- data/lib/dodopayments/models/product_collections/group_create_params.rb +71 -0
- data/lib/dodopayments/models/product_collections/group_create_response.rb +160 -0
- data/lib/dodopayments/models/product_collections/group_delete_params.rb +28 -0
- data/lib/dodopayments/models/product_collections/group_update_params.rb +59 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_params.rb +60 -0
- data/lib/dodopayments/models/product_collections/groups/item_create_response.rb +136 -0
- data/lib/dodopayments/models/product_collections/groups/item_delete_params.rb +36 -0
- data/lib/dodopayments/models/product_collections/groups/item_update_params.rb +47 -0
- data/lib/dodopayments/models/subscription.rb +107 -1
- data/lib/dodopayments/models/subscription_cancel_change_plan_params.rb +20 -0
- data/lib/dodopayments/models/subscription_list_response.rb +109 -1
- data/lib/dodopayments/models/subscription_preview_change_plan_response.rb +10 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +29 -1
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +32 -0
- data/lib/dodopayments/models.rb +20 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers/customer_portal.rb +6 -1
- data/lib/dodopayments/resources/invoices/payments.rb +18 -0
- data/lib/dodopayments/resources/product_collections/groups/items.rb +111 -0
- data/lib/dodopayments/resources/product_collections/groups.rb +109 -0
- data/lib/dodopayments/resources/product_collections.rb +179 -0
- data/lib/dodopayments/resources/subscriptions.rb +24 -2
- data/lib/dodopayments/resources/webhooks.rb +11 -1
- data/lib/dodopayments/resources/your_webhook_url.rb +56 -0
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +31 -3
- data/rbi/dodopayments/client.rbi +12 -0
- data/rbi/dodopayments/models/checkout_session_customization.rbi +12 -13
- data/rbi/dodopayments/models/checkout_session_request.rbi +10 -0
- data/rbi/dodopayments/models/credit_entitlement_cart_response.rbi +4 -4
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +2 -2
- data/rbi/dodopayments/models/customer_retrieve_payment_methods_response.rbi +6 -0
- data/rbi/dodopayments/models/customers/customer_portal_create_params.rbi +13 -0
- data/rbi/dodopayments/models/dispute.rbi +4 -4
- data/rbi/dodopayments/models/get_dispute.rbi +4 -4
- data/rbi/dodopayments/models/invoices/payment_retrieve_payout_params.rbi +40 -0
- data/rbi/dodopayments/models/license_key.rbi +2 -2
- data/rbi/dodopayments/models/meter_cart_response_item.rbi +2 -2
- data/rbi/dodopayments/models/payment.rbi +10 -12
- data/rbi/dodopayments/models/payment_method_types.rbi +3 -0
- data/rbi/dodopayments/models/product_collection_create_params.rbi +180 -0
- data/rbi/dodopayments/models/product_collection_create_response.rbi +303 -0
- data/rbi/dodopayments/models/product_collection_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_list_params.rbi +82 -0
- data/rbi/dodopayments/models/product_collection_list_response.rbi +88 -0
- data/rbi/dodopayments/models/product_collection_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_retrieve_response.rbi +305 -0
- data/rbi/dodopayments/models/product_collection_unarchive_params.rbi +38 -0
- data/rbi/dodopayments/models/product_collection_unarchive_response.rbi +56 -0
- data/rbi/dodopayments/models/product_collection_update_images_params.rbi +52 -0
- data/rbi/dodopayments/models/product_collection_update_images_response.rbi +40 -0
- data/rbi/dodopayments/models/product_collection_update_params.rbi +84 -0
- data/rbi/dodopayments/models/product_collections/group_create_params.rbi +123 -0
- data/rbi/dodopayments/models/product_collections/group_create_response.rbi +204 -0
- data/rbi/dodopayments/models/product_collections/group_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/product_collections/group_update_params.rbi +80 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_params.rbi +113 -0
- data/rbi/dodopayments/models/product_collections/groups/item_create_response.rbi +156 -0
- data/rbi/dodopayments/models/product_collections/groups/item_delete_params.rbi +55 -0
- data/rbi/dodopayments/models/product_collections/groups/item_update_params.rbi +68 -0
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/refund_list_item.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +169 -10
- data/rbi/dodopayments/models/subscription_cancel_change_plan_params.rbi +41 -0
- data/rbi/dodopayments/models/subscription_list_response.rbi +179 -0
- data/rbi/dodopayments/models/subscription_preview_change_plan_response.rbi +12 -1
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +70 -0
- data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +56 -0
- data/rbi/dodopayments/models.rbi +28 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +8 -0
- data/rbi/dodopayments/resources/customers/customer_portal.rbi +4 -0
- data/rbi/dodopayments/resources/invoices/payments.rbi +9 -0
- data/rbi/dodopayments/resources/product_collections/groups/items.rbi +83 -0
- data/rbi/dodopayments/resources/product_collections/groups.rbi +90 -0
- data/rbi/dodopayments/resources/product_collections.rbi +149 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +27 -0
- data/rbi/dodopayments/resources/webhooks.rbi +10 -2
- data/rbi/dodopayments/resources/your_webhook_url.rbi +53 -0
- data/sig/dodopayments/client.rbs +7 -0
- data/sig/dodopayments/models/checkout_session_customization.rbs +4 -8
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/customers/customer_portal_create_params.rbs +7 -1
- data/sig/dodopayments/models/invoices/payment_retrieve_payout_params.rbs +25 -0
- data/sig/dodopayments/models/product_collection_create_params.rbs +80 -0
- data/sig/dodopayments/models/product_collection_create_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_delete_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_list_params.rbs +49 -0
- data/sig/dodopayments/models/product_collection_list_response.rbs +50 -0
- data/sig/dodopayments/models/product_collection_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_retrieve_response.rbs +179 -0
- data/sig/dodopayments/models/product_collection_unarchive_params.rbs +23 -0
- data/sig/dodopayments/models/product_collection_unarchive_response.rbs +30 -0
- data/sig/dodopayments/models/product_collection_update_images_params.rbs +28 -0
- data/sig/dodopayments/models/product_collection_update_images_response.rbs +16 -0
- data/sig/dodopayments/models/product_collection_update_params.rbs +51 -0
- data/sig/dodopayments/models/product_collections/group_create_params.rbs +55 -0
- data/sig/dodopayments/models/product_collections/group_create_response.rbs +129 -0
- data/sig/dodopayments/models/product_collections/group_delete_params.rbs +30 -0
- data/sig/dodopayments/models/product_collections/group_update_params.rbs +48 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_params.rbs +52 -0
- data/sig/dodopayments/models/product_collections/groups/item_create_response.rbs +104 -0
- data/sig/dodopayments/models/product_collections/groups/item_delete_params.rbs +36 -0
- data/sig/dodopayments/models/product_collections/groups/item_update_params.rbs +40 -0
- data/sig/dodopayments/models/subscription.rbs +75 -0
- data/sig/dodopayments/models/subscription_cancel_change_plan_params.rbs +24 -0
- data/sig/dodopayments/models/subscription_list_response.rbs +75 -0
- data/sig/dodopayments/models/subscription_preview_change_plan_response.rbs +5 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +25 -1
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +42 -0
- data/sig/dodopayments/models.rbs +20 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers/customer_portal.rbs +1 -0
- data/sig/dodopayments/resources/invoices/payments.rbs +5 -0
- data/sig/dodopayments/resources/product_collections/groups/items.rbs +33 -0
- data/sig/dodopayments/resources/product_collections/groups.rbs +34 -0
- data/sig/dodopayments/resources/product_collections.rbs +56 -0
- data/sig/dodopayments/resources/subscriptions.rbs +7 -0
- data/sig/dodopayments/resources/webhooks.rbs +3 -1
- data/sig/dodopayments/resources/your_webhook_url.rbs +18 -0
- metadata +97 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Resources
|
|
5
|
+
class YourWebhookURL
|
|
6
|
+
sig do
|
|
7
|
+
params(
|
|
8
|
+
business_id: String,
|
|
9
|
+
data:
|
|
10
|
+
T.any(
|
|
11
|
+
Dodopayments::WebhookPayload::Data::Payment::OrHash,
|
|
12
|
+
Dodopayments::WebhookPayload::Data::Subscription::OrHash,
|
|
13
|
+
Dodopayments::WebhookPayload::Data::Refund::OrHash,
|
|
14
|
+
Dodopayments::WebhookPayload::Data::Dispute::OrHash,
|
|
15
|
+
Dodopayments::WebhookPayload::Data::LicenseKey::OrHash,
|
|
16
|
+
Dodopayments::WebhookPayload::Data::CreditLedgerEntry::OrHash,
|
|
17
|
+
Dodopayments::WebhookPayload::Data::CreditBalanceLow::OrHash
|
|
18
|
+
),
|
|
19
|
+
timestamp: Time,
|
|
20
|
+
type: Dodopayments::WebhookEventType::OrSymbol,
|
|
21
|
+
webhook_id: String,
|
|
22
|
+
webhook_signature: String,
|
|
23
|
+
webhook_timestamp: String,
|
|
24
|
+
request_options: Dodopayments::RequestOptions::OrHash
|
|
25
|
+
).void
|
|
26
|
+
end
|
|
27
|
+
def create(
|
|
28
|
+
# Body param
|
|
29
|
+
business_id:,
|
|
30
|
+
# Body param: The latest data at the time of delivery attempt
|
|
31
|
+
data:,
|
|
32
|
+
# Body param: The timestamp of when the event occurred (not necessarily the same
|
|
33
|
+
# of when it was delivered)
|
|
34
|
+
timestamp:,
|
|
35
|
+
# Body param: Event types for Dodo events
|
|
36
|
+
type:,
|
|
37
|
+
# Header param: Unique identifier for the webhook
|
|
38
|
+
webhook_id:,
|
|
39
|
+
# Header param: Signature of the Webhook
|
|
40
|
+
webhook_signature:,
|
|
41
|
+
# Header param: Unix timestamp when the webhook was sent
|
|
42
|
+
webhook_timestamp:,
|
|
43
|
+
request_options: {}
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# @api private
|
|
48
|
+
sig { params(client: Dodopayments::Client).returns(T.attached_class) }
|
|
49
|
+
def self.new(client:)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
data/sig/dodopayments/client.rbs
CHANGED
|
@@ -15,6 +15,8 @@ module Dodopayments
|
|
|
15
15
|
|
|
16
16
|
attr_reader bearer_token: String
|
|
17
17
|
|
|
18
|
+
attr_reader webhook_key: String?
|
|
19
|
+
|
|
18
20
|
attr_reader checkout_sessions: Dodopayments::Resources::CheckoutSessions
|
|
19
21
|
|
|
20
22
|
attr_reader payments: Dodopayments::Resources::Payments
|
|
@@ -59,10 +61,15 @@ module Dodopayments
|
|
|
59
61
|
|
|
60
62
|
attr_reader credit_entitlements: Dodopayments::Resources::CreditEntitlements
|
|
61
63
|
|
|
64
|
+
attr_reader product_collections: Dodopayments::Resources::ProductCollections
|
|
65
|
+
|
|
66
|
+
attr_reader your_webhook_url: Dodopayments::Resources::YourWebhookURL
|
|
67
|
+
|
|
62
68
|
private def auth_headers: -> ::Hash[String, String]
|
|
63
69
|
|
|
64
70
|
def initialize: (
|
|
65
71
|
?bearer_token: String?,
|
|
72
|
+
?webhook_key: String?,
|
|
66
73
|
?environment: :live_mode | :test_mode | nil,
|
|
67
74
|
?base_url: String?,
|
|
68
75
|
?max_retries: Integer,
|
|
@@ -5,7 +5,7 @@ module Dodopayments
|
|
|
5
5
|
force_language: String?,
|
|
6
6
|
show_on_demand_tag: bool,
|
|
7
7
|
show_order_details: bool,
|
|
8
|
-
theme: Dodopayments::Models::CheckoutSessionCustomization::theme
|
|
8
|
+
theme: Dodopayments::Models::CheckoutSessionCustomization::theme?,
|
|
9
9
|
theme_config: Dodopayments::ThemeConfig?
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -20,11 +20,7 @@ module Dodopayments
|
|
|
20
20
|
|
|
21
21
|
def show_order_details=: (bool) -> bool
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def theme=: (
|
|
26
|
-
Dodopayments::Models::CheckoutSessionCustomization::theme
|
|
27
|
-
) -> Dodopayments::Models::CheckoutSessionCustomization::theme
|
|
23
|
+
attr_accessor theme: Dodopayments::Models::CheckoutSessionCustomization::theme?
|
|
28
24
|
|
|
29
25
|
attr_accessor theme_config: Dodopayments::ThemeConfig?
|
|
30
26
|
|
|
@@ -32,7 +28,7 @@ module Dodopayments
|
|
|
32
28
|
?force_language: String?,
|
|
33
29
|
?show_on_demand_tag: bool,
|
|
34
30
|
?show_order_details: bool,
|
|
35
|
-
?theme: Dodopayments::Models::CheckoutSessionCustomization::theme
|
|
31
|
+
?theme: Dodopayments::Models::CheckoutSessionCustomization::theme?,
|
|
36
32
|
?theme_config: Dodopayments::ThemeConfig?
|
|
37
33
|
) -> void
|
|
38
34
|
|
|
@@ -40,7 +36,7 @@ module Dodopayments
|
|
|
40
36
|
force_language: String?,
|
|
41
37
|
show_on_demand_tag: bool,
|
|
42
38
|
show_order_details: bool,
|
|
43
|
-
theme: Dodopayments::Models::CheckoutSessionCustomization::theme
|
|
39
|
+
theme: Dodopayments::Models::CheckoutSessionCustomization::theme?,
|
|
44
40
|
theme_config: Dodopayments::ThemeConfig?
|
|
45
41
|
}
|
|
46
42
|
|
|
@@ -6,6 +6,7 @@ module Dodopayments
|
|
|
6
6
|
allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
7
7
|
billing_address: Dodopayments::CheckoutSessionBillingAddress?,
|
|
8
8
|
billing_currency: Dodopayments::Models::currency?,
|
|
9
|
+
cancel_url: String?,
|
|
9
10
|
confirm: bool,
|
|
10
11
|
custom_fields: ::Array[Dodopayments::CustomField]?,
|
|
11
12
|
customer: Dodopayments::Models::customer_request?,
|
|
@@ -33,6 +34,8 @@ module Dodopayments
|
|
|
33
34
|
|
|
34
35
|
attr_accessor billing_currency: Dodopayments::Models::currency?
|
|
35
36
|
|
|
37
|
+
attr_accessor cancel_url: String?
|
|
38
|
+
|
|
36
39
|
attr_reader confirm: bool?
|
|
37
40
|
|
|
38
41
|
def confirm=: (bool) -> bool
|
|
@@ -86,6 +89,7 @@ module Dodopayments
|
|
|
86
89
|
?allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
87
90
|
?billing_address: Dodopayments::CheckoutSessionBillingAddress?,
|
|
88
91
|
?billing_currency: Dodopayments::Models::currency?,
|
|
92
|
+
?cancel_url: String?,
|
|
89
93
|
?confirm: bool,
|
|
90
94
|
?custom_fields: ::Array[Dodopayments::CustomField]?,
|
|
91
95
|
?customer: Dodopayments::Models::customer_request?,
|
|
@@ -109,6 +113,7 @@ module Dodopayments
|
|
|
109
113
|
allowed_payment_method_types: ::Array[Dodopayments::Models::payment_method_types]?,
|
|
110
114
|
billing_address: Dodopayments::CheckoutSessionBillingAddress?,
|
|
111
115
|
billing_currency: Dodopayments::Models::currency?,
|
|
116
|
+
cancel_url: String?,
|
|
112
117
|
confirm: bool,
|
|
113
118
|
custom_fields: ::Array[Dodopayments::CustomField]?,
|
|
114
119
|
customer: Dodopayments::Models::customer_request?,
|
|
@@ -2,7 +2,7 @@ module Dodopayments
|
|
|
2
2
|
module Models
|
|
3
3
|
module Customers
|
|
4
4
|
type customer_portal_create_params =
|
|
5
|
-
{ customer_id: String, send_email: bool }
|
|
5
|
+
{ customer_id: String, return_url: String, send_email: bool }
|
|
6
6
|
& Dodopayments::Internal::Type::request_parameters
|
|
7
7
|
|
|
8
8
|
class CustomerPortalCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
@@ -11,18 +11,24 @@ module Dodopayments
|
|
|
11
11
|
|
|
12
12
|
attr_accessor customer_id: String
|
|
13
13
|
|
|
14
|
+
attr_reader return_url: String?
|
|
15
|
+
|
|
16
|
+
def return_url=: (String) -> String
|
|
17
|
+
|
|
14
18
|
attr_reader send_email: bool?
|
|
15
19
|
|
|
16
20
|
def send_email=: (bool) -> bool
|
|
17
21
|
|
|
18
22
|
def initialize: (
|
|
19
23
|
customer_id: String,
|
|
24
|
+
?return_url: String,
|
|
20
25
|
?send_email: bool,
|
|
21
26
|
?request_options: Dodopayments::request_opts
|
|
22
27
|
) -> void
|
|
23
28
|
|
|
24
29
|
def to_hash: -> {
|
|
25
30
|
customer_id: String,
|
|
31
|
+
return_url: String,
|
|
26
32
|
send_email: bool,
|
|
27
33
|
request_options: Dodopayments::RequestOptions
|
|
28
34
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
module Invoices
|
|
4
|
+
type payment_retrieve_payout_params =
|
|
5
|
+
{ payout_id: String } & Dodopayments::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class PaymentRetrievePayoutParams < Dodopayments::Internal::Type::BaseModel
|
|
8
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor payout_id: String
|
|
12
|
+
|
|
13
|
+
def initialize: (
|
|
14
|
+
payout_id: String,
|
|
15
|
+
?request_options: Dodopayments::request_opts
|
|
16
|
+
) -> void
|
|
17
|
+
|
|
18
|
+
def to_hash: -> {
|
|
19
|
+
payout_id: String,
|
|
20
|
+
request_options: Dodopayments::RequestOptions
|
|
21
|
+
}
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_create_params =
|
|
4
|
+
{
|
|
5
|
+
groups: ::Array[Dodopayments::ProductCollectionCreateParams::Group],
|
|
6
|
+
name: String,
|
|
7
|
+
brand_id: String?,
|
|
8
|
+
description: String?
|
|
9
|
+
}
|
|
10
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
11
|
+
|
|
12
|
+
class ProductCollectionCreateParams < Dodopayments::Internal::Type::BaseModel
|
|
13
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
attr_accessor groups: ::Array[Dodopayments::ProductCollectionCreateParams::Group]
|
|
17
|
+
|
|
18
|
+
attr_accessor name: String
|
|
19
|
+
|
|
20
|
+
attr_accessor brand_id: String?
|
|
21
|
+
|
|
22
|
+
attr_accessor description: String?
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
groups: ::Array[Dodopayments::ProductCollectionCreateParams::Group],
|
|
26
|
+
name: String,
|
|
27
|
+
?brand_id: String?,
|
|
28
|
+
?description: String?,
|
|
29
|
+
?request_options: Dodopayments::request_opts
|
|
30
|
+
) -> void
|
|
31
|
+
|
|
32
|
+
def to_hash: -> {
|
|
33
|
+
groups: ::Array[Dodopayments::ProductCollectionCreateParams::Group],
|
|
34
|
+
name: String,
|
|
35
|
+
brand_id: String?,
|
|
36
|
+
description: String?,
|
|
37
|
+
request_options: Dodopayments::RequestOptions
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
type group =
|
|
41
|
+
{
|
|
42
|
+
products: ::Array[Dodopayments::ProductCollectionCreateParams::Group::Product],
|
|
43
|
+
group_name: String?,
|
|
44
|
+
status: bool?
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
48
|
+
attr_accessor products: ::Array[Dodopayments::ProductCollectionCreateParams::Group::Product]
|
|
49
|
+
|
|
50
|
+
attr_accessor group_name: String?
|
|
51
|
+
|
|
52
|
+
attr_accessor status: bool?
|
|
53
|
+
|
|
54
|
+
def initialize: (
|
|
55
|
+
products: ::Array[Dodopayments::ProductCollectionCreateParams::Group::Product],
|
|
56
|
+
?group_name: String?,
|
|
57
|
+
?status: bool?
|
|
58
|
+
) -> void
|
|
59
|
+
|
|
60
|
+
def to_hash: -> {
|
|
61
|
+
products: ::Array[Dodopayments::ProductCollectionCreateParams::Group::Product],
|
|
62
|
+
group_name: String?,
|
|
63
|
+
status: bool?
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
type product = { product_id: String, status: bool? }
|
|
67
|
+
|
|
68
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
69
|
+
attr_accessor product_id: String
|
|
70
|
+
|
|
71
|
+
attr_accessor status: bool?
|
|
72
|
+
|
|
73
|
+
def initialize: (product_id: String, ?status: bool?) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> { product_id: String, status: bool? }
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_create_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
brand_id: String,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
groups: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group],
|
|
9
|
+
name: String,
|
|
10
|
+
updated_at: Time,
|
|
11
|
+
description: String?,
|
|
12
|
+
image: String?
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class ProductCollectionCreateResponse < Dodopayments::Internal::Type::BaseModel
|
|
16
|
+
attr_accessor id: String
|
|
17
|
+
|
|
18
|
+
attr_accessor brand_id: String
|
|
19
|
+
|
|
20
|
+
attr_accessor created_at: Time
|
|
21
|
+
|
|
22
|
+
attr_accessor groups: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group]
|
|
23
|
+
|
|
24
|
+
attr_accessor name: String
|
|
25
|
+
|
|
26
|
+
attr_accessor updated_at: Time
|
|
27
|
+
|
|
28
|
+
attr_accessor description: String?
|
|
29
|
+
|
|
30
|
+
attr_accessor image: String?
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
id: String,
|
|
34
|
+
brand_id: String,
|
|
35
|
+
created_at: Time,
|
|
36
|
+
groups: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group],
|
|
37
|
+
name: String,
|
|
38
|
+
updated_at: Time,
|
|
39
|
+
?description: String?,
|
|
40
|
+
?image: String?
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
id: String,
|
|
45
|
+
brand_id: String,
|
|
46
|
+
created_at: Time,
|
|
47
|
+
groups: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group],
|
|
48
|
+
name: String,
|
|
49
|
+
updated_at: Time,
|
|
50
|
+
description: String?,
|
|
51
|
+
image: String?
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
type group =
|
|
55
|
+
{
|
|
56
|
+
group_id: String,
|
|
57
|
+
products: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group::Product],
|
|
58
|
+
status: bool,
|
|
59
|
+
group_name: String?
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
class Group < Dodopayments::Internal::Type::BaseModel
|
|
63
|
+
attr_accessor group_id: String
|
|
64
|
+
|
|
65
|
+
attr_accessor products: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group::Product]
|
|
66
|
+
|
|
67
|
+
attr_accessor status: bool
|
|
68
|
+
|
|
69
|
+
attr_accessor group_name: String?
|
|
70
|
+
|
|
71
|
+
def initialize: (
|
|
72
|
+
group_id: String,
|
|
73
|
+
products: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group::Product],
|
|
74
|
+
status: bool,
|
|
75
|
+
?group_name: String?
|
|
76
|
+
) -> void
|
|
77
|
+
|
|
78
|
+
def to_hash: -> {
|
|
79
|
+
group_id: String,
|
|
80
|
+
products: ::Array[Dodopayments::Models::ProductCollectionCreateResponse::Group::Product],
|
|
81
|
+
status: bool,
|
|
82
|
+
group_name: String?
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
type product =
|
|
86
|
+
{
|
|
87
|
+
id: String,
|
|
88
|
+
addons_count: Integer,
|
|
89
|
+
files_count: Integer,
|
|
90
|
+
has_credit_entitlements: bool,
|
|
91
|
+
is_recurring: bool,
|
|
92
|
+
license_key_enabled: bool,
|
|
93
|
+
meters_count: Integer,
|
|
94
|
+
product_id: String,
|
|
95
|
+
status: bool,
|
|
96
|
+
currency: Dodopayments::Models::currency?,
|
|
97
|
+
description: String?,
|
|
98
|
+
name: String?,
|
|
99
|
+
price: Integer?,
|
|
100
|
+
price_detail: Dodopayments::Models::price?,
|
|
101
|
+
tax_category: Dodopayments::Models::tax_category?,
|
|
102
|
+
tax_inclusive: bool?
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
class Product < Dodopayments::Internal::Type::BaseModel
|
|
106
|
+
attr_accessor id: String
|
|
107
|
+
|
|
108
|
+
attr_accessor addons_count: Integer
|
|
109
|
+
|
|
110
|
+
attr_accessor files_count: Integer
|
|
111
|
+
|
|
112
|
+
attr_accessor has_credit_entitlements: bool
|
|
113
|
+
|
|
114
|
+
attr_accessor is_recurring: bool
|
|
115
|
+
|
|
116
|
+
attr_accessor license_key_enabled: bool
|
|
117
|
+
|
|
118
|
+
attr_accessor meters_count: Integer
|
|
119
|
+
|
|
120
|
+
attr_accessor product_id: String
|
|
121
|
+
|
|
122
|
+
attr_accessor status: bool
|
|
123
|
+
|
|
124
|
+
attr_accessor currency: Dodopayments::Models::currency?
|
|
125
|
+
|
|
126
|
+
attr_accessor description: String?
|
|
127
|
+
|
|
128
|
+
attr_accessor name: String?
|
|
129
|
+
|
|
130
|
+
attr_accessor price: Integer?
|
|
131
|
+
|
|
132
|
+
attr_accessor price_detail: Dodopayments::Models::price?
|
|
133
|
+
|
|
134
|
+
attr_accessor tax_category: Dodopayments::Models::tax_category?
|
|
135
|
+
|
|
136
|
+
attr_accessor tax_inclusive: bool?
|
|
137
|
+
|
|
138
|
+
def initialize: (
|
|
139
|
+
id: String,
|
|
140
|
+
addons_count: Integer,
|
|
141
|
+
files_count: Integer,
|
|
142
|
+
has_credit_entitlements: bool,
|
|
143
|
+
is_recurring: bool,
|
|
144
|
+
license_key_enabled: bool,
|
|
145
|
+
meters_count: Integer,
|
|
146
|
+
product_id: String,
|
|
147
|
+
status: bool,
|
|
148
|
+
?currency: Dodopayments::Models::currency?,
|
|
149
|
+
?description: String?,
|
|
150
|
+
?name: String?,
|
|
151
|
+
?price: Integer?,
|
|
152
|
+
?price_detail: Dodopayments::Models::price?,
|
|
153
|
+
?tax_category: Dodopayments::Models::tax_category?,
|
|
154
|
+
?tax_inclusive: bool?
|
|
155
|
+
) -> void
|
|
156
|
+
|
|
157
|
+
def to_hash: -> {
|
|
158
|
+
id: String,
|
|
159
|
+
addons_count: Integer,
|
|
160
|
+
files_count: Integer,
|
|
161
|
+
has_credit_entitlements: bool,
|
|
162
|
+
is_recurring: bool,
|
|
163
|
+
license_key_enabled: bool,
|
|
164
|
+
meters_count: Integer,
|
|
165
|
+
product_id: String,
|
|
166
|
+
status: bool,
|
|
167
|
+
currency: Dodopayments::Models::currency?,
|
|
168
|
+
description: String?,
|
|
169
|
+
name: String?,
|
|
170
|
+
price: Integer?,
|
|
171
|
+
price_detail: Dodopayments::Models::price?,
|
|
172
|
+
tax_category: Dodopayments::Models::tax_category?,
|
|
173
|
+
tax_inclusive: bool?
|
|
174
|
+
}
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_delete_params =
|
|
4
|
+
{ id: String } & Dodopayments::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class ProductCollectionDeleteParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: Dodopayments::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
id: String,
|
|
19
|
+
request_options: Dodopayments::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_list_params =
|
|
4
|
+
{
|
|
5
|
+
archived: bool,
|
|
6
|
+
brand_id: String,
|
|
7
|
+
page_number: Integer,
|
|
8
|
+
page_size: Integer
|
|
9
|
+
}
|
|
10
|
+
& Dodopayments::Internal::Type::request_parameters
|
|
11
|
+
|
|
12
|
+
class ProductCollectionListParams < Dodopayments::Internal::Type::BaseModel
|
|
13
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
14
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
15
|
+
|
|
16
|
+
attr_reader archived: bool?
|
|
17
|
+
|
|
18
|
+
def archived=: (bool) -> bool
|
|
19
|
+
|
|
20
|
+
attr_reader brand_id: String?
|
|
21
|
+
|
|
22
|
+
def brand_id=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader page_number: Integer?
|
|
25
|
+
|
|
26
|
+
def page_number=: (Integer) -> Integer
|
|
27
|
+
|
|
28
|
+
attr_reader page_size: Integer?
|
|
29
|
+
|
|
30
|
+
def page_size=: (Integer) -> Integer
|
|
31
|
+
|
|
32
|
+
def initialize: (
|
|
33
|
+
?archived: bool,
|
|
34
|
+
?brand_id: String,
|
|
35
|
+
?page_number: Integer,
|
|
36
|
+
?page_size: Integer,
|
|
37
|
+
?request_options: Dodopayments::request_opts
|
|
38
|
+
) -> void
|
|
39
|
+
|
|
40
|
+
def to_hash: -> {
|
|
41
|
+
archived: bool,
|
|
42
|
+
brand_id: String,
|
|
43
|
+
page_number: Integer,
|
|
44
|
+
page_size: Integer,
|
|
45
|
+
request_options: Dodopayments::RequestOptions
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_list_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
created_at: Time,
|
|
7
|
+
name: String,
|
|
8
|
+
products_count: Integer,
|
|
9
|
+
updated_at: Time,
|
|
10
|
+
description: String?,
|
|
11
|
+
image: String?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class ProductCollectionListResponse < Dodopayments::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor created_at: Time
|
|
18
|
+
|
|
19
|
+
attr_accessor name: String
|
|
20
|
+
|
|
21
|
+
attr_accessor products_count: Integer
|
|
22
|
+
|
|
23
|
+
attr_accessor updated_at: Time
|
|
24
|
+
|
|
25
|
+
attr_accessor description: String?
|
|
26
|
+
|
|
27
|
+
attr_accessor image: String?
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
id: String,
|
|
31
|
+
created_at: Time,
|
|
32
|
+
name: String,
|
|
33
|
+
products_count: Integer,
|
|
34
|
+
updated_at: Time,
|
|
35
|
+
?description: String?,
|
|
36
|
+
?image: String?
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
id: String,
|
|
41
|
+
created_at: Time,
|
|
42
|
+
name: String,
|
|
43
|
+
products_count: Integer,
|
|
44
|
+
updated_at: Time,
|
|
45
|
+
description: String?,
|
|
46
|
+
image: String?
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module Dodopayments
|
|
2
|
+
module Models
|
|
3
|
+
type product_collection_retrieve_params =
|
|
4
|
+
{ id: String } & Dodopayments::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class ProductCollectionRetrieveParams < Dodopayments::Internal::Type::BaseModel
|
|
7
|
+
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Dodopayments::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: Dodopayments::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
id: String,
|
|
19
|
+
request_options: Dodopayments::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|