lib/phrase/models/webhook_create_parameters.rb in phrase-1.0.6 vs lib/phrase/models/webhook_create_parameters.rb in phrase-1.0.7
- old
+ new
@@ -3,10 +3,13 @@
module Phrase
class WebhookCreateParameters
# Callback URL to send requests to
attr_accessor :callback_url
+ # Webhook secret used to calculate signature. If empty, the default project secret will be used.
+ attr_accessor :secret
+
# Webhook description
attr_accessor :description
# List of event names to trigger the webhook (separated by comma)
attr_accessor :events
@@ -16,20 +19,22 @@
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'callback_url' => :'callback_url',
+ :'secret' => :'secret',
:'description' => :'description',
:'events' => :'events',
:'active' => :'active'
}
end
# Attribute type mapping.
def self.openapi_types
{
:'callback_url' => :'String',
+ :'secret' => :'String',
:'description' => :'String',
:'events' => :'String',
:'active' => :'Boolean'
}
end
@@ -57,10 +62,14 @@
if attributes.key?(:'callback_url')
self.callback_url = attributes[:'callback_url']
end
+ if attributes.key?(:'secret')
+ self.secret = attributes[:'secret']
+ end
+
if attributes.key?(:'description')
self.description = attributes[:'description']
end
if attributes.key?(:'events')
@@ -89,10 +98,11 @@
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
callback_url == o.callback_url &&
+ secret == o.secret &&
description == o.description &&
events == o.events &&
active == o.active
end
@@ -103,10 +113,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [callback_url, description, events, active].hash
+ [callback_url, secret, description, events, active].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself