Class: Svix::IngestSourceConsumerPortalAccessIn
- Inherits:
-
Object
- Object
- Svix::IngestSourceConsumerPortalAccessIn
- Defined in:
- lib/svix/models/ingest_source_consumer_portal_access_in.rb
Instance Attribute Summary collapse
-
#expiry ⇒ Object
How long the token will be valid for, in seconds.
-
#read_only ⇒ Object
Whether the app portal should be in read-only mode.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ IngestSourceConsumerPortalAccessIn
constructor
A new instance of IngestSourceConsumerPortalAccessIn.
- #serialize ⇒ Object
-
#to_json ⇒ Object
Serializes the object to a json string.
Constructor Details
#initialize(attributes = {}) ⇒ IngestSourceConsumerPortalAccessIn
Returns a new instance of IngestSourceConsumerPortalAccessIn.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 17 def initialize(attributes = {}) unless attributes.is_a?(Hash) fail( ArgumentError, "The input argument (attributes) must be a hash in `Svix::IngestSourceConsumerPortalAccessIn` 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::IngestSourceConsumerPortalAccessIn") end instance_variable_set("@#{k}", v) instance_variable_set("@__#{k}_is_defined", true) end end |
Instance Attribute Details
#expiry ⇒ Object
How long the token will be valid for, in seconds.
Valid values are between 1 hour and 7 days. The default is 7 days.
10 11 12 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 10 def expiry @expiry end |
#read_only ⇒ Object
Whether the app portal should be in read-only mode.
12 13 14 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 12 def read_only @read_only end |
Class Method Details
.deserialize(attributes = {}) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 35 def self.deserialize(attributes = {}) attributes = attributes.transform_keys(&:to_s) attrs = Hash.new attrs["expiry"] = attributes["expiry"] attrs["read_only"] = attributes["readOnly"] new(attrs) end |
Instance Method Details
#serialize ⇒ Object
43 44 45 46 47 48 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 43 def serialize out = Hash.new out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry out["readOnly"] = Svix::serialize_primitive(@read_only) if @read_only out end |
#to_json ⇒ Object
Serializes the object to a json string
52 53 54 |
# File 'lib/svix/models/ingest_source_consumer_portal_access_in.rb', line 52 def to_json JSON.dump(serialize) end |