dodopayments 2.8.1 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +1 -1
- data/lib/dodopayments/client.rb +4 -0
- data/lib/dodopayments/models/attach_product_entitlement.rb +22 -0
- data/lib/dodopayments/models/cancellation_feedback.rb +21 -0
- data/lib/dodopayments/models/checkout_session_flags.rb +12 -1
- data/lib/dodopayments/models/checkout_session_request.rb +14 -1
- data/lib/dodopayments/models/credit_entitlements/credit_ledger_entry.rb +1 -0
- data/lib/dodopayments/models/credit_overage_reset_webhook_event.rb +52 -0
- data/lib/dodopayments/models/customer_list_entitlements_params.rb +20 -0
- data/lib/dodopayments/models/customer_list_entitlements_response.rb +105 -0
- data/lib/dodopayments/models/digital_product_delivery.rb +19 -14
- data/lib/dodopayments/models/digital_product_delivery_file.rb +40 -9
- data/lib/dodopayments/models/entitlement.rb +97 -0
- data/lib/dodopayments/models/entitlement_create_params.rb +54 -0
- data/lib/dodopayments/models/entitlement_delete_params.rb +20 -0
- data/lib/dodopayments/models/entitlement_grant_created_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_delivered_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_failed_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_grant_revoked_webhook_event.rb +56 -0
- data/lib/dodopayments/models/entitlement_integration_type.rb +21 -0
- data/lib/dodopayments/models/entitlement_list_params.rb +55 -0
- data/lib/dodopayments/models/entitlement_retrieve_params.rb +20 -0
- data/lib/dodopayments/models/entitlement_update_params.rb +54 -0
- data/lib/dodopayments/models/entitlements/entitlement_grant.rb +190 -0
- data/lib/dodopayments/models/entitlements/file_delete_params.rb +28 -0
- data/lib/dodopayments/models/entitlements/file_upload_params.rb +22 -0
- data/lib/dodopayments/models/entitlements/file_upload_response.rb +23 -0
- data/lib/dodopayments/models/entitlements/grant_list_params.rb +68 -0
- data/lib/dodopayments/models/entitlements/grant_revoke_params.rb +28 -0
- data/lib/dodopayments/models/entitlements/license_key_grant.rb +45 -0
- data/lib/dodopayments/models/integration_config.rb +217 -0
- data/lib/dodopayments/models/integration_config_response.rb +278 -0
- data/lib/dodopayments/models/license_key_instance_list_params.rb +9 -1
- data/lib/dodopayments/models/one_time_product_cart_item.rb +15 -1
- data/lib/dodopayments/models/payment.rb +19 -3
- data/lib/dodopayments/models/payment_create_params.rb +23 -35
- data/lib/dodopayments/models/payment_create_response.rb +3 -33
- data/lib/dodopayments/models/product.rb +10 -217
- data/lib/dodopayments/models/product_create_params.rb +25 -6
- data/lib/dodopayments/models/product_entitlement_summary.rb +57 -0
- data/lib/dodopayments/models/product_list_response.rb +3 -218
- data/lib/dodopayments/models/product_update_params.rb +21 -7
- data/lib/dodopayments/models/scheduled_plan_change.rb +99 -0
- data/lib/dodopayments/models/subscription.rb +20 -102
- data/lib/dodopayments/models/subscription_create_params.rb +27 -37
- data/lib/dodopayments/models/subscription_create_response.rb +19 -3
- data/lib/dodopayments/models/subscription_list_response.rb +3 -103
- data/lib/dodopayments/models/subscription_update_params.rb +23 -1
- data/lib/dodopayments/models/unsafe_unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/unwrap_webhook_event.rb +11 -1
- data/lib/dodopayments/models/update_subscription_plan_req.rb +10 -1
- data/lib/dodopayments/models/webhook_event_type.rb +1 -0
- data/lib/dodopayments/models/webhook_payload.rb +6 -153
- data/lib/dodopayments/models.rb +40 -0
- data/lib/dodopayments/resources/checkout_sessions.rb +6 -2
- data/lib/dodopayments/resources/customers.rb +20 -0
- data/lib/dodopayments/resources/entitlements/files.rb +63 -0
- data/lib/dodopayments/resources/entitlements/grants.rb +76 -0
- data/lib/dodopayments/resources/entitlements.rb +153 -0
- data/lib/dodopayments/resources/license_key_instances.rb +3 -1
- data/lib/dodopayments/resources/payments.rb +6 -2
- data/lib/dodopayments/resources/products.rb +4 -4
- data/lib/dodopayments/resources/subscriptions.rb +20 -5
- data/lib/dodopayments/resources/webhooks.rb +2 -2
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +30 -0
- data/rbi/dodopayments/client.rbi +3 -0
- data/rbi/dodopayments/models/attach_product_entitlement.rbi +35 -0
- data/rbi/dodopayments/models/cancellation_feedback.rbi +45 -0
- data/rbi/dodopayments/models/checkout_session_flags.rbi +20 -3
- data/rbi/dodopayments/models/checkout_session_request.rbi +18 -0
- data/rbi/dodopayments/models/credit_entitlements/credit_ledger_entry.rbi +5 -0
- data/rbi/dodopayments/models/credit_overage_reset_webhook_event.rbi +103 -0
- data/rbi/dodopayments/models/customer_list_entitlements_params.rbi +38 -0
- data/rbi/dodopayments/models/customer_list_entitlements_response.rbi +189 -0
- data/rbi/dodopayments/models/digital_product_delivery.rbi +16 -18
- data/rbi/dodopayments/models/digital_product_delivery_file.rbi +51 -8
- data/rbi/dodopayments/models/entitlement.rbi +127 -0
- data/rbi/dodopayments/models/entitlement_create_params.rbi +115 -0
- data/rbi/dodopayments/models/entitlement_delete_params.rbi +38 -0
- data/rbi/dodopayments/models/entitlement_grant_created_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_grant_delivered_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_grant_failed_webhook_event.rbi +106 -0
- data/rbi/dodopayments/models/entitlement_grant_revoked_webhook_event.rbi +107 -0
- data/rbi/dodopayments/models/entitlement_integration_type.rbi +44 -0
- data/rbi/dodopayments/models/entitlement_list_params.rbi +146 -0
- data/rbi/dodopayments/models/entitlement_retrieve_params.rbi +38 -0
- data/rbi/dodopayments/models/entitlement_update_params.rbi +111 -0
- data/rbi/dodopayments/models/entitlements/entitlement_grant.rbi +269 -0
- data/rbi/dodopayments/models/entitlements/file_delete_params.rbi +48 -0
- data/rbi/dodopayments/models/entitlements/file_upload_params.rbi +40 -0
- data/rbi/dodopayments/models/entitlements/file_upload_response.rbi +34 -0
- data/rbi/dodopayments/models/entitlements/grant_list_params.rbi +145 -0
- data/rbi/dodopayments/models/entitlements/grant_revoke_params.rbi +48 -0
- data/rbi/dodopayments/models/entitlements/license_key_grant.rbi +68 -0
- data/rbi/dodopayments/models/integration_config.rbi +411 -0
- data/rbi/dodopayments/models/integration_config_response.rbi +531 -0
- data/rbi/dodopayments/models/license_key_instance_list_params.rbi +8 -0
- data/rbi/dodopayments/models/one_time_product_cart_item.rbi +24 -3
- data/rbi/dodopayments/models/payment.rbi +31 -3
- data/rbi/dodopayments/models/payment_create_params.rbi +28 -56
- data/rbi/dodopayments/models/payment_create_response.rbi +3 -68
- data/rbi/dodopayments/models/product.rbi +8 -420
- data/rbi/dodopayments/models/product_create_params.rbi +43 -7
- data/rbi/dodopayments/models/product_entitlement_summary.rbi +88 -0
- data/rbi/dodopayments/models/product_list_response.rbi +3 -430
- data/rbi/dodopayments/models/product_update_params.rbi +35 -9
- data/rbi/dodopayments/models/scheduled_plan_change.rbi +141 -0
- data/rbi/dodopayments/models/subscription.rbi +24 -149
- data/rbi/dodopayments/models/subscription_create_params.rbi +36 -68
- data/rbi/dodopayments/models/subscription_create_response.rbi +47 -3
- data/rbi/dodopayments/models/subscription_list_response.rbi +4 -167
- data/rbi/dodopayments/models/subscription_update_params.rbi +27 -0
- data/rbi/dodopayments/models/unsafe_unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/unwrap_webhook_event.rbi +5 -0
- data/rbi/dodopayments/models/update_subscription_plan_req.rbi +10 -0
- data/rbi/dodopayments/models/webhook_event_type.rbi +5 -0
- data/rbi/dodopayments/models/webhook_payload.rbi +6 -197
- data/rbi/dodopayments/models.rbi +46 -0
- data/rbi/dodopayments/resources/checkout_sessions.rbi +16 -0
- data/rbi/dodopayments/resources/customers.rbi +14 -0
- data/rbi/dodopayments/resources/entitlements/files.rbi +45 -0
- data/rbi/dodopayments/resources/entitlements/grants.rbi +63 -0
- data/rbi/dodopayments/resources/entitlements.rbi +143 -0
- data/rbi/dodopayments/resources/license_key_instances.rbi +3 -0
- data/rbi/dodopayments/resources/payments.rbi +10 -2
- data/rbi/dodopayments/resources/products.rbi +34 -7
- data/rbi/dodopayments/resources/subscriptions.rbi +31 -5
- data/rbi/dodopayments/resources/webhooks.rbi +10 -0
- data/sig/dodopayments/client.rbs +2 -0
- data/sig/dodopayments/models/attach_product_entitlement.rbs +13 -0
- data/sig/dodopayments/models/cancellation_feedback.rbs +28 -0
- data/sig/dodopayments/models/checkout_session_flags.rbs +10 -3
- data/sig/dodopayments/models/checkout_session_request.rbs +5 -0
- data/sig/dodopayments/models/credit_entitlements/credit_ledger_entry.rbs +2 -0
- data/sig/dodopayments/models/credit_overage_reset_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/customer_list_entitlements_params.rbs +23 -0
- data/sig/dodopayments/models/customer_list_entitlements_response.rbs +95 -0
- data/sig/dodopayments/models/digital_product_delivery.rbs +5 -5
- data/sig/dodopayments/models/digital_product_delivery_file.rbs +32 -5
- data/sig/dodopayments/models/entitlement.rbs +65 -0
- data/sig/dodopayments/models/entitlement_create_params.rbs +48 -0
- data/sig/dodopayments/models/entitlement_delete_params.rbs +23 -0
- data/sig/dodopayments/models/entitlement_grant_created_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_delivered_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_failed_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_grant_revoked_webhook_event.rbs +45 -0
- data/sig/dodopayments/models/entitlement_integration_type.rbs +28 -0
- data/sig/dodopayments/models/entitlement_list_params.rbs +69 -0
- data/sig/dodopayments/models/entitlement_retrieve_params.rbs +23 -0
- data/sig/dodopayments/models/entitlement_update_params.rbs +46 -0
- data/sig/dodopayments/models/entitlements/entitlement_grant.rbs +127 -0
- data/sig/dodopayments/models/entitlements/file_delete_params.rbs +30 -0
- data/sig/dodopayments/models/entitlements/file_upload_params.rbs +25 -0
- data/sig/dodopayments/models/entitlements/file_upload_response.rbs +15 -0
- data/sig/dodopayments/models/entitlements/grant_list_params.rbs +71 -0
- data/sig/dodopayments/models/entitlements/grant_revoke_params.rbs +30 -0
- data/sig/dodopayments/models/entitlements/license_key_grant.rbs +37 -0
- data/sig/dodopayments/models/integration_config.rbs +171 -0
- data/sig/dodopayments/models/integration_config_response.rbs +225 -0
- data/sig/dodopayments/models/license_key_instance_list_params.rbs +10 -1
- data/sig/dodopayments/models/one_time_product_cart_item.rbs +14 -3
- data/sig/dodopayments/models/payment.rbs +16 -4
- data/sig/dodopayments/models/payment_create_params.rbs +16 -27
- data/sig/dodopayments/models/payment_create_response.rbs +4 -27
- data/sig/dodopayments/models/product.rbs +4 -205
- data/sig/dodopayments/models/product_create_params.rbs +4 -4
- data/sig/dodopayments/models/product_entitlement_summary.rbs +40 -0
- data/sig/dodopayments/models/product_list_response.rbs +4 -205
- data/sig/dodopayments/models/product_update_params.rbs +4 -4
- data/sig/dodopayments/models/scheduled_plan_change.rbs +73 -0
- data/sig/dodopayments/models/subscription.rbs +14 -74
- data/sig/dodopayments/models/subscription_create_params.rbs +16 -27
- data/sig/dodopayments/models/subscription_create_response.rbs +16 -4
- data/sig/dodopayments/models/subscription_list_response.rbs +4 -74
- data/sig/dodopayments/models/subscription_update_params.rbs +12 -0
- data/sig/dodopayments/models/unsafe_unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/unwrap_webhook_event.rbs +5 -0
- data/sig/dodopayments/models/update_subscription_plan_req.rbs +5 -0
- data/sig/dodopayments/models/webhook_event_type.rbs +2 -0
- data/sig/dodopayments/models/webhook_payload.rbs +8 -134
- data/sig/dodopayments/models.rbs +40 -0
- data/sig/dodopayments/resources/checkout_sessions.rbs +2 -0
- data/sig/dodopayments/resources/customers.rbs +5 -0
- data/sig/dodopayments/resources/entitlements/files.rbs +20 -0
- data/sig/dodopayments/resources/entitlements/grants.rbs +24 -0
- data/sig/dodopayments/resources/entitlements.rbs +46 -0
- data/sig/dodopayments/resources/license_key_instances.rbs +1 -0
- data/sig/dodopayments/resources/payments.rbs +3 -1
- data/sig/dodopayments/resources/products.rbs +2 -2
- data/sig/dodopayments/resources/subscriptions.rbs +7 -1
- data/sig/dodopayments/resources/webhooks.rbs +10 -0
- metadata +92 -2
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Dodopayments
|
|
4
|
+
module Models
|
|
5
|
+
# Integration-specific configuration on an entitlement read response.
|
|
6
|
+
#
|
|
7
|
+
# For `digital_files` entitlements the response includes presigned download URLs
|
|
8
|
+
# for each attached file; other integrations match the shape supplied at creation.
|
|
9
|
+
module IntegrationConfigResponse
|
|
10
|
+
extend Dodopayments::Internal::Type::Union
|
|
11
|
+
|
|
12
|
+
Variants =
|
|
13
|
+
T.type_alias do
|
|
14
|
+
T.any(
|
|
15
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig,
|
|
16
|
+
Dodopayments::IntegrationConfigResponse::DiscordConfig,
|
|
17
|
+
Dodopayments::IntegrationConfigResponse::TelegramConfig,
|
|
18
|
+
Dodopayments::IntegrationConfigResponse::FigmaConfig,
|
|
19
|
+
Dodopayments::IntegrationConfigResponse::FramerConfig,
|
|
20
|
+
Dodopayments::IntegrationConfigResponse::NotionConfig,
|
|
21
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig,
|
|
22
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig
|
|
23
|
+
)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
class GitHubConfig < Dodopayments::Internal::Type::BaseModel
|
|
27
|
+
OrHash =
|
|
28
|
+
T.type_alias do
|
|
29
|
+
T.any(
|
|
30
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig,
|
|
31
|
+
Dodopayments::Internal::AnyHash
|
|
32
|
+
)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Permission to grant on the repository.
|
|
36
|
+
sig do
|
|
37
|
+
returns(
|
|
38
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
39
|
+
)
|
|
40
|
+
end
|
|
41
|
+
attr_accessor :permission
|
|
42
|
+
|
|
43
|
+
# Repository or organisation slug to grant access to.
|
|
44
|
+
sig { returns(String) }
|
|
45
|
+
attr_accessor :target_id
|
|
46
|
+
|
|
47
|
+
sig do
|
|
48
|
+
params(
|
|
49
|
+
permission:
|
|
50
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::OrSymbol,
|
|
51
|
+
target_id: String
|
|
52
|
+
).returns(T.attached_class)
|
|
53
|
+
end
|
|
54
|
+
def self.new(
|
|
55
|
+
# Permission to grant on the repository.
|
|
56
|
+
permission:,
|
|
57
|
+
# Repository or organisation slug to grant access to.
|
|
58
|
+
target_id:
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
sig do
|
|
63
|
+
override.returns(
|
|
64
|
+
{
|
|
65
|
+
permission:
|
|
66
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol,
|
|
67
|
+
target_id: String
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
def to_hash
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Permission to grant on the repository.
|
|
75
|
+
module Permission
|
|
76
|
+
extend Dodopayments::Internal::Type::Enum
|
|
77
|
+
|
|
78
|
+
TaggedSymbol =
|
|
79
|
+
T.type_alias do
|
|
80
|
+
T.all(
|
|
81
|
+
Symbol,
|
|
82
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
86
|
+
|
|
87
|
+
PULL =
|
|
88
|
+
T.let(
|
|
89
|
+
:pull,
|
|
90
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
91
|
+
)
|
|
92
|
+
PUSH =
|
|
93
|
+
T.let(
|
|
94
|
+
:push,
|
|
95
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
96
|
+
)
|
|
97
|
+
ADMIN =
|
|
98
|
+
T.let(
|
|
99
|
+
:admin,
|
|
100
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
101
|
+
)
|
|
102
|
+
MAINTAIN =
|
|
103
|
+
T.let(
|
|
104
|
+
:maintain,
|
|
105
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
106
|
+
)
|
|
107
|
+
TRIAGE =
|
|
108
|
+
T.let(
|
|
109
|
+
:triage,
|
|
110
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
sig do
|
|
114
|
+
override.returns(
|
|
115
|
+
T::Array[
|
|
116
|
+
Dodopayments::IntegrationConfigResponse::GitHubConfig::Permission::TaggedSymbol
|
|
117
|
+
]
|
|
118
|
+
)
|
|
119
|
+
end
|
|
120
|
+
def self.values
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
class DiscordConfig < Dodopayments::Internal::Type::BaseModel
|
|
126
|
+
OrHash =
|
|
127
|
+
T.type_alias do
|
|
128
|
+
T.any(
|
|
129
|
+
Dodopayments::IntegrationConfigResponse::DiscordConfig,
|
|
130
|
+
Dodopayments::Internal::AnyHash
|
|
131
|
+
)
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Discord guild (server) ID.
|
|
135
|
+
sig { returns(String) }
|
|
136
|
+
attr_accessor :guild_id
|
|
137
|
+
|
|
138
|
+
# Optional Discord role to assign within the guild.
|
|
139
|
+
sig { returns(T.nilable(String)) }
|
|
140
|
+
attr_accessor :role_id
|
|
141
|
+
|
|
142
|
+
sig do
|
|
143
|
+
params(guild_id: String, role_id: T.nilable(String)).returns(
|
|
144
|
+
T.attached_class
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
def self.new(
|
|
148
|
+
# Discord guild (server) ID.
|
|
149
|
+
guild_id:,
|
|
150
|
+
# Optional Discord role to assign within the guild.
|
|
151
|
+
role_id: nil
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
override.returns({ guild_id: String, role_id: T.nilable(String) })
|
|
157
|
+
end
|
|
158
|
+
def to_hash
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
class TelegramConfig < Dodopayments::Internal::Type::BaseModel
|
|
163
|
+
OrHash =
|
|
164
|
+
T.type_alias do
|
|
165
|
+
T.any(
|
|
166
|
+
Dodopayments::IntegrationConfigResponse::TelegramConfig,
|
|
167
|
+
Dodopayments::Internal::AnyHash
|
|
168
|
+
)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Telegram chat ID. For groups this is typically a negative integer.
|
|
172
|
+
sig { returns(String) }
|
|
173
|
+
attr_accessor :chat_id
|
|
174
|
+
|
|
175
|
+
sig { params(chat_id: String).returns(T.attached_class) }
|
|
176
|
+
def self.new(
|
|
177
|
+
# Telegram chat ID. For groups this is typically a negative integer.
|
|
178
|
+
chat_id:
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
sig { override.returns({ chat_id: String }) }
|
|
183
|
+
def to_hash
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
class FigmaConfig < Dodopayments::Internal::Type::BaseModel
|
|
188
|
+
OrHash =
|
|
189
|
+
T.type_alias do
|
|
190
|
+
T.any(
|
|
191
|
+
Dodopayments::IntegrationConfigResponse::FigmaConfig,
|
|
192
|
+
Dodopayments::Internal::AnyHash
|
|
193
|
+
)
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
# Figma file identifier to grant access to.
|
|
197
|
+
sig { returns(String) }
|
|
198
|
+
attr_accessor :figma_file_id
|
|
199
|
+
|
|
200
|
+
sig { params(figma_file_id: String).returns(T.attached_class) }
|
|
201
|
+
def self.new(
|
|
202
|
+
# Figma file identifier to grant access to.
|
|
203
|
+
figma_file_id:
|
|
204
|
+
)
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
sig { override.returns({ figma_file_id: String }) }
|
|
208
|
+
def to_hash
|
|
209
|
+
end
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
class FramerConfig < Dodopayments::Internal::Type::BaseModel
|
|
213
|
+
OrHash =
|
|
214
|
+
T.type_alias do
|
|
215
|
+
T.any(
|
|
216
|
+
Dodopayments::IntegrationConfigResponse::FramerConfig,
|
|
217
|
+
Dodopayments::Internal::AnyHash
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Framer template identifier to grant access to.
|
|
222
|
+
sig { returns(String) }
|
|
223
|
+
attr_accessor :framer_template_id
|
|
224
|
+
|
|
225
|
+
sig { params(framer_template_id: String).returns(T.attached_class) }
|
|
226
|
+
def self.new(
|
|
227
|
+
# Framer template identifier to grant access to.
|
|
228
|
+
framer_template_id:
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
sig { override.returns({ framer_template_id: String }) }
|
|
233
|
+
def to_hash
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
class NotionConfig < Dodopayments::Internal::Type::BaseModel
|
|
238
|
+
OrHash =
|
|
239
|
+
T.type_alias do
|
|
240
|
+
T.any(
|
|
241
|
+
Dodopayments::IntegrationConfigResponse::NotionConfig,
|
|
242
|
+
Dodopayments::Internal::AnyHash
|
|
243
|
+
)
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Notion template identifier to grant access to.
|
|
247
|
+
sig { returns(String) }
|
|
248
|
+
attr_accessor :notion_template_id
|
|
249
|
+
|
|
250
|
+
sig { params(notion_template_id: String).returns(T.attached_class) }
|
|
251
|
+
def self.new(
|
|
252
|
+
# Notion template identifier to grant access to.
|
|
253
|
+
notion_template_id:
|
|
254
|
+
)
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
sig { override.returns({ notion_template_id: String }) }
|
|
258
|
+
def to_hash
|
|
259
|
+
end
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
class DigitalFilesConfig < Dodopayments::Internal::Type::BaseModel
|
|
263
|
+
OrHash =
|
|
264
|
+
T.type_alias do
|
|
265
|
+
T.any(
|
|
266
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig,
|
|
267
|
+
Dodopayments::Internal::AnyHash
|
|
268
|
+
)
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
# Populated digital-files payload with each file's metadata and a short-lived
|
|
272
|
+
# presigned download URL.
|
|
273
|
+
sig do
|
|
274
|
+
returns(
|
|
275
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles
|
|
276
|
+
)
|
|
277
|
+
end
|
|
278
|
+
attr_reader :digital_files
|
|
279
|
+
|
|
280
|
+
sig do
|
|
281
|
+
params(
|
|
282
|
+
digital_files:
|
|
283
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::OrHash
|
|
284
|
+
).void
|
|
285
|
+
end
|
|
286
|
+
attr_writer :digital_files
|
|
287
|
+
|
|
288
|
+
sig do
|
|
289
|
+
params(
|
|
290
|
+
digital_files:
|
|
291
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::OrHash
|
|
292
|
+
).returns(T.attached_class)
|
|
293
|
+
end
|
|
294
|
+
def self.new(
|
|
295
|
+
# Populated digital-files payload with each file's metadata and a short-lived
|
|
296
|
+
# presigned download URL.
|
|
297
|
+
digital_files:
|
|
298
|
+
)
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
sig do
|
|
302
|
+
override.returns(
|
|
303
|
+
{
|
|
304
|
+
digital_files:
|
|
305
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles
|
|
306
|
+
}
|
|
307
|
+
)
|
|
308
|
+
end
|
|
309
|
+
def to_hash
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
class DigitalFiles < Dodopayments::Internal::Type::BaseModel
|
|
313
|
+
OrHash =
|
|
314
|
+
T.type_alias do
|
|
315
|
+
T.any(
|
|
316
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles,
|
|
317
|
+
Dodopayments::Internal::AnyHash
|
|
318
|
+
)
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
# One entry per attached file.
|
|
322
|
+
sig do
|
|
323
|
+
returns(
|
|
324
|
+
T::Array[
|
|
325
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File
|
|
326
|
+
]
|
|
327
|
+
)
|
|
328
|
+
end
|
|
329
|
+
attr_accessor :files
|
|
330
|
+
|
|
331
|
+
# Optional external URL, passed through from the entitlement configuration.
|
|
332
|
+
sig { returns(T.nilable(String)) }
|
|
333
|
+
attr_accessor :external_url
|
|
334
|
+
|
|
335
|
+
# Optional human-readable delivery instructions, passed through from the
|
|
336
|
+
# entitlement configuration.
|
|
337
|
+
sig { returns(T.nilable(String)) }
|
|
338
|
+
attr_accessor :instructions
|
|
339
|
+
|
|
340
|
+
# Populated digital-files payload with each file's metadata and a short-lived
|
|
341
|
+
# presigned download URL.
|
|
342
|
+
sig do
|
|
343
|
+
params(
|
|
344
|
+
files:
|
|
345
|
+
T::Array[
|
|
346
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File::OrHash
|
|
347
|
+
],
|
|
348
|
+
external_url: T.nilable(String),
|
|
349
|
+
instructions: T.nilable(String)
|
|
350
|
+
).returns(T.attached_class)
|
|
351
|
+
end
|
|
352
|
+
def self.new(
|
|
353
|
+
# One entry per attached file.
|
|
354
|
+
files:,
|
|
355
|
+
# Optional external URL, passed through from the entitlement configuration.
|
|
356
|
+
external_url: nil,
|
|
357
|
+
# Optional human-readable delivery instructions, passed through from the
|
|
358
|
+
# entitlement configuration.
|
|
359
|
+
instructions: nil
|
|
360
|
+
)
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
sig do
|
|
364
|
+
override.returns(
|
|
365
|
+
{
|
|
366
|
+
files:
|
|
367
|
+
T::Array[
|
|
368
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File
|
|
369
|
+
],
|
|
370
|
+
external_url: T.nilable(String),
|
|
371
|
+
instructions: T.nilable(String)
|
|
372
|
+
}
|
|
373
|
+
)
|
|
374
|
+
end
|
|
375
|
+
def to_hash
|
|
376
|
+
end
|
|
377
|
+
|
|
378
|
+
class File < Dodopayments::Internal::Type::BaseModel
|
|
379
|
+
OrHash =
|
|
380
|
+
T.type_alias do
|
|
381
|
+
T.any(
|
|
382
|
+
Dodopayments::IntegrationConfigResponse::DigitalFilesConfig::DigitalFiles::File,
|
|
383
|
+
Dodopayments::Internal::AnyHash
|
|
384
|
+
)
|
|
385
|
+
end
|
|
386
|
+
|
|
387
|
+
# Short-lived presigned URL for downloading the file.
|
|
388
|
+
sig { returns(String) }
|
|
389
|
+
attr_accessor :download_url
|
|
390
|
+
|
|
391
|
+
# Seconds until `download_url` expires.
|
|
392
|
+
sig { returns(Integer) }
|
|
393
|
+
attr_accessor :expires_in
|
|
394
|
+
|
|
395
|
+
# Identifier of the attached file.
|
|
396
|
+
sig { returns(String) }
|
|
397
|
+
attr_accessor :file_id
|
|
398
|
+
|
|
399
|
+
# Original filename of the attached file.
|
|
400
|
+
sig { returns(String) }
|
|
401
|
+
attr_accessor :filename
|
|
402
|
+
|
|
403
|
+
# Optional content-type declared at upload.
|
|
404
|
+
sig { returns(T.nilable(String)) }
|
|
405
|
+
attr_accessor :content_type
|
|
406
|
+
|
|
407
|
+
# Optional size of the file in bytes.
|
|
408
|
+
sig { returns(T.nilable(Integer)) }
|
|
409
|
+
attr_accessor :file_size
|
|
410
|
+
|
|
411
|
+
# One file in a resolved digital-files payload.
|
|
412
|
+
sig do
|
|
413
|
+
params(
|
|
414
|
+
download_url: String,
|
|
415
|
+
expires_in: Integer,
|
|
416
|
+
file_id: String,
|
|
417
|
+
filename: String,
|
|
418
|
+
content_type: T.nilable(String),
|
|
419
|
+
file_size: T.nilable(Integer)
|
|
420
|
+
).returns(T.attached_class)
|
|
421
|
+
end
|
|
422
|
+
def self.new(
|
|
423
|
+
# Short-lived presigned URL for downloading the file.
|
|
424
|
+
download_url:,
|
|
425
|
+
# Seconds until `download_url` expires.
|
|
426
|
+
expires_in:,
|
|
427
|
+
# Identifier of the attached file.
|
|
428
|
+
file_id:,
|
|
429
|
+
# Original filename of the attached file.
|
|
430
|
+
filename:,
|
|
431
|
+
# Optional content-type declared at upload.
|
|
432
|
+
content_type: nil,
|
|
433
|
+
# Optional size of the file in bytes.
|
|
434
|
+
file_size: nil
|
|
435
|
+
)
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
sig do
|
|
439
|
+
override.returns(
|
|
440
|
+
{
|
|
441
|
+
download_url: String,
|
|
442
|
+
expires_in: Integer,
|
|
443
|
+
file_id: String,
|
|
444
|
+
filename: String,
|
|
445
|
+
content_type: T.nilable(String),
|
|
446
|
+
file_size: T.nilable(Integer)
|
|
447
|
+
}
|
|
448
|
+
)
|
|
449
|
+
end
|
|
450
|
+
def to_hash
|
|
451
|
+
end
|
|
452
|
+
end
|
|
453
|
+
end
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
class LicenseKeyConfig < Dodopayments::Internal::Type::BaseModel
|
|
457
|
+
OrHash =
|
|
458
|
+
T.type_alias do
|
|
459
|
+
T.any(
|
|
460
|
+
Dodopayments::IntegrationConfigResponse::LicenseKeyConfig,
|
|
461
|
+
Dodopayments::Internal::AnyHash
|
|
462
|
+
)
|
|
463
|
+
end
|
|
464
|
+
|
|
465
|
+
# Optional message displayed when a customer activates the license key (≤ 2500
|
|
466
|
+
# characters).
|
|
467
|
+
sig { returns(T.nilable(String)) }
|
|
468
|
+
attr_accessor :activation_message
|
|
469
|
+
|
|
470
|
+
# Maximum activations allowed per issued license key. Omit for unlimited.
|
|
471
|
+
sig { returns(T.nilable(Integer)) }
|
|
472
|
+
attr_accessor :activations_limit
|
|
473
|
+
|
|
474
|
+
# Validity duration of issued license keys. Provide both `duration_count` and
|
|
475
|
+
# `duration_interval` together for a fixed duration; omit both for non-expiring
|
|
476
|
+
# keys.
|
|
477
|
+
sig { returns(T.nilable(Integer)) }
|
|
478
|
+
attr_accessor :duration_count
|
|
479
|
+
|
|
480
|
+
# Unit of `duration_count`.
|
|
481
|
+
sig { returns(T.nilable(Dodopayments::TimeInterval::TaggedSymbol)) }
|
|
482
|
+
attr_accessor :duration_interval
|
|
483
|
+
|
|
484
|
+
sig do
|
|
485
|
+
params(
|
|
486
|
+
activation_message: T.nilable(String),
|
|
487
|
+
activations_limit: T.nilable(Integer),
|
|
488
|
+
duration_count: T.nilable(Integer),
|
|
489
|
+
duration_interval: T.nilable(Dodopayments::TimeInterval::OrSymbol)
|
|
490
|
+
).returns(T.attached_class)
|
|
491
|
+
end
|
|
492
|
+
def self.new(
|
|
493
|
+
# Optional message displayed when a customer activates the license key (≤ 2500
|
|
494
|
+
# characters).
|
|
495
|
+
activation_message: nil,
|
|
496
|
+
# Maximum activations allowed per issued license key. Omit for unlimited.
|
|
497
|
+
activations_limit: nil,
|
|
498
|
+
# Validity duration of issued license keys. Provide both `duration_count` and
|
|
499
|
+
# `duration_interval` together for a fixed duration; omit both for non-expiring
|
|
500
|
+
# keys.
|
|
501
|
+
duration_count: nil,
|
|
502
|
+
# Unit of `duration_count`.
|
|
503
|
+
duration_interval: nil
|
|
504
|
+
)
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
sig do
|
|
508
|
+
override.returns(
|
|
509
|
+
{
|
|
510
|
+
activation_message: T.nilable(String),
|
|
511
|
+
activations_limit: T.nilable(Integer),
|
|
512
|
+
duration_count: T.nilable(Integer),
|
|
513
|
+
duration_interval:
|
|
514
|
+
T.nilable(Dodopayments::TimeInterval::TaggedSymbol)
|
|
515
|
+
}
|
|
516
|
+
)
|
|
517
|
+
end
|
|
518
|
+
def to_hash
|
|
519
|
+
end
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
sig do
|
|
523
|
+
override.returns(
|
|
524
|
+
T::Array[Dodopayments::IntegrationConfigResponse::Variants]
|
|
525
|
+
)
|
|
526
|
+
end
|
|
527
|
+
def self.variants
|
|
528
|
+
end
|
|
529
|
+
end
|
|
530
|
+
end
|
|
531
|
+
end
|
|
@@ -14,6 +14,10 @@ module Dodopayments
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
# Filter instances by entitlement grant ID
|
|
18
|
+
sig { returns(T.nilable(String)) }
|
|
19
|
+
attr_accessor :grant_id
|
|
20
|
+
|
|
17
21
|
# Filter by license key ID
|
|
18
22
|
sig { returns(T.nilable(String)) }
|
|
19
23
|
attr_accessor :license_key_id
|
|
@@ -28,6 +32,7 @@ module Dodopayments
|
|
|
28
32
|
|
|
29
33
|
sig do
|
|
30
34
|
params(
|
|
35
|
+
grant_id: T.nilable(String),
|
|
31
36
|
license_key_id: T.nilable(String),
|
|
32
37
|
page_number: T.nilable(Integer),
|
|
33
38
|
page_size: T.nilable(Integer),
|
|
@@ -35,6 +40,8 @@ module Dodopayments
|
|
|
35
40
|
).returns(T.attached_class)
|
|
36
41
|
end
|
|
37
42
|
def self.new(
|
|
43
|
+
# Filter instances by entitlement grant ID
|
|
44
|
+
grant_id: nil,
|
|
38
45
|
# Filter by license key ID
|
|
39
46
|
license_key_id: nil,
|
|
40
47
|
# Page number default is 0
|
|
@@ -48,6 +55,7 @@ module Dodopayments
|
|
|
48
55
|
sig do
|
|
49
56
|
override.returns(
|
|
50
57
|
{
|
|
58
|
+
grant_id: T.nilable(String),
|
|
51
59
|
license_key_id: T.nilable(String),
|
|
52
60
|
page_number: T.nilable(Integer),
|
|
53
61
|
page_size: T.nilable(Integer),
|
|
@@ -17,13 +17,34 @@ module Dodopayments
|
|
|
17
17
|
sig { returns(Integer) }
|
|
18
18
|
attr_accessor :quantity
|
|
19
19
|
|
|
20
|
+
# Amount the customer pays if pay_what_you_want is enabled. If disabled then
|
|
21
|
+
# amount will be ignored Represented in the lowest denomination of the currency
|
|
22
|
+
# (e.g., cents for USD). For example, to charge $1.00, pass `100`.
|
|
23
|
+
sig { returns(T.nilable(Integer)) }
|
|
24
|
+
attr_accessor :amount
|
|
25
|
+
|
|
20
26
|
sig do
|
|
21
|
-
params(
|
|
27
|
+
params(
|
|
28
|
+
product_id: String,
|
|
29
|
+
quantity: Integer,
|
|
30
|
+
amount: T.nilable(Integer)
|
|
31
|
+
).returns(T.attached_class)
|
|
22
32
|
end
|
|
23
|
-
def self.new(
|
|
33
|
+
def self.new(
|
|
34
|
+
product_id:,
|
|
35
|
+
quantity:,
|
|
36
|
+
# Amount the customer pays if pay_what_you_want is enabled. If disabled then
|
|
37
|
+
# amount will be ignored Represented in the lowest denomination of the currency
|
|
38
|
+
# (e.g., cents for USD). For example, to charge $1.00, pass `100`.
|
|
39
|
+
amount: nil
|
|
40
|
+
)
|
|
24
41
|
end
|
|
25
42
|
|
|
26
|
-
sig
|
|
43
|
+
sig do
|
|
44
|
+
override.returns(
|
|
45
|
+
{ product_id: String, quantity: Integer, amount: T.nilable(Integer) }
|
|
46
|
+
)
|
|
47
|
+
end
|
|
27
48
|
def to_hash
|
|
28
49
|
end
|
|
29
50
|
end
|
|
@@ -139,7 +139,7 @@ module Dodopayments
|
|
|
139
139
|
attr_accessor :payment_method_type
|
|
140
140
|
|
|
141
141
|
# List of products purchased in a one-time payment
|
|
142
|
-
sig { returns(T.nilable(T::Array[Dodopayments::
|
|
142
|
+
sig { returns(T.nilable(T::Array[Dodopayments::Payment::ProductCart])) }
|
|
143
143
|
attr_accessor :product_cart
|
|
144
144
|
|
|
145
145
|
# Summary of the refund status for this payment. None if no succeeded refunds
|
|
@@ -204,7 +204,7 @@ module Dodopayments
|
|
|
204
204
|
payment_method: T.nilable(String),
|
|
205
205
|
payment_method_type: T.nilable(String),
|
|
206
206
|
product_cart:
|
|
207
|
-
T.nilable(T::Array[Dodopayments::
|
|
207
|
+
T.nilable(T::Array[Dodopayments::Payment::ProductCart::OrHash]),
|
|
208
208
|
refund_status: T.nilable(Dodopayments::PaymentRefundStatus::OrSymbol),
|
|
209
209
|
settlement_tax: T.nilable(Integer),
|
|
210
210
|
status: T.nilable(Dodopayments::IntentStatus::OrSymbol),
|
|
@@ -333,7 +333,7 @@ module Dodopayments
|
|
|
333
333
|
payment_method: T.nilable(String),
|
|
334
334
|
payment_method_type: T.nilable(String),
|
|
335
335
|
product_cart:
|
|
336
|
-
T.nilable(T::Array[Dodopayments::
|
|
336
|
+
T.nilable(T::Array[Dodopayments::Payment::ProductCart]),
|
|
337
337
|
refund_status:
|
|
338
338
|
T.nilable(Dodopayments::PaymentRefundStatus::TaggedSymbol),
|
|
339
339
|
settlement_tax: T.nilable(Integer),
|
|
@@ -346,6 +346,34 @@ module Dodopayments
|
|
|
346
346
|
end
|
|
347
347
|
def to_hash
|
|
348
348
|
end
|
|
349
|
+
|
|
350
|
+
class ProductCart < Dodopayments::Internal::Type::BaseModel
|
|
351
|
+
OrHash =
|
|
352
|
+
T.type_alias do
|
|
353
|
+
T.any(
|
|
354
|
+
Dodopayments::Payment::ProductCart,
|
|
355
|
+
Dodopayments::Internal::AnyHash
|
|
356
|
+
)
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
sig { returns(String) }
|
|
360
|
+
attr_accessor :product_id
|
|
361
|
+
|
|
362
|
+
sig { returns(Integer) }
|
|
363
|
+
attr_accessor :quantity
|
|
364
|
+
|
|
365
|
+
sig do
|
|
366
|
+
params(product_id: String, quantity: Integer).returns(
|
|
367
|
+
T.attached_class
|
|
368
|
+
)
|
|
369
|
+
end
|
|
370
|
+
def self.new(product_id:, quantity:)
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
sig { override.returns({ product_id: String, quantity: Integer }) }
|
|
374
|
+
def to_hash
|
|
375
|
+
end
|
|
376
|
+
end
|
|
349
377
|
end
|
|
350
378
|
end
|
|
351
379
|
end
|