basecamp-sdk 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +127 -8
  3. data/lib/basecamp/client.rb +55 -11
  4. data/lib/basecamp/config.rb +69 -0
  5. data/lib/basecamp/generated/metadata.json +443 -133
  6. data/lib/basecamp/generated/services/base_service.rb +37 -16
  7. data/lib/basecamp/generated/services/bookmarks_service.rb +50 -0
  8. data/lib/basecamp/generated/services/boosts_service.rb +12 -6
  9. data/lib/basecamp/generated/services/calendars_service.rb +30 -0
  10. data/lib/basecamp/generated/services/campfires_service.rb +54 -41
  11. data/lib/basecamp/generated/services/cards_service.rb +6 -3
  12. data/lib/basecamp/generated/services/checkins_service.rb +28 -15
  13. data/lib/basecamp/generated/services/client_approvals_service.rb +8 -5
  14. data/lib/basecamp/generated/services/client_correspondences_service.rb +8 -5
  15. data/lib/basecamp/generated/services/client_replies_service.rb +12 -7
  16. data/lib/basecamp/generated/services/cloud_files_service.rb +57 -0
  17. data/lib/basecamp/generated/services/comments_service.rb +6 -3
  18. data/lib/basecamp/generated/services/documents_service.rb +9 -6
  19. data/lib/basecamp/generated/services/drafts_service.rb +22 -0
  20. data/lib/basecamp/generated/services/events_service.rb +6 -3
  21. data/lib/basecamp/generated/services/everything_service.rb +116 -69
  22. data/lib/basecamp/generated/services/folders_service.rb +62 -0
  23. data/lib/basecamp/generated/services/forwards_service.rb +12 -17
  24. data/lib/basecamp/generated/services/gauges_service.rb +12 -7
  25. data/lib/basecamp/generated/services/google_documents_service.rb +61 -0
  26. data/lib/basecamp/generated/services/message_types_service.rb +4 -3
  27. data/lib/basecamp/generated/services/messages_service.rb +6 -4
  28. data/lib/basecamp/generated/services/my_assignments_service.rb +31 -0
  29. data/lib/basecamp/generated/services/my_notes_service.rb +28 -0
  30. data/lib/basecamp/generated/services/my_notifications_service.rb +8 -5
  31. data/lib/basecamp/generated/services/people_service.rb +17 -10
  32. data/lib/basecamp/generated/services/projects_service.rb +26 -4
  33. data/lib/basecamp/generated/services/recordings_service.rb +6 -13
  34. data/lib/basecamp/generated/services/reports_service.rb +15 -9
  35. data/lib/basecamp/generated/services/schedules_service.rb +90 -16
  36. data/lib/basecamp/generated/services/search_service.rb +6 -4
  37. data/lib/basecamp/generated/services/templates_service.rb +6 -4
  38. data/lib/basecamp/generated/services/timeline_service.rb +6 -3
  39. data/lib/basecamp/generated/services/timesheets_service.rb +22 -8
  40. data/lib/basecamp/generated/services/todolist_groups_service.rb +7 -4
  41. data/lib/basecamp/generated/services/todolists_service.rb +11 -9
  42. data/lib/basecamp/generated/services/todos_service.rb +23 -14
  43. data/lib/basecamp/generated/services/uploads_service.rb +10 -6
  44. data/lib/basecamp/generated/services/vaults_service.rb +6 -3
  45. data/lib/basecamp/generated/services/webhooks_service.rb +4 -3
  46. data/lib/basecamp/generated/types.rb +847 -147
  47. data/lib/basecamp/http.rb +346 -163
  48. data/lib/basecamp/list_enumerator.rb +29 -0
  49. data/lib/basecamp/list_meta.rb +44 -0
  50. data/lib/basecamp/services/cards_extensions.rb +35 -27
  51. data/lib/basecamp/services/documents_extensions.rb +136 -0
  52. data/lib/basecamp/services/merge_safe.rb +255 -0
  53. data/lib/basecamp/services/schedules_extensions.rb +354 -0
  54. data/lib/basecamp/services/todolists_extensions.rb +274 -0
  55. data/lib/basecamp/services/todos_extensions.rb +22 -6
  56. data/lib/basecamp/validation_error.rb +11 -1
  57. data/lib/basecamp/version.rb +2 -2
  58. data/lib/basecamp.rb +94 -4
  59. data/scripts/generate-services.rb +74 -25
  60. data/scripts/generate-types.rb +2 -1
  61. data/scripts/go_type_spellings.rb +26 -0
  62. metadata +16 -2
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Auto-generated from OpenAPI spec. Do not edit manually.
4
- # Generated: 2026-07-30T23:14:00Z
4
+ # Generated: 2026-08-06T00:45:34Z
5
5
 
6
6
  require "json"
7
7
  require "time"
@@ -217,36 +217,54 @@ module Basecamp
217
217
  end
218
218
  end
219
219
 
220
- # Assignable
221
- class Assignable
220
+ # Bookmark
221
+ class Bookmark
222
222
  include TypeHelpers
223
- attr_accessor :app_url, :assignees, :bucket, :due_on, :id, :parent, :starts_on, :title, :type, :url
223
+ attr_accessor :created_at, :id, :recording, :updated_at
224
+
225
+ # @return [Array<Symbol>]
226
+ def self.required_fields
227
+ %i[created_at id recording updated_at].freeze
228
+ end
224
229
 
225
230
  def initialize(data = {})
226
- @app_url = data["app_url"]
227
- @assignees = parse_array(data["assignees"], "Person")
228
- @bucket = parse_type(data["bucket"], "TodoBucket")
229
- @due_on = data["due_on"]
231
+ @created_at = parse_datetime(data["created_at"])
230
232
  @id = parse_integer(data["id"])
231
- @parent = parse_type(data["parent"], "TodoParent")
232
- @starts_on = data["starts_on"]
233
- @title = data["title"]
234
- @type = data["type"]
235
- @url = data["url"]
233
+ @recording = parse_type(data["recording"], "Recording")
234
+ @updated_at = parse_datetime(data["updated_at"])
236
235
  end
237
236
 
238
237
  def to_h
239
238
  {
240
- "app_url" => @app_url,
241
- "assignees" => @assignees,
242
- "bucket" => @bucket,
243
- "due_on" => @due_on,
239
+ "created_at" => @created_at,
244
240
  "id" => @id,
245
- "parent" => @parent,
246
- "starts_on" => @starts_on,
247
- "title" => @title,
248
- "type" => @type,
249
- "url" => @url,
241
+ "recording" => @recording,
242
+ "updated_at" => @updated_at,
243
+ }.compact
244
+ end
245
+
246
+ def to_json(*args)
247
+ to_h.to_json(*args)
248
+ end
249
+ end
250
+
251
+ # BookmarkStatus
252
+ class BookmarkStatus
253
+ include TypeHelpers
254
+ attr_accessor :bookmarked
255
+
256
+ # @return [Array<Symbol>]
257
+ def self.required_fields
258
+ %i[bookmarked].freeze
259
+ end
260
+
261
+ def initialize(data = {})
262
+ @bookmarked = parse_boolean(data["bookmarked"])
263
+ end
264
+
265
+ def to_h
266
+ {
267
+ "bookmarked" => @bookmarked,
250
268
  }.compact
251
269
  end
252
270
 
@@ -342,6 +360,72 @@ module Basecamp
342
360
  end
343
361
  end
344
362
 
