Class: Svix::ConnectorOut
- Inherits:
-
Object
- Object
- Svix::ConnectorOut
- Defined in:
- lib/svix/models/connector_out.rb
Instance Attribute Summary collapse
-
#allowed_event_types ⇒ Object
Returns the value of attribute allowed_event_types.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
-
#id ⇒ Object
The Connector’s ID.
-
#instructions ⇒ Object
Returns the value of attribute instructions.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#logo ⇒ Object
Returns the value of attribute logo.
-
#name ⇒ Object
Returns the value of attribute name.
-
#org_id ⇒ Object
The Environment’s ID.
-
#product_type ⇒ Object
Returns the value of attribute product_type.
-
#transformation ⇒ Object
Returns the value of attribute transformation.
-
#uid ⇒ Object
The Connector’s UID.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ConnectorOut
constructor
A new instance of ConnectorOut.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ ConnectorOut
Returns a new instance of ConnectorOut.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/svix/models/connector_out.rb', line 43 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ConnectorOut` 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::ConnectorOut") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#allowed_event_types ⇒ Object
Returns the value of attribute allowed_event_types.
7 8 9 |
# File 'lib/svix/models/connector_out.rb', line 7 def allowed_event_types @allowed_event_types end |
#created_at ⇒ Object
Returns the value of attribute created_at.
8 9 10 |
# File 'lib/svix/models/connector_out.rb', line 8 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
9 10 11 |
# File 'lib/svix/models/connector_out.rb', line 9 def description @description end |
#feature_flags ⇒ Object
Returns the value of attribute feature_flags.
10 11 12 |
# File 'lib/svix/models/connector_out.rb', line 10 def feature_flags @feature_flags end |
#id ⇒ Object
The Connector’s ID.
12 13 14 |
# File 'lib/svix/models/connector_out.rb', line 12 def id @id end |
#instructions ⇒ Object
Returns the value of attribute instructions.
13 14 15 |
# File 'lib/svix/models/connector_out.rb', line 13 def instructions @instructions end |
#kind ⇒ Object
Returns the value of attribute kind.
14 15 16 |
# File 'lib/svix/models/connector_out.rb', line 14 def kind @kind end |
#logo ⇒ Object
Returns the value of attribute logo.
15 16 17 |
# File 'lib/svix/models/connector_out.rb', line 15 def logo @logo end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/svix/models/connector_out.rb', line 16 def name @name end |
#org_id ⇒ Object
The Environment’s ID.
18 19 20 |
# File 'lib/svix/models/connector_out.rb', line 18 def org_id @org_id end |
#product_type ⇒ Object
Returns the value of attribute product_type.
19 20 21 |
# File 'lib/svix/models/connector_out.rb', line 19 def product_type @product_type end |
#transformation ⇒ Object
Returns the value of attribute transformation.
20 21 22 |
# File 'lib/svix/models/connector_out.rb', line 20 def transformation @transformation end |
#uid ⇒ Object
The Connector’s UID.
22 23 24 |
# File 'lib/svix/models/connector_out.rb', line 22 def uid @uid end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
23 24 25 |
# File 'lib/svix/models/connector_out.rb', line 23 def updated_at @updated_at end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/svix/models/connector_out.rb', line 58 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["allowed_event_types"] = attributes["allowedEventTypes"] attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time attrs["description"] = attributes["description"] attrs["feature_flags"] = attributes["featureFlags"] attrs["id"] = attributes["id"] attrs["instructions"] = attributes["instructions"] attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"]) attrs["logo"] = attributes["logo"] attrs["name"] = attributes["name"] attrs["org_id"] = attributes["orgId"] attrs["product_type"] = Svix::ConnectorProduct.deserialize(attributes["productType"]) attrs["transformation"] = attributes["transformation"] attrs["uid"] = attributes["uid"] attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time new(attrs) end |
Instance Method Details
#serialize ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/svix/models/connector_out.rb', line 78 def serialize out = Hash.new out["allowedEventTypes"] = Svix::serialize_primitive(@allowed_event_types) if @allowed_event_types out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at out["description"] = Svix::serialize_primitive(@description) if @description out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags out["id"] = Svix::serialize_primitive(@id) if @id out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions out["kind"] = Svix::serialize_schema_ref(@kind) if @kind out["logo"] = Svix::serialize_primitive(@logo) if @logo out["name"] = Svix::serialize_primitive(@name) if @name out["orgId"] = Svix::serialize_primitive(@org_id) if @org_id out["productType"] = Svix::serialize_schema_ref(@product_type) if @product_type out["transformation"] = Svix::serialize_primitive(@transformation) if @transformation out["uid"] = Svix::serialize_primitive(@uid) if @uid out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at out end |
#to_json ⇒ Object
Serializes the object to a json string
99 100 101 |
# File 'lib/svix/models/connector_out.rb', line 99 def to_json JSON.dump(serialize) end |