hooksniff 0.3.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/Gemfile.lock +56 -0
- data/README.md +23 -199
- data/Rakefile +2 -0
- data/hooksniff.gemspec +48 -0
- data/lib/hooksniff/api/authentication.rb +36 -0
- data/lib/hooksniff/api/endpoint.rb +102 -0
- data/lib/hooksniff/api/event_type.rb +66 -0
- data/lib/hooksniff/api/health.rb +16 -0
- data/lib/hooksniff/api/message.rb +48 -0
- data/lib/hooksniff/api/message_attempt.rb +38 -0
- data/lib/hooksniff/api/statistics.rb +37 -0
- data/lib/{openapi_client → hooksniff}/api_error.rb +8 -18
- data/lib/hooksniff/errors.rb +129 -0
- data/lib/hooksniff/hooksniff.rb +36 -0
- data/lib/hooksniff/hooksniff_http_client.rb +128 -0
- data/lib/hooksniff/http_error_out.rb +18 -0
- data/lib/hooksniff/http_validation_error.rb +18 -0
- data/lib/hooksniff/internal.rb +7 -0
- data/lib/hooksniff/models/aggregate_event_types_out.rb +59 -0
- data/lib/hooksniff/models/endpoint_created_event.rb +50 -0
- data/lib/hooksniff/models/endpoint_created_event_data.rb +63 -0
- data/lib/hooksniff/models/endpoint_deleted_event.rb +50 -0
- data/lib/hooksniff/models/endpoint_deleted_event_data.rb +63 -0
- data/lib/hooksniff/models/endpoint_disabled_event.rb +53 -0
- data/lib/hooksniff/models/endpoint_disabled_event_data.rb +69 -0
- data/lib/hooksniff/models/endpoint_enabled_event.rb +50 -0
- data/lib/hooksniff/models/endpoint_enabled_event_data.rb +63 -0
- data/lib/hooksniff/models/endpoint_headers_in.rb +46 -0
- data/lib/hooksniff/models/endpoint_headers_out.rb +52 -0
- data/lib/hooksniff/models/endpoint_headers_patch_in.rb +53 -0
- data/lib/hooksniff/models/endpoint_in.rb +102 -0
- data/lib/hooksniff/models/endpoint_out.rb +104 -0
- data/lib/hooksniff/models/endpoint_patch.rb +97 -0
- data/lib/hooksniff/models/endpoint_secret_out.rb +50 -0
- data/lib/hooksniff/models/endpoint_secret_rotate_in.rb +53 -0
- data/lib/hooksniff/models/endpoint_update.rb +90 -0
- data/lib/hooksniff/models/endpoint_updated_event.rb +50 -0
- data/lib/hooksniff/models/endpoint_updated_event_data.rb +63 -0
- data/lib/hooksniff/models/event_in.rb +50 -0
- data/lib/hooksniff/models/event_out.rb +53 -0
- data/lib/hooksniff/models/event_type_in.rb +80 -0
- data/lib/hooksniff/models/event_type_out.rb +87 -0
- data/lib/hooksniff/models/event_type_patch.rb +66 -0
- data/lib/hooksniff/models/event_type_update.rb +67 -0
- data/lib/hooksniff/models/list_response_endpoint_out.rb +58 -0
- data/lib/hooksniff/models/list_response_event_type_out.rb +58 -0
- data/lib/hooksniff/models/list_response_message_attempt_out.rb +58 -0
- data/lib/hooksniff/models/list_response_message_out.rb +58 -0
- data/lib/hooksniff/models/message_attempt_exhausted_event.rb +53 -0
- data/lib/hooksniff/models/message_attempt_exhausted_event_data.rb +70 -0
- data/lib/hooksniff/models/message_attempt_failed_data.rb +56 -0
- data/lib/hooksniff/models/message_attempt_failing_event.rb +54 -0
- data/lib/hooksniff/models/message_attempt_failing_event_data.rb +70 -0
- data/lib/hooksniff/models/message_attempt_log.rb +112 -0
- data/lib/hooksniff/models/message_attempt_log_event.rb +53 -0
- data/lib/hooksniff/models/message_attempt_out.rb +96 -0
- data/lib/hooksniff/models/message_attempt_recovered_event.rb +53 -0
- data/lib/hooksniff/models/message_attempt_recovered_event_data.rb +70 -0
- data/lib/hooksniff/models/message_attempt_trigger_type.rb +33 -0
- data/lib/hooksniff/models/message_endpoint_out.rb +112 -0
- data/lib/hooksniff/models/message_in.rb +100 -0
- data/lib/hooksniff/models/message_out.rb +71 -0
- data/lib/hooksniff/models/message_status.rb +39 -0
- data/lib/hooksniff/models/message_status_text.rb +32 -0
- data/lib/hooksniff/models/ordering.rb +30 -0
- data/lib/hooksniff/models/status_code_class.rb +41 -0
- data/lib/hooksniff/util.rb +69 -0
- data/lib/hooksniff/validation_error.rb +28 -0
- data/lib/hooksniff/version.rb +5 -0
- data/lib/hooksniff/webhook.rb +84 -0
- data/lib/hooksniff.rb +78 -0
- data/test/test_hooksniff.rb +86 -0
- metadata +127 -163
- data/lib/openapi_client/api/admin_api.rb +0 -452
- data/lib/openapi_client/api/alerts_api.rb +0 -322
- data/lib/openapi_client/api/analytics_api.rb +0 -208
- data/lib/openapi_client/api/api_keys_api.rb +0 -252
- data/lib/openapi_client/api/audit_log_api.rb +0 -140
- data/lib/openapi_client/api/auth_api.rb +0 -1080
- data/lib/openapi_client/api/billing_api.rb +0 -500
- data/lib/openapi_client/api/contact_api.rb +0 -88
- data/lib/openapi_client/api/custom_domains_api.rb +0 -253
- data/lib/openapi_client/api/customer_portal_api.rb +0 -700
- data/lib/openapi_client/api/delivery_details_api.rb +0 -146
- data/lib/openapi_client/api/devices_api.rb +0 -202
- data/lib/openapi_client/api/embed_api.rb +0 -128
- data/lib/openapi_client/api/endpoints_api.rb +0 -468
- data/lib/openapi_client/api/events_api.rb +0 -75
- data/lib/openapi_client/api/health_api.rb +0 -193
- data/lib/openapi_client/api/inbound_api.rb +0 -170
- data/lib/openapi_client/api/notifications_api.rb +0 -309
- data/lib/openapi_client/api/o_auth_api.rb +0 -181
- data/lib/openapi_client/api/outbound_ips_api.rb +0 -77
- data/lib/openapi_client/api/playground_api.rb +0 -143
- data/lib/openapi_client/api/rate_limits_api.rb +0 -252
- data/lib/openapi_client/api/routing_api.rb +0 -393
- data/lib/openapi_client/api/schemas_api.rb +0 -268
- data/lib/openapi_client/api/search_api.rb +0 -96
- data/lib/openapi_client/api/simulator_api.rb +0 -82
- data/lib/openapi_client/api/sso_api.rb +0 -241
- data/lib/openapi_client/api/stats_api.rb +0 -77
- data/lib/openapi_client/api/stream_api.rb +0 -88
- data/lib/openapi_client/api/teams_api.rb +0 -476
- data/lib/openapi_client/api/templates_api.rb +0 -213
- data/lib/openapi_client/api/transforms_api.rb +0 -368
- data/lib/openapi_client/api/webhooks_api.rb +0 -534
- data/lib/openapi_client/api_client.rb +0 -397
- data/lib/openapi_client/api_model_base.rb +0 -88
- data/lib/openapi_client/configuration.rb +0 -312
- data/lib/openapi_client/models/admin_revenue_get200_response_inner.rb +0 -165
- data/lib/openapi_client/models/admin_sdk_update_post_request.rb +0 -156
- data/lib/openapi_client/models/admin_users_id_plan_put_request.rb +0 -181
- data/lib/openapi_client/models/admin_users_id_status_put_request.rb +0 -147
- data/lib/openapi_client/models/alert_rule.rb +0 -237
- data/lib/openapi_client/models/api_key_info.rb +0 -185
- data/lib/openapi_client/models/apply_template_request.rb +0 -173
- data/lib/openapi_client/models/apply_template_response.rb +0 -156
- data/lib/openapi_client/models/auth2fa_enable_post200_response.rb +0 -156
- data/lib/openapi_client/models/auth_login_post200_response.rb +0 -104
- data/lib/openapi_client/models/auth_response.rb +0 -167
- data/lib/openapi_client/models/batch_replay_request.rb +0 -166
- data/lib/openapi_client/models/batch_response.rb +0 -160
- data/lib/openapi_client/models/batch_response_errors_inner.rb +0 -156
- data/lib/openapi_client/models/batch_webhook_request.rb +0 -166
- data/lib/openapi_client/models/billing_portal_post200_response.rb +0 -147
- data/lib/openapi_client/models/change_password_request.rb +0 -199
- data/lib/openapi_client/models/change_role_request.rb +0 -188
- data/lib/openapi_client/models/confirm2fa_request.rb +0 -182
- data/lib/openapi_client/models/contact_request.rb +0 -242
- data/lib/openapi_client/models/contact_response.rb +0 -156
- data/lib/openapi_client/models/create_alert_request.rb +0 -277
- data/lib/openapi_client/models/create_api_key_response.rb +0 -175
- data/lib/openapi_client/models/create_endpoint_request.rb +0 -288
- data/lib/openapi_client/models/create_team_request.rb +0 -164
- data/lib/openapi_client/models/create_transform_rule_request.rb +0 -216
- data/lib/openapi_client/models/create_webhook_request.rb +0 -201
- data/lib/openapi_client/models/custom_domains_post_request.rb +0 -147
- data/lib/openapi_client/models/customer_response.rb +0 -256
- data/lib/openapi_client/models/delivery.rb +0 -246
- data/lib/openapi_client/models/delivery_attempt.rb +0 -205
- data/lib/openapi_client/models/delivery_list_response.rb +0 -176
- data/lib/openapi_client/models/delivery_trend_response.rb +0 -158
- data/lib/openapi_client/models/delivery_trend_response_buckets_inner.rb +0 -174
- data/lib/openapi_client/models/device_token_response.rb +0 -174
- data/lib/openapi_client/models/disable2fa_request.rb +0 -164
- data/lib/openapi_client/models/enable2fa_request.rb +0 -164
- data/lib/openapi_client/models/endpoint.rb +0 -321
- data/lib/openapi_client/models/endpoint_health.rb +0 -183
- data/lib/openapi_client/models/endpoints_endpoint_id_transforms_test_post_request.rb +0 -156
- data/lib/openapi_client/models/endpoints_id_rotate_secret_post200_response.rb +0 -156
- data/lib/openapi_client/models/error.rb +0 -165
- data/lib/openapi_client/models/forgot_password_request.rb +0 -164
- data/lib/openapi_client/models/invite_request.rb +0 -207
- data/lib/openapi_client/models/invoice_response.rb +0 -183
- data/lib/openapi_client/models/latency_trend_response.rb +0 -167
- data/lib/openapi_client/models/latency_trend_response_buckets_inner.rb +0 -165
- data/lib/openapi_client/models/login_request.rb +0 -190
- data/lib/openapi_client/models/notification.rb +0 -193
- data/lib/openapi_client/models/notification_list_response.rb +0 -167
- data/lib/openapi_client/models/notification_preferences.rb +0 -201
- data/lib/openapi_client/models/notifications_unread_count_get200_response.rb +0 -147
- data/lib/openapi_client/models/outbound_ips_response.rb +0 -158
- data/lib/openapi_client/models/paginated_users.rb +0 -176
- data/lib/openapi_client/models/playground_get200_response.rb +0 -160
- data/lib/openapi_client/models/portal_notifications_put200_response.rb +0 -156
- data/lib/openapi_client/models/portal_profile.rb +0 -184
- data/lib/openapi_client/models/refresh_token_request.rb +0 -164
- data/lib/openapi_client/models/register_device_request.rb +0 -208
- data/lib/openapi_client/models/register_request.rb +0 -201
- data/lib/openapi_client/models/register_schema_request.rb +0 -191
- data/lib/openapi_client/models/resend_verification_request.rb +0 -164
- data/lib/openapi_client/models/reset_password_request.rb +0 -199
- data/lib/openapi_client/models/retry_policy.rb +0 -216
- data/lib/openapi_client/models/routing_info.rb +0 -193
- data/lib/openapi_client/models/search_result.rb +0 -158
- data/lib/openapi_client/models/simulator_post_request.rb +0 -165
- data/lib/openapi_client/models/sso_config_post_request.rb +0 -190
- data/lib/openapi_client/models/stats_response.rb +0 -210
- data/lib/openapi_client/models/stream_params.rb +0 -201
- data/lib/openapi_client/models/subscription_response.rb +0 -201
- data/lib/openapi_client/models/success_rate_response.rb +0 -183
- data/lib/openapi_client/models/system_stats.rb +0 -185
- data/lib/openapi_client/models/system_stats_plan_breakdown_inner.rb +0 -156
- data/lib/openapi_client/models/system_status.rb +0 -210
- data/lib/openapi_client/models/system_status_components_inner.rb +0 -184
- data/lib/openapi_client/models/team.rb +0 -165
- data/lib/openapi_client/models/team_detail_response.rb +0 -169
- data/lib/openapi_client/models/team_invite.rb +0 -174
- data/lib/openapi_client/models/team_member.rb +0 -193
- data/lib/openapi_client/models/test_webhook_request.rb +0 -199
- data/lib/openapi_client/models/test_webhook_response.rb +0 -174
- data/lib/openapi_client/models/transform_rule.rb +0 -201
- data/lib/openapi_client/models/two_factor_required_response.rb +0 -165
- data/lib/openapi_client/models/update_endpoint_request.rb +0 -278
- data/lib/openapi_client/models/update_notification_preferences.rb +0 -195
- data/lib/openapi_client/models/update_profile_request.rb +0 -190
- data/lib/openapi_client/models/update_routing_request.rb +0 -190
- data/lib/openapi_client/models/upgrade_request.rb +0 -209
- data/lib/openapi_client/models/upgrade_response.rb +0 -166
- data/lib/openapi_client/models/usage_response.rb +0 -201
- data/lib/openapi_client/models/user_summary.rb +0 -193
- data/lib/openapi_client/models/validate_event_request.rb +0 -164
- data/lib/openapi_client/models/verify2fa_request.rb +0 -208
- data/lib/openapi_client/models/verify_email_request.rb +0 -164
- data/lib/openapi_client/models/webhook_template.rb +0 -183
- data/lib/openapi_client/version.rb +0 -15
- data/lib/openapi_client.rb +0 -169
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
# Sent when an endpoint is created, updated, or deleted
|
|
7
|
+
class EndpointDeletedEventData
|
|
8
|
+
# The Application's ID.
|
|
9
|
+
attr_accessor :app_id
|
|
10
|
+
# The Application's UID.
|
|
11
|
+
attr_accessor :app_uid
|
|
12
|
+
# The Endpoint's ID.
|
|
13
|
+
attr_accessor :endpoint_id
|
|
14
|
+
# The Endpoint's UID.
|
|
15
|
+
attr_accessor :endpoint_uid
|
|
16
|
+
|
|
17
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
|
18
|
+
private_constant :ALL_FIELD
|
|
19
|
+
|
|
20
|
+
def initialize(attributes = {})
|
|
21
|
+
unless attributes.is_a?(Hash)
|
|
22
|
+
fail(
|
|
23
|
+
ArgumentError,
|
|
24
|
+
"The input argument (attributes) must be a hash in `HookSniff::EndpointDeletedEventData` new method"
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
attributes.each do |k, v|
|
|
29
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
30
|
+
fail(ArgumentError, "The field #{k} is not part of HookSniff::EndpointDeletedEventData")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
instance_variable_set("@#{k}", v)
|
|
34
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.deserialize(attributes = {})
|
|
39
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
40
|
+
attrs = Hash.new
|
|
41
|
+
attrs["app_id"] = attributes["appId"]
|
|
42
|
+
attrs["app_uid"] = attributes["appUid"]
|
|
43
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
|
44
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
|
45
|
+
new(attrs)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def serialize
|
|
49
|
+
out = Hash.new
|
|
50
|
+
out["appId"] = HookSniff::serialize_primitive(@app_id) if @app_id
|
|
51
|
+
out["appUid"] = HookSniff::serialize_primitive(@app_uid) if @app_uid
|
|
52
|
+
out["endpointId"] = HookSniff::serialize_primitive(@endpoint_id) if @endpoint_id
|
|
53
|
+
out["endpointUid"] = HookSniff::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
|
54
|
+
out
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Serializes the object to a json string
|
|
58
|
+
# @return String
|
|
59
|
+
def to_json
|
|
60
|
+
JSON.dump(serialize)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
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 `HookSniff::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 HookSniff::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"] = HookSniff::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"] = HookSniff::serialize_schema_ref(@data) if @data
|
|
43
|
+
out["type"] = HookSniff::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,69 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
# Sent when an endpoint has been automatically disabled after continuous failures, or manually via an API call.
|
|
7
|
+
class EndpointDisabledEventData
|
|
8
|
+
# The Application's ID.
|
|
9
|
+
attr_accessor :app_id
|
|
10
|
+
# The Application's UID.
|
|
11
|
+
attr_accessor :app_uid
|
|
12
|
+
# The Endpoint's ID.
|
|
13
|
+
attr_accessor :endpoint_id
|
|
14
|
+
# The Endpoint's UID.
|
|
15
|
+
attr_accessor :endpoint_uid
|
|
16
|
+
attr_accessor :fail_since
|
|
17
|
+
attr_accessor :trigger
|
|
18
|
+
|
|
19
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid", "fail_since", "trigger"].freeze
|
|
20
|
+
private_constant :ALL_FIELD
|
|
21
|
+
|
|
22
|
+
def initialize(attributes = {})
|
|
23
|
+
unless attributes.is_a?(Hash)
|
|
24
|
+
fail(
|
|
25
|
+
ArgumentError,
|
|
26
|
+
"The input argument (attributes) must be a hash in `HookSniff::EndpointDisabledEventData` new method"
|
|
27
|
+
)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
attributes.each do |k, v|
|
|
31
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
32
|
+
fail(ArgumentError, "The field #{k} is not part of HookSniff::EndpointDisabledEventData")
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
instance_variable_set("@#{k}", v)
|
|
36
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def self.deserialize(attributes = {})
|
|
41
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
42
|
+
attrs = Hash.new
|
|
43
|
+
attrs["app_id"] = attributes["appId"]
|
|
44
|
+
attrs["app_uid"] = attributes["appUid"]
|
|
45
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
|
46
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
|
47
|
+
attrs["fail_since"] = DateTime.rfc3339(attributes["failSince"]).to_time if attributes["failSince"]
|
|
48
|
+
attrs["trigger"] = HookSniff::EndpointDisabledTrigger.deserialize(attributes["trigger"]) if attributes["trigger"]
|
|
49
|
+
new(attrs)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def serialize
|
|
53
|
+
out = Hash.new
|
|
54
|
+
out["appId"] = HookSniff::serialize_primitive(@app_id) if @app_id
|
|
55
|
+
out["appUid"] = HookSniff::serialize_primitive(@app_uid) if @app_uid
|
|
56
|
+
out["endpointId"] = HookSniff::serialize_primitive(@endpoint_id) if @endpoint_id
|
|
57
|
+
out["endpointUid"] = HookSniff::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
|
58
|
+
out["failSince"] = HookSniff::serialize_primitive(@fail_since) if @fail_since
|
|
59
|
+
out["trigger"] = HookSniff::serialize_schema_ref(@trigger) if @trigger
|
|
60
|
+
out
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Serializes the object to a json string
|
|
64
|
+
# @return String
|
|
65
|
+
def to_json
|
|
66
|
+
JSON.dump(serialize)
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
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 `HookSniff::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 HookSniff::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"] = HookSniff::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"] = HookSniff::serialize_schema_ref(@data) if @data
|
|
40
|
+
out["type"] = HookSniff::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,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
# Sent when an endpoint has been enabled.
|
|
7
|
+
class EndpointEnabledEventData
|
|
8
|
+
# The Application's ID.
|
|
9
|
+
attr_accessor :app_id
|
|
10
|
+
# The Application's UID.
|
|
11
|
+
attr_accessor :app_uid
|
|
12
|
+
# The Endpoint's ID.
|
|
13
|
+
attr_accessor :endpoint_id
|
|
14
|
+
# The Endpoint's UID.
|
|
15
|
+
attr_accessor :endpoint_uid
|
|
16
|
+
|
|
17
|
+
ALL_FIELD ||= ["app_id", "app_uid", "endpoint_id", "endpoint_uid"].freeze
|
|
18
|
+
private_constant :ALL_FIELD
|
|
19
|
+
|
|
20
|
+
def initialize(attributes = {})
|
|
21
|
+
unless attributes.is_a?(Hash)
|
|
22
|
+
fail(
|
|
23
|
+
ArgumentError,
|
|
24
|
+
"The input argument (attributes) must be a hash in `HookSniff::EndpointEnabledEventData` new method"
|
|
25
|
+
)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
attributes.each do |k, v|
|
|
29
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
30
|
+
fail(ArgumentError, "The field #{k} is not part of HookSniff::EndpointEnabledEventData")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
instance_variable_set("@#{k}", v)
|
|
34
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.deserialize(attributes = {})
|
|
39
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
40
|
+
attrs = Hash.new
|
|
41
|
+
attrs["app_id"] = attributes["appId"]
|
|
42
|
+
attrs["app_uid"] = attributes["appUid"]
|
|
43
|
+
attrs["endpoint_id"] = attributes["endpointId"]
|
|
44
|
+
attrs["endpoint_uid"] = attributes["endpointUid"]
|
|
45
|
+
new(attrs)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def serialize
|
|
49
|
+
out = Hash.new
|
|
50
|
+
out["appId"] = HookSniff::serialize_primitive(@app_id) if @app_id
|
|
51
|
+
out["appUid"] = HookSniff::serialize_primitive(@app_uid) if @app_uid
|
|
52
|
+
out["endpointId"] = HookSniff::serialize_primitive(@endpoint_id) if @endpoint_id
|
|
53
|
+
out["endpointUid"] = HookSniff::serialize_primitive(@endpoint_uid) if @endpoint_uid
|
|
54
|
+
out
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Serializes the object to a json string
|
|
58
|
+
# @return String
|
|
59
|
+
def to_json
|
|
60
|
+
JSON.dump(serialize)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
class EndpointHeadersIn
|
|
7
|
+
attr_accessor :headers
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["headers"].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 `HookSniff::EndpointHeadersIn` 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 HookSniff::EndpointHeadersIn")
|
|
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["headers"] = attributes["headers"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["headers"] = HookSniff::serialize_primitive(@headers) if @headers
|
|
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,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
# The value of the headers is returned in the `headers` field.
|
|
7
|
+
#
|
|
8
|
+
# Sensitive headers that have been redacted are returned in the sensitive field.
|
|
9
|
+
class EndpointHeadersOut
|
|
10
|
+
attr_accessor :headers
|
|
11
|
+
attr_accessor :sensitive
|
|
12
|
+
|
|
13
|
+
ALL_FIELD ||= ["headers", "sensitive"].freeze
|
|
14
|
+
private_constant :ALL_FIELD
|
|
15
|
+
|
|
16
|
+
def initialize(attributes = {})
|
|
17
|
+
unless attributes.is_a?(Hash)
|
|
18
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `HookSniff::EndpointHeadersOut` new method")
|
|
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 HookSniff::EndpointHeadersOut")
|
|
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["headers"] = attributes["headers"]
|
|
35
|
+
attrs["sensitive"] = attributes["sensitive"]
|
|
36
|
+
new(attrs)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def serialize
|
|
40
|
+
out = Hash.new
|
|
41
|
+
out["headers"] = HookSniff::serialize_primitive(@headers) if @headers
|
|
42
|
+
out["sensitive"] = HookSniff::serialize_primitive(@sensitive) if @sensitive
|
|
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,53 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
class EndpointHeadersPatchIn
|
|
7
|
+
# A list of headers be be removed
|
|
8
|
+
attr_accessor :delete_headers
|
|
9
|
+
attr_accessor :headers
|
|
10
|
+
|
|
11
|
+
ALL_FIELD ||= ["delete_headers", "headers"].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 `HookSniff::EndpointHeadersPatchIn` 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 HookSniff::EndpointHeadersPatchIn")
|
|
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["delete_headers"] = attributes["deleteHeaders"]
|
|
36
|
+
attrs["headers"] = attributes["headers"]
|
|
37
|
+
new(attrs)
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def serialize
|
|
41
|
+
out = Hash.new
|
|
42
|
+
out["deleteHeaders"] = HookSniff::serialize_primitive(@delete_headers) if @delete_headers
|
|
43
|
+
out["headers"] = HookSniff::serialize_primitive(@headers) if @headers
|
|
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,102 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
class EndpointIn
|
|
7
|
+
# List of message channels this endpoint listens to (omit for all).
|
|
8
|
+
attr_accessor :channels
|
|
9
|
+
attr_accessor :description
|
|
10
|
+
attr_accessor :disabled
|
|
11
|
+
attr_accessor :filter_types
|
|
12
|
+
attr_accessor :headers
|
|
13
|
+
attr_accessor :metadata
|
|
14
|
+
# Deprecated, use `throttleRate` instead.
|
|
15
|
+
attr_accessor :rate_limit
|
|
16
|
+
# The endpoint's verification secret.
|
|
17
|
+
#
|
|
18
|
+
# Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
|
|
19
|
+
# It is recommended to not set this and let the server generate the secret.
|
|
20
|
+
attr_accessor :secret
|
|
21
|
+
# Maximum messages per second to send to this endpoint.
|
|
22
|
+
#
|
|
23
|
+
# Outgoing messages will be throttled to this rate.
|
|
24
|
+
attr_accessor :throttle_rate
|
|
25
|
+
# Optional unique identifier for the endpoint.
|
|
26
|
+
attr_accessor :uid
|
|
27
|
+
attr_accessor :url
|
|
28
|
+
attr_accessor :version
|
|
29
|
+
|
|
30
|
+
ALL_FIELD ||= [
|
|
31
|
+
"channels",
|
|
32
|
+
"description",
|
|
33
|
+
"disabled",
|
|
34
|
+
"filter_types",
|
|
35
|
+
"headers",
|
|
36
|
+
"metadata",
|
|
37
|
+
"rate_limit",
|
|
38
|
+
"secret",
|
|
39
|
+
"throttle_rate",
|
|
40
|
+
"uid",
|
|
41
|
+
"url",
|
|
42
|
+
"version"
|
|
43
|
+
].freeze
|
|
44
|
+
private_constant :ALL_FIELD
|
|
45
|
+
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
unless attributes.is_a?(Hash)
|
|
48
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `HookSniff::EndpointIn` new method")
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
attributes.each do |k, v|
|
|
52
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
53
|
+
fail(ArgumentError, "The field #{k} is not part of HookSniff::EndpointIn")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
instance_variable_set("@#{k}", v)
|
|
57
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def self.deserialize(attributes = {})
|
|
62
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
63
|
+
attrs = Hash.new
|
|
64
|
+
attrs["channels"] = attributes["channels"]
|
|
65
|
+
attrs["description"] = attributes["description"]
|
|
66
|
+
attrs["disabled"] = attributes["disabled"]
|
|
67
|
+
attrs["filter_types"] = attributes["filterTypes"]
|
|
68
|
+
attrs["headers"] = attributes["headers"]
|
|
69
|
+
attrs["metadata"] = attributes["metadata"]
|
|
70
|
+
attrs["rate_limit"] = attributes["rateLimit"]
|
|
71
|
+
attrs["secret"] = attributes["secret"]
|
|
72
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
73
|
+
attrs["uid"] = attributes["uid"]
|
|
74
|
+
attrs["url"] = attributes["url"]
|
|
75
|
+
attrs["version"] = attributes["version"]
|
|
76
|
+
new(attrs)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def serialize
|
|
80
|
+
out = Hash.new
|
|
81
|
+
out["channels"] = HookSniff::serialize_primitive(@channels) if @channels
|
|
82
|
+
out["description"] = HookSniff::serialize_primitive(@description) if @description
|
|
83
|
+
out["disabled"] = HookSniff::serialize_primitive(@disabled) if @disabled
|
|
84
|
+
out["filterTypes"] = HookSniff::serialize_primitive(@filter_types) if @filter_types
|
|
85
|
+
out["headers"] = HookSniff::serialize_primitive(@headers) if @headers
|
|
86
|
+
out["metadata"] = HookSniff::serialize_primitive(@metadata) if @metadata
|
|
87
|
+
out["rateLimit"] = HookSniff::serialize_primitive(@rate_limit) if @rate_limit
|
|
88
|
+
out["secret"] = HookSniff::serialize_primitive(@secret) if @secret
|
|
89
|
+
out["throttleRate"] = HookSniff::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
90
|
+
out["uid"] = HookSniff::serialize_primitive(@uid) if @uid
|
|
91
|
+
out["url"] = HookSniff::serialize_primitive(@url) if @url
|
|
92
|
+
out["version"] = HookSniff::serialize_primitive(@version) if @version
|
|
93
|
+
out
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Serializes the object to a json string
|
|
97
|
+
# @return String
|
|
98
|
+
def to_json
|
|
99
|
+
JSON.dump(serialize)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module HookSniff
|
|
6
|
+
class EndpointOut
|
|
7
|
+
# List of message channels this endpoint listens to (omit for all).
|
|
8
|
+
attr_accessor :channels
|
|
9
|
+
attr_accessor :created_at
|
|
10
|
+
# An example endpoint name.
|
|
11
|
+
attr_accessor :description
|
|
12
|
+
attr_accessor :disabled
|
|
13
|
+
attr_accessor :filter_types
|
|
14
|
+
# The Endpoint's ID.
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
attr_accessor :metadata
|
|
17
|
+
# Deprecated, use `throttleRate` instead.
|
|
18
|
+
attr_accessor :rate_limit
|
|
19
|
+
# Maximum messages per second to send to this endpoint.
|
|
20
|
+
#
|
|
21
|
+
# Outgoing messages will be throttled to this rate.
|
|
22
|
+
attr_accessor :throttle_rate
|
|
23
|
+
# Optional unique identifier for the endpoint.
|
|
24
|
+
attr_accessor :uid
|
|
25
|
+
attr_accessor :updated_at
|
|
26
|
+
attr_accessor :url
|
|
27
|
+
attr_accessor :version
|
|
28
|
+
|
|
29
|
+
ALL_FIELD ||= [
|
|
30
|
+
"channels",
|
|
31
|
+
"created_at",
|
|
32
|
+
"description",
|
|
33
|
+
"disabled",
|
|
34
|
+
"filter_types",
|
|
35
|
+
"id",
|
|
36
|
+
"metadata",
|
|
37
|
+
"rate_limit",
|
|
38
|
+
"throttle_rate",
|
|
39
|
+
"uid",
|
|
40
|
+
"updated_at",
|
|
41
|
+
"url",
|
|
42
|
+
"version"
|
|
43
|
+
].freeze
|
|
44
|
+
private_constant :ALL_FIELD
|
|
45
|
+
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
unless attributes.is_a?(Hash)
|
|
48
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `HookSniff::EndpointOut` new method")
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
attributes.each do |k, v|
|
|
52
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
53
|
+
fail(ArgumentError, "The field #{k} is not part of HookSniff::EndpointOut")
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
instance_variable_set("@#{k}", v)
|
|
57
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def self.deserialize(attributes = {})
|
|
62
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
63
|
+
attrs = Hash.new
|
|
64
|
+
attrs["channels"] = attributes["channels"]
|
|
65
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
|
66
|
+
attrs["description"] = attributes["description"]
|
|
67
|
+
attrs["disabled"] = attributes["disabled"]
|
|
68
|
+
attrs["filter_types"] = attributes["filterTypes"]
|
|
69
|
+
attrs["id"] = attributes["id"]
|
|
70
|
+
attrs["metadata"] = attributes["metadata"]
|
|
71
|
+
attrs["rate_limit"] = attributes["rateLimit"]
|
|
72
|
+
attrs["throttle_rate"] = attributes["throttleRate"]
|
|
73
|
+
attrs["uid"] = attributes["uid"]
|
|
74
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
|
75
|
+
attrs["url"] = attributes["url"]
|
|
76
|
+
attrs["version"] = attributes["version"]
|
|
77
|
+
new(attrs)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def serialize
|
|
81
|
+
out = Hash.new
|
|
82
|
+
out["channels"] = HookSniff::serialize_primitive(@channels) if @channels
|
|
83
|
+
out["createdAt"] = HookSniff::serialize_primitive(@created_at) if @created_at
|
|
84
|
+
out["description"] = HookSniff::serialize_primitive(@description) if @description
|
|
85
|
+
out["disabled"] = HookSniff::serialize_primitive(@disabled) if @disabled
|
|
86
|
+
out["filterTypes"] = HookSniff::serialize_primitive(@filter_types) if @filter_types
|
|
87
|
+
out["id"] = HookSniff::serialize_primitive(@id) if @id
|
|
88
|
+
out["metadata"] = HookSniff::serialize_primitive(@metadata) if @metadata
|
|
89
|
+
out["rateLimit"] = HookSniff::serialize_primitive(@rate_limit) if @rate_limit
|
|
90
|
+
out["throttleRate"] = HookSniff::serialize_primitive(@throttle_rate) if @throttle_rate
|
|
91
|
+
out["uid"] = HookSniff::serialize_primitive(@uid) if @uid
|
|
92
|
+
out["updatedAt"] = HookSniff::serialize_primitive(@updated_at) if @updated_at
|
|
93
|
+
out["url"] = HookSniff::serialize_primitive(@url) if @url
|
|
94
|
+
out["version"] = HookSniff::serialize_primitive(@version) if @version
|
|
95
|
+
out
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Serializes the object to a json string
|
|
99
|
+
# @return String
|
|
100
|
+
def to_json
|
|
101
|
+
JSON.dump(serialize)
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|