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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/svix/api/ingest.rb +26 -0
  4. data/lib/svix/api/ingest_source.rb +76 -0
  5. data/lib/svix/models/adobe_sign_config.rb +46 -0
  6. data/lib/svix/models/adobe_sign_config_out.rb +43 -0
  7. data/lib/svix/models/aggregate_event_types_out.rb +2 -2
  8. data/lib/svix/models/app_portal_access_in.rb +1 -1
  9. data/lib/svix/models/app_usage_stats_out.rb +2 -2
  10. data/lib/svix/models/background_task_finished_event.rb +53 -0
  11. data/lib/svix/models/background_task_finished_event2.rb +58 -0
  12. data/lib/svix/models/background_task_out.rb +2 -2
  13. data/lib/svix/models/connector_in.rb +1 -1
  14. data/lib/svix/models/connector_out.rb +96 -0
  15. data/lib/svix/models/cron_config.rb +52 -0
  16. data/lib/svix/models/docusign_config.rb +46 -0
  17. data/lib/svix/models/docusign_config_out.rb +43 -0
  18. data/lib/svix/models/endpoint_created_event.rb +50 -0
  19. data/lib/svix/models/endpoint_created_event_data.rb +59 -0
  20. data/lib/svix/models/endpoint_deleted_event.rb +50 -0
  21. data/lib/svix/models/endpoint_deleted_event_data.rb +59 -0
  22. data/lib/svix/models/endpoint_disabled_event.rb +53 -0
  23. data/lib/svix/models/endpoint_disabled_event_data.rb +65 -0
  24. data/lib/svix/models/endpoint_disabled_trigger.rb +29 -0
  25. data/lib/svix/models/endpoint_enabled_event.rb +50 -0
  26. data/lib/svix/models/endpoint_enabled_event_data.rb +59 -0
  27. data/lib/svix/models/endpoint_message_out.rb +1 -1
  28. data/lib/svix/models/endpoint_updated_event.rb +50 -0
  29. data/lib/svix/models/endpoint_updated_event_data.rb +59 -0
  30. data/lib/svix/models/environment_out.rb +1 -1
  31. data/lib/svix/models/event_type_import_open_api_out.rb +1 -1
  32. data/lib/svix/models/expunge_all_contents_out.rb +2 -2
  33. data/lib/svix/models/github_config.rb +46 -0
  34. data/lib/svix/models/github_config_out.rb +43 -0
  35. data/lib/svix/models/hubspot_config.rb +46 -0
  36. data/lib/svix/models/hubspot_config_out.rb +43 -0
  37. data/lib/svix/models/ingest_source_consumer_portal_access_in.rb +52 -0
  38. data/lib/svix/models/ingest_source_in.rb +209 -0
  39. data/lib/svix/models/ingest_source_out.rb +221 -0
  40. data/lib/svix/models/list_response_ingest_source_out.rb +58 -0
  41. data/lib/svix/models/message_attempt_exhausted_event.rb +53 -0
  42. data/lib/svix/models/message_attempt_exhausted_event_data.rb +65 -0
  43. data/lib/svix/models/message_attempt_failed_data.rb +55 -0
  44. data/lib/svix/models/message_attempt_failing_event.rb +54 -0
  45. data/lib/svix/models/message_attempt_failing_event_data.rb +65 -0
  46. data/lib/svix/models/message_attempt_out.rb +3 -3
  47. data/lib/svix/models/message_attempt_recovered_event.rb +53 -0
  48. data/lib/svix/models/message_attempt_recovered_event_data.rb +65 -0
  49. data/lib/svix/models/message_endpoint_out.rb +1 -1
  50. data/lib/svix/models/message_in.rb +1 -1
  51. data/lib/svix/models/recover_out.rb +2 -2
  52. data/lib/svix/models/replay_out.rb +2 -2
  53. data/lib/svix/models/rotate_token_out.rb +46 -0
  54. data/lib/svix/models/segment_config.rb +46 -0
  55. data/lib/svix/models/segment_config_out.rb +43 -0
  56. data/lib/svix/models/shopify_config.rb +46 -0
  57. data/lib/svix/models/shopify_config_out.rb +43 -0
  58. data/lib/svix/models/slack_config.rb +46 -0
  59. data/lib/svix/models/slack_config_out.rb +43 -0
  60. data/lib/svix/models/stripe_config.rb +46 -0
  61. data/lib/svix/models/stripe_config_out.rb +43 -0
  62. data/lib/svix/models/svix_config.rb +46 -0
  63. data/lib/svix/models/svix_config_out.rb +43 -0
  64. data/lib/svix/models/zoom_config.rb +46 -0
  65. data/lib/svix/models/zoom_config_out.rb +43 -0
  66. data/lib/svix/util.rb +13 -0
  67. data/lib/svix/version.rb +1 -1
  68. data/lib/svix.rb +49 -1
  69. data/templates/component_type.rb.jinja +2 -0
  70. data/templates/types/macros.rb.jinja +43 -0
  71. data/templates/types/struct.rb.jinja +4 -33
  72. data/templates/types/struct_enum.rb.jinja +116 -0
  73. metadata +53 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c84e19a237337d37953636bd545d7ff1b5114df56c6e41a829605631a2ec6eac