363
+ # Calendar
364
+ class Calendar
365
+ include TypeHelpers
366
+ attr_accessor :app_url, :color, :created_at, :id, :name, :schedule_url, :type, :updated_at, :url
367
+
368
+ # @return [Array<Symbol>]
369
+ def self.required_fields
370
+ %i[app_url color created_at id name schedule_url type updated_at url].freeze
371
+ end
372
+
373
+ def initialize(data = {})
374
+ @app_url = data["app_url"]
375
+ @color = data["color"]
376
+ @created_at = parse_datetime(data["created_at"])
377
+ @id = parse_integer(data["id"])
378
+ @name = data["name"]
379
+ @schedule_url = data["schedule_url"]
380
+ @type = data["type"]
381
+ @updated_at = parse_datetime(data["updated_at"])
382
+ @url = data["url"]
383
+ end
384
+
385
+ def to_h
386
+ {
387
+ "app_url" => @app_url,
388
+ "color" => @color,
389
+ "created_at" => @created_at,
390
+ "id" => @id,
391
+ "name" => @name,
392
+ "schedule_url" => @schedule_url,
393
+ "type" => @type,
394
+ "updated_at" => @updated_at,
395
+ "url" => @url,
396
+ }.compact
397
+ end
398
+
399
+ def to_json(*args)
400
+ to_h.to_json(*args)
401
+ end
402
+ end
403
+
404
+ # CalendarAttributes
405
+ class CalendarAttributes
406
+ include TypeHelpers
407
+ attr_accessor :color
408
+
409
+ # @return [Array<Symbol>]
410
+ def self.required_fields
411
+ %i[color].freeze
412
+ end
413
+
414
+ def initialize(data = {})
415
+ @color = data["color"]
416
+ end
417
+
418
+ def to_h
419
+ {
420
+ "color" => @color,
421
+ }.compact
422
+ end
423
+
424
+ def to_json(*args)
425
+ to_h.to_json(*args)
426
+ end
427
+ end
428
+
345
429
  # Campfire
346
430
  class Campfire
347
431
  include TypeHelpers
@@ -1129,6 +1213,108 @@ module Basecamp
1129
1213
  end
1130
1214
  end
1131
1215
 
1216
+ # CloudFile
1217
+ class CloudFile
1218
+ include TypeHelpers
1219
+ attr_accessor :app_url, :bucket, :created_at, :creator, :description_attachments, :id, :inherits_status, :parent, :service, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :description, :position, :subscription_url
1220
+
1221
+ # @return [Array<Symbol>]
1222
+ def self.required_fields
1223
+ %i[app_url bucket created_at creator description_attachments id inherits_status parent service status title type updated_at url visible_to_clients].freeze
1224
+ end
1225
+
1226
+ def initialize(data = {})
1227
+ @app_url = data["app_url"]
1228
+ @bucket = parse_type(data["bucket"], "TodoBucket")
1229
+ @created_at = parse_datetime(data["created_at"])
1230
+ @creator = parse_type(data["creator"], "Person")
1231
+ @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment")
1232
+ @id = parse_integer(data["id"])
1233
+ @inherits_status = parse_boolean(data["inherits_status"])
1234
+ @parent = parse_type(data["parent"], "RecordingParent")
1235
+ @service = parse_type(data["service"], "CloudFileService")
1236
+ @status = data["status"]
1237
+ @title = data["title"]
1238
+ @type = data["type"]
1239
+ @updated_at = parse_datetime(data["updated_at"])
1240
+ @url = data["url"]
1241
+ @visible_to_clients = parse_boolean(data["visible_to_clients"])
1242
+ @bookmark_url = data["bookmark_url"]
1243
+ @boosts_count = parse_integer(data["boosts_count"])
1244
+ @boosts_url = data["boosts_url"]
1245
+ @comments_count = parse_integer(data["comments_count"])
1246
+ @comments_url = data["comments_url"]
1247
+ @description = data["description"]
1248
+ @position = parse_integer(data["position"])
1249
+ @subscription_url = data["subscription_url"]
1250
+ end
1251
+
1252
+ def to_h
1253
+ {
1254
+ "app_url" => @app_url,
1255
+ "bucket" => @bucket,
1256
+ "created_at" => @created_at,
1257
+ "creator" => @creator,
1258
+ "description_attachments" => @description_attachments,
1259
+ "id" => @id,
1260
+ "inherits_status" => @inherits_status,
1261
+ "parent" => @parent,
1262
+ "service" => @service,
1263
+ "status" => @status,
1264
+ "title" => @title,
1265
+ "type" => @type,
1266
+ "updated_at" => @updated_at,
1267
+ "url" => @url,
1268
+ "visible_to_clients" => @visible_to_clients,
1269
+ "bookmark_url" => @bookmark_url,
1270
+ "boosts_count" => @boosts_count,
1271
+ "boosts_url" => @boosts_url,
1272
+ "comments_count" => @comments_count,
1273
+ "comments_url" => @comments_url,
1274
+ "description" => @description,
1275
+ "position" => @position,
1276
+ "subscription_url" => @subscription_url,
1277
+ }.compact
1278
+ end
1279
+
1280
+ def to_json(*args)
1281
+ to_h.to_json(*args)
1282
+ end
1283
+ end
1284
+
1285
+ # CloudFileService
1286
+ class CloudFileService
1287
+ include TypeHelpers
1288
+ attr_accessor :code, :example_url, :name, :valid_patterns, :supporting_text
1289
+
1290
+ # @return [Array<Symbol>]
1291
+ def self.required_fields
1292
+ %i[code example_url name valid_patterns].freeze
1293
+ end
1294
+
1295
+ def initialize(data = {})
1296
+ @code = data["code"]
1297
+ @example_url = data["example_url"]
1298
+ @name = data["name"]
1299
+ @valid_patterns = data["valid_patterns"]
1300
+ @supporting_text = data["supporting_text"]
1301
+ end
1302
+
1303
+ def to_h
1304
+ {
1305
+ "code" => @code,
1306
+ "example_url" => @example_url,
1307
+ "name" => @name,
1308
+ "valid_patterns" => @valid_patterns,
1309
+ "supporting_text" => @supporting_text,
1310
+ }.compact
1311
+ end
1312
+
1313
+ def to_json(*args)
1314
+ to_h.to_json(*args)
1315
+ end
1316
+ end
1317
+
1132
1318
  # Comment
1133
1319
  class Comment
1134
1320
  include TypeHelpers
@@ -1351,38 +1537,42 @@ module Basecamp
1351
1537
  end
1352
1538
  end
1353
1539
 
1354
- # Event
1355
- class Event
1540
+ # Draft
1541
+ class Draft
1356
1542
  include TypeHelpers
1357
- attr_accessor :action, :created_at, :creator, :id, :recording_id, :boosts_count, :boosts_url, :details
1543
+ attr_accessor :app_url, :bucket, :created_at, :excerpt, :id, :parent, :scheduled_posting_at, :title, :type, :updated_at
1358
1544
 
1359
1545
  # @return [Array<Symbol>]
1360
1546
  def self.required_fields
1361
- %i[action created_at creator id recording_id].freeze
1547
+ %i[app_url bucket created_at excerpt id parent scheduled_posting_at title type updated_at].freeze
1362
1548
  end
1363
1549
 
1364
1550
  def initialize(data = {})
1365
- @action = data["action"]
1551
+ @app_url = data["app_url"]
1552
+ @bucket = parse_type(data["bucket"], "DraftBucket")
1366
1553
  @created_at = parse_datetime(data["created_at"])
1367
- @creator = parse_type(data["creator"], "Person")
1554
+ @excerpt = data["excerpt"]
1368
1555
  @id = parse_integer(data["id"])
1369
- @recording_id = parse_integer(data["recording_id"])
1370
- @boosts_count = parse_integer(data["boosts_count"])
1371
- @boosts_url = data["boosts_url"]
1372
- @details = parse_type(data["details"], "EventDetails")
1556
+ @parent = data["parent"]
1557
+ @scheduled_posting_at = parse_datetime(data["scheduled_posting_at"])
1558
+ @title = data["title"]
1559
+ @type = data["type"]
1560
+ @updated_at = parse_datetime(data["updated_at"])
1373
1561
  end
