dodopayments 1.47.0 → 1.51.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 +24 -0
- data/README.md +17 -51
- data/lib/dodopayments/client.rb +4 -4
- data/lib/dodopayments/internal/transport/base_client.rb +1 -4
- data/lib/dodopayments/internal/transport/pooled_net_requester.rb +1 -9
- data/lib/dodopayments/internal/type/base_model.rb +6 -11
- data/lib/dodopayments/internal/util.rb +1 -1
- data/lib/dodopayments/models/checkout_session_create_params.rb +14 -0
- data/lib/dodopayments/models/checkout_session_request.rb +347 -0
- data/lib/dodopayments/models/checkout_session_response.rb +25 -0
- data/lib/dodopayments/models/on_demand_subscription.rb +58 -0
- data/lib/dodopayments/models/payment_create_params.rb +1 -4
- data/lib/dodopayments/models/subscription.rb +9 -1
- data/lib/dodopayments/models/subscription_create_params.rb +3 -56
- data/lib/dodopayments/models/subscription_update_params.rb +16 -2
- data/lib/dodopayments/models/webhook_create_params.rb +6 -9
- data/lib/dodopayments/models/{webhook_create_response.rb → webhook_details.rb} +2 -2
- data/lib/dodopayments/models/webhook_retrieve_secret_params.rb +14 -0
- data/lib/dodopayments/models/webhook_retrieve_secret_response.rb +16 -0
- data/lib/dodopayments/models.rb +12 -2
- data/lib/dodopayments/resources/checkout_sessions.rb +61 -0
- data/lib/dodopayments/resources/subscriptions.rb +5 -3
- data/lib/dodopayments/resources/webhooks.rb +29 -10
- data/lib/dodopayments/version.rb +1 -1
- data/lib/dodopayments.rb +9 -7
- data/rbi/dodopayments/client.rbi +3 -3
- data/rbi/dodopayments/errors.rbi +2 -2
- data/rbi/dodopayments/models/checkout_session_create_params.rbi +32 -0
- data/rbi/dodopayments/models/checkout_session_request.rbi +652 -0
- data/rbi/dodopayments/models/checkout_session_response.rbi +40 -0
- data/rbi/dodopayments/models/dispute.rbi +4 -4
- data/rbi/dodopayments/models/get_dispute.rbi +4 -4
- data/rbi/dodopayments/models/license_key.rbi +2 -2
- data/rbi/dodopayments/models/on_demand_subscription.rbi +86 -0
- data/rbi/dodopayments/models/payment.rbi +8 -8
- data/rbi/dodopayments/models/refund.rbi +4 -4
- data/rbi/dodopayments/models/subscription.rbi +21 -11
- data/rbi/dodopayments/models/subscription_create_params.rbi +4 -90
- data/rbi/dodopayments/models/subscription_update_params.rbi +8 -0
- data/rbi/dodopayments/models/webhook_create_params.rbi +6 -6
- data/rbi/dodopayments/models/{webhook_list_response.rbi → webhook_details.rbi} +2 -5
- data/rbi/dodopayments/models/webhook_retrieve_secret_params.rbi +32 -0
- data/rbi/dodopayments/models/webhook_retrieve_secret_response.rbi +26 -0
- data/rbi/dodopayments/models.rbi +14 -2
- data/rbi/dodopayments/resources/checkout_sessions.rbi +80 -0
- data/rbi/dodopayments/resources/subscriptions.rbi +4 -2
- data/rbi/dodopayments/resources/webhooks.rbi +17 -7
- data/sig/dodopayments/client.rbs +2 -2
- data/sig/dodopayments/models/checkout_session_create_params.rbs +15 -0
- data/sig/dodopayments/models/checkout_session_request.rbs +277 -0
- data/sig/dodopayments/models/checkout_session_response.rbs +16 -0
- data/sig/dodopayments/models/on_demand_subscription.rbs +40 -0
- data/sig/dodopayments/models/subscription.rbs +8 -3
- data/sig/dodopayments/models/subscription_create_params.rbs +4 -41
- data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
- data/sig/dodopayments/models/{webhook_list_response.rbs → webhook_details.rbs} +2 -2
- data/sig/dodopayments/models/webhook_retrieve_secret_params.rbs +15 -0
- data/sig/dodopayments/models/webhook_retrieve_secret_response.rbs +13 -0
- data/sig/dodopayments/models.rbs +12 -2
- data/sig/dodopayments/resources/checkout_sessions.rbs +24 -0
- data/sig/dodopayments/resources/subscriptions.rbs +2 -1
- data/sig/dodopayments/resources/webhooks.rbs +9 -4
- metadata +26 -20
- data/lib/dodopayments/models/webhook_list_response.rb +0 -88
- data/lib/dodopayments/models/webhook_retrieve_response.rb +0 -88
- data/lib/dodopayments/models/webhook_update_response.rb +0 -88
- data/lib/dodopayments/models/your_webhook_url_create_params.rb +0 -32
- data/lib/dodopayments/resources/your_webhook_url.rb +0 -56
- data/rbi/dodopayments/models/webhook_create_response.rbi +0 -112
- data/rbi/dodopayments/models/webhook_retrieve_response.rbi +0 -112
- data/rbi/dodopayments/models/webhook_update_response.rbi +0 -112
- data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +0 -56
- data/rbi/dodopayments/resources/your_webhook_url.rbi +0 -51
- data/sig/dodopayments/models/webhook_create_response.rbs +0 -60
- data/sig/dodopayments/models/webhook_retrieve_response.rbs +0 -60
- data/sig/dodopayments/models/webhook_update_response.rbs +0 -60
- data/sig/dodopayments/models/your_webhook_url_create_params.rbs +0 -42
- data/sig/dodopayments/resources/your_webhook_url.rbs +0 -18
@@ -1,60 +0,0 @@
|
|
1
|
-
module Dodopayments
|
2
|
-
module Models
|
3
|
-
type webhook_retrieve_response =
|
4
|
-
{
|
5
|
-
id: String,
|
6
|
-
created_at: String,
|
7
|
-
description: String,
|
8
|
-
metadata: ::Hash[Symbol, String],
|
9
|
-
updated_at: String,
|
10
|
-
url: String,
|
11
|
-
disabled: bool?,
|
12
|
-
filter_types: ::Array[String]?,
|
13
|
-
rate_limit: Integer?
|
14
|
-
}
|
15
|
-
|
16
|
-
class WebhookRetrieveResponse < Dodopayments::Internal::Type::BaseModel
|
17
|
-
attr_accessor id: String
|
18
|
-
|
19
|
-
attr_accessor created_at: String
|
20
|
-
|
21
|
-
attr_accessor description: String
|
22
|
-
|
23
|
-
attr_accessor metadata: ::Hash[Symbol, String]
|
24
|
-
|
25
|
-
attr_accessor updated_at: String
|
26
|
-
|
27
|
-
attr_accessor url: String
|
28
|
-
|
29
|
-
attr_accessor disabled: bool?
|
30
|
-
|
31
|
-
attr_accessor filter_types: ::Array[String]?
|
32
|
-
|
33
|
-
attr_accessor rate_limit: Integer?
|
34
|
-
|
35
|
-
def initialize: (
|
36
|
-
id: String,
|
37
|
-
created_at: String,
|
38
|
-
description: String,
|
39
|
-
metadata: ::Hash[Symbol, String],
|
40
|
-
updated_at: String,
|
41
|
-
url: String,
|
42
|
-
?disabled: bool?,
|
43
|
-
?filter_types: ::Array[String]?,
|
44
|
-
?rate_limit: Integer?
|
45
|
-
) -> void
|
46
|
-
|
47
|
-
def to_hash: -> {
|
48
|
-
id: String,
|
49
|
-
created_at: String,
|
50
|
-
description: String,
|
51
|
-
metadata: ::Hash[Symbol, String],
|
52
|
-
updated_at: String,
|
53
|
-
url: String,
|
54
|
-
disabled: bool?,
|
55
|
-
filter_types: ::Array[String]?,
|
56
|
-
rate_limit: Integer?
|
57
|
-
}
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,60 +0,0 @@
|
|
1
|
-
module Dodopayments
|
2
|
-
module Models
|
3
|
-
type webhook_update_response =
|
4
|
-
{
|
5
|
-
id: String,
|
6
|
-
created_at: String,
|
7
|
-
description: String,
|
8
|
-
metadata: ::Hash[Symbol, String],
|
9
|
-
updated_at: String,
|
10
|
-
url: String,
|
11
|
-
disabled: bool?,
|
12
|
-
filter_types: ::Array[String]?,
|
13
|
-
rate_limit: Integer?
|
14
|
-
}
|
15
|
-
|
16
|
-
class WebhookUpdateResponse < Dodopayments::Internal::Type::BaseModel
|
17
|
-
attr_accessor id: String
|
18
|
-
|
19
|
-
attr_accessor created_at: String
|
20
|
-
|
21
|
-
attr_accessor description: String
|
22
|
-
|
23
|
-
attr_accessor metadata: ::Hash[Symbol, String]
|
24
|
-
|
25
|
-
attr_accessor updated_at: String
|
26
|
-
|
27
|
-
attr_accessor url: String
|
28
|
-
|
29
|
-
attr_accessor disabled: bool?
|
30
|
-
|
31
|
-
attr_accessor filter_types: ::Array[String]?
|
32
|
-
|
33
|
-
attr_accessor rate_limit: Integer?
|
34
|
-
|
35
|
-
def initialize: (
|
36
|
-
id: String,
|
37
|
-
created_at: String,
|
38
|
-
description: String,
|
39
|
-
metadata: ::Hash[Symbol, String],
|
40
|
-
updated_at: String,
|
41
|
-
url: String,
|
42
|
-
?disabled: bool?,
|
43
|
-
?filter_types: ::Array[String]?,
|
44
|
-
?rate_limit: Integer?
|
45
|
-
) -> void
|
46
|
-
|
47
|
-
def to_hash: -> {
|
48
|
-
id: String,
|
49
|
-
created_at: String,
|
50
|
-
description: String,
|
51
|
-
metadata: ::Hash[Symbol, String],
|
52
|
-
updated_at: String,
|
53
|
-
url: String,
|
54
|
-
disabled: bool?,
|
55
|
-
filter_types: ::Array[String]?,
|
56
|
-
rate_limit: Integer?
|
57
|
-
}
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Dodopayments
|
2
|
-
module Models
|
3
|
-
type your_webhook_url_create_params =
|
4
|
-
{
|
5
|
-
webhook_id: String,
|
6
|
-
webhook_signature: String,
|
7
|
-
webhook_timestamp: String
|
8
|
-
}
|
9
|
-
& Dodopayments::Internal::Type::request_parameters
|
10
|
-
|
11
|
-
class YourWebhookURLCreateParams < Dodopayments::Models::WebhookPayload
|
12
|
-
extend Dodopayments::Internal::Type::RequestParameters::Converter
|
13
|
-
include Dodopayments::Internal::Type::RequestParameters
|
14
|
-
|
15
|
-
def webhook_id: -> String
|
16
|
-
|
17
|
-
def webhook_id=: (String _) -> String
|
18
|
-
|
19
|
-
def webhook_signature: -> String
|
20
|
-
|
21
|
-
def webhook_signature=: (String _) -> String
|
22
|
-
|
23
|
-
def webhook_timestamp: -> String
|
24
|
-
|
25
|
-
def webhook_timestamp=: (String _) -> String
|
26
|
-
|
27
|
-
def initialize: (
|
28
|
-
webhook_id: String,
|
29
|
-
webhook_signature: String,
|
30
|
-
webhook_timestamp: String,
|
31
|
-
?request_options: Dodopayments::request_opts
|
32
|
-
) -> void
|
33
|
-
|
34
|
-
def to_hash: -> {
|
35
|
-
webhook_id: String,
|
36
|
-
webhook_signature: String,
|
37
|
-
webhook_timestamp: String,
|
38
|
-
request_options: Dodopayments::RequestOptions
|
39
|
-
}
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Dodopayments
|
2
|
-
module Resources
|
3
|
-
class YourWebhookURL
|
4
|
-
def create: (
|
5
|
-
business_id: String,
|
6
|
-
data: Dodopayments::Models::WebhookPayload::data,
|
7
|
-
timestamp: Time,
|
8
|
-
type: Dodopayments::Models::webhook_event_type,
|
9
|
-
webhook_id: String,
|
10
|
-
webhook_signature: String,
|
11
|
-
webhook_timestamp: String,
|
12
|
-
?request_options: Dodopayments::request_opts
|
13
|
-
) -> nil
|
14
|
-
|
15
|
-
def initialize: (client: Dodopayments::Client) -> void
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|