svix 1.61.3 → 1.61.4
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/Gemfile.lock +1 -1
- data/lib/svix/api/ingest.rb +26 -0
- data/lib/svix/api/ingest_source.rb +76 -0
- data/lib/svix/models/adobe_sign_config.rb +46 -0
- data/lib/svix/models/adobe_sign_config_out.rb +43 -0
- data/lib/svix/models/aggregate_event_types_out.rb +2 -2
- data/lib/svix/models/app_portal_access_in.rb +1 -1
- data/lib/svix/models/app_usage_stats_out.rb +2 -2
- data/lib/svix/models/background_task_finished_event.rb +53 -0
- data/lib/svix/models/background_task_finished_event2.rb +58 -0
- data/lib/svix/models/background_task_out.rb +2 -2
- data/lib/svix/models/connector_in.rb +1 -1
- data/lib/svix/models/connector_out.rb +96 -0
- data/lib/svix/models/cron_config.rb +52 -0
- data/lib/svix/models/docusign_config.rb +46 -0
- data/lib/svix/models/docusign_config_out.rb +43 -0
- data/lib/svix/models/endpoint_created_event.rb +50 -0
- data/lib/svix/models/endpoint_created_event_data.rb +59 -0
- data/lib/svix/models/endpoint_deleted_event.rb +50 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +59 -0
- data/lib/svix/models/endpoint_disabled_event.rb +53 -0
- data/lib/svix/models/endpoint_disabled_event_data.rb +65 -0
- data/lib/svix/models/endpoint_disabled_trigger.rb +29 -0
- data/lib/svix/models/endpoint_enabled_event.rb +50 -0
- data/lib/svix/models/endpoint_enabled_event_data.rb +59 -0
- data/lib/svix/models/endpoint_message_out.rb +1 -1
- data/lib/svix/models/endpoint_updated_event.rb +50 -0
- data/lib/svix/models/endpoint_updated_event_data.rb +59 -0
- data/lib/svix/models/environment_out.rb +1 -1
- data/lib/svix/models/event_type_import_open_api_out.rb +1 -1
- data/lib/svix/models/expunge_all_contents_out.rb +2 -2
- data/lib/svix/models/github_config.rb +46 -0
- data/lib/svix/models/github_config_out.rb +43 -0
- data/lib/svix/models/hubspot_config.rb +46 -0
- data/lib/svix/models/hubspot_config_out.rb +43 -0
- data/lib/svix/models/ingest_source_consumer_portal_access_in.rb +52 -0
- data/lib/svix/models/ingest_source_in.rb +209 -0
- data/lib/svix/models/ingest_source_out.rb +221 -0
- data/lib/svix/models/list_response_ingest_source_out.rb +58 -0
- data/lib/svix/models/message_attempt_exhausted_event.rb +53 -0
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +65 -0
- data/lib/svix/models/message_attempt_failed_data.rb +55 -0
- data/lib/svix/models/message_attempt_failing_event.rb +54 -0
- data/lib/svix/models/message_attempt_failing_event_data.rb +65 -0
- data/lib/svix/models/message_attempt_out.rb +3 -3
- data/lib/svix/models/message_attempt_recovered_event.rb +53 -0
- data/lib/svix/models/message_attempt_recovered_event_data.rb +65 -0
- data/lib/svix/models/message_endpoint_out.rb +1 -1
- data/lib/svix/models/message_in.rb +1 -1
- data/lib/svix/models/recover_out.rb +2 -2
- data/lib/svix/models/replay_out.rb +2 -2
- data/lib/svix/models/rotate_token_out.rb +46 -0
- data/lib/svix/models/segment_config.rb +46 -0
- data/lib/svix/models/segment_config_out.rb +43 -0
- data/lib/svix/models/shopify_config.rb +46 -0
- data/lib/svix/models/shopify_config_out.rb +43 -0
- data/lib/svix/models/slack_config.rb +46 -0
- data/lib/svix/models/slack_config_out.rb +43 -0
- data/lib/svix/models/stripe_config.rb +46 -0
- data/lib/svix/models/stripe_config_out.rb +43 -0
- data/lib/svix/models/svix_config.rb +46 -0
- data/lib/svix/models/svix_config_out.rb +43 -0
- data/lib/svix/models/zoom_config.rb +46 -0
- data/lib/svix/models/zoom_config_out.rb +43 -0
- data/lib/svix/util.rb +13 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +49 -1
- data/templates/component_type.rb.jinja +2 -0
- data/templates/types/macros.rb.jinja +43 -0
- data/templates/types/struct.rb.jinja +4 -33
- data/templates/types/struct_enum.rb.jinja +116 -0
- metadata +53 -2
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class HubspotConfig
|
7
|
+
attr_accessor :secret
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["secret"].freeze
|
10
|
+
private_constant :ALL_FIELD
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
unless attributes.is_a?(Hash)
|
14
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::HubspotConfig` new method")
|
15
|
+
end
|
16
|
+
|
17
|
+
attributes.each do |k, v|
|
18
|
+
unless ALL_FIELD.include?(k.to_s)
|
19
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::HubspotConfig")
|
20
|
+
end
|
21
|
+
|
22
|
+
instance_variable_set("@#{k}", v)
|
23
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.deserialize(attributes = {})
|
28
|
+
attributes = attributes.transform_keys(&:to_s)
|
29
|
+
attrs = Hash.new
|
30
|
+
attrs["secret"] = attributes["secret"]
|
31
|
+
new(attrs)
|
32
|
+
end
|
33
|
+
|
34
|
+
def serialize
|
35
|
+
out = Hash.new
|
36
|
+
out["secret"] = Svix::serialize_primitive(@secret) if @secret
|
37
|
+
out
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serializes the object to a json string
|
41
|
+
# @return String
|
42
|
+
def to_json
|
43
|
+
JSON.dump(serialize)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class HubspotConfigOut
|
7
|
+
|
8
|
+
ALL_FIELD ||= [].freeze
|
9
|
+
private_constant :ALL_FIELD
|
10
|
+
|
11
|
+
def initialize(attributes = {})
|
12
|
+
unless attributes.is_a?(Hash)
|
13
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::HubspotConfigOut` new method")
|
14
|
+
end
|
15
|
+
|
16
|
+
attributes.each do |k, v|
|
17
|
+
unless ALL_FIELD.include?(k.to_s)
|
18
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::HubspotConfigOut")
|
19
|
+
end
|
20
|
+
|
21
|
+
instance_variable_set("@#{k}", v)
|
22
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.deserialize(attributes = {})
|
27
|
+
attributes = attributes.transform_keys(&:to_s)
|
28
|
+
attrs = Hash.new
|
29
|
+
new(attrs)
|
30
|
+
end
|
31
|
+
|
32
|
+
def serialize
|
33
|
+
out = Hash.new
|
34
|
+
out
|
35
|
+
end
|
36
|
+
|
37
|
+
# Serializes the object to a json string
|
38
|
+
# @return String
|
39
|
+
def to_json
|
40
|
+
JSON.dump(serialize)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class IngestSourceConsumerPortalAccessIn
|
7
|
+
attr_accessor :expiry
|
8
|
+
attr_accessor :read_only
|
9
|
+
|
10
|
+
ALL_FIELD ||= ["expiry", "read_only"].freeze
|
11
|
+
private_constant :ALL_FIELD
|
12
|
+
|
13
|
+
def initialize(attributes = {})
|
14
|
+
unless attributes.is_a?(Hash)
|
15
|
+
fail(
|
16
|
+
ArgumentError,
|
17
|
+
"The input argument (attributes) must be a hash in `Svix::IngestSourceConsumerPortalAccessIn` new method"
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
attributes.each do |k, v|
|
22
|
+
unless ALL_FIELD.include?(k.to_s)
|
23
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::IngestSourceConsumerPortalAccessIn")
|
24
|
+
end
|
25
|
+
|
26
|
+
instance_variable_set("@#{k}", v)
|
27
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.deserialize(attributes = {})
|
32
|
+
attributes = attributes.transform_keys(&:to_s)
|
33
|
+
attrs = Hash.new
|
34
|
+
attrs["expiry"] = attributes["expiry"]
|
35
|
+
attrs["read_only"] = attributes["readOnly"]
|
36
|
+
new(attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
def serialize
|
40
|
+
out = Hash.new
|
41
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
42
|
+
out["readOnly"] = Svix::serialize_primitive(@read_only) if @read_only
|
43
|
+
out
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serializes the object to a json string
|
47
|
+
# @return String
|
48
|
+
def to_json
|
49
|
+
JSON.dump(serialize)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,209 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
require_relative "./adobe_sign_config"
|
6
|
+
require_relative "./cron_config"
|
7
|
+
require_relative "./docusign_config"
|
8
|
+
require_relative "./github_config"
|
9
|
+
require_relative "./hubspot_config"
|
10
|
+
require_relative "./segment_config"
|
11
|
+
require_relative "./shopify_config"
|
12
|
+
require_relative "./slack_config"
|
13
|
+
require_relative "./stripe_config"
|
14
|
+
require_relative "./svix_config"
|
15
|
+
require_relative "./zoom_config"
|
16
|
+
|
17
|
+
module Svix
|
18
|
+
class IngestSourceInConfig
|
19
|
+
class GenericWebhook
|
20
|
+
|
21
|
+
def serialize
|
22
|
+
Hash.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.deserialize(attributes = {})
|
26
|
+
new
|
27
|
+
end
|
28
|
+
# Serializes the object to a json string
|
29
|
+
# @return String
|
30
|
+
def to_json
|
31
|
+
JSON.dump(serialize)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
class Cron < CronConfig
|
36
|
+
end
|
37
|
+
|
38
|
+
class AdobeSign < AdobeSignConfig
|
39
|
+
end
|
40
|
+
|
41
|
+
class Beehiiv < SvixConfig
|
42
|
+
end
|
43
|
+
|
44
|
+
class Brex < SvixConfig
|
45
|
+
end
|
46
|
+
|
47
|
+
class Clerk < SvixConfig
|
48
|
+
end
|
49
|
+
|
50
|
+
class Docusign < DocusignConfig
|
51
|
+
end
|
52
|
+
|
53
|
+
class Github < GithubConfig
|
54
|
+
end
|
55
|
+
|
56
|
+
class Guesty < SvixConfig
|
57
|
+
end
|
58
|
+
|
59
|
+
class Hubspot < HubspotConfig
|
60
|
+
end
|
61
|
+
|
62
|
+
class IncidentIo < SvixConfig
|
63
|
+
end
|
64
|
+
|
65
|
+
class Lithic < SvixConfig
|
66
|
+
end
|
67
|
+
|
68
|
+
class Nash < SvixConfig
|
69
|
+
end
|
70
|
+
|
71
|
+
class Pleo < SvixConfig
|
72
|
+
end
|
73
|
+
|
74
|
+
class Replicate < SvixConfig
|
75
|
+
end
|
76
|
+
|
77
|
+
class Resend < SvixConfig
|
78
|
+
end
|
79
|
+
|
80
|
+
class Safebase < SvixConfig
|
81
|
+
end
|
82
|
+
|
83
|
+
class Sardine < SvixConfig
|
84
|
+
end
|
85
|
+
|
86
|
+
class Segment < SegmentConfig
|
87
|
+
end
|
88
|
+
|
89
|
+
class Shopify < ShopifyConfig
|
90
|
+
end
|
91
|
+
|
92
|
+
class Slack < SlackConfig
|
93
|
+
end
|
94
|
+
|
95
|
+
class Stripe < StripeConfig
|
96
|
+
end
|
97
|
+
|
98
|
+
class Stych < SvixConfig
|
99
|
+
end
|
100
|
+
|
101
|
+
class Svix < SvixConfig
|
102
|
+
end
|
103
|
+
|
104
|
+
class Zoom < ZoomConfig
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
class IngestSourceIn
|
109
|
+
attr_accessor :name
|
110
|
+
attr_accessor :uid
|
111
|
+
attr_accessor :config
|
112
|
+
|
113
|
+
ALL_FIELD ||= ["name", "uid", "config"].freeze
|
114
|
+
private_constant :ALL_FIELD
|
115
|
+
TYPE_TO_NAME = {
|
116
|
+
IngestSourceInConfig::GenericWebhook => "generic-webhook",
|
117
|
+
IngestSourceInConfig::Cron => "cron",
|
118
|
+
IngestSourceInConfig::AdobeSign => "adobe-sign",
|
119
|
+
IngestSourceInConfig::Beehiiv => "beehiiv",
|
120
|
+
IngestSourceInConfig::Brex => "brex",
|
121
|
+
IngestSourceInConfig::Clerk => "clerk",
|
122
|
+
IngestSourceInConfig::Docusign => "docusign",
|
123
|
+
IngestSourceInConfig::Github => "github",
|
124
|
+
IngestSourceInConfig::Guesty => "guesty",
|
125
|
+
IngestSourceInConfig::Hubspot => "hubspot",
|
126
|
+
IngestSourceInConfig::IncidentIo => "incident-io",
|
127
|
+
IngestSourceInConfig::Lithic => "lithic",
|
128
|
+
IngestSourceInConfig::Nash => "nash",
|
129
|
+
IngestSourceInConfig::Pleo => "pleo",
|
130
|
+
IngestSourceInConfig::Replicate => "replicate",
|
131
|
+
IngestSourceInConfig::Resend => "resend",
|
132
|
+
IngestSourceInConfig::Safebase => "safebase",
|
133
|
+
IngestSourceInConfig::Sardine => "sardine",
|
134
|
+
IngestSourceInConfig::Segment => "segment",
|
135
|
+
IngestSourceInConfig::Shopify => "shopify",
|
136
|
+
IngestSourceInConfig::Slack => "slack",
|
137
|
+
IngestSourceInConfig::Stripe => "stripe",
|
138
|
+
IngestSourceInConfig::Stych => "stych",
|
139
|
+
IngestSourceInConfig::Svix => "svix",
|
140
|
+
IngestSourceInConfig::Zoom => "zoom"
|
141
|
+
}
|
142
|
+
private_constant :TYPE_TO_NAME
|
143
|
+
NAME_TO_TYPE = TYPE_TO_NAME.invert
|
144
|
+
private_constant :NAME_TO_TYPE
|
145
|
+
|
146
|
+
def initialize(attributes = {})
|
147
|
+
unless attributes.is_a?(Hash)
|
148
|
+
fail(
|
149
|
+
ArgumentError,
|
150
|
+
"The input argument (attributes) must be a hash in `Svix::IngestSourceIn` new method"
|
151
|
+
)
|
152
|
+
end
|
153
|
+
|
154
|
+
attributes.each do |k, v|
|
155
|
+
unless ALL_FIELD.include?(k.to_s)
|
156
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::IngestSourceIn")
|
157
|
+
end
|
158
|
+
|
159
|
+
if k == "config"
|
160
|
+
unless TYPE_TO_NAME.key?(v.class)
|
161
|
+
fail(ArgumentError, "The field #{k} can't be a `#{v.class}` expected one of #{TYPE_TO_NAME.keys}")
|
162
|
+
end
|
163
|
+
|
164
|
+
instance_variable_set("@__enum_discriminator", TYPE_TO_NAME[v.class])
|
165
|
+
end
|
166
|
+
|
167
|
+
instance_variable_set("@#{k}", v)
|
168
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
169
|
+
end
|
170
|
+
|
171
|
+
if @__enum_discriminator.nil?
|
172
|
+
fail(ArgumentError, "Required config field was not set")
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
def self.deserialize(attributes = {})
|
177
|
+
attributes = attributes.transform_keys(&:to_s)
|
178
|
+
attrs = Hash.new
|
179
|
+
attrs["name"] = attributes["name"]
|
180
|
+
attrs["uid"] = attributes["uid"]
|
181
|
+
unless NAME_TO_TYPE.key?(attributes["type"])
|
182
|
+
fail(ArgumentError, "Invalid type `#{attributes["type"]}` expected on of #{NAME_TO_TYPE.keys}")
|
183
|
+
end
|
184
|
+
|
185
|
+
unless attributes.key?("config")
|
186
|
+
fail(ArgumentError, "Missing required field config")
|
187
|
+
end
|
188
|
+
|
189
|
+
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"])
|
190
|
+
new(attrs)
|
191
|
+
end
|
192
|
+
|
193
|
+
def serialize
|
194
|
+
out = Hash.new
|
195
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
196
|
+
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
197
|
+
out["type"] = @__enum_discriminator
|
198
|
+
out["config"] = @config.serialize
|
199
|
+
out
|
200
|
+
end
|
201
|
+
|
202
|
+
# Serializes the object to a json string
|
203
|
+
# @return String
|
204
|
+
def to_json
|
205
|
+
JSON.dump(serialize)
|
206
|
+
end
|
207
|
+
|
208
|
+
end
|
209
|
+
end
|
@@ -0,0 +1,221 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
require_relative "./adobe_sign_config_out"
|
6
|
+
require_relative "./cron_config"
|
7
|
+
require_relative "./docusign_config_out"
|
8
|
+
require_relative "./github_config_out"
|
9
|
+
require_relative "./hubspot_config_out"
|
10
|
+
require_relative "./segment_config_out"
|
11
|
+
require_relative "./shopify_config_out"
|
12
|
+
require_relative "./slack_config_out"
|
13
|
+
require_relative "./stripe_config_out"
|
14
|
+
require_relative "./svix_config_out"
|
15
|
+
require_relative "./zoom_config_out"
|
16
|
+
|
17
|
+
module Svix
|
18
|
+
class IngestSourceOutConfig
|
19
|
+
class GenericWebhook
|
20
|
+
|
21
|
+
def serialize
|
22
|
+
Hash.new
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.deserialize(attributes = {})
|
26
|
+
new
|
27
|
+
end
|
28
|
+
# Serializes the object to a json string
|
29
|
+
# @return String
|
30
|
+
def to_json
|
31
|
+
JSON.dump(serialize)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
class Cron < CronConfig
|
36
|
+
end
|
37
|
+
|
38
|
+
class AdobeSign < AdobeSignConfigOut
|
39
|
+
end
|
40
|
+
|
41
|
+
class Beehiiv < SvixConfigOut
|
42
|
+
end
|
43
|
+
|
44
|
+
class Brex < SvixConfigOut
|
45
|
+
end
|
46
|
+
|
47
|
+
class Clerk < SvixConfigOut
|
48
|
+
end
|
49
|
+
|
50
|
+
class Docusign < DocusignConfigOut
|
51
|
+
end
|
52
|
+
|
53
|
+
class Github < GithubConfigOut
|
54
|
+
end
|
55
|
+
|
56
|
+
class Guesty < SvixConfigOut
|
57
|
+
end
|
58
|
+
|
59
|
+
class Hubspot < HubspotConfigOut
|
60
|
+
end
|
61
|
+
|
62
|
+
class IncidentIo < SvixConfigOut
|
63
|
+
end
|
64
|
+
|
65
|
+
class Lithic < SvixConfigOut
|
66
|
+
end
|
67
|
+
|
68
|
+
class Nash < SvixConfigOut
|
69
|
+
end
|
70
|
+
|
71
|
+
class Pleo < SvixConfigOut
|
72
|
+
end
|
73
|
+
|
74
|
+
class Replicate < SvixConfigOut
|
75
|
+
end
|
76
|
+
|
77
|
+
class Resend < SvixConfigOut
|
78
|
+
end
|
79
|
+
|
80
|
+
class Safebase < SvixConfigOut
|
81
|
+
end
|
82
|
+
|
83
|
+
class Sardine < SvixConfigOut
|
84
|
+
end
|
85
|
+
|
86
|
+
class Segment < SegmentConfigOut
|
87
|
+
end
|
88
|
+
|
89
|
+
class Shopify < ShopifyConfigOut
|
90
|
+
end
|
91
|
+
|
92
|
+
class Slack < SlackConfigOut
|
93
|
+
end
|
94
|
+
|
95
|
+
class Stripe < StripeConfigOut
|
96
|
+
end
|
97
|
+
|
98
|
+
class Stych < SvixConfigOut
|
99
|
+
end
|
100
|
+
|
101
|
+
class Svix < SvixConfigOut
|
102
|
+
end
|
103
|
+
|
104
|
+
class Zoom < ZoomConfigOut
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
class IngestSourceOut
|
109
|
+
attr_accessor :created_at
|
110
|
+
attr_accessor :id
|
111
|
+
attr_accessor :ingest_url
|
112
|
+
attr_accessor :name
|
113
|
+
attr_accessor :uid
|
114
|
+
attr_accessor :updated_at
|
115
|
+
attr_accessor :config
|
116
|
+
|
117
|
+
ALL_FIELD ||= ["created_at", "id", "ingest_url", "name", "uid", "updated_at", "config"].freeze
|
118
|
+
private_constant :ALL_FIELD
|
119
|
+
TYPE_TO_NAME = {
|
120
|
+
IngestSourceOutConfig::GenericWebhook => "generic-webhook",
|
121
|
+
IngestSourceOutConfig::Cron => "cron",
|
122
|
+
IngestSourceOutConfig::AdobeSign => "adobe-sign",
|
123
|
+
IngestSourceOutConfig::Beehiiv => "beehiiv",
|
124
|
+
IngestSourceOutConfig::Brex => "brex",
|
125
|
+
IngestSourceOutConfig::Clerk => "clerk",
|
126
|
+
IngestSourceOutConfig::Docusign => "docusign",
|
127
|
+
IngestSourceOutConfig::Github => "github",
|
128
|
+
IngestSourceOutConfig::Guesty => "guesty",
|
129
|
+
IngestSourceOutConfig::Hubspot => "hubspot",
|
130
|
+
IngestSourceOutConfig::IncidentIo => "incident-io",
|
131
|
+
IngestSourceOutConfig::Lithic => "lithic",
|
132
|
+
IngestSourceOutConfig::Nash => "nash",
|
133
|
+
IngestSourceOutConfig::Pleo => "pleo",
|
134
|
+
IngestSourceOutConfig::Replicate => "replicate",
|
135
|
+
IngestSourceOutConfig::Resend => "resend",
|
136
|
+
IngestSourceOutConfig::Safebase => "safebase",
|
137
|
+
IngestSourceOutConfig::Sardine => "sardine",
|
138
|
+
IngestSourceOutConfig::Segment => "segment",
|
139
|
+
IngestSourceOutConfig::Shopify => "shopify",
|
140
|
+
IngestSourceOutConfig::Slack => "slack",
|
141
|
+
IngestSourceOutConfig::Stripe => "stripe",
|
142
|
+
IngestSourceOutConfig::Stych => "stych",
|
143
|
+
IngestSourceOutConfig::Svix => "svix",
|
144
|
+
IngestSourceOutConfig::Zoom => "zoom"
|
145
|
+
}
|
146
|
+
private_constant :TYPE_TO_NAME
|
147
|
+
NAME_TO_TYPE = TYPE_TO_NAME.invert
|
148
|
+
private_constant :NAME_TO_TYPE
|
149
|
+
|
150
|
+
def initialize(attributes = {})
|
151
|
+
unless attributes.is_a?(Hash)
|
152
|
+
fail(
|
153
|
+
ArgumentError,
|
154
|
+
"The input argument (attributes) must be a hash in `Svix::IngestSourceOut` new method"
|
155
|
+
)
|
156
|
+
end
|
157
|
+
|
158
|
+
attributes.each do |k, v|
|
159
|
+
unless ALL_FIELD.include?(k.to_s)
|
160
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::IngestSourceOut")
|
161
|
+
end
|
162
|
+
|
163
|
+
if k == "config"
|
164
|
+
unless TYPE_TO_NAME.key?(v.class)
|
165
|
+
fail(ArgumentError, "The field #{k} can't be a `#{v.class}` expected one of #{TYPE_TO_NAME.keys}")
|
166
|
+
end
|
167
|
+
|
168
|
+
instance_variable_set("@__enum_discriminator", TYPE_TO_NAME[v.class])
|
169
|
+
end
|
170
|
+
|
171
|
+
instance_variable_set("@#{k}", v)
|
172
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
173
|
+
end
|
174
|
+
|
175
|
+
if @__enum_discriminator.nil?
|
176
|
+
fail(ArgumentError, "Required config field was not set")
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
def self.deserialize(attributes = {})
|
181
|
+
attributes = attributes.transform_keys(&:to_s)
|
182
|
+
attrs = Hash.new
|
183
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
184
|
+
attrs["id"] = attributes["id"]
|
185
|
+
attrs["ingest_url"] = attributes["ingestUrl"]
|
186
|
+
attrs["name"] = attributes["name"]
|
187
|
+
attrs["uid"] = attributes["uid"]
|
188
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
189
|
+
unless NAME_TO_TYPE.key?(attributes["type"])
|
190
|
+
fail(ArgumentError, "Invalid type `#{attributes["type"]}` expected on of #{NAME_TO_TYPE.keys}")
|
191
|
+
end
|
192
|
+
|
193
|
+
unless attributes.key?("config")
|
194
|
+
fail(ArgumentError, "Missing required field config")
|
195
|
+
end
|
196
|
+
|
197
|
+
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"])
|
198
|
+
new(attrs)
|
199
|
+
end
|
200
|
+
|
201
|
+
def serialize
|
202
|
+
out = Hash.new
|
203
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
204
|
+
out["id"] = Svix::serialize_primitive(@id) if @id
|
205
|
+
out["ingestUrl"] = Svix::serialize_primitive(@ingest_url) if @ingest_url
|
206
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
207
|
+
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
208
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
209
|
+
out["type"] = @__enum_discriminator
|
210
|
+
out["config"] = @config.serialize
|
211
|
+
out
|
212
|
+
end
|
213
|
+
|
214
|
+
# Serializes the object to a json string
|
215
|
+
# @return String
|
216
|
+
def to_json
|
217
|
+
JSON.dump(serialize)
|
218
|
+
end
|
219
|
+
|
220
|
+
end
|
221
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class ListResponseIngestSourceOut
|
7
|
+
attr_accessor :data
|
8
|
+
attr_accessor :done
|
9
|
+
attr_accessor :iterator
|
10
|
+
attr_accessor :prev_iterator
|
11
|
+
|
12
|
+
ALL_FIELD ||= ["data", "done", "iterator", "prev_iterator"].freeze
|
13
|
+
private_constant :ALL_FIELD
|
14
|
+
|
15
|
+
def initialize(attributes = {})
|
16
|
+
unless attributes.is_a?(Hash)
|
17
|
+
fail(
|
18
|
+
ArgumentError,
|
19
|
+
"The input argument (attributes) must be a hash in `Svix::ListResponseIngestSourceOut` new method"
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
attributes.each do |k, v|
|
24
|
+
unless ALL_FIELD.include?(k.to_s)
|
25
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::ListResponseIngestSourceOut")
|
26
|
+
end
|
27
|
+
|
28
|
+
instance_variable_set("@#{k}", v)
|
29
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.deserialize(attributes = {})
|
34
|
+
attributes = attributes.transform_keys(&:to_s)
|
35
|
+
attrs = Hash.new
|
36
|
+
attrs["data"] = attributes["data"].map { |v| Svix::IngestSourceOut.deserialize(v) }
|
37
|
+
attrs["done"] = attributes["done"]
|
38
|
+
attrs["iterator"] = attributes["iterator"]
|
39
|
+
attrs["prev_iterator"] = attributes["prevIterator"]
|
40
|
+
new(attrs)
|
41
|
+
end
|
42
|
+
|
43
|
+
def serialize
|
44
|
+
out = Hash.new
|
45
|
+
out["data"] = @data.map { |v| v.serialize } if @data
|
46
|
+
out["done"] = Svix::serialize_primitive(@done) if @done
|
47
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
|
48
|
+
out["prevIterator"] = Svix::serialize_primitive(@prev_iterator) if @prev_iterator
|
49
|
+
out
|
50
|
+
end
|
51
|
+
|
52
|
+
# Serializes the object to a json string
|
53
|
+
# @return String
|
54
|
+
def to_json
|
55
|
+
JSON.dump(serialize)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when a message delivery has failed (all of the retry attempts have been exhausted).
|
7
|
+
class MessageAttemptExhaustedEvent
|
8
|
+
attr_accessor :data
|
9
|
+
attr_accessor :type
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["data", "type"].freeze
|
12
|
+
private_constant :ALL_FIELD
|
13
|
+
|
14
|
+
def initialize(attributes = {})
|
15
|
+
unless attributes.is_a?(Hash)
|
16
|
+
fail(
|
17
|
+
ArgumentError,
|
18
|
+
"The input argument (attributes) must be a hash in `Svix::MessageAttemptExhaustedEvent` new method"
|
19
|
+
)
|
20
|
+
end
|
21
|
+
|
22
|
+
attributes.each do |k, v|
|
23
|
+
unless ALL_FIELD.include?(k.to_s)
|
24
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::MessageAttemptExhaustedEvent")
|
25
|
+
end
|
26
|
+
|
27
|
+
instance_variable_set("@#{k}", v)
|
28
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.deserialize(attributes = {})
|
33
|
+
attributes = attributes.transform_keys(&:to_s)
|
34
|
+
attrs = Hash.new
|
35
|
+
attrs["data"] = Svix::MessageAttemptExhaustedEventData.deserialize(attributes["data"])
|
36
|
+
attrs["type"] = attributes["type"]
|
37
|
+
new(attrs)
|
38
|
+
end
|
39
|
+
|
40
|
+
def serialize
|
41
|
+
out = Hash.new
|
42
|
+
out["data"] = Svix::serialize_schema_ref(@data) if @data
|
43
|
+
out["type"] = Svix::serialize_primitive(@type) if @type
|
44
|
+
out
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serializes the object to a json string
|
48
|
+
# @return String
|
49
|
+
def to_json
|
50
|
+
JSON.dump(serialize)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|