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