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.



4789
4790
4791
4792
4793
4794
# File 'lib/basecamp/generated/types.rb', line 4789

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.



4787
4788
4789
# File 'lib/basecamp/generated/types.rb', line 4787

def app_url
  @app_url
end

#bucketObject

Returns the value of attribute bucket.



4787
4788
4789
# File 'lib/basecamp/generated/types.rb', line 4787

def bucket
  @bucket
end

#idObject

Returns the value of attribute id.



4787
4788
4789
# File 'lib/basecamp/generated/types.rb', line 4787

def id
  @id
end

#urlObject

Returns the value of attribute url.



4787
4788
4789
# File 'lib/basecamp/generated/types.rb', line 4787

def url
  @url
end

Instance Method Details

#to_hObject



4796
4797
4798
4799
4800
4801
4802
4803
# File 'lib/basecamp/generated/types.rb', line 4796

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

#to_json(*args) ⇒ Object



4805
4806
4807
# File 'lib/basecamp/generated/types.rb', line 4805

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