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.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -0
  3. data/README.md +17 -51
  4. data/lib/dodopayments/client.rb +4 -4
  5. data/lib/dodopayments/internal/transport/base_client.rb +1 -4
  6. data/lib/dodopayments/internal/transport/pooled_net_requester.rb +1 -9
  7. data/lib/dodopayments/internal/type/base_model.rb +6 -11
  8. data/lib/dodopayments/internal/util.rb +1 -1
  9. data/lib/dodopayments/models/checkout_session_create_params.rb +14 -0
  10. data/lib/dodopayments/models/checkout_session_request.rb +347 -0
  11. data/lib/dodopayments/models/checkout_session_response.rb +25 -0
  12. data/lib/dodopayments/models/on_demand_subscription.rb +58 -0
  13. data/lib/dodopayments/models/payment_create_params.rb +1 -4
  14. data/lib/dodopayments/models/subscription.rb +9 -1
  15. data/lib/dodopayments/models/subscription_create_params.rb +3 -56
  16. data/lib/dodopayments/models/subscription_update_params.rb +16 -2
  17. data/lib/dodopayments/models/webhook_create_params.rb +6 -9
  18. data/lib/dodopayments/models/{webhook_create_response.rb → webhook_details.rb} +2 -2
  19. data/lib/dodopayments/models/webhook_retrieve_secret_params.rb +14 -0
  20. data/lib/dodopayments/models/webhook_retrieve_secret_response.rb +16 -0
  21. data/lib/dodopayments/models.rb +12 -2
  22. data/lib/dodopayments/resources/checkout_sessions.rb +61 -0
  23. data/lib/dodopayments/resources/subscriptions.rb +5 -3
  24. data/lib/dodopayments/resources/webhooks.rb +29 -10
  25. data/lib/dodopayments/version.rb +1 -1
  26. data/lib/dodopayments.rb +9 -7
  27. data/rbi/dodopayments/client.rbi +3 -3
  28. data/rbi/dodopayments/errors.rbi +2 -2
  29. data/rbi/dodopayments/models/checkout_session_create_params.rbi +32 -0
  30. data/rbi/dodopayments/models/checkout_session_request.rbi +652 -0
  31. data/rbi/dodopayments/models/checkout_session_response.rbi +40 -0
  32. data/rbi/dodopayments/models/dispute.rbi +4 -4
  33. data/rbi/dodopayments/models/get_dispute.rbi +4 -4
  34. data/rbi/dodopayments/models/license_key.rbi +2 -2
  35. data/rbi/dodopayments/models/on_demand_subscription.rbi +86 -0
  36. data/rbi/dodopayments/models/payment.rbi +8 -8
  37. data/rbi/dodopayments/models/refund.rbi +4 -4
  38. data/rbi/dodopayments/models/subscription.rbi +21 -11
  39. data/rbi/dodopayments/models/subscription_create_params.rbi +4 -90
  40. data/rbi/dodopayments/models/subscription_update_params.rbi +8 -0
  41. data/rbi/dodopayments/models/webhook_create_params.rbi +6 -6
  42. data/rbi/dodopayments/models/{webhook_list_response.rbi → webhook_details.rbi} +2 -5
  43. data/rbi/dodopayments/models/webhook_retrieve_secret_params.rbi +32 -0
  44. data/rbi/dodopayments/models/webhook_retrieve_secret_response.rbi +26 -0
  45. data/rbi/dodopayments/models.rbi +14 -2
  46. data/rbi/dodopayments/resources/checkout_sessions.rbi +80 -0
  47. data/rbi/dodopayments/resources/subscriptions.rbi +4 -2
  48. data/rbi/dodopayments/resources/webhooks.rbi +17 -7
  49. data/sig/dodopayments/client.rbs +2 -2
  50. data/sig/dodopayments/models/checkout_session_create_params.rbs +15 -0
  51. data/sig/dodopayments/models/checkout_session_request.rbs +277 -0
  52. data/sig/dodopayments/models/checkout_session_response.rbs +16 -0
  53. data/sig/dodopayments/models/on_demand_subscription.rbs +40 -0
  54. data/sig/dodopayments/models/subscription.rbs +8 -3
  55. data/sig/dodopayments/models/subscription_create_params.rbs +4 -41
  56. data/sig/dodopayments/models/subscription_update_params.rbs +5 -0
  57. data/sig/dodopayments/models/{webhook_list_response.rbs → webhook_details.rbs} +2 -2
  58. data/sig/dodopayments/models/webhook_retrieve_secret_params.rbs +15 -0
  59. data/sig/dodopayments/models/webhook_retrieve_secret_response.rbs +13 -0
  60. data/sig/dodopayments/models.rbs +12 -2
  61. data/sig/dodopayments/resources/checkout_sessions.rbs +24 -0
  62. data/sig/dodopayments/resources/subscriptions.rbs +2 -1
  63. data/sig/dodopayments/resources/webhooks.rbs +9 -4
  64. metadata +26 -20
  65. data/lib/dodopayments/models/webhook_list_response.rb +0 -88
  66. data/lib/dodopayments/models/webhook_retrieve_response.rb +0 -88
  67. data/lib/dodopayments/models/webhook_update_response.rb +0 -88
  68. data/lib/dodopayments/models/your_webhook_url_create_params.rb +0 -32
  69. data/lib/dodopayments/resources/your_webhook_url.rb +0 -56
  70. data/rbi/dodopayments/models/webhook_create_response.rbi +0 -112
  71. data/rbi/dodopayments/models/webhook_retrieve_response.rbi +0 -112
  72. data/rbi/dodopayments/models/webhook_update_response.rbi +0 -112
  73. data/rbi/dodopayments/models/your_webhook_url_create_params.rbi +0 -56
  74. data/rbi/dodopayments/resources/your_webhook_url.rbi +0 -51
  75. data/sig/dodopayments/models/webhook_create_response.rbs +0 -60
  76. data/sig/dodopayments/models/webhook_retrieve_response.rbs +0 -60
  77. data/sig/dodopayments/models/webhook_update_response.rbs +0 -60
  78. data/sig/dodopayments/models/your_webhook_url_create_params.rbs +0 -42
  79. data/sig/dodopayments/resources/your_webhook_url.rbs +0 -18
