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.



1529
1530
1531
1532
1533
# File 'lib/basecamp/generated/types.rb', line 1529

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.



1522
1523
1524
# File 'lib/basecamp/generated/types.rb', line 1522

def app_url
  @app_url
end

#idObject

Returns the value of attribute id.



1522
1523
1524
# File 'lib/basecamp/generated/types.rb', line 1522

def id
  @id
end

#nameObject

Returns the value of attribute name.



1522
1523
1524
# File 'lib/basecamp/generated/types.rb', line 1522

def name
  @name
end

Class Method Details

.required_fieldsArray<Symbol>

Returns:

  • (Array<Symbol>)


1525
1526
1527
# File 'lib/basecamp/generated/types.rb', line 1525

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

Instance Method Details

#to_hObject



1535
1536
1537
1538
1539
1540
1541
# File 'lib/basecamp/generated/types.rb', line 1535

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

#to_json(*args) ⇒ Object



1543
1544
1545
# File 'lib/basecamp/generated/types.rb', line 1543

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