Class: Svix::EndpointPatch
- Inherits:
-
Object
- Object
- Svix::EndpointPatch
- Defined in:
- lib/svix/models/endpoint_patch.rb
Instance Attribute Summary collapse
-
#channels ⇒ Object
Returns the value of attribute channels.
-
#description ⇒ Object
Returns the value of attribute description.
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#filter_types ⇒ Object
Returns the value of attribute filter_types.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
-
#secret ⇒ Object
The endpoint’s verification secret.
-
#uid ⇒ Object
The Endpoint’s UID.
-
#url ⇒ Object
Returns the value of attribute url.
-
#version ⇒ Object
Returns the value of attribute version.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ EndpointPatch
constructor
A new instance of EndpointPatch.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ EndpointPatch
Returns a new instance of EndpointPatch.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/svix/models/endpoint_patch.rb', line 37 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointPatch` new method") end attributes.each do |k, v| unless ALL_FIELD.include?(k.to_s) fail(ArgumentError, "The field #{k} is not part of Svix::EndpointPatch") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#channels ⇒ Object
Returns the value of attribute channels.
7 8 9 |
# File 'lib/svix/models/endpoint_patch.rb', line 7 def channels @channels end |
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/svix/models/endpoint_patch.rb', line 8 def description @description end |
#disabled ⇒ Object
Returns the value of attribute disabled.
9 10 11 |
# File 'lib/svix/models/endpoint_patch.rb', line 9 def disabled @disabled end |
#filter_types ⇒ Object
Returns the value of attribute filter_types.
10 11 12 |
# File 'lib/svix/models/endpoint_patch.rb', line 10 def filter_types @filter_types end |
#metadata ⇒ Object
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/svix/models/endpoint_patch.rb', line 11 def end |
#rate_limit ⇒ Object
Returns the value of attribute rate_limit.
12 13 14 |
# File 'lib/svix/models/endpoint_patch.rb', line 12 def rate_limit @rate_limit end |
#secret ⇒ Object
The endpoint’s verification secret.
Format: ‘base64` encoded random bytes optionally prefixed with `whsec_`. It is recommended to not set this and let the server generate the secret.
17 18 19 |
# File 'lib/svix/models/endpoint_patch.rb', line 17 def secret @secret end |
#uid ⇒ Object
The Endpoint’s UID.
19 20 21 |
# File 'lib/svix/models/endpoint_patch.rb', line 19 def uid @uid end |
#url ⇒ Object
Returns the value of attribute url.
20 21 22 |
# File 'lib/svix/models/endpoint_patch.rb', line 20 def url @url end |
#version ⇒ Object
Returns the value of attribute version.
21 22 23 |
# File 'lib/svix/models/endpoint_patch.rb', line 21 def version @version end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/svix/models/endpoint_patch.rb', line 52 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["channels"] = attributes["channels"] attrs["description"] = attributes["description"] attrs["disabled"] = attributes["disabled"] attrs["filter_types"] = attributes["filterTypes"] attrs["metadata"] = attributes["metadata"] attrs["rate_limit"] = attributes["rateLimit"] attrs["secret"] = attributes["secret"] attrs["uid"] = attributes["uid"] attrs["url"] = attributes["url"] attrs["version"] = attributes["version"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/svix/models/endpoint_patch.rb', line 68 def serialize out = Hash.new out["channels"] = Svix::serialize_primitive(@channels) if @__channels_is_defined out["description"] = Svix::serialize_primitive(@description) if @description out["disabled"] = Svix::serialize_primitive(@disabled) if @disabled out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @__filter_types_is_defined out["metadata"] = Svix::serialize_primitive() if out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @__rate_limit_is_defined out["secret"] = Svix::serialize_primitive(@secret) if @__secret_is_defined out["uid"] = Svix::serialize_primitive(@uid) if @__uid_is_defined out["url"] = Svix::serialize_primitive(@url) if @url out["version"] = Svix::serialize_primitive(@version) if @version out end |
#to_json ⇒ Object
Serializes the object to a json string
85 86 87 |
# File 'lib/svix/models/endpoint_patch.rb', line 85 def to_json JSON.dump(serialize) end |