Class: Svix::IngestEndpointHeadersOut
- Inherits:
-
Object
- Object
- Svix::IngestEndpointHeadersOut
- Defined in:
- lib/svix/models/ingest_endpoint_headers_out.rb
Instance Attribute Summary collapse
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#sensitive ⇒ Object
Returns the value of attribute sensitive.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ IngestEndpointHeadersOut
constructor
A new instance of IngestEndpointHeadersOut.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ IngestEndpointHeadersOut
Returns a new instance of IngestEndpointHeadersOut.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 13 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::IngestEndpointHeadersOut` 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::IngestEndpointHeadersOut") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#headers ⇒ Object
Returns the value of attribute headers.
7 8 9 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 7 def headers @headers end |
#sensitive ⇒ Object
Returns the value of attribute sensitive.
8 9 10 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 8 def sensitive @sensitive end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 31 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["headers"] = attributes["headers"] attrs["sensitive"] = attributes["sensitive"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
39 40 41 42 43 44 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 39 def serialize out = Hash.new out["headers"] = Svix::serialize_primitive(@headers) if @headers out["sensitive"] = Svix::serialize_primitive(@sensitive) if @sensitive out end |
#to_json ⇒ Object
Serializes the object to a json string
48 49 50 |
# File 'lib/svix/models/ingest_endpoint_headers_out.rb', line 48 def to_json JSON.dump(serialize) end |