1374
1562
 
1375
1563
  def to_h
1376
1564
  {
1377
- "action" => @action,
1565
+ "app_url" => @app_url,
1566
+ "bucket" => @bucket,
1378
1567
  "created_at" => @created_at,
1379
- "creator" => @creator,
1568
+ "excerpt" => @excerpt,
1380
1569
  "id" => @id,
1381
- "recording_id" => @recording_id,
1382
- "boosts_count" => @boosts_count,
1383
- "boosts_url" => @boosts_url,
1384
- "details" => @details,
1385
- }.compact
1570
+ "parent" => @parent,
1571
+ "scheduled_posting_at" => @scheduled_posting_at,
1572
+ "title" => @title,
1573
+ "type" => @type,
1574
+ "updated_at" => @updated_at,
1575
+ }.reject { |k, v| v.nil? && !["scheduled_posting_at"].include?(k) }
1386
1576
  end
1387
1577
 
1388
1578
  def to_json(*args)
@@ -1390,22 +1580,27 @@ module Basecamp
1390
1580
  end
1391
1581
  end
1392
1582
 
1393
- # EventDetails
1394
- class EventDetails
1583
+ # DraftBucket
1584
+ class DraftBucket
1395
1585
  include TypeHelpers
1396
- attr_accessor :added_person_ids, :notified_recipient_ids, :removed_person_ids
1586
+ attr_accessor :app_url, :id, :name
1587
+
1588
+ # @return [Array<Symbol>]
1589
+ def self.required_fields
1590
+ %i[app_url id name].freeze
1591
+ end
1397
1592
 
1398
1593
  def initialize(data = {})
1399
- @added_person_ids = data["added_person_ids"]
1400
- @notified_recipient_ids = data["notified_recipient_ids"]
1401
- @removed_person_ids = data["removed_person_ids"]
1594
+ @app_url = data["app_url"]
1595
+ @id = parse_integer(data["id"])
1596
+ @name = data["name"]
1402
1597
  end
1403
1598
 
1404
1599
  def to_h
1405
1600
  {
1406
- "added_person_ids" => @added_person_ids,
1407
- "notified_recipient_ids" => @notified_recipient_ids,
1408
- "removed_person_ids" => @removed_person_ids,
1601
+ "app_url" => @app_url,
1602
+ "id" => @id,
1603
+ "name" => @name,
1409
1604
  }.compact
1410
1605
  end
1411
1606
 
@@ -1414,18 +1609,110 @@ module Basecamp
1414
1609
  end
1415
1610
  end
1416
1611
 
1417
- # EverythingFile
1418
- class EverythingFile
1612
+ # DraftParent
1613
+ class DraftParent
1419
1614
  include TypeHelpers
1420
- attr_accessor :app_download_url, :app_url, :attachable_sgid, :bookmark_url, :boosts_count, :boosts_url, :bucket, :byte_size, :comments_count, :comments_url, :content, :content_attachments, :content_type, :created_at, :creator, :description, :description_attachments, :download_url, :filename, :height, :id, :inherits_status, :parent, :position, :status, :subscription_url, :title, :type, :updated_at, :url, :visible_to_clients, :width
1615
+ attr_accessor :app_url, :id, :title
1616
+
1617
+ # @return [Array<Symbol>]
1618
+ def self.required_fields
1619
+ %i[app_url id title].freeze
1620
+ end
1421
1621
 
1422
1622
  def initialize(data = {})
1423
- @app_download_url = data["app_download_url"]
1424
1623
  @app_url = data["app_url"]
1425
- @attachable_sgid = data["attachable_sgid"]
1426
- @bookmark_url = data["bookmark_url"]
1427
- @boosts_count = parse_integer(data["boosts_count"])
1428
- @boosts_url = data["boosts_url"]
1624
+ @id = parse_integer(data["id"])
1625
+ @title = data["title"]
1626
+ end
1627
+
1628
+ def to_h
1629
+ {
1630
+ "app_url" => @app_url,
1631
+ "id" => @id,
1632
+ "title" => @title,
1633
+ }.compact
1634
+ end
1635
+
1636
+ def to_json(*args)
1637
+ to_h.to_json(*args)
1638
+ end
1639
+ end
1640
+
1641
+ # Event
1642
+ class Event
1643
+ include TypeHelpers
1644
+ attr_accessor :action, :created_at, :creator, :id, :recording_id, :boosts_count, :boosts_url, :details
1645
+
1646
+ # @return [Array<Symbol>]
1647
+ def self.required_fields
1648
+ %i[action created_at creator id recording_id].freeze
1649
+ end
1650
+
1651
+ def initialize(data = {})
1652
+ @action = data["action"]
1653
+ @created_at = parse_datetime(data["created_at"])
1654
+ @creator = parse_type(data["creator"], "Person")
1655
+ @id = parse_integer(data["id"])
1656
+ @recording_id = parse_integer(data["recording_id"])
1657
+ @boosts_count = parse_integer(data["boosts_count"])
1658
+ @boosts_url = data["boosts_url"]
1659
+ @details = parse_type(data["details"], "EventDetails")
1660
+ end
1661
+
1662
+ def to_h
1663
+ {
1664
+ "action" => @action,
1665
+ "created_at" => @created_at,
1666
+ "creator" => @creator,
1667
+ "id" => @id,
1668
+ "recording_id" => @recording_id,
1669
+ "boosts_count" => @boosts_count,
1670
+ "boosts_url" => @boosts_url,
1671
+ "details" => @details,
1672
+ }.compact
1673
+ end
1674
+
1675
+ def to_json(*args)
1676
+ to_h.to_json(*args)
1677
+ end
1678
+ end
1679
+
1680
+ # EventDetails
1681
+ class EventDetails
1682
+ include TypeHelpers
1683
+ attr_accessor :added_person_ids, :notified_recipient_ids, :removed_person_ids
1684
+
1685
+ def initialize(data = {})
1686
+ @added_person_ids = data["added_person_ids"]
1687
+ @notified_recipient_ids = data["notified_recipient_ids"]
1688
+ @removed_person_ids = data["removed_person_ids"]
1689
+ end
1690
+
1691
+ def to_h
1692
+ {
1693
+ "added_person_ids" => @added_person_ids,
1694
+ "notified_recipient_ids" => @notified_recipient_ids,
1695
+ "removed_person_ids" => @removed_person_ids,
1696
+ }.compact
1697
+ end
1698
+
1699
+ def to_json(*args)
1700
+ to_h.to_json(*args)
1701
+ end
1702
+ end
1703
+
1704
+ # EverythingFile
1705
+ class EverythingFile
1706
+ include TypeHelpers
1707
+ attr_accessor :app_download_url, :app_url, :attachable_sgid, :bookmark_url, :boosts_count, :boosts_url, :bucket, :byte_size, :comments_count, :comments_url, :content, :content_attachments, :content_type, :created_at, :creator, :description, :description_attachments, :download_url, :filename, :height, :id, :inherits_status, :parent, :position, :status, :subscription_url, :title, :type, :updated_at, :url, :visible_to_clients, :width
1708
+
1709
+ def initialize(data = {})
1710
+ @app_download_url = data["app_download_url"]
1711
+ @app_url = data["app_url"]
1712
+ @attachable_sgid = data["attachable_sgid"]
1713
+ @bookmark_url = data["bookmark_url"]
1714
+ @boosts_count = parse_integer(data["boosts_count"])
1715
+ @boosts_url = data["boosts_url"]
1429
1716
  @bucket = parse_type(data["bucket"], "RecordingBucket")
1430
1717
  @byte_size = parse_integer(data["byte_size"])
1431
1718
  @comments_count = parse_integer(data["comments_count"])
