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.
4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 |
# File 'lib/basecamp/generated/types.rb', line 4753 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.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def active @active end |
#app_url ⇒ Object
Returns the value of attribute app_url.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def id @id end |
#payload_url ⇒ Object
Returns the value of attribute payload_url.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def payload_url @payload_url end |
#recent_deliveries ⇒ Object
Returns the value of attribute recent_deliveries.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def recent_deliveries @recent_deliveries end |
#types ⇒ Object
Returns the value of attribute types.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def types @types end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4746 4747 4748 |
# File 'lib/basecamp/generated/types.rb', line 4746 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4749 4750 4751 |
# File 'lib/basecamp/generated/types.rb', line 4749 def self.required_fields %i[app_url created_at id payload_url updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 |
# File 'lib/basecamp/generated/types.rb', line 4765 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
4779 4780 4781 |
# File 'lib/basecamp/generated/types.rb', line 4779 def to_json(*args) to_h.to_json(*args) end |