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.
4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 |
# File 'lib/basecamp/generated/types.rb', line 4085 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.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def active @active end |
#app_url ⇒ Object
Returns the value of attribute app_url.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def app_url @app_url end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def id @id end |
#payload_url ⇒ Object
Returns the value of attribute payload_url.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def payload_url @payload_url end |
#recent_deliveries ⇒ Object
Returns the value of attribute recent_deliveries.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def recent_deliveries @recent_deliveries end |
#types ⇒ Object
Returns the value of attribute types.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def types @types end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def updated_at @updated_at end |
#url ⇒ Object
Returns the value of attribute url.
4078 4079 4080 |
# File 'lib/basecamp/generated/types.rb', line 4078 def url @url end |
Class Method Details
.required_fields ⇒ Array<Symbol>
4081 4082 4083 |
# File 'lib/basecamp/generated/types.rb', line 4081 def self.required_fields %i[app_url created_at id payload_url updated_at url].freeze end |
Instance Method Details
#to_h ⇒ Object
4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 |
# File 'lib/basecamp/generated/types.rb', line 4097 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
4111 4112 4113 |
# File 'lib/basecamp/generated/types.rb', line 4111 def to_json(*args) to_h.to_json(*args) end |