Class: Basecamp::Types::Webhook
- Inherits:
-
Object
- Object
- Basecamp::Types::Webhook
- Includes:
- TypeHelpers
- Defined in:
- lib/basecamp/generated/types.rb
Overview
Webhook
Instance Attribute Summary collapse
-
#active ⇒ Object
Returns the value of attribute active.
-
#app_url ⇒ Object
Returns the value of attribute app_url.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#payload_url ⇒ Object
Returns the value of attribute payload_url.
-
#recent_deliveries ⇒ Object
Returns the value of attribute recent_deliveries.
-
#types ⇒ Object
Returns the value of attribute types.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ Webhook
constructor
A new instance of Webhook.
- #to_h ⇒ Object
- #to_json(*args) ⇒ Object
Constructor Details
#initialize(data = {}) ⇒ Webhook
Returns a new instance of Webhook.
4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 |
# File 'lib/basecamp/generated/types.rb', line 4474 def initialize(data = {}) @app_url = data["app_url"] @created_at = parse_datetime(data["created_at"]) @id = parse_integer(data["id"]) @payload_url = data["payload_url"] @updated_at = parse_datetime(data["updated_at"]) @url = data["url"] @active = parse_boolean(data["active"]) @recent_deliveries = parse_array(data["recent_deliveries"], "WebhookDelivery") @types = data["types"] end |
Instance Attribute Details
#active ⇒ Object
Returns the value of attribute active.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def active @active end |
#app_url ⇒ Object
Returns the value of attribute app_url.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def id @id end |
#payload_url ⇒ Object
Returns the value of attribute payload_url.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def payload_url @payload_url end |
#recent_deliveries ⇒ Object
Returns the value of attribute recent_deliveries.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def recent_deliveries @recent_deliveries end |
#types ⇒ Object
Returns the value of attribute types.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def types @types end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4467 4468 4469 |
# File 'lib/basecamp/generated/types.rb', line 4467 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4470 4471 4472 |
# File 'lib/basecamp/generated/types.rb', line 4470 def self.required_fields %i[app_url created_at id payload_url updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 |
# File 'lib/basecamp/generated/types.rb', line 4486 def to_h { "app_url" => @app_url, "created_at" => @created_at, "id" => @id, "payload_url" => @payload_url, "updated_at" => @updated_at, "url" => @url, "active" => @active, "recent_deliveries" => @recent_deliveries, "types" => @types, }.compact end |
#to_json(*args) ⇒ Object
4500 4501 4502 |
# File 'lib/basecamp/generated/types.rb', line 4500 def to_json(*args) to_h.to_json(*args) end |