@@ -1496,6 +1783,127 @@ module Basecamp
1496
1783
  end
1497
1784
  end
1498
1785
 
1786
+ # FieldKeyedErrors
1787
+ class FieldKeyedErrors
1788
+ include TypeHelpers
1789
+ attr_accessor :errors
1790
+
1791
+ # @return [Array<Symbol>]
1792
+ def self.required_fields
1793
+ %i[errors].freeze
1794
+ end
1795
+
1796
+ def initialize(data = {})
1797
+ @errors = parse_type(data["errors"], "FieldErrorMap")
1798
+ end
1799
+
1800
+ def to_h
1801
+ {
1802
+ "errors" => @errors,
1803
+ }.compact
1804
+ end
1805
+
1806
+ def to_json(*args)
1807
+ to_h.to_json(*args)
1808
+ end
1809
+ end
1810
+
1811
+ # Folder
1812
+ class Folder
1813
+ include TypeHelpers
1814
+ attr_accessor :bucket_ids, :color, :created_at, :gauges_url, :id, :image_url, :is_emoji_only_name, :name, :star_url, :type, :updated_at, :url
1815
+
1816
+ # @return [Array<Symbol>]
1817
+ def self.required_fields
1818
+ %i[bucket_ids color created_at gauges_url id image_url is_emoji_only_name name star_url type updated_at url].freeze
1819
+ end
1820
+
1821
+ def initialize(data = {})
1822
+ @bucket_ids = data["bucket_ids"]
1823
+ @color = data["color"]
1824
+ @created_at = parse_datetime(data["created_at"])
1825
+ @gauges_url = data["gauges_url"]
1826
+ @id = parse_integer(data["id"])
1827
+ @image_url = data["image_url"]
1828
+ @is_emoji_only_name = parse_boolean(data["is_emoji_only_name"])
1829
+ @name = data["name"]
1830
+ @star_url = data["star_url"]
1831
+ @type = data["type"]
1832
+ @updated_at = parse_datetime(data["updated_at"])
1833
+ @url = data["url"]
1834
+ end
1835
+
1836
+ def to_h
1837
+ {
1838
+ "bucket_ids" => @bucket_ids,
1839
+ "color" => @color,
1840
+ "created_at" => @created_at,
1841
+ "gauges_url" => @gauges_url,
1842
+ "id" => @id,
1843
+ "image_url" => @image_url,
1844
+ "is_emoji_only_name" => @is_emoji_only_name,
1845
+ "name" => @name,
1846
+ "star_url" => @star_url,
1847
+ "type" => @type,
1848
+ "updated_at" => @updated_at,
1849
+ "url" => @url,
1850
+ }.reject { |k, v| v.nil? && !["color", "gauges_url", "image_url"].include?(k) }
1851
+ end
1852
+
1853
+ def to_json(*args)
1854
+ to_h.to_json(*args)
1855
+ end
1856
+ end
1857
+
1858
+ # FolderWithProjects
1859
+ class FolderWithProjects
1860
+ include TypeHelpers
1861
+ attr_accessor :bucket_ids, :color, :created_at, :gauges_url, :id, :image_url, :is_emoji_only_name, :name, :projects, :star_url, :type, :updated_at, :url
1862
+
1863
+ # @return [Array<Symbol>]
1864
+ def self.required_fields
1865
+ %i[bucket_ids color created_at gauges_url id image_url is_emoji_only_name name projects star_url type updated_at url].freeze
1866
+ end
1867
+
1868
+ def initialize(data = {})
1869
+ @bucket_ids = data["bucket_ids"]
1870
+ @color = data["color"]
1871
+ @created_at = parse_datetime(data["created_at"])
1872
+ @gauges_url = data["gauges_url"]
1873
+ @id = parse_integer(data["id"])
1874
+ @image_url = data["image_url"]
1875
+ @is_emoji_only_name = parse_boolean(data["is_emoji_only_name"])
1876
+ @name = data["name"]
1877
+ @projects = parse_array(data["projects"], "Project")
1878
+ @star_url = data["star_url"]
1879
+ @type = data["type"]
1880
+ @updated_at = parse_datetime(data["updated_at"])
1881
+ @url = data["url"]
1882
+ end
1883
+
1884
+ def to_h
1885
+ {
1886
+ "bucket_ids" => @bucket_ids,
1887
+ "color" => @color,
1888
+ "created_at" => @created_at,
1889
+ "gauges_url" => @gauges_url,
1890
+ "id" => @id,
1891
+ "image_url" => @image_url,
1892
+ "is_emoji_only_name" => @is_emoji_only_name,
1893
+ "name" => @name,
1894
+ "projects" => @projects,
1895
+ "star_url" => @star_url,
1896
+ "type" => @type,
1897
+ "updated_at" => @updated_at,
1898
+ "url" => @url,
1899
+ }.reject { |k, v| v.nil? && !["color", "gauges_url", "image_url"].include?(k) }
1900
+ end
1901
+
1902
+ def to_json(*args)
1903
+ to_h.to_json(*args)
1904
+ end
1905
+ end
1906
+
1499
1907
  # Forward
1500
1908
  class Forward
1501
1909
  include TypeHelpers
@@ -1824,6 +2232,75 @@ module Basecamp
1824
2232
  end
1825
2233
  end
1826
2234
 
2235
+ # GoogleDocument
2236
+ class GoogleDocument
2237
+ include TypeHelpers
2238
+ attr_accessor :app_url, :bucket, :created_at, :creator, :description_attachments, :document_type, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :description, :position, :subscription_url
2239
+
2240
+ # @return [Array<Symbol>]
2241
+ def self.required_fields
2242
+ %i[app_url bucket created_at creator description_attachments document_type id inherits_status parent status title type updated_at url visible_to_clients].freeze
2243
+ end
2244
+
2245
+ def initialize(data = {})
2246
+ @app_url = data["app_url"]
2247
+ @bucket = parse_type(data["bucket"], "TodoBucket")
2248
+ @created_at = parse_datetime(data["created_at"])
2249
+ @creator = parse_type(data["creator"], "Person")
2250
+ @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment")
2251
+ @document_type = data["document_type"]
2252
+ @id = parse_integer(data["id"])
2253
+ @inherits_status = parse_boolean(data["inherits_status"])
2254
+ @parent = parse_type(data["parent"], "RecordingParent")
2255
+ @status = data["status"]
2256
+ @title = data["title"]
2257
+ @type = data["type"]
2258
+ @updated_at = parse_datetime(data["updated_at"])
2259
+ @url = data["url"]
2260
+ @visible_to_clients = parse_boolean(data["visible_to_clients"])
2261
+ @bookmark_url = data["bookmark_url"]
2262
+ @boosts_count = parse_integer(data["boosts_count"])
2263
+ @boosts_url = data["boosts_url"]
2264
+ @comments_count = parse_integer(data["comments_count"])
2265
+ @comments_url = data["comments_url"]
2266
+ @description = data["description"]
2267
+ @position = parse_integer(data["position"])
2268
+ @subscription_url = data["subscription_url"]
2269
+ end
2270
+
2271
+ def to_h
2272
+ {
2273
+ "app_url" => @app_url,
2274
+ "bucket" => @bucket,
2275
+ "created_at" => @created_at,
2276
+ "creator" => @creator,
2277
+ "description_attachments" => @description_attachments,
2278
+ "document_type" => @document_type,
2279
+ "id" => @id,
2280
+ "inherits_status" => @inherits_status,
2281
+ "parent" => @parent,
2282
+ "status" => @status,
2283
+ "title" => @title,
2284
+ "type" => @type,
2285
+ "updated_at" => @updated_at,
2286
+ "url" => @url,
2287
+ "visible_to_clients" => @visible_to_clients,
2288
+ "bookmark_url" => @bookmark_url,
2289
+ "boosts_count" => @boosts_count,
2290
+ "boosts_url" => @boosts_url,
2291
+ "comments_count" => @comments_count,
2292
+ "comments_url" => @comments_url,
2293
+ "description" => @description,
2294
+ "position" => @position,
2295
+ "subscription_url" => @subscription_url,
2296
+ }.compact
2297
+ end
2298
+
2299
+ def to_json(*args)
2300
+ to_h.to_json(*args)
2301
+ end
2302
+ end
2303
+
1827
2304
  # HillChart
