Class: Svix::IngestEndpointUpsertIn
- Inherits:
-
Object
- Object
- Svix::IngestEndpointUpsertIn
- Defined in:
- lib/svix/models/ingest_endpoint_upsert_in.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#throttle_rate ⇒ Object
Maximum messages per second to send to this endpoint.
-
#uid ⇒ Object
Optional unique identifier for the endpoint.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ IngestEndpointUpsertIn
constructor
A new instance of IngestEndpointUpsertIn.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ IngestEndpointUpsertIn
Returns a new instance of IngestEndpointUpsertIn.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 21 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::IngestEndpointUpsertIn` 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::IngestEndpointUpsertIn") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
8 9 10 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 8 def description @description end |
#disabled ⇒ Object
Returns the value of attribute disabled.
15 16 17 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 15 def disabled @disabled end |
#metadata ⇒ Object
Returns the value of attribute metadata.
16 17 18 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 16 def @metadata end |
#throttle_rate ⇒ Object
Maximum messages per second to send to this endpoint.
Outgoing messages will be throttled to this rate.
12 13 14 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 12 def throttle_rate @throttle_rate end |
#uid ⇒ Object
Optional unique identifier for the endpoint.
14 15 16 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 14 def uid @uid end |
#url ⇒ Object
Returns the value of attribute url.
7 8 9 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 7 def url @url end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 39 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["url"] = attributes["url"] attrs["description"] = attributes["description"] attrs["throttle_rate"] = attributes["throttleRate"] attrs["uid"] = attributes["uid"] attrs["disabled"] = attributes["disabled"] attrs["metadata"] = attributes["metadata"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 51 def serialize out = Hash.new out["url"] = Svix::serialize_primitive(@url) if @url out["description"] = Svix::serialize_primitive(@description) if @description out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @throttle_rate out["uid"] = Svix::serialize_primitive(@uid) if @uid out["disabled"] = Svix::serialize_primitive(@disabled) if @disabled out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata out end |
#to_json ⇒ Object
Serializes the object to a json string
64 65 66 |
# File 'lib/svix/models/ingest_endpoint_upsert_in.rb', line 64 def to_json JSON.dump(serialize) end |