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,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint is created, updated, or deleted
|
7
|
+
class EndpointCreatedEventData
|
8
|
+
attr_accessor :app_id
|
9
|
+
attr_accessor :app_uid
|
10
|
+
attr_accessor :endpoint_id
|
11
|
+
attr_accessor :endpoint_uid
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
14
|
+
private_constant :ALL_FIELD
|
15
|
+
|
16
|
+
def initialize(attributes = {})
|
17
|
+
unless attributes.is_a?(Hash)
|
18
|
+
fail(
|
19
|
+
ArgumentError,
|
20
|
+
"The input argument (attributes) must be a hash in `Svix::EndpointCreatedEventData` new method"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointCreatedEventData")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["app_id"] = attributes["appId"]
|
38
|
+
attrs["app_uid"] = attributes["appUid"]
|
39
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
40
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
|
47
|
+
out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
|
48
|
+
out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
|
49
|
+
out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint is deleted.
|
7
|
+
class EndpointDeletedEvent
|
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(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointDeletedEvent` new method")
|
17
|
+
end
|
18
|
+
|
19
|
+
attributes.each do |k, v|
|
20
|
+
unless ALL_FIELD.include?(k.to_s)
|
21
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointDeletedEvent")
|
22
|
+
end
|
23
|
+
|
24
|
+
instance_variable_set("@#{k}", v)
|
25
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.deserialize(attributes = {})
|
30
|
+
attributes = attributes.transform_keys(&:to_s)
|
31
|
+
attrs = Hash.new
|
32
|
+
attrs["data"] = Svix::EndpointDeletedEventData.deserialize(attributes["data"])
|
33
|
+
attrs["type"] = attributes["type"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["data"] = Svix::serialize_schema_ref(@data) if @data
|
40
|
+
out["type"] = Svix::serialize_primitive(@type) if @type
|
41
|
+
out
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serializes the object to a json string
|
45
|
+
# @return String
|
46
|
+
def to_json
|
47
|
+
JSON.dump(serialize)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint is created, updated, or deleted
|
7
|
+
class EndpointDeletedEventData
|
8
|
+
attr_accessor :app_id
|
9
|
+
attr_accessor :app_uid
|
10
|
+
attr_accessor :endpoint_id
|
11
|
+
attr_accessor :endpoint_uid
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
14
|
+
private_constant :ALL_FIELD
|
15
|
+
|
16
|
+
def initialize(attributes = {})
|
17
|
+
unless attributes.is_a?(Hash)
|
18
|
+
fail(
|
19
|
+
ArgumentError,
|
20
|
+
"The input argument (attributes) must be a hash in `Svix::EndpointDeletedEventData` new method"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointDeletedEventData")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["app_id"] = attributes["appId"]
|
38
|
+
attrs["app_uid"] = attributes["appUid"]
|
39
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
40
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
|
47
|
+
out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
|
48
|
+
out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
|
49
|
+
out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
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 an endpoint has been automatically disabled after continuous failures, or manually via an API call.
|
7
|
+
class EndpointDisabledEvent
|
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::EndpointDisabledEvent` 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::EndpointDisabledEvent")
|
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::EndpointDisabledEventData.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
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint has been automatically disabled after continuous failures, or manually via an API call.
|
7
|
+
class EndpointDisabledEventData
|
8
|
+
attr_accessor :app_id
|
9
|
+
attr_accessor :app_uid
|
10
|
+
attr_accessor :endpoint_id
|
11
|
+
attr_accessor :endpoint_uid
|
12
|
+
attr_accessor :fail_since
|
13
|
+
attr_accessor :trigger
|
14
|
+
|
15
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid", "fail_since", "trigger"].freeze
|
16
|
+
private_constant :ALL_FIELD
|
17
|
+
|
18
|
+
def initialize(attributes = {})
|
19
|
+
unless attributes.is_a?(Hash)
|
20
|
+
fail(
|
21
|
+
ArgumentError,
|
22
|
+
"The input argument (attributes) must be a hash in `Svix::EndpointDisabledEventData` new method"
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
attributes.each do |k, v|
|
27
|
+
unless ALL_FIELD.include?(k.to_s)
|
28
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointDisabledEventData")
|
29
|
+
end
|
30
|
+
|
31
|
+
instance_variable_set("@#{k}", v)
|
32
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.deserialize(attributes = {})
|
37
|
+
attributes = attributes.transform_keys(&:to_s)
|
38
|
+
attrs = Hash.new
|
39
|
+
attrs["app_id"] = attributes["appId"]
|
40
|
+
attrs["app_uid"] = attributes["appUid"]
|
41
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
42
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
43
|
+
attrs["fail_since"] = DateTime.rfc3339(attributes["failSince"]).to_time if attributes["failSince"]
|
44
|
+
attrs["trigger"] = Svix::EndpointDisabledTrigger.deserialize(attributes["trigger"]) if attributes["trigger"]
|
45
|
+
new(attrs)
|
46
|
+
end
|
47
|
+
|
48
|
+
def serialize
|
49
|
+
out = Hash.new
|
50
|
+
out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
|
51
|
+
out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
|
52
|
+
out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
|
53
|
+
out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
54
|
+
out["failSince"] = Svix::serialize_primitive(@fail_since) if @fail_since
|
55
|
+
out["trigger"] = Svix::serialize_schema_ref(@trigger) if @trigger
|
56
|
+
out
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serializes the object to a json string
|
60
|
+
# @return String
|
61
|
+
def to_json
|
62
|
+
JSON.dump(serialize)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
module Svix
|
4
|
+
class EndpointDisabledTrigger
|
5
|
+
MANUAL = "manual".freeze
|
6
|
+
AUTOMATIC = "automatic".freeze
|
7
|
+
|
8
|
+
def self.all_vars
|
9
|
+
@all_vars ||= [MANUAL, AUTOMATIC].freeze
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(value)
|
13
|
+
unless EndpointDisabledTrigger.all_vars.include?(value)
|
14
|
+
raise "Invalid ENUM value '#{value}' for class #EndpointDisabledTrigger"
|
15
|
+
end
|
16
|
+
|
17
|
+
@value = value
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.deserialize(value)
|
21
|
+
return value if EndpointDisabledTrigger.all_vars.include?(value)
|
22
|
+
raise "Invalid ENUM value '#{value}' for class #EndpointDisabledTrigger"
|
23
|
+
end
|
24
|
+
|
25
|
+
def serialize
|
26
|
+
@value
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint has been enabled.
|
7
|
+
class EndpointEnabledEvent
|
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(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointEnabledEvent` new method")
|
17
|
+
end
|
18
|
+
|
19
|
+
attributes.each do |k, v|
|
20
|
+
unless ALL_FIELD.include?(k.to_s)
|
21
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointEnabledEvent")
|
22
|
+
end
|
23
|
+
|
24
|
+
instance_variable_set("@#{k}", v)
|
25
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.deserialize(attributes = {})
|
30
|
+
attributes = attributes.transform_keys(&:to_s)
|
31
|
+
attrs = Hash.new
|
32
|
+
attrs["data"] = Svix::EndpointEnabledEventData.deserialize(attributes["data"])
|
33
|
+
attrs["type"] = attributes["type"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["data"] = Svix::serialize_schema_ref(@data) if @data
|
40
|
+
out["type"] = Svix::serialize_primitive(@type) if @type
|
41
|
+
out
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serializes the object to a json string
|
45
|
+
# @return String
|
46
|
+
def to_json
|
47
|
+
JSON.dump(serialize)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint has been enabled.
|
7
|
+
class EndpointEnabledEventData
|
8
|
+
attr_accessor :app_id
|
9
|
+
attr_accessor :app_uid
|
10
|
+
attr_accessor :endpoint_id
|
11
|
+
attr_accessor :endpoint_uid
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
14
|
+
private_constant :ALL_FIELD
|
15
|
+
|
16
|
+
def initialize(attributes = {})
|
17
|
+
unless attributes.is_a?(Hash)
|
18
|
+
fail(
|
19
|
+
ArgumentError,
|
20
|
+
"The input argument (attributes) must be a hash in `Svix::EndpointEnabledEventData` new method"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointEnabledEventData")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["app_id"] = attributes["appId"]
|
38
|
+
attrs["app_uid"] = attributes["appUid"]
|
39
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
40
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
|
47
|
+
out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
|
48
|
+
out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
|
49
|
+
out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -56,7 +56,7 @@ module Svix
|
|
56
56
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
57
57
|
out["nextAttempt"] = Svix::serialize_primitive(@next_attempt) if @next_attempt
|
58
58
|
out["payload"] = Svix::serialize_primitive(@payload) if @payload
|
59
|
-
out["status"] = @status
|
59
|
+
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
60
60
|
out["tags"] = Svix::serialize_primitive(@tags) if @tags
|
61
61
|
out["timestamp"] = Svix::serialize_primitive(@timestamp) if @timestamp
|
62
62
|
out
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint is updated.
|
7
|
+
class EndpointUpdatedEvent
|
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(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointUpdatedEvent` new method")
|
17
|
+
end
|
18
|
+
|
19
|
+
attributes.each do |k, v|
|
20
|
+
unless ALL_FIELD.include?(k.to_s)
|
21
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointUpdatedEvent")
|
22
|
+
end
|
23
|
+
|
24
|
+
instance_variable_set("@#{k}", v)
|
25
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.deserialize(attributes = {})
|
30
|
+
attributes = attributes.transform_keys(&:to_s)
|
31
|
+
attrs = Hash.new
|
32
|
+
attrs["data"] = Svix::EndpointUpdatedEventData.deserialize(attributes["data"])
|
33
|
+
attrs["type"] = attributes["type"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["data"] = Svix::serialize_schema_ref(@data) if @data
|
40
|
+
out["type"] = Svix::serialize_primitive(@type) if @type
|
41
|
+
out
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serializes the object to a json string
|
45
|
+
# @return String
|
46
|
+
def to_json
|
47
|
+
JSON.dump(serialize)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an endpoint is created, updated, or deleted
|
7
|
+
class EndpointUpdatedEventData
|
8
|
+
attr_accessor :app_id
|
9
|
+
attr_accessor :app_uid
|
10
|
+
attr_accessor :endpoint_id
|
11
|
+
attr_accessor :endpoint_uid
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
14
|
+
private_constant :ALL_FIELD
|
15
|
+
|
16
|
+
def initialize(attributes = {})
|
17
|
+
unless attributes.is_a?(Hash)
|
18
|
+
fail(
|
19
|
+
ArgumentError,
|
20
|
+
"The input argument (attributes) must be a hash in `Svix::EndpointUpdatedEventData` new method"
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EndpointUpdatedEventData")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["app_id"] = attributes["appId"]
|
38
|
+
attrs["app_uid"] = attributes["appUid"]
|
39
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
40
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
41
|
+
new(attrs)
|
42
|
+
end
|
43
|
+
|
44
|
+
def serialize
|
45
|
+
out = Hash.new
|
46
|
+
out["appId"] = Svix::serialize_primitive(@app_id) if @app_id
|
47
|
+
out["appUid"] = Svix::serialize_primitive(@app_uid) if @app_uid
|
48
|
+
out["endpointId"] = Svix::serialize_primitive(@endpoint_id) if @endpoint_id
|
49
|
+
out["endpointUid"] = Svix::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -35,7 +35,7 @@ module Svix
|
|
35
35
|
attrs["event_types"] = attributes["eventTypes"].map { |v| Svix::EventTypeOut.deserialize(v) }
|
36
36
|
attrs["settings"] = attributes["settings"]
|
37
37
|
attrs["transformation_templates"] = attributes["transformationTemplates"].map { |v|
|
38
|
-
Svix::
|
38
|
+
Svix::ConnectorOut.deserialize(v)
|
39
39
|
}
|
40
40
|
attrs["version"] = attributes["version"]
|
41
41
|
new(attrs)
|
@@ -41,8 +41,8 @@ module Svix
|
|
41
41
|
def serialize
|
42
42
|
out = Hash.new
|
43
43
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
44
|
-
out["status"] = @status
|
45
|
-
out["task"] = @task
|
44
|
+
out["status"] = Svix::serialize_schema_ref(@status) if @status
|
45
|
+
out["task"] = Svix::serialize_schema_ref(@task) if @task
|
46
46
|
out
|
47
47
|
end
|
48
48
|
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class GithubConfig
|
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::GithubConfig` 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::GithubConfig")
|
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 GithubConfigOut
|
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::GithubConfigOut` 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::GithubConfigOut")
|
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
|