1828
2305
  class HillChart
1829
2306
  include TypeHelpers
@@ -2279,25 +2756,89 @@ module Basecamp
2279
2756
  end
2280
2757
  end
2281
2758
 
2282
- # Notification
2283
- class Notification
2759
+ # MyNote
2760
+ class MyNote
2284
2761
  include TypeHelpers
2285
- attr_accessor :created_at, :id, :updated_at, :app_url, :bookmark_url, :bubble_up_at, :bubble_up_url, :bucket_name, :content_excerpt, :creator, :image_url, :memory_url, :named, :participants, :previewable_attachments, :read_at, :readable_identifier, :readable_sgid, :section, :subscribed, :subscription_url, :title, :type, :unread_at, :unread_count, :unread_url
2762
+ attr_accessor :app_url, :content, :content_attachments, :created_at, :id, :type, :updated_at, :url
2286
2763
 
2287
2764
  # @return [Array<Symbol>]
2288
2765
  def self.required_fields
2289
- %i[created_at id updated_at].freeze
2766
+ %i[app_url content content_attachments created_at id type updated_at url].freeze
2290
2767
  end
2291
2768
 
2292
2769
  def initialize(data = {})
2770
+ @app_url = data["app_url"]
2771
+ @content = data["content"]
2772
+ @content_attachments = parse_array(data["content_attachments"], "RichTextAttachment")
2293
2773
  @created_at = parse_datetime(data["created_at"])
2294
- @id = parse_integer(data["id"])
2774
+ @id = data["id"]
2775
+ @type = data["type"]
2295
2776
  @updated_at = parse_datetime(data["updated_at"])
2296
- @app_url = data["app_url"]
2297
- @bookmark_url = data["bookmark_url"]
2298
- @bubble_up_at = parse_datetime(data["bubble_up_at"])
2299
- @bubble_up_url = data["bubble_up_url"]
2300
- @bucket_name = data["bucket_name"]
2777
+ @url = data["url"]
2778
+ end
2779
+
2780
+ def to_h
2781
+ {
2782
+ "app_url" => @app_url,
2783
+ "content" => @content,
2784
+ "content_attachments" => @content_attachments,
2785
+ "created_at" => @created_at,
2786
+ "id" => @id,
2787
+ "type" => @type,
2788
+ "updated_at" => @updated_at,
2789
+ "url" => @url,
2790
+ }.reject { |k, v| v.nil? && !["created_at", "id", "updated_at"].include?(k) }
2791
+ end
2792
+
2793
+ def to_json(*args)
2794
+ to_h.to_json(*args)
2795
+ end
2796
+ end
2797
+
2798
+ # MyNoteAttributes
2799
+ class MyNoteAttributes
2800
+ include TypeHelpers
2801
+ attr_accessor :content
2802
+
2803
+ # @return [Array<Symbol>]
2804
+ def self.required_fields
2805
+ %i[content].freeze
2806
+ end
2807
+
2808
+ def initialize(data = {})
2809
+ @content = data["content"]
2810
+ end
2811
+
2812
+ def to_h
2813
+ {
2814
+ "content" => @content,
2815
+ }.compact
2816
+ end
2817
+
2818
+ def to_json(*args)
2819
+ to_h.to_json(*args)
2820
+ end
2821
+ end
2822
+
2823
+ # Notification
2824
+ class Notification
2825
+ include TypeHelpers
2826
+ attr_accessor :created_at, :id, :updated_at, :app_url, :bookmark_url, :bubble_up_at, :bubble_up_url, :bucket_name, :content_excerpt, :creator, :image_url, :memory_url, :named, :participants, :previewable_attachments, :read_at, :readable_identifier, :readable_sgid, :section, :subscribed, :subscription_url, :title, :type, :unread_at, :unread_count, :unread_url
2827
+
2828
+ # @return [Array<Symbol>]
2829
+ def self.required_fields
2830
+ %i[created_at id updated_at].freeze
2831
+ end
2832
+
2833
+ def initialize(data = {})
2834
+ @created_at = parse_datetime(data["created_at"])
2835
+ @id = parse_integer(data["id"])
2836
+ @updated_at = parse_datetime(data["updated_at"])
2837
+ @app_url = data["app_url"]
2838
+ @bookmark_url = data["bookmark_url"]
2839
+ @bubble_up_at = parse_datetime(data["bubble_up_at"])
2840
+ @bubble_up_url = data["bubble_up_url"]
2841
+ @bucket_name = data["bucket_name"]
2301
2842
  @content_excerpt = data["content_excerpt"]
2302
2843
  @creator = parse_type(data["creator"], "Person")
2303
2844
  @image_url = data["image_url"]
@@ -3368,22 +3909,25 @@ module Basecamp
3368
3909
  # ScheduleEntry
3369
3910
  class ScheduleEntry
3370
3911
  include TypeHelpers
3371
- attr_accessor :app_url, :bucket, :created_at, :creator, :description_attachments, :id, :inherits_status, :parent, :status, :summary, :title, :type, :updated_at, :url, :visible_to_clients, :all_day, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :description, :ends_at, :participants, :starts_at, :subscription_url
3912
+ attr_accessor :all_day, :app_url, :bucket, :created_at, :creator, :description_attachments, :ends_at, :id, :inherits_status, :parent, :starts_at, :status, :summary, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :description, :highlighted, :join_url, :participants, :subscription_url
3372
3913
 
3373
3914
  # @return [Array<Symbol>]
3374
3915
  def self.required_fields
3375
- %i[app_url bucket created_at creator description_attachments id inherits_status parent status summary title type updated_at url visible_to_clients].freeze
3916
+ %i[all_day app_url bucket created_at creator description_attachments ends_at id inherits_status parent starts_at status summary title type updated_at url visible_to_clients].freeze
3376
3917
  end
3377
3918
 
3378
3919
  def initialize(data = {})
3920
+ @all_day = parse_boolean(data["all_day"])
3379
3921
  @app_url = data["app_url"]
3380
3922
  @bucket = parse_type(data["bucket"], "TodoBucket")
3381
3923
  @created_at = parse_datetime(data["created_at"])
3382
3924
  @creator = parse_type(data["creator"], "Person")
3383
3925
  @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment")
3926
+ @ends_at = data["ends_at"]
3384
3927
  @id = parse_integer(data["id"])
3385
3928
  @inherits_status = parse_boolean(data["inherits_status"])
3386
3929
  @parent = parse_type(data["parent"], "RecordingParent")
3930
+ @starts_at = data["starts_at"]
3387
3931
  @status = data["status"]
3388
3932
  @summary = data["summary"]
3389
3933
  @title = data["title"]
@@ -3391,29 +3935,31 @@ module Basecamp
3391
3935
  @updated_at = parse_datetime(data["updated_at"])
3392
3936
  @url = data["url"]
3393
3937
  @visible_to_clients = parse_boolean(data["visible_to_clients"])
3394
- @all_day = parse_boolean(data["all_day"])
3395
3938
  @bookmark_url = data["bookmark_url"]
3396
3939
  @boosts_count = parse_integer(data["boosts_count"])
3397
3940
  @boosts_url = data["boosts_url"]
3398
3941
  @comments_count = parse_integer(data["comments_count"])
