Class: Basecamp::Types::DraftBucket

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

Overview

DraftBucket

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {}) ⇒ DraftBucket

Returns a new instance of DraftBucket.



1593
1594
1595
1596
1597
# File 'lib/basecamp/generated/types.rb', line 1593

def initialize(data = {})
  @app_url = data["app_url"]
  @id = parse_integer(data["id"])
  @name = data["name"]
end

Instance Attribute Details

#app_urlObject

Returns the value of attribute app_url.



1586
1587
1588
# File 'lib/basecamp/generated/types.rb', line 1586

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



1586
1587
1588
# File 'lib/basecamp/generated/types.rb', line 1586

def id
  @id
end

#nameObject

Returns the value of attribute name.



1586
1587
1588
# File 'lib/basecamp/generated/types.rb', line 1586

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


1589
1590
1591
# File 'lib/basecamp/generated/types.rb', line 1589

def self.required_fields
  %i[app_url id name].freeze
end

Instance Method Details

#to_hObject



1599
1600
1601
1602
1603
1604
1605
# File 'lib/basecamp/generated/types.rb', line 1599

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

#to_json(*args) ⇒ Object



1607
1608
1609
# File 'lib/basecamp/generated/types.rb', line 1607

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