Class: MistApi::ConstWebhookTopic
- Defined in:
- lib/mist_api/models/const_webhook_topic.rb
Overview
ConstWebhookTopic Model.
Instance Attribute Summary collapse
-
#allows_single_event_per_message ⇒ TrueClass | FalseClass
supports single event per message results.
-
#for_org ⇒ TrueClass | FalseClass
Can be used in org webhooks, optional.
-
#has_delivery_results ⇒ TrueClass | FalseClass
Supports webhook delivery results /api/v1/:scope/:scope_id/webhooks/:webhook_id/events/search.
-
#internal ⇒ TrueClass | FalseClass
Internal topic (not selectable in site/org webhooks).
-
#key ⇒ String
Webhook topic name.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(allows_single_event_per_message = SKIP, for_org = SKIP, has_delivery_results = SKIP, internal = SKIP, key = SKIP) ⇒ ConstWebhookTopic
constructor
A new instance of ConstWebhookTopic.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(allows_single_event_per_message = SKIP, for_org = SKIP, has_delivery_results = SKIP, internal = SKIP, key = SKIP) ⇒ ConstWebhookTopic
Returns a new instance of ConstWebhookTopic.
61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 61 def initialize( = SKIP, for_org = SKIP, has_delivery_results = SKIP, internal = SKIP, key = SKIP) unless == SKIP @allows_single_event_per_message = end @for_org = for_org unless for_org == SKIP @has_delivery_results = has_delivery_results unless has_delivery_results == SKIP @internal = internal unless internal == SKIP @key = key unless key == SKIP end |
Instance Attribute Details
#allows_single_event_per_message ⇒ TrueClass | FalseClass
supports single event per message results
14 15 16 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 14 def @allows_single_event_per_message end |
#for_org ⇒ TrueClass | FalseClass
Can be used in org webhooks, optional
18 19 20 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 18 def for_org @for_org end |
#has_delivery_results ⇒ TrueClass | FalseClass
Supports webhook delivery results /api/v1/:scope/:scope_id/webhooks/:webhook_id/events/search
23 24 25 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 23 def has_delivery_results @has_delivery_results end |
#internal ⇒ TrueClass | FalseClass
Internal topic (not selectable in site/org webhooks)
27 28 29 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 27 def internal @internal end |
#key ⇒ String
Webhook topic name
31 32 33 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 31 def key @key end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. = hash.key?('allows_single_event_per_message') ? hash['allows_single_event_per_message'] : SKIP for_org = hash.key?('for_org') ? hash['for_org'] : SKIP has_delivery_results = hash.key?('has_delivery_results') ? hash['has_delivery_results'] : SKIP internal = hash.key?('internal') ? hash['internal'] : SKIP key = hash.key?('key') ? hash['key'] : SKIP # Create object from extracted values. ConstWebhookTopic.new(, for_org, has_delivery_results, internal, key) end |
.names ⇒ Object
A mapping from model property names to API property names.
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 34 def self.names @_hash = {} if @_hash.nil? @_hash['allows_single_event_per_message'] = 'allows_single_event_per_message' @_hash['for_org'] = 'for_org' @_hash['has_delivery_results'] = 'has_delivery_results' @_hash['internal'] = 'internal' @_hash['key'] = 'key' @_hash end |
.nullables ⇒ Object
An array for nullable fields
57 58 59 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 57 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
46 47 48 49 50 51 52 53 54 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 46 def self.optionals %w[ allows_single_event_per_message for_org has_delivery_results internal key ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
103 104 105 106 107 108 109 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 103 def inspect class_name = self.class.name.split('::').last "<#{class_name} allows_single_event_per_message:"\ " #{@allows_single_event_per_message.inspect}, for_org: #{@for_org.inspect},"\ " has_delivery_results: #{@has_delivery_results.inspect}, internal: #{@internal.inspect},"\ " key: #{@key.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
95 96 97 98 99 100 |
# File 'lib/mist_api/models/const_webhook_topic.rb', line 95 def to_s class_name = self.class.name.split('::').last "<#{class_name} allows_single_event_per_message: #{@allows_single_event_per_message},"\ " for_org: #{@for_org}, has_delivery_results: #{@has_delivery_results}, internal:"\ " #{@internal}, key: #{@key}>" end |