Class: Basecamp::Types::WebhookDelivery

Inherits:
Object
  • Object
show all
Includes:
TypeHelpers
Defined in:
lib/basecamp/generated/types.rb

Overview

WebhookDelivery

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ WebhookDelivery

Returns a new instance of WebhookDelivery.



4523
4524
4525
4526
4527
4528
# File 'lib/basecamp/generated/types.rb', line 4523

def initialize(data = {})
  @created_at = parse_datetime(data["created_at"])
  @id = parse_integer(data["id"])
  @request = parse_type(data["request"], "WebhookDeliveryRequest")
  @response = parse_type(data["response"], "WebhookDeliveryResponse")
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



4521
4522
4523
# File 'lib/basecamp/generated/types.rb', line 4521

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



4521
4522
4523
# File 'lib/basecamp/generated/types.rb', line 4521

def id
  @id
end

#requestObject

Returns the value of attribute request.



4521
4522
4523
# File 'lib/basecamp/generated/types.rb', line 4521

def request
  @request
end

#responseObject

Returns the value of attribute response.



4521
4522
4523
# File 'lib/basecamp/generated/types.rb', line 4521

def response
  @response
end

Instance Method Details

#to_hObject



4530
4531
4532
4533
4534
4535
4536
4537
# File 'lib/basecamp/generated/types.rb', line 4530

def to_h
  {
    "created_at" => @created_at,
    "id" => @id,
    "request" => @request,
    "response" => @response,
  }.compact
end

#to_json(*args) ⇒ Object



4539
4540
4541
# File 'lib/basecamp/generated/types.rb', line 4539

def to_json(*args)
  to_h.to_json(*args)
end