Class: Basecamp::Types::WebhookCopy

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

Overview

WebhookCopy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ WebhookCopy

Returns a new instance of WebhookCopy.



5177
5178
5179
5180
5181
5182
# File 'lib/basecamp/generated/types.rb', line 5177

def initialize(data = {})
  @app_url = data["app_url"]
  @bucket = parse_type(data["bucket"], "WebhookCopyBucket")
  @id = parse_integer(data["id"])
  @url = data["url"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



5175
5176
5177
# File 'lib/basecamp/generated/types.rb', line 5175

def app_url
  @app_url
end

#bucketObject

Returns the value of attribute bucket.



5175
5176
5177
# File 'lib/basecamp/generated/types.rb', line 5175

def bucket
  @bucket
end

#idObject

Returns the value of attribute id.



5175
5176
5177
# File 'lib/basecamp/generated/types.rb', line 5175

def id
  @id
end

#urlObject

Returns the value of attribute url.



5175
5176
5177
# File 'lib/basecamp/generated/types.rb', line 5175

def url
  @url
end

Instance Method Details

#to_hObject



5184
5185
5186
5187
5188
5189
5190
5191
# File 'lib/basecamp/generated/types.rb', line 5184

def to_h
  {
    "app_url" => @app_url,
    "bucket" => @bucket,
    "id" => @id,
    "url" => @url,
  }.compact
end

#to_json(*args) ⇒ Object



5193
5194
5195
# File 'lib/basecamp/generated/types.rb', line 5193

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