Class: ApolloDeploySignalSdkRails::UpdateWebhookBody
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::UpdateWebhookBody
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: UpdateWebhookBody
Instance Attribute Summary collapse
- #enabled ⇒ Boolean?
- #events ⇒ Array<String>
- #filters ⇒ Array<WebhookFilterSerializable>
- #name ⇒ String?
- #secret ⇒ String?
- #transformations ⇒ Array<WebhookTransformationSerializable>
- #url ⇒ String?
Class Method Summary collapse
-
.from_json(attributes) ⇒ UpdateWebhookBody
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(name: nil, url: nil, events: nil, secret: nil, enabled: nil, filters: nil, transformations: nil) ⇒ UpdateWebhookBody
constructor
A new instance of UpdateWebhookBody.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(name: nil, url: nil, events: nil, secret: nil, enabled: nil, filters: nil, transformations: nil) ⇒ UpdateWebhookBody
Returns a new instance of UpdateWebhookBody.
3627 3628 3629 3630 3631 3632 3633 3634 3635 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3627 def initialize(name: nil, url: nil, events: nil, secret: nil, enabled: nil, filters: nil, transformations: nil) @name = name @url = url @events = events @secret = secret @enabled = enabled @filters = filters @transformations = transformations end |
Instance Attribute Details
#enabled ⇒ Boolean?
3620 3621 3622 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3620 def enabled @enabled end |
#events ⇒ Array<String>
3616 3617 3618 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3616 def events @events end |
#filters ⇒ Array<WebhookFilterSerializable>
3622 3623 3624 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3622 def filters @filters end |
#name ⇒ String?
3612 3613 3614 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3612 def name @name end |
#secret ⇒ String?
3618 3619 3620 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3618 def secret @secret end |
#transformations ⇒ Array<WebhookTransformationSerializable>
3624 3625 3626 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3624 def transformations @transformations end |
#url ⇒ String?
3614 3615 3616 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3614 def url @url end |
Class Method Details
.from_json(attributes) ⇒ UpdateWebhookBody
Create an instance from a parsed JSON hash.
3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3653 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( name: attributes.key?("name") ? attributes["name"] : attributes[:name], url: attributes.key?("url") ? attributes["url"] : attributes[:url], events: attributes.key?("events") ? attributes["events"] : attributes[:events], secret: attributes.key?("secret") ? attributes["secret"] : attributes[:secret], enabled: attributes.key?("enabled") ? attributes["enabled"] : attributes[:enabled], filters: attributes.key?("filters") ? attributes["filters"] : attributes[:filters], transformations: attributes.key?("transformations") ? attributes["transformations"] : attributes[:transformations], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3638 def to_h { name: @name, url: @url, events: @events, secret: @secret, enabled: @enabled, filters: @filters, transformations: @transformations, }.compact end |