4
- data.tar.gz: d1baeb8a7766403ee4f76cd4acefa9dccdd0a4446bceba1a8d3ce1af530fc2b9
3
+ metadata.gz: a32dc96d2c73fef3249b713d47212a27e754f919b44c2cba14bd5c13149e0732
4
+ data.tar.gz: 1b2e8cb0d31b09fd0ed4bc0884b229d6b596f85e3d07efb66dab442c42cfb607
5
5
  SHA512:
6
- metadata.gz: 572bfcdf60765f6fbf56ec57993b995f55893988cb6d4caf9eaf0a0eee77aae2d5c71994900881f08809c9a02e6dcb021943dc90afd9541afdfcfde769676bfd
7
- data.tar.gz: 159346ddaf2dfcf53d99085badcadfaaff77ead2073f3675292ebf124f57bd458f4848bdb35e2e33a554bd7453ad87d019f7a5341e7f50f646c2f18d1c28f137
6
+ metadata.gz: e16de97783f6ef134155bba8ecaf4ddb3c4c9d7dceb575f45bd8cf3e2414636bea27c96bbb8c86551e3a013c39551474381194c9e0ab0281b6837afa7addb5bc
7
+ data.tar.gz: 3d2330c9b6306775f71bd645bf023c3213b835929390b5908712063a6b09235ed6d544c3271672f1c4b0e1986f1e167f1023955b0417eda646eb8f4a0cc062bf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.61.3)
4
+ svix (1.61.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class Ingest
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def dashboard(source_id, ingest_source_consumer_portal_access_in, options = {})
13
+ options = options.transform_keys(&:to_s)
14
+ res = @client.execute_request(
15
+ "POST",
16
+ "/ingest/api/v1/source/#{source_id}/dashboard",
17
+ headers: {
18
+ "idempotency-key" => options["idempotency-key"]
19
+ },
20
+ body: ingest_source_consumer_portal_access_in
21
+ )
22
+ DashboardAccessOut.deserialize(res)
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,76 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+
4
+ require "net/http"
5
+
6
+ module Svix
7
+ class IngestSource
8
+ def initialize(client)
9
+ @client = client
10
+ end
11
+
12
+ def list(options = {})
13
+ options = options.transform_keys(&:to_s)
14
+ res = @client.execute_request(
15
+ "GET",
16
+ "/ingest/api/v1/source",
17
+ query_params: {
18
+ "limit" => options["limit"],
19
+ "iterator" => options["iterator"],
20
+ "order" => options["order"]
21
+ }
22
+ )
23
+ ListResponseIngestSourceOut.deserialize(res)
24
+ end
25
+
26
+ def create(ingest_source_in, options = {})
27
+ options = options.transform_keys(&:to_s)
28
+ res = @client.execute_request(
29
+ "POST",
30
+ "/ingest/api/v1/source",
31
+ headers: {
32
+ "idempotency-key" => options["idempotency-key"]
33
+ },
34
+ body: ingest_source_in
35
+ )
36
+ IngestSourceOut.deserialize(res)
37
+ end
38
+
39
+ def get(source_id)
40
+ res = @client.execute_request(
41
+ "GET",
42
+ "/ingest/api/v1/source/#{source_id}"
43
+ )
44
+ IngestSourceOut.deserialize(res)
45
+ end
46
+
47
+ def update(source_id, ingest_source_in)
48
+ res = @client.execute_request(
49
+ "PUT",
50
+ "/ingest/api/v1/source/#{source_id}",
51
+ body: ingest_source_in
52
+ )
53
+ IngestSourceOut.deserialize(res)
54
+ end
55
+
56
+ def delete(source_id)
57
+ @client.execute_request(
58
+ "DELETE",
59
+ "/ingest/api/v1/source/#{source_id}"
60
+ )
61
+ end
62
+
63
+ def rotate_token(source_id, options = {})
64
+ options = options.transform_keys(&:to_s)
65
+ res = @client.execute_request(
66
+ "POST",
67
+ "/ingest/api/v1/source/#{source_id}/token/rotate",
68
+ headers: {
69
+ "idempotency-key" => options["idempotency-key"]
70
+ }
71
+ )
72
+ RotateTokenOut.deserialize(res)
73
+ end
74
+
75
+ end
76
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class AdobeSignConfig
7
+ attr_accessor :client_id
8
+
9
+ ALL_FIELD ||= ["client_id"].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::AdobeSignConfig` 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::AdobeSignConfig")
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["client_id"] = attributes["clientId"]
31
+ new(attrs)
32
+ end
33
+
34
+ def serialize
35
+ out = Hash.new
36
+ out["clientId"] = Svix::serialize_primitive(@client_id) if @client_id
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 AdobeSignConfigOut
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::AdobeSignConfigOut` 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::AdobeSignConfigOut")
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
@@ -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.serialize if @status
45
- out["task"] = @task.serialize if @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
 
@@ -39,7 +39,7 @@ module Svix
39
39
 
40
40
  def serialize
41
41
  out = Hash.new
42
- out["application"] = @application.serialize if @application
42
+ out["application"] = Svix::serialize_schema_ref(@application) if @application
43
43
  out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
44
44
  out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
45
45
  out["readOnly"] = Svix::serialize_primitive(@read_only) if @read_only
@@ -40,8 +40,8 @@ module Svix
40
40
  def serialize
41
41
  out = Hash.new
42
42
  out["id"] = Svix::serialize_primitive(@id) if @id
43
- out["status"] = @status.serialize if @status
44
- out["task"] = @task.serialize if @task
43
+ out["status"] = Svix::serialize_schema_ref(@status) if @status
44
+ out["task"] = Svix::serialize_schema_ref(@task) if @task
45
45
  out["unresolvedAppIds"] = Svix::serialize_primitive(@unresolved_app_ids) if @unresolved_app_ids
46
46
  out
47
47
  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 background task is finished.
7
+ class BackgroundTaskFinishedEvent
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::BackgroundTaskFinishedEvent` 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::BackgroundTaskFinishedEvent")
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::BackgroundTaskFinishedEvent2.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,58 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class BackgroundTaskFinishedEvent2
7
+ attr_accessor :data
8
+ attr_accessor :status
9
+ attr_accessor :task
10
+ attr_accessor :task_id
11
+
12
+ ALL_FIELD ||= ["data", "status", "task", "task_id"].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::BackgroundTaskFinishedEvent2` 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::BackgroundTaskFinishedEvent2")
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"]
37
+ attrs["status"] = Svix::BackgroundTaskStatus.deserialize(attributes["status"])
38
+ attrs["task"] = Svix::BackgroundTaskType.deserialize(attributes["task"])
39
+ attrs["task_id"] = attributes["taskId"]
40
+ new(attrs)
41
+ end
42
+
43
+ def serialize
44
+ out = Hash.new
45
+ out["data"] = @data if @data
46
+ out["status"] = Svix::serialize_schema_ref(@status) if @status
47
+ out["task"] = Svix::serialize_schema_ref(@task) if @task
48
+ out["taskId"] = Svix::serialize_primitive(@task_id) if @task_id
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
@@ -41,8 +41,8 @@ module Svix
41
41
  out = Hash.new
42
42
  out["data"] = Svix::serialize_primitive(@data) if @data
43
43
  out["id"] = Svix::serialize_primitive(@id) if @id
44
- out["status"] = @status.serialize if @status
45
- out["task"] = @task.serialize if @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
 
@@ -64,7 +64,7 @@ module Svix
64
64
  out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
65
65
  out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
66
66
  out["instructionsLink"] = Svix::serialize_primitive(@instructions_link) if @instructions_link
67
- out["kind"] = @kind.serialize if @kind
67
+ out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
68
68
  out["logo"] = Svix::serialize_primitive(@logo) if @logo
69
69
  out["name"] = Svix::serialize_primitive(@name) if @name
70
70
  out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class ConnectorOut
7
+ attr_accessor :created_at
8
+ attr_accessor :description
9
+ attr_accessor :feature_flag
10
+ attr_accessor :filter_types
11
+ attr_accessor :id
12
+ attr_accessor :instructions
13
+ attr_accessor :instructions_link
14
+ attr_accessor :kind
15
+ attr_accessor :logo
16
+ attr_accessor :name
17
+ attr_accessor :org_id
18
+ attr_accessor :transformation
19
+ attr_accessor :updated_at
20
+
21
+ ALL_FIELD ||= [
22
+ "created_at",
23
+ "description",
24
+ "feature_flag",
25
+ "filter_types",
26
+ "id",
27
+ "instructions",
28
+ "instructions_link",
29
+ "kind",
30
+ "logo",
31
+ "name",
32
+ "org_id",
33
+ "transformation",
34
+ "updated_at"
35
+ ].freeze
36
+ private_constant :ALL_FIELD
37
+
38
+ def initialize(attributes = {})
39
+ unless attributes.is_a?(Hash)
40
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorOut` new method")
41
+ end
42
+
43
+ attributes.each do |k, v|
44
+ unless ALL_FIELD.include?(k.to_s)
45
+ fail(ArgumentError, "The field #{k} is not part of Svix::ConnectorOut")
46
+ end
47
+
48
+ instance_variable_set("@#{k}", v)
49
+ instance_variable_set("@__#{k}_is_defined", true)
50
+ end
51
+ end
52
+
53
+ def self.deserialize(attributes = {})
54
+ attributes = attributes.transform_keys(&:to_s)
55
+ attrs = Hash.new
56
+ attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
57
+ attrs["description"] = attributes["description"]
58
+ attrs["feature_flag"] = attributes["featureFlag"]
59
+ attrs["filter_types"] = attributes["filterTypes"]
60
+ attrs["id"] = attributes["id"]
61
+ attrs["instructions"] = attributes["instructions"]
62
+ attrs["instructions_link"] = attributes["instructionsLink"]
63
+ attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"])
64
+ attrs["logo"] = attributes["logo"]
65
+ attrs["name"] = attributes["name"]
66
+ attrs["org_id"] = attributes["orgId"]
67
+ attrs["transformation"] = attributes["transformation"]
68
+ attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
69
+ new(attrs)
70
+ end
71
+
72
+ def serialize
73
+ out = Hash.new
74
+ out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
75
+ out["description"] = Svix::serialize_primitive(@description) if @description
76
+ out["featureFlag"] = Svix::serialize_primitive(@feature_flag) if @feature_flag
77
+ out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
78
+ out["id"] = Svix::serialize_primitive(@id) if @id
79
+ out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
80
+ out["instructionsLink"] = Svix::serialize_primitive(@instructions_link) if @instructions_link
81
+ out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
82
+ out["logo"] = Svix::serialize_primitive(@logo) if @logo
83
+ out["name"] = Svix::serialize_primitive(@name) if @name
84
+ out["orgId"] = Svix::serialize_primitive(@org_id) if @org_id
85
+ out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation
86
+ out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
87
+ out
88
+ end
89
+
90
+ # Serializes the object to a json string
91
+ # @return String
92
+ def to_json
93
+ JSON.dump(serialize)
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class CronConfig
7
+ attr_accessor :content_type
8
+ attr_accessor :payload
9
+ attr_accessor :schedule
10
+
11
+ ALL_FIELD ||= ["content_type", "payload", "schedule"].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::CronConfig` 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::CronConfig")
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["content_type"] = attributes["contentType"]
33
+ attrs["payload"] = attributes["payload"]
34
+ attrs["schedule"] = attributes["schedule"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["contentType"] = Svix::serialize_primitive(@content_type) if @content_type
41
+ out["payload"] = Svix::serialize_primitive(@payload) if @payload
42
+ out["schedule"] = Svix::serialize_primitive(@schedule) if @schedule
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,46 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class DocusignConfig
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::DocusignConfig` 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::DocusignConfig")
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 DocusignConfigOut
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::DocusignConfigOut` 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::DocusignConfigOut")
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,50 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ # Sent when an endpoint is created.
7
+ class EndpointCreatedEvent
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::EndpointCreatedEvent` 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::EndpointCreatedEvent")
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::EndpointCreatedEventData.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