Class: Basecamp::Types::WebhookDelivery
- Inherits:
-
Object
- Object
- Basecamp::Types::WebhookDelivery
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
WebhookDelivery
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#request ⇒ Object
Returns the value of attribute request.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ WebhookDelivery
constructor
A new instance of WebhookDelivery.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ WebhookDelivery
Returns a new instance of WebhookDelivery.
4167 4168 4169 4170 4171 4172 |
# File 'lib/basecamp/generated/types.rb', line 4167 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_at ⇒ Object
Returns the value of attribute created_at.
4165 4166 4167 |
# File 'lib/basecamp/generated/types.rb', line 4165 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
4165 4166 4167 |
# File 'lib/basecamp/generated/types.rb', line 4165 def id @id end |
#request ⇒ Object
Returns the value of attribute request.
4165 4166 4167 |
# File 'lib/basecamp/generated/types.rb', line 4165 def request @request end |
#response ⇒ Object
Returns the value of attribute response.
4165 4166 4167 |
# File 'lib/basecamp/generated/types.rb', line 4165 def response @response end |
Instance Method Details
#to_h ⇒ Object
4174 4175 4176 4177 4178 4179 4180 4181 |
# File 'lib/basecamp/generated/types.rb', line 4174 def to_h { "created_at" => @created_at, "id" => @id, "request" => @request, "response" => @response, }.compact end |
#to_json(*args) ⇒ Object
4183 4184 4185 |
# File 'lib/basecamp/generated/types.rb', line 4183 def to_json(*args) to_h.to_json(*args) end |