Class: ApolloDeploySignalSdk::WebhookDeliveryResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdk::WebhookDeliveryResponse
- Defined in:
- lib/apollo_deploy_signal_sdk/types.rb
Overview
Schema type: WebhookDeliveryResponse
Instance Attribute Summary collapse
- #attempt_count ⇒ Integer
- #created_at ⇒ String
- #event_type ⇒ String
- #id ⇒ String
- #last_error ⇒ String?
- #last_status_code ⇒ Integer?
- #next_attempt_at ⇒ String?
- #project_id ⇒ String
- #response_body_snippet ⇒ String?
- #status ⇒ String
- #updated_at ⇒ String
- #webhook_endpoint_id ⇒ String
Class Method Summary collapse
-
.from_json(attributes) ⇒ WebhookDeliveryResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(id:, project_id:, webhook_endpoint_id:, event_type:, status:, attempt_count:, last_status_code:, last_error:, response_body_snippet:, next_attempt_at:, created_at:, updated_at:) ⇒ WebhookDeliveryResponse
constructor
A new instance of WebhookDeliveryResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(id:, project_id:, webhook_endpoint_id:, event_type:, status:, attempt_count:, last_status_code:, last_error:, response_body_snippet:, next_attempt_at:, created_at:, updated_at:) ⇒ WebhookDeliveryResponse
Returns a new instance of WebhookDeliveryResponse.
3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3386 def initialize(id: , project_id: , webhook_endpoint_id: , event_type: , status: , attempt_count: , last_status_code: , last_error: , response_body_snippet: , next_attempt_at: , created_at: , updated_at: ) @id = id @project_id = project_id @webhook_endpoint_id = webhook_endpoint_id @event_type = event_type @status = status @attempt_count = attempt_count @last_status_code = last_status_code @last_error = last_error @response_body_snippet = response_body_snippet @next_attempt_at = next_attempt_at @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#attempt_count ⇒ Integer
3371 3372 3373 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3371 def attempt_count @attempt_count end |
#created_at ⇒ String
3381 3382 3383 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3381 def created_at @created_at end |
#event_type ⇒ String
3367 3368 3369 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3367 def event_type @event_type end |
#id ⇒ String
3361 3362 3363 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3361 def id @id end |
#last_error ⇒ String?
3375 3376 3377 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3375 def last_error @last_error end |
#last_status_code ⇒ Integer?
3373 3374 3375 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3373 def last_status_code @last_status_code end |
#next_attempt_at ⇒ String?
3379 3380 3381 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3379 def next_attempt_at @next_attempt_at end |
#project_id ⇒ String
3363 3364 3365 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3363 def project_id @project_id end |
#response_body_snippet ⇒ String?
3377 3378 3379 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3377 def response_body_snippet @response_body_snippet end |
#status ⇒ String
3369 3370 3371 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3369 def status @status end |
#updated_at ⇒ String
3383 3384 3385 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3383 def updated_at @updated_at end |
#webhook_endpoint_id ⇒ String
3365 3366 3367 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3365 def webhook_endpoint_id @webhook_endpoint_id end |
Class Method Details
.from_json(attributes) ⇒ WebhookDeliveryResponse
Create an instance from a parsed JSON hash.
3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3422 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], webhook_endpoint_id: attributes.key?("webhookEndpointId") ? attributes["webhookEndpointId"] : attributes[:webhook_endpoint_id], event_type: attributes.key?("eventType") ? attributes["eventType"] : attributes[:event_type], status: attributes.key?("status") ? attributes["status"] : attributes[:status], attempt_count: attributes.key?("attemptCount") ? attributes["attemptCount"] : attributes[:attempt_count], last_status_code: attributes.key?("lastStatusCode") ? attributes["lastStatusCode"] : attributes[:last_status_code], last_error: attributes.key?("lastError") ? attributes["lastError"] : attributes[:last_error], response_body_snippet: attributes.key?("responseBodySnippet") ? attributes["responseBodySnippet"] : attributes[:response_body_snippet], next_attempt_at: attributes.key?("nextAttemptAt") ? attributes["nextAttemptAt"] : attributes[:next_attempt_at], created_at: attributes.key?("createdAt") ? attributes["createdAt"] : attributes[:created_at], updated_at: attributes.key?("updatedAt") ? attributes["updatedAt"] : attributes[:updated_at], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 |
# File 'lib/apollo_deploy_signal_sdk/types.rb', line 3402 def to_h { id: @id, project_id: @project_id, webhook_endpoint_id: @webhook_endpoint_id, event_type: @event_type, status: @status, attempt_count: @attempt_count, last_status_code: @last_status_code, last_error: @last_error, response_body_snippet: @response_body_snippet, next_attempt_at: @next_attempt_at, created_at: @created_at, updated_at: @updated_at, }.compact end |