Class: ApolloDeploySignalSdkRails::WebhookCreateResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::WebhookCreateResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: WebhookCreateResponse
Instance Attribute Summary collapse
- #created_at ⇒ String
- #enabled ⇒ Boolean
- #events ⇒ Array<String>
- #filters ⇒ Array<WebhookFilterSerializable>
- #id ⇒ String
- #name ⇒ String
- #project_id ⇒ String
- #secret ⇒ String
- #transformations ⇒ Array<WebhookTransformationSerializable>
- #updated_at ⇒ String
- #url ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ WebhookCreateResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, project_id:, name:, url:, events:, enabled:, filters:, transformations:, created_at:, updated_at:, secret:) ⇒ WebhookCreateResponse
constructor
A new instance of WebhookCreateResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, project_id:, name:, url:, events:, enabled:, filters:, transformations:, created_at:, updated_at:, secret:) ⇒ WebhookCreateResponse
Returns a new instance of WebhookCreateResponse.
3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3556 def initialize(id: , project_id: , name: , url: , events: , enabled: , filters: , transformations: , created_at: , updated_at: , secret: ) @id = id @project_id = project_id @name = name @url = url @events = events @enabled = enabled @filters = filters @transformations = transformations @created_at = created_at @updated_at = updated_at @secret = secret end |
Instance Attribute Details
#created_at ⇒ String
3549 3550 3551 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3549 def created_at @created_at end |
#enabled ⇒ Boolean
3543 3544 3545 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3543 def enabled @enabled end |
#events ⇒ Array<String>
3541 3542 3543 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3541 def events @events end |
#filters ⇒ Array<WebhookFilterSerializable>
3545 3546 3547 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3545 def filters @filters end |
#id ⇒ String
3533 3534 3535 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3533 def id @id end |
#name ⇒ String
3537 3538 3539 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3537 def name @name end |
#project_id ⇒ String
3535 3536 3537 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3535 def project_id @project_id end |
#secret ⇒ String
3553 3554 3555 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3553 def secret @secret end |
#transformations ⇒ Array<WebhookTransformationSerializable>
3547 3548 3549 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3547 def transformations @transformations end |
#updated_at ⇒ String
3551 3552 3553 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3551 def updated_at @updated_at end |
#url ⇒ String
3539 3540 3541 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3539 def url @url end |
Class Method Details
.from_json(attributes) ⇒ WebhookCreateResponse
Create an instance from a parsed JSON hash.
3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3590 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( id: attributes.key?("id") ? attributes["id"] : attributes[:id], project_id: attributes.key?("projectId") ? attributes["projectId"] : attributes[:project_id], name: attributes.key?("name") ? attributes["name"] : attributes[:name], url: attributes.key?("url") ? attributes["url"] : attributes[:url], events: attributes.key?("events") ? attributes["events"] : attributes[:events], enabled: attributes.key?("enabled") ? attributes["enabled"] : attributes[:enabled], filters: attributes.key?("filters") ? attributes["filters"] : attributes[:filters], transformations: attributes.key?("transformations") ? attributes["transformations"] : attributes[:transformations], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], secret: attributes.key?("secret") ? attributes["secret"] : attributes[:secret], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 3571 def to_h { id: @id, project_id: @project_id, name: @name, url: @url, events: @events, enabled: @enabled, filters: @filters, transformations: @transformations, created_at: @created_at, updated_at: @updated_at, secret: @secret, }.compact end |