@@ -1,88 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dodopayments
4
- module Models
5
- # @see Dodopayments::Resources::Webhooks#update
6
- class WebhookUpdateResponse < Dodopayments::Internal::Type::BaseModel
7
- # @!attribute id
8
- # The webhook's ID.
9
- #
10
- # @return [String]
11
- required :id, String
12
-
13
- # @!attribute created_at
14
- # Created at timestamp
15
- #
16
- # @return [String]
17
- required :created_at, String
18
-
19
- # @!attribute description
20
- # An example webhook name.
21
- #
22
- # @return [String]
23
- required :description, String
24
-
25
- # @!attribute metadata
26
- # Metadata of the webhook
27
- #
28
- # @return [Hash{Symbol=>String}]
29
- required :metadata, Dodopayments::Internal::Type::HashOf[String]
30
-
31
- # @!attribute updated_at
32
- # Updated at timestamp
33
- #
34
- # @return [String]
35
- required :updated_at, String
36
-
37
- # @!attribute url
38
- # Url endpoint of the webhook
39
- #
40
- # @return [String]
41
- required :url, String
42
-
43
- # @!attribute disabled
44
- # Status of the webhook.
45
- #
46
- # If true, events are not sent
47
- #
48
- # @return [Boolean, nil]
49
- optional :disabled, Dodopayments::Internal::Type::Boolean, nil?: true
50
-
51
- # @!attribute filter_types
52
- # Filter events to the webhook.
53
- #
54
- # Webhook event will only be sent for events in the list.
55
- #
56
- # @return [Array<String>, nil]
57
- optional :filter_types, Dodopayments::Internal::Type::ArrayOf[String], nil?: true
58
-
59
- # @!attribute rate_limit
60
- # Configured rate limit
61
- #
62
- # @return [Integer, nil]
63
- optional :rate_limit, Integer, nil?: true
64
-
65
- # @!method initialize(id:, created_at:, description:, metadata:, updated_at:, url:, disabled: nil, filter_types: nil, rate_limit: nil)
66
- # Some parameter documentations has been truncated, see
67
- # {Dodopayments::Models::WebhookUpdateResponse} for more details.
68
- #
69
- # @param id [String] The webhook's ID.
70
- #
71
- # @param created_at [String] Created at timestamp
72
- #
73
- # @param description [String] An example webhook name.
74
- #
75
- # @param metadata [Hash{Symbol=>String}] Metadata of the webhook
76
- #
77
- # @param updated_at [String] Updated at timestamp
78
- #
79
- # @param url [String] Url endpoint of the webhook
80
- #
81
- # @param disabled [Boolean, nil] Status of the webhook.
82
- #
83
- # @param filter_types [Array<String>, nil] Filter events to the webhook.
84
- #
85
- # @param rate_limit [Integer, nil] Configured rate limit
86
- end
87
- end
88
- end
@@ -1,32 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dodopayments
4
- module Models
5
- # @see Dodopayments::Resources::YourWebhookURL#create
6
- class YourWebhookURLCreateParams < Dodopayments::Models::WebhookPayload
7
- extend Dodopayments::Internal::Type::RequestParameters::Converter
8
- include Dodopayments::Internal::Type::RequestParameters
9
-
10
- # @!attribute webhook_id
11
- #
12
- # @return [String]
13
- required :webhook_id, String
14
-
15
- # @!attribute webhook_signature
16
- #
17
- # @return [String]
18
- required :webhook_signature, String
19
-
20
- # @!attribute webhook_timestamp
21
- #
22
- # @return [String]
23
- required :webhook_timestamp, String
24
-
25
- # @!method initialize(webhook_id:, webhook_signature:, webhook_timestamp:, request_options: {})
26
- # @param webhook_id [String]
27
- # @param webhook_signature [String]
28
- # @param webhook_timestamp [String]
29
- # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}]
30
- end
31
- end
32
- end
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Dodopayments
4
- module Resources
5
- class YourWebhookURL
6
- # Some parameter documentations has been truncated, see
7
- # {Dodopayments::Models::YourWebhookURLCreateParams} for more details.
8
- #
9
- # @overload create(business_id:, data:, timestamp:, type:, webhook_id:, webhook_signature:, webhook_timestamp:, request_options: {})
10
- #
11
- # @param business_id [String] Body param:
12
- #
13
- # @param data [Dodopayments::Models::WebhookPayload::Data::Payment, Dodopayments::Models::WebhookPayload::Data::Subscription, Dodopayments::Models::WebhookPayload::Data::Refund, Dodopayments::Models::WebhookPayload::Data::Dispute, Dodopayments::Models::WebhookPayload::Data::LicenseKey] Body param: The latest data at the time of delivery attempt
14
- #
15
- # @param timestamp [Time] Body param: The timestamp of when the event occurred (not necessarily the same o
16
- #
17
- # @param type [Symbol, Dodopayments::Models::WebhookEventType] Body param: Event types for Dodo events
18
- #
19
- # @param webhook_id [String] Header param: Unique identifier for the webhook
20
- #
21
- # @param webhook_signature [String] Header param: Signature of the Webhook
22
- #
23
- # @param webhook_timestamp [String] Header param: Unix timestamp when the webhook was sent
24
- #
25
- # @param request_options [Dodopayments::RequestOptions, Hash{Symbol=>Object}, nil]
26
- #
27
- # @return [nil]
28
- #
29
- # @see Dodopayments::Models::YourWebhookURLCreateParams
30
- def create(params)
31
- parsed, options = Dodopayments::YourWebhookURLCreateParams.dump_request(params)
32
- header_params =
33
- {
34
- webhook_id: "webhook-id",
35
- webhook_signature: "webhook-signature",
36
- webhook_timestamp: "webhook-timestamp"
37
- }
38
- @client.request(
39
- method: :post,
40
- path: "your-webhook-url",
41
- headers: parsed.slice(*header_params.keys).transform_keys(header_params),
42
- body: parsed.except(*header_params.keys),
43
- model: NilClass,
44
- options: options
45
- )
46
- end
47
-
48
- # @api private
49
- #
50
- # @param client [Dodopayments::Client]
51
- def initialize(client:)
52
- @client = client
53
- end
54
- end
55
- end
56
- end
@@ -1,112 +0,0 @@
1
- # typed: strong
2
-
3
- module Dodopayments
4
- module Models
5
- class WebhookCreateResponse < Dodopayments::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(
9
- Dodopayments::Models::WebhookCreateResponse,
10
- Dodopayments::Internal::AnyHash
11
- )
12
- end
13
-
14
- # The webhook's ID.
15
- sig { returns(String) }
16
- attr_accessor :id
17
-
18
- # Created at timestamp
19
- sig { returns(String) }
20
- attr_accessor :created_at
21
-
22
- # An example webhook name.
23
- sig { returns(String) }
24
- attr_accessor :description
25
-
26
- # Metadata of the webhook
27
- sig { returns(T::Hash[Symbol, String]) }
28
- attr_accessor :metadata
29
-
30
- # Updated at timestamp
31
- sig { returns(String) }
32
- attr_accessor :updated_at
33
-
34
- # Url endpoint of the webhook
35
- sig { returns(String) }
36
- attr_accessor :url
37
-
38
- # Status of the webhook.
39
- #
40
- # If true, events are not sent
41
- sig { returns(T.nilable(T::Boolean)) }
42
- attr_accessor :disabled
43
-
44
- # Filter events to the webhook.
45
- #
46
- # Webhook event will only be sent for events in the list.
47
- sig { returns(T.nilable(T::Array[String])) }
48
- attr_accessor :filter_types
49
-
50
- # Configured rate limit
51
- sig { returns(T.nilable(Integer)) }
52
- attr_accessor :rate_limit
53
-
54
- sig do
55
- params(
56
- id: String,
57
- created_at: String,
58
- description: String,
59
- metadata: T::Hash[Symbol, String],
60
- updated_at: String,
61
- url: String,
62
- disabled: T.nilable(T::Boolean),
63
- filter_types: T.nilable(T::Array[String]),
64
- rate_limit: T.nilable(Integer)
65
- ).returns(T.attached_class)
66
- end
67
- def self.new(
68
- # The webhook's ID.
69
- id:,
70
- # Created at timestamp
71
- created_at:,
72
- # An example webhook name.
73
- description:,
74
- # Metadata of the webhook
75
- metadata:,
76
- # Updated at timestamp
77
- updated_at:,
78
- # Url endpoint of the webhook
79
- url:,
80
- # Status of the webhook.
81
- #
82
- # If true, events are not sent
83
- disabled: nil,
84
- # Filter events to the webhook.
85
- #
86
- # Webhook event will only be sent for events in the list.
87
- filter_types: nil,
88
- # Configured rate limit
89
- rate_limit: nil
90
- )
91
- end
92
-
93
- sig do
94
- override.returns(
95
- {
96
- id: String,
97
- created_at: String,
98
- description: String,
99
- metadata: T::Hash[Symbol, String],
100
- updated_at: String,
101
- url: String,
102
- disabled: T.nilable(T::Boolean),
103
- filter_types: T.nilable(T::Array[String]),
104
- rate_limit: T.nilable(Integer)
105
- }
106
- )
107
- end
108
- def to_hash
109
- end
110
- end
111
- end
112
- end
@@ -1,112 +0,0 @@
1
- # typed: strong
2
-
3
- module Dodopayments
4
- module Models
5
- class WebhookRetrieveResponse < Dodopayments::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(
9
- Dodopayments::Models::WebhookRetrieveResponse,
10
- Dodopayments::Internal::AnyHash
11
- )
12
- end
13
-
14
- # The webhook's ID.
15
- sig { returns(String) }
16
- attr_accessor :id
17
-
18
- # Created at timestamp
19
- sig { returns(String) }
20
- attr_accessor :created_at
21
-
22
- # An example webhook name.
23
- sig { returns(String) }
24
- attr_accessor :description
25
-
26
- # Metadata of the webhook
27
- sig { returns(T::Hash[Symbol, String]) }
28
- attr_accessor :metadata
29
-
30
- # Updated at timestamp
31
- sig { returns(String) }
32
- attr_accessor :updated_at
33
-
34
- # Url endpoint of the webhook
35
- sig { returns(String) }
36
- attr_accessor :url
37
-
38
- # Status of the webhook.
39
- #
40
- # If true, events are not sent
41
- sig { returns(T.nilable(T::Boolean)) }
42
- attr_accessor :disabled
43
-
44
- # Filter events to the webhook.
45
- #
46
- # Webhook event will only be sent for events in the list.
47
- sig { returns(T.nilable(T::Array[String])) }
48
- attr_accessor :filter_types
49
-
50
- # Configured rate limit
51
- sig { returns(T.nilable(Integer)) }
52
- attr_accessor :rate_limit
53
-
54
- sig do
55
- params(
56
- id: String,
57
- created_at: String,
58
- description: String,
59
- metadata: T::Hash[Symbol, String],
60
- updated_at: String,
61
- url: String,
62
- disabled: T.nilable(T::Boolean),
63
- filter_types: T.nilable(T::Array[String]),
64
- rate_limit: T.nilable(Integer)
65
- ).returns(T.attached_class)
66
- end
67
- def self.new(
68
- # The webhook's ID.
69
- id:,
70
- # Created at timestamp
71
- created_at:,
72
- # An example webhook name.
73
- description:,
74
- # Metadata of the webhook
75
- metadata:,
76
- # Updated at timestamp
77
- updated_at:,
78
- # Url endpoint of the webhook
79
- url:,
80
- # Status of the webhook.
81
- #
82
- # If true, events are not sent
83
- disabled: nil,
84
- # Filter events to the webhook.
85
- #
86
- # Webhook event will only be sent for events in the list.
87
- filter_types: nil,
88
- # Configured rate limit
89
- rate_limit: nil
90
- )
91
- end
92
-
93
- sig do
94
- override.returns(
95
- {
96
- id: String,
97
- created_at: String,
98
- description: String,
99
- metadata: T::Hash[Symbol, String],
100
- updated_at: String,
101
- url: String,
102
- disabled: T.nilable(T::Boolean),
103
- filter_types: T.nilable(T::Array[String]),
104
- rate_limit: T.nilable(Integer)
105
- }
106
- )
107
- end
108
- def to_hash
109
- end
110
- end
111
- end
112
- end
@@ -1,112 +0,0 @@
1
- # typed: strong
2
-
3
- module Dodopayments
4
- module Models
5
- class WebhookUpdateResponse < Dodopayments::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(
9
- Dodopayments::Models::WebhookUpdateResponse,
10
- Dodopayments::Internal::AnyHash
11
- )
12
- end
13
-
14
- # The webhook's ID.
15
- sig { returns(String) }
16
- attr_accessor :id
17
-
18
- # Created at timestamp
19
- sig { returns(String) }
20
- attr_accessor :created_at
21
-
22
- # An example webhook name.
23
- sig { returns(String) }
24
- attr_accessor :description
25
-
26
- # Metadata of the webhook
27
- sig { returns(T::Hash[Symbol, String]) }
28
- attr_accessor :metadata
29
-
30
- # Updated at timestamp
31
- sig { returns(String) }
32
- attr_accessor :updated_at
33
-
34
- # Url endpoint of the webhook
35
- sig { returns(String) }
36
- attr_accessor :url
37
-
38
- # Status of the webhook.
39
- #
40
- # If true, events are not sent
41
- sig { returns(T.nilable(T::Boolean)) }
42
- attr_accessor :disabled
43
-
44
- # Filter events to the webhook.
45
- #
46
- # Webhook event will only be sent for events in the list.
47
- sig { returns(T.nilable(T::Array[String])) }
48
- attr_accessor :filter_types
49
-
50
- # Configured rate limit
51
- sig { returns(T.nilable(Integer)) }
52
- attr_accessor :rate_limit
53
-
54
- sig do
55
- params(
56
- id: String,
57
- created_at: String,
58
- description: String,
59
- metadata: T::Hash[Symbol, String],
60
- updated_at: String,
61
- url: String,
62
- disabled: T.nilable(T::Boolean),
63
- filter_types: T.nilable(T::Array[String]),
64
- rate_limit: T.nilable(Integer)
65
- ).returns(T.attached_class)
66
- end
67
- def self.new(
68
- # The webhook's ID.
69
- id:,
70
- # Created at timestamp
71
- created_at:,
72
- # An example webhook name.
73
- description:,
74
- # Metadata of the webhook
75
- metadata:,
76
- # Updated at timestamp
77
- updated_at:,
78
- # Url endpoint of the webhook
79
- url:,
80
- # Status of the webhook.
81
- #
82
- # If true, events are not sent
83
- disabled: nil,
84
- # Filter events to the webhook.
85
- #
86
- # Webhook event will only be sent for events in the list.
87
- filter_types: nil,
88
- # Configured rate limit
89
- rate_limit: nil
90
- )
91
- end
92
-
93
- sig do
94
- override.returns(
95
- {
96
- id: String,
97
- created_at: String,
98
- description: String,
99
- metadata: T::Hash[Symbol, String],
100
- updated_at: String,
101
- url: String,
102
- disabled: T.nilable(T::Boolean),
103
- filter_types: T.nilable(T::Array[String]),
104
- rate_limit: T.nilable(Integer)
105
- }
106
- )
107
- end
108
- def to_hash
109
- end
110
- end
111
- end
112
- end
@@ -1,56 +0,0 @@
1
- # typed: strong
2
-
3
- module Dodopayments
4
- module Models
5
- class YourWebhookURLCreateParams < Dodopayments::Models::WebhookPayload
6
- extend Dodopayments::Internal::Type::RequestParameters::Converter
7
- include Dodopayments::Internal::Type::RequestParameters
8
-
9
- OrHash =
10
- T.type_alias do
11
- T.any(
12
- Dodopayments::YourWebhookURLCreateParams,
13
- Dodopayments::Internal::AnyHash
14
- )
15
- end
16
-
17
- sig { returns(String) }
18
- attr_accessor :webhook_id
19
-
20
- sig { returns(String) }
21
- attr_accessor :webhook_signature
22
-
23
- sig { returns(String) }
24
- attr_accessor :webhook_timestamp
25
-
26
- sig do
27
- params(
28
- webhook_id: String,
29
- webhook_signature: String,
30
- webhook_timestamp: String,
31
- request_options: Dodopayments::RequestOptions::OrHash
32
- ).returns(T.attached_class)
33
- end
34
- def self.new(
35
- webhook_id:,
36
- webhook_signature:,
37
- webhook_timestamp:,
38
- request_options: {}
39
- )
40
- end
41
-
42
- sig do
43
- override.returns(
44
- {
45
- webhook_id: String,
46
- webhook_signature: String,
47
- webhook_timestamp: String,
48
- request_options: Dodopayments::RequestOptions
49
- }
50
- )
51
- end
52
- def to_hash
53
- end
54
- end
55
- end
56
- end
@@ -1,51 +0,0 @@
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
- ),
17
- timestamp: Time,
18
- type: Dodopayments::WebhookEventType::OrSymbol,
19
- webhook_id: String,
20
- webhook_signature: String,
21
- webhook_timestamp: String,
22
- request_options: Dodopayments::RequestOptions::OrHash
23
- ).void
24
- end
25
- def create(
26
- # Body param:
27
- business_id:,
28
- # Body param: The latest data at the time of delivery attempt
29
- data:,
30
- # Body param: The timestamp of when the event occurred (not necessarily the same
31
- # of when it was delivered)
32
- timestamp:,
33
- # Body param: Event types for Dodo events
34
- type:,
35
- # Header param: Unique identifier for the webhook
36
- webhook_id:,
37
- # Header param: Signature of the Webhook
38
- webhook_signature:,
39
- # Header param: Unix timestamp when the webhook was sent
40
- webhook_timestamp:,
41
- request_options: {}
42
- )
43
- end
44
-
45
- # @api private
46
- sig { params(client: Dodopayments::Client).returns(T.attached_class) }
47
- def self.new(client:)
48
- end
49
- end
50
- end
51
- end
@@ -1,60 +0,0 @@
1
- module Dodopayments
2
- module Models
3
- type webhook_create_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 WebhookCreateResponse < 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