3399
3942
  @comments_url = data["comments_url"]
3400
3943
  @description = data["description"]
3401
- @ends_at = data["ends_at"]
3944
+ @highlighted = parse_boolean(data["highlighted"])
3945
+ @join_url = data["join_url"]
3402
3946
  @participants = parse_array(data["participants"], "Person")
3403
- @starts_at = data["starts_at"]
3404
3947
  @subscription_url = data["subscription_url"]
3405
3948
  end
3406
3949
 
3407
3950
  def to_h
3408
3951
  {
3952
+ "all_day" => @all_day,
3409
3953
  "app_url" => @app_url,
3410
3954
  "bucket" => @bucket,
3411
3955
  "created_at" => @created_at,
3412
3956
  "creator" => @creator,
3413
3957
  "description_attachments" => @description_attachments,
3958
+ "ends_at" => @ends_at,
3414
3959
  "id" => @id,
3415
3960
  "inherits_status" => @inherits_status,
3416
3961
  "parent" => @parent,
3962
+ "starts_at" => @starts_at,
3417
3963
  "status" => @status,
3418
3964
  "summary" => @summary,
3419
3965
  "title" => @title,
@@ -3421,16 +3967,15 @@ module Basecamp
3421
3967
  "updated_at" => @updated_at,
3422
3968
  "url" => @url,
3423
3969
  "visible_to_clients" => @visible_to_clients,
3424
- "all_day" => @all_day,
3425
3970
  "bookmark_url" => @bookmark_url,
3426
3971
  "boosts_count" => @boosts_count,
3427
3972
  "boosts_url" => @boosts_url,
3428
3973
  "comments_count" => @comments_count,
3429
3974
  "comments_url" => @comments_url,
3430
3975
  "description" => @description,
3431
- "ends_at" => @ends_at,
3976
+ "highlighted" => @highlighted,
3977
+ "join_url" => @join_url,
3432
3978
  "participants" => @participants,
3433
- "starts_at" => @starts_at,
3434
3979
  "subscription_url" => @subscription_url,
3435
3980
  }.compact
3436
3981
  end
@@ -4019,19 +4564,22 @@ module Basecamp
4019
4564
  # Todolist
4020
4565
  class Todolist
4021
4566
  include TypeHelpers
4022
- attr_accessor :app_url, :bubble_up_url, :bucket, :created_at, :creator, :description_attachments, :id, :inherits_status, :name, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todos_url, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :completed, :completed_ratio, :description, :groups_url, :position, :subscription_url, :todos_url
4567
+ attr_accessor :app_url, :bubble_up_url, :bucket, :color, :comments_app_url, :created_at, :creator, :description, :description_attachments, :id, :inherits_status, :name, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todos_url, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :completed, :completed_ratio, :group_position_url, :groups_url, :position, :subscription_url, :todos_url
4023
4568
 
4024
4569
  # @return [Array<Symbol>]
4025
4570
  def self.required_fields
4026
- %i[app_url bubble_up_url bucket created_at creator description_attachments id inherits_status name parent status title type updated_at url visible_to_clients].freeze
4571
+ %i[app_url bubble_up_url bucket color comments_app_url created_at creator description description_attachments id inherits_status name parent status title type updated_at url visible_to_clients].freeze
4027
4572
  end
4028
4573
 
4029
4574
  def initialize(data = {})
4030
4575
  @app_url = data["app_url"]
4031
4576
  @bubble_up_url = data["bubble_up_url"]
4032
4577
  @bucket = parse_type(data["bucket"], "TodoBucket")
4578
+ @color = data["color"]
4579
+ @comments_app_url = data["comments_app_url"]
4033
4580
  @created_at = parse_datetime(data["created_at"])
4034
4581
  @creator = parse_type(data["creator"], "Person")
4582
+ @description = data["description"]
4035
4583
  @description_attachments = parse_array(data["description_attachments"], "RichTextAttachment")
4036
4584
  @id = parse_integer(data["id"])
4037
4585
  @inherits_status = parse_boolean(data["inherits_status"])
@@ -4051,7 +4599,7 @@ module Basecamp
4051
4599
  @comments_url = data["comments_url"]
4052
4600
  @completed = parse_boolean(data["completed"])
4053
4601
  @completed_ratio = data["completed_ratio"]
4054
- @description = data["description"]
4602
+ @group_position_url = data["group_position_url"]
4055
4603
  @groups_url = data["groups_url"]
4056
4604
  @position = parse_integer(data["position"])
4057
4605
  @subscription_url = data["subscription_url"]
@@ -4063,8 +4611,11 @@ module Basecamp
4063
4611
  "app_url" => @app_url,
4064
4612
  "bubble_up_url" => @bubble_up_url,
4065
4613
  "bucket" => @bucket,
4614
+ "color" => @color,
4615
+ "comments_app_url" => @comments_app_url,
4066
4616
  "created_at" => @created_at,
4067
4617
  "creator" => @creator,
4618
+ "description" => @description,
4068
4619
  "description_attachments" => @description_attachments,
4069
4620
  "id" => @id,
4070
4621
  "inherits_status" => @inherits_status,
@@ -4084,12 +4635,12 @@ module Basecamp
4084
4635
  "comments_url" => @comments_url,
4085
4636
  "completed" => @completed,
4086
4637
  "completed_ratio" => @completed_ratio,
4087
- "description" => @description,
4638
+ "group_position_url" => @group_position_url,
4088
4639
  "groups_url" => @groups_url,
4089
4640
  "position" => @position,
4090
4641
  "subscription_url" => @subscription_url,
4091
4642
  "todos_url" => @todos_url,
4092
- }.compact
4643
+ }.reject { |k, v| v.nil? && !["color"].include?(k) }
4093
4644
  end
4094
4645
 
4095
4646
  def to_json(*args)
@@ -4097,68 +4648,68 @@ module Basecamp
4097
4648
  end
4098
4649
  end
4099
4650
 
4100
- # TodolistGroup
4101
- class TodolistGroup
4651
+ # Todoset
4652
+ class Todoset
4102
4653
  include TypeHelpers
4103
- attr_accessor :app_url, :bubble_up_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todos_url, :bookmark_url, :comments_count, :comments_url, :completed, :completed_ratio, :position, :subscription_url, :todos_url
4654
+ attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :app_todos_url, :bookmark_url, :completed, :completed_loose_todos_count, :completed_ratio, :position, :todolists_count, :todolists_url, :todos_count, :todos_url
4104
4655
 
4105
4656
  # @return [Array<Symbol>]
4106
4657
  def self.required_fields
4107
- %i[app_url bubble_up_url bucket created_at creator id inherits_status name parent status title type updated_at url visible_to_clients].freeze
4658
+ %i[app_url bucket created_at creator id inherits_status name status title type updated_at url visible_to_clients].freeze
4108
4659
  end
4109
4660
 
4110
4661
  def initialize(data = {})
4111
4662
  @app_url = data["app_url"]
4112
- @bubble_up_url = data["bubble_up_url"]
4113
4663
  @bucket = parse_type(data["bucket"], "TodoBucket")
4114
4664
  @created_at = parse_datetime(data["created_at"])
4115
4665
  @creator = parse_type(data["creator"], "Person")
4116
4666
  @id = parse_integer(data["id"])
4117
4667
  @inherits_status = parse_boolean(data["inherits_status"])
4118
4668
  @name = data["name"]
4119
- @parent = parse_type(data["parent"], "TodoParent")
4120
4669
  @status = data["status"]
4121
4670
  @title = data["title"]
4122
4671
  @type = data["type"]
4123
4672
  @updated_at = parse_datetime(data["updated_at"])
4124
4673
  @url = data["url"]
4125
4674
  @visible_to_clients = parse_boolean(data["visible_to_clients"])
4675
+ @app_todolists_url = data["app_todolists_url"]
4126
4676
  @app_todos_url = data["app_todos_url"]
4127
4677
  @bookmark_url = data["bookmark_url"]
4128
- @comments_count = parse_integer(data["comments_count"])
4129
- @comments_url = data["comments_url"]
4130
4678
  @completed = parse_boolean(data["completed"])
4679
+ @completed_loose_todos_count = parse_integer(data["completed_loose_todos_count"])
4131
4680
  @completed_ratio = data["completed_ratio"]
4132
4681
  @position = parse_integer(data["position"])
4133
- @subscription_url = data["subscription_url"]
4682
+ @todolists_count = parse_integer(data["todolists_count"])
4683
+ @todolists_url = data["todolists_url"]
4684
+ @todos_count = parse_integer(data["todos_count"])
4134
4685
  @todos_url = data["todos_url"]
4135
4686
  end
4136
4687
 
4137
4688
  def to_h
4138
4689
  {
4139
4690
  "app_url" => @app_url,
4140
- "bubble_up_url" => @bubble_up_url,
4141
4691
  "bucket" => @bucket,
4142
4692
  "created_at" => @created_at,
4143
4693
  "creator" => @creator,
4144
4694
  "id" => @id,
4145
4695
  "inherits_status" => @inherits_status,
4146
4696
  "name" => @name,
4147
- "parent" => @parent,
4148
4697
  "status" => @status,
4149
4698
  "title" => @title,
4150
4699
  "type" => @type,
4151
4700
  "updated_at" => @updated_at,
4152
4701
  "url" => @url,
4153
4702
  "visible_to_clients" => @visible_to_clients,
4703
+ "app_todolists_url" => @app_todolists_url,
4154
4704
  "app_todos_url" => @app_todos_url,
4155
4705
  "bookmark_url" => @bookmark_url,
4156
- "comments_count" => @comments_count,
4157
- "comments_url" => @comments_url,
4158
4706
  "completed" => @completed,
4707
+ "completed_loose_todos_count" => @completed_loose_todos_count,
4159
4708
  "completed_ratio" => @completed_ratio,
4160
4709
  "position" => @position,
4161
- "subscription_url" => @subscription_url,
4710
+ "todolists_count" => @todolists_count,
4711
+ "todolists_url" => @todolists_url,
4712
+ "todos_count" => @todos_count,
4162
4713
  "todos_url" => @todos_url,
4163
4714
  }.compact
4164
4715
  end
@@ -4168,69 +4719,100 @@ module Basecamp
4168
4719
  end
4169
4720
  end
4170
4721
 
4171
- # Todoset
4172
- class Todoset
4722
+ # Tool
4723
+ class Tool
4173
4724
  include TypeHelpers
4174
- attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :app_todos_url, :bookmark_url, :completed, :completed_loose_todos_count, :completed_ratio, :position, :todolists_count, :todolists_url, :todos_count, :todos_url
4725
+ attr_accessor :created_at, :enabled, :id, :name, :title, :updated_at, :app_url, :bucket, :position, :status, :url
4175
4726
 
4176
4727
  # @return [Array<Symbol>]
4177
4728
  def self.required_fields
4178
- %i[app_url bucket created_at creator id inherits_status name status title type updated_at url visible_to_clients].freeze
4729
+ %i[created_at enabled id name title updated_at].freeze
4179
4730
  end
4180
4731
 
4181
4732
  def initialize(data = {})
4182
- @app_url = data["app_url"]
4183
- @bucket = parse_type(data["bucket"], "TodoBucket")
4184
4733
  @created_at = parse_datetime(data["created_at"])
4185
- @creator = parse_type(data["creator"], "Person")
4734
+ @enabled = parse_boolean(data["enabled"])
4186
4735
  @id = parse_integer(data["id"])
4187
- @inherits_status = parse_boolean(data["inherits_status"])
4188
4736
  @name = data["name"]
4189
- @status = data["status"]
4190
4737
  @title = data["title"]
4191
- @type = data["type"]
4192
4738
  @updated_at = parse_datetime(data["updated_at"])
4739
+ @app_url = data["app_url"]
4740
+ @bucket = parse_type(data["bucket"], "RecordingBucket")
4741
+ @position = parse_integer(data["position"])
4742
+ @status = data["status"]
4193
4743
  @url = data["url"]
4194
- @visible_to_clients = parse_boolean(data["visible_to_clients"])
4195
- @app_todolists_url = data["app_todolists_url"]
4196
- @app_todos_url = data["app_todos_url"]
4197
- @bookmark_url = data["bookmark_url"]
4744
+ end
4745
+
4746
+ def to_h
4747
+ {
4748
+ "created_at" => @created_at,
4749
+ "enabled" => @enabled,
4750
+ "id" => @id,
4751
+ "name" => @name,
4752
+ "title" => @title,
4753
+ "updated_at" => @updated_at,
4754
+ "app_url" => @app_url,
4755
+ "bucket" => @bucket,
4756
+ "position" => @position,
4757
+ "status" => @status,
4758
+ "url" => @url,
4759
+ }.compact
4760
+ end
4761
+
4762
+ def to_json(*args)
4763
+ to_h.to_json(*args)
4764
+ end
4765
+ end
4766
+
4767
+ # UpcomingAssignable
4768
+ class UpcomingAssignable
4769
+ include TypeHelpers
4770
+ attr_accessor :app_url, :assignees, :bucket, :comments_count, :completed, :completion_url, :content, :id, :parent, :repeating, :status, :type, :url, :visible_to_clients, :completion, :due_on, :starts_on
4771
+
4772
+ # @return [Array<Symbol>]
4773
+ def self.required_fields
4774
+ %i[app_url assignees bucket comments_count completed completion_url content id parent repeating status type url visible_to_clients].freeze
4775
+ end
4776
+
4777
+ def initialize(data = {})
4778
+ @app_url = data["app_url"]
4779
+ @assignees = parse_array(data["assignees"], "UpcomingSchedulePerson")
4780
+ @bucket = parse_type(data["bucket"], "UpcomingScheduleBucket")
4781
+ @comments_count = parse_integer(data["comments_count"])
4198
4782
  @completed = parse_boolean(data["completed"])
4199
- @completed_loose_todos_count = parse_integer(data["completed_loose_todos_count"])
4200
- @completed_ratio = data["completed_ratio"]
4201
- @position = parse_integer(data["position"])
4202
- @todolists_count = parse_integer(data["todolists_count"])
4203
- @todolists_url = data["todolists_url"]
4204
- @todos_count = parse_integer(data["todos_count"])
4205
- @todos_url = data["todos_url"]
4783
+ @completion_url = data["completion_url"]
4784
+ @content = data["content"]
4785
+ @id = parse_integer(data["id"])
4786
+ @parent = parse_type(data["parent"], "UpcomingAssignableParent")
4787
+ @repeating = parse_boolean(data["repeating"])
4788
+ @status = data["status"]
4789
+ @type = data["type"]
4790
+ @url = data["url"]
4791
+ @visible_to_clients = parse_boolean(data["visible_to_clients"])
4792
+ @completion = parse_type(data["completion"], "UpcomingAssignableCompletion")
4793
+ @due_on = data["due_on"]
4794
+ @starts_on = data["starts_on"]
4206
4795
  end
4207
4796
 
4208
4797
  def to_h
4209
4798
  {
4210
4799
  "app_url" => @app_url,
4800
+ "assignees" => @assignees,
4211
4801
  "bucket" => @bucket,
4212
- "created_at" => @created_at,
4213
- "creator" => @creator,
4802
+ "comments_count" => @comments_count,
4803
+ "completed" => @completed,
4804
+ "completion_url" => @completion_url,
4805
+ "content" => @content,
4214
4806
  "id" => @id,
4215
- "inherits_status" => @inherits_status,
4216
- "name" => @name,
4807
+ "parent" => @parent,
4808
+ "repeating" => @repeating,
4217
4809
  "status" => @status,
4218
- "title" => @title,
4219
4810
  "type" => @type,
4220
- "updated_at" => @updated_at,
4221
4811
  "url" => @url,
4222
4812
  "visible_to_clients" => @visible_to_clients,
4223
- "app_todolists_url" => @app_todolists_url,
4224
- "app_todos_url" => @app_todos_url,
4225
- "bookmark_url" => @bookmark_url,
4226
- "completed" => @completed,
4227
- "completed_loose_todos_count" => @completed_loose_todos_count,
4228
- "completed_ratio" => @completed_ratio,
4229
- "position" => @position,
4230
- "todolists_count" => @todolists_count,
4231
- "todolists_url" => @todolists_url,
4232
- "todos_count" => @todos_count,
4233
- "todos_url" => @todos_url,
4813
+ "completion" => @completion,
4814
+ "due_on" => @due_on,
4815
+ "starts_on" => @starts_on,
4234
4816
  }.compact
4235
4817
  end
4236
4818
 
@@ -4239,43 +4821,161 @@ module Basecamp
4239
4821
  end
4240
4822
  end
4241
4823
 
4242
- # Tool
4243
- class Tool
4824
+ # UpcomingAssignableCompletion
4825
+ class UpcomingAssignableCompletion
4244
4826
  include TypeHelpers
4245
- attr_accessor :created_at, :enabled, :id, :name, :title, :updated_at, :app_url, :bucket, :position, :status, :url
4827
+ attr_accessor :created_at, :creator
4246
4828
 
4247
4829
  # @return [Array<Symbol>]
4248
4830
  def self.required_fields
4249
- %i[created_at enabled id name title updated_at].freeze
4831
+ %i[created_at creator].freeze
4250
4832
  end
4251
4833
 
4252
4834
  def initialize(data = {})
4253
4835
  @created_at = parse_datetime(data["created_at"])
4254
- @enabled = parse_boolean(data["enabled"])
4836
+ @creator = parse_type(data["creator"], "UpcomingSchedulePerson")
4837
+ end
4838
+
4839
+ def to_h
4840
+ {
4841
+ "created_at" => @created_at,
4842
+ "creator" => @creator,
4843
+ }.compact
4844
+ end
4845
+
4846
+ def to_json(*args)
4847
+ to_h.to_json(*args)
4848
+ end
4849
+ end
4850
+
4851
+ # UpcomingAssignableParent
4852
+ class UpcomingAssignableParent
4853
+ include TypeHelpers
4854
+ attr_accessor :id, :title
4855
+
4856
+ # @return [Array<Symbol>]
4857
+ def self.required_fields
4858
+ %i[id title].freeze
4859
+ end
4860
+
4861
+ def initialize(data = {})
4255
4862
  @id = parse_integer(data["id"])
4256
- @name = data["name"]
4257
4863
  @title = data["title"]
4258
- @updated_at = parse_datetime(data["updated_at"])
4864
+ end
4865
+
4866
+ def to_h
4867
+ {
4868
+ "id" => @id,
4869
+ "title" => @title,
4870
+ }.compact
4871
+ end
4872
+
4873
+ def to_json(*args)
4874
+ to_h.to_json(*args)
4875
+ end
4876
+ end
4877
+
4878
+ # UpcomingScheduleBucket
4879
+ class UpcomingScheduleBucket
4880
+ include TypeHelpers
4881
+ attr_accessor :id, :name
4882
+
4883
+ # @return [Array<Symbol>]
4884
+ def self.required_fields
4885
+ %i[id name].freeze
4886
+ end
4887
+
4888
+ def initialize(data = {})
4889
+ @id = parse_integer(data["id"])
4890
+ @name = data["name"]
4891
+ end
4892
+
4893
+ def to_h
4894
+ {
4895
+ "id" => @id,
4896
+ "name" => @name,
4897
+ }.compact
4898
+ end
4899
+
4900
+ def to_json(*args)
4901
+ to_h.to_json(*args)
4902
+ end
4903
+ end
4904
+
4905
+ # UpcomingScheduleEntry
4906
+ class UpcomingScheduleEntry
4907
+ include TypeHelpers
4908
+ attr_accessor :all_day, :app_url, :bucket, :comments_count, :creator, :ends_at, :id, :participants, :recurring, :starts_at, :status, :summary, :type, :url, :visible_to_clients
4909
+
4910
+ # @return [Array<Symbol>]
4911
+ def self.required_fields
4912
+ %i[all_day app_url bucket comments_count creator ends_at id participants recurring starts_at status summary type url visible_to_clients].freeze
4913
+ end
4914
+
4915
+ def initialize(data = {})
4916
+ @all_day = parse_boolean(data["all_day"])
4259
4917
  @app_url = data["app_url"]
4260
- @bucket = parse_type(data["bucket"], "RecordingBucket")
4261
- @position = parse_integer(data["position"])
4918
+ @bucket = parse_type(data["bucket"], "UpcomingScheduleBucket")
4919
+ @comments_count = parse_integer(data["comments_count"])
4920
+ @creator = parse_type(data["creator"], "UpcomingSchedulePerson")
4921
+ @ends_at = data["ends_at"]
4922
+ @id = parse_integer(data["id"])
4923
+ @participants = parse_array(data["participants"], "UpcomingSchedulePerson")
4924
+ @recurring = parse_boolean(data["recurring"])
4925
+ @starts_at = data["starts_at"]
4262
4926
  @status = data["status"]
4927
+ @summary = data["summary"]
4928
+ @type = data["type"]
4263
4929
  @url = data["url"]
4930
+ @visible_to_clients = parse_boolean(data["visible_to_clients"])
4264
4931
  end
4265
4932
 
4266
4933
  def to_h
4267
4934
  {
4268
- "created_at" => @created_at,
4269
- "enabled" => @enabled,
4270
- "id" => @id,
4271
- "name" => @name,
4272
- "title" => @title,
4273
- "updated_at" => @updated_at,
4935
+ "all_day" => @all_day,
4274
4936
  "app_url" => @app_url,
4275
4937
  "bucket" => @bucket,
4276
- "position" => @position,
4938
+ "comments_count" => @comments_count,
4939
+ "creator" => @creator,
4940
+ "ends_at" => @ends_at,
4941
+ "id" => @id,
4942
+ "participants" => @participants,
4943
+ "recurring" => @recurring,
4944
+ "starts_at" => @starts_at,
4277
4945
  "status" => @status,
4946
+ "summary" => @summary,
4947
+ "type" => @type,
4278
4948
  "url" => @url,
4949
+ "visible_to_clients" => @visible_to_clients,
4950
+ }.compact
4951
+ end
4952
+
4953
+ def to_json(*args)
4954
+ to_h.to_json(*args)
4955
+ end
4956
+ end
4957
+
4958
+ # UpcomingSchedulePerson
4959
+ class UpcomingSchedulePerson
4960
+ include TypeHelpers
4961
+ attr_accessor :avatar_url, :id, :name
4962
+
4963
+ # @return [Array<Symbol>]
4964
+ def self.required_fields
4965
+ %i[avatar_url id name].freeze
4966
+ end
4967
+
4968
+ def initialize(data = {})
4969
+ @avatar_url = data["avatar_url"]
4970
+ @id = parse_integer(data["id"])
4971
+ @name = data["name"]
4972
+ end
4973
+
4974
+ def to_h
4975
+ {
4976
+ "avatar_url" => @avatar_url,
4977
+ "id" => @id,
4978
+ "name" => @name,
4279
4979
  }.compact
4280
4980
  end
4281
4981