basecamp-sdk 0.5.0 → 0.7.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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/basecamp/ambiguous_error.rb +23 -0
- data/lib/basecamp/api_error.rb +27 -0
- data/lib/basecamp/auth_error.rb +16 -0
- data/lib/basecamp/auth_strategy.rb +0 -18
- data/lib/basecamp/bearer_auth.rb +21 -0
- data/lib/basecamp/client.rb +162 -0
- data/lib/basecamp/download_result.rb +10 -0
- data/lib/basecamp/error.rb +86 -0
- data/lib/basecamp/error_code.rb +16 -0
- data/lib/basecamp/exit_code.rb +17 -0
- data/lib/basecamp/forbidden_error.rb +20 -0
- data/lib/basecamp/generated/metadata.json +316 -1
- data/lib/basecamp/generated/services/account_service.rb +49 -0
- data/lib/basecamp/{services → generated/services}/authorization_service.rb +1 -1
- data/lib/basecamp/generated/services/automation_service.rb +19 -0
- data/lib/basecamp/{services → generated/services}/base_service.rb +33 -2
- data/lib/basecamp/generated/services/campfires_service.rb +10 -4
- data/lib/basecamp/generated/services/card_steps_service.rb +9 -0
- data/lib/basecamp/generated/services/cards_service.rb +3 -2
- data/lib/basecamp/generated/services/client_approvals_service.rb +5 -2
- data/lib/basecamp/generated/services/client_correspondences_service.rb +5 -2
- data/lib/basecamp/generated/services/forwards_service.rb +5 -2
- data/lib/basecamp/generated/services/gauges_service.rb +83 -0
- data/lib/basecamp/generated/services/hill_charts_service.rb +31 -0
- data/lib/basecamp/generated/services/my_assignments_service.rb +37 -0
- data/lib/basecamp/generated/services/my_notifications_service.rb +30 -0
- data/lib/basecamp/generated/services/people_service.rb +63 -0
- data/lib/basecamp/generated/services/search_service.rb +1 -1
- data/lib/basecamp/generated/services/tools_service.rb +3 -2
- data/lib/basecamp/generated/types.rb +962 -110
- data/lib/basecamp/http.rb +33 -13
- data/lib/basecamp/network_error.rb +16 -0
- data/lib/basecamp/not_found_error.rb +20 -0
- data/lib/basecamp/oauth/config.rb +30 -0
- data/lib/basecamp/oauth/discovery.rb +9 -41
- data/lib/basecamp/oauth/exchange.rb +20 -114
- data/lib/basecamp/oauth/exchange_request.rb +36 -0
- data/lib/basecamp/oauth/{errors.rb → oauth_error.rb} +1 -1
- data/lib/basecamp/oauth/refresh_request.rb +30 -0
- data/lib/basecamp/oauth/token.rb +52 -0
- data/lib/basecamp/oauth.rb +40 -8
- data/lib/basecamp/operation_info.rb +0 -7
- data/lib/basecamp/operation_result.rb +10 -0
- data/lib/basecamp/rate_limit_error.rb +19 -0
- data/lib/basecamp/security.rb +1 -1
- data/lib/basecamp/usage_error.rb +10 -0
- data/lib/basecamp/validation_error.rb +15 -0
- data/lib/basecamp/version.rb +1 -1
- data/lib/basecamp/webhooks/rack_middleware.rb +0 -2
- data/lib/basecamp/webhooks/receiver.rb +0 -4
- data/lib/basecamp/webhooks/verification_error.rb +7 -0
- data/lib/basecamp.rb +62 -22
- data/scripts/generate-services.rb +42 -7
- metadata +31 -43
- data/lib/basecamp/errors.rb +0 -294
- data/lib/basecamp/oauth/types.rb +0 -133
- data/lib/basecamp/services/attachments_service.rb +0 -33
- data/lib/basecamp/services/campfires_service.rb +0 -141
- data/lib/basecamp/services/card_columns_service.rb +0 -106
- data/lib/basecamp/services/card_steps_service.rb +0 -86
- data/lib/basecamp/services/card_tables_service.rb +0 -23
- data/lib/basecamp/services/cards_service.rb +0 -93
- data/lib/basecamp/services/checkins_service.rb +0 -127
- data/lib/basecamp/services/client_approvals_service.rb +0 -33
- data/lib/basecamp/services/client_correspondences_service.rb +0 -33
- data/lib/basecamp/services/client_replies_service.rb +0 -35
- data/lib/basecamp/services/comments_service.rb +0 -63
- data/lib/basecamp/services/documents_service.rb +0 -74
- data/lib/basecamp/services/events_service.rb +0 -27
- data/lib/basecamp/services/forwards_service.rb +0 -80
- data/lib/basecamp/services/lineup_service.rb +0 -67
- data/lib/basecamp/services/message_boards_service.rb +0 -24
- data/lib/basecamp/services/message_types_service.rb +0 -79
- data/lib/basecamp/services/messages_service.rb +0 -133
- data/lib/basecamp/services/people_service.rb +0 -73
- data/lib/basecamp/services/projects_service.rb +0 -67
- data/lib/basecamp/services/recordings_service.rb +0 -127
- data/lib/basecamp/services/reports_service.rb +0 -80
- data/lib/basecamp/services/schedules_service.rb +0 -156
- data/lib/basecamp/services/search_service.rb +0 -36
- data/lib/basecamp/services/subscriptions_service.rb +0 -67
- data/lib/basecamp/services/templates_service.rb +0 -96
- data/lib/basecamp/services/timeline_service.rb +0 -62
- data/lib/basecamp/services/timesheet_service.rb +0 -68
- data/lib/basecamp/services/todolist_groups_service.rb +0 -100
- data/lib/basecamp/services/todolists_service.rb +0 -104
- data/lib/basecamp/services/todos_service.rb +0 -156
- data/lib/basecamp/services/todosets_service.rb +0 -23
- data/lib/basecamp/services/tools_service.rb +0 -89
- data/lib/basecamp/services/uploads_service.rb +0 -84
- data/lib/basecamp/services/vaults_service.rb +0 -84
- data/lib/basecamp/services/webhooks_service.rb +0 -88
|
@@ -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-03-
|
|
4
|
+
# Generated: 2026-03-23T21:15:35Z
|
|
5
5
|
|
|
6
6
|
require "json"
|
|
7
7
|
require "time"
|
|
@@ -62,6 +62,141 @@ module Basecamp
|
|
|
62
62
|
module Types
|
|
63
63
|
include TypeHelpers
|
|
64
64
|
|
|
65
|
+
# Account
|
|
66
|
+
class Account
|
|
67
|
+
include TypeHelpers
|
|
68
|
+
attr_accessor :created_at, :id, :name, :updated_at, :active, :frozen, :limits, :logo, :owner_name, :paused, :settings, :subscription, :trial, :trial_ends_on
|
|
69
|
+
|
|
70
|
+
# @return [Array<Symbol>]
|
|
71
|
+
def self.required_fields
|
|
72
|
+
%i[created_at id name updated_at].freeze
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def initialize(data = {})
|
|
76
|
+
@created_at = parse_datetime(data["created_at"])
|
|
77
|
+
@id = parse_integer(data["id"])
|
|
78
|
+
@name = data["name"]
|
|
79
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
80
|
+
@active = parse_boolean(data["active"])
|
|
81
|
+
@frozen = parse_boolean(data["frozen"])
|
|
82
|
+
@limits = parse_type(data["limits"], "AccountLimits")
|
|
83
|
+
@logo = data["logo"]
|
|
84
|
+
@owner_name = data["owner_name"]
|
|
85
|
+
@paused = parse_boolean(data["paused"])
|
|
86
|
+
@settings = parse_type(data["settings"], "AccountSettings")
|
|
87
|
+
@subscription = parse_type(data["subscription"], "AccountSubscription")
|
|
88
|
+
@trial = parse_boolean(data["trial"])
|
|
89
|
+
@trial_ends_on = data["trial_ends_on"]
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def to_h
|
|
93
|
+
{
|
|
94
|
+
"created_at" => @created_at,
|
|
95
|
+
"id" => @id,
|
|
96
|
+
"name" => @name,
|
|
97
|
+
"updated_at" => @updated_at,
|
|
98
|
+
"active" => @active,
|
|
99
|
+
"frozen" => @frozen,
|
|
100
|
+
"limits" => @limits,
|
|
101
|
+
"logo" => @logo,
|
|
102
|
+
"owner_name" => @owner_name,
|
|
103
|
+
"paused" => @paused,
|
|
104
|
+
"settings" => @settings,
|
|
105
|
+
"subscription" => @subscription,
|
|
106
|
+
"trial" => @trial,
|
|
107
|
+
"trial_ends_on" => @trial_ends_on,
|
|
108
|
+
}.compact
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def to_json(*args)
|
|
112
|
+
to_h.to_json(*args)
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# AccountLimits
|
|
117
|
+
class AccountLimits
|
|
118
|
+
include TypeHelpers
|
|
119
|
+
attr_accessor :can_create_projects, :can_create_users, :can_pin_projects, :can_upload_files
|
|
120
|
+
|
|
121
|
+
def initialize(data = {})
|
|
122
|
+
@can_create_projects = parse_boolean(data["can_create_projects"])
|
|
123
|
+
@can_create_users = parse_boolean(data["can_create_users"])
|
|
124
|
+
@can_pin_projects = parse_boolean(data["can_pin_projects"])
|
|
125
|
+
@can_upload_files = parse_boolean(data["can_upload_files"])
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def to_h
|
|
129
|
+
{
|
|
130
|
+
"can_create_projects" => @can_create_projects,
|
|
131
|
+
"can_create_users" => @can_create_users,
|
|
132
|
+
"can_pin_projects" => @can_pin_projects,
|
|
133
|
+
"can_upload_files" => @can_upload_files,
|
|
134
|
+
}.compact
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def to_json(*args)
|
|
138
|
+
to_h.to_json(*args)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# AccountSettings
|
|
143
|
+
class AccountSettings
|
|
144
|
+
include TypeHelpers
|
|
145
|
+
attr_accessor :company_hq_enabled, :projects_enabled, :teams_enabled
|
|
146
|
+
|
|
147
|
+
def initialize(data = {})
|
|
148
|
+
@company_hq_enabled = parse_boolean(data["company_hq_enabled"])
|
|
149
|
+
@projects_enabled = parse_boolean(data["projects_enabled"])
|
|
150
|
+
@teams_enabled = parse_boolean(data["teams_enabled"])
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
def to_h
|
|
154
|
+
{
|
|
155
|
+
"company_hq_enabled" => @company_hq_enabled,
|
|
156
|
+
"projects_enabled" => @projects_enabled,
|
|
157
|
+
"teams_enabled" => @teams_enabled,
|
|
158
|
+
}.compact
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
def to_json(*args)
|
|
162
|
+
to_h.to_json(*args)
|
|
163
|
+
end
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# AccountSubscription
|
|
167
|
+
class AccountSubscription
|
|
168
|
+
include TypeHelpers
|
|
169
|
+
attr_accessor :clients, :logo, :project_limit, :proper_name, :short_name, :teams, :templates, :timesheet
|
|
170
|
+
|
|
171
|
+
def initialize(data = {})
|
|
172
|
+
@clients = parse_boolean(data["clients"])
|
|
173
|
+
@logo = parse_boolean(data["logo"])
|
|
174
|
+
@project_limit = parse_integer(data["project_limit"])
|
|
175
|
+
@proper_name = data["proper_name"]
|
|
176
|
+
@short_name = data["short_name"]
|
|
177
|
+
@teams = parse_boolean(data["teams"])
|
|
178
|
+
@templates = parse_boolean(data["templates"])
|
|
179
|
+
@timesheet = parse_boolean(data["timesheet"])
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
def to_h
|
|
183
|
+
{
|
|
184
|
+
"clients" => @clients,
|
|
185
|
+
"logo" => @logo,
|
|
186
|
+
"project_limit" => @project_limit,
|
|
187
|
+
"proper_name" => @proper_name,
|
|
188
|
+
"short_name" => @short_name,
|
|
189
|
+
"teams" => @teams,
|
|
190
|
+
"templates" => @templates,
|
|
191
|
+
"timesheet" => @timesheet,
|
|
192
|
+
}.compact
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
def to_json(*args)
|
|
196
|
+
to_h.to_json(*args)
|
|
197
|
+
end
|
|
198
|
+
end
|
|
199
|
+
|
|
65
200
|
# Assignable
|
|
66
201
|
class Assignable
|
|
67
202
|
include TypeHelpers
|
|
@@ -367,7 +502,7 @@ module Basecamp
|
|
|
367
502
|
# CardColumn
|
|
368
503
|
class CardColumn
|
|
369
504
|
include TypeHelpers
|
|
370
|
-
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :cards_count, :cards_url, :color, :comments_count, :description, :position, :subscribers
|
|
505
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :cards_count, :cards_url, :color, :comments_count, :description, :on_hold, :position, :subscribers
|
|
371
506
|
|
|
372
507
|
# @return [Array<Symbol>]
|
|
373
508
|
def self.required_fields
|
|
@@ -394,6 +529,7 @@ module Basecamp
|
|
|
394
529
|
@color = data["color"]
|
|
395
530
|
@comments_count = parse_integer(data["comments_count"])
|
|
396
531
|
@description = data["description"]
|
|
532
|
+
@on_hold = parse_type(data["on_hold"], "CardColumnOnHold")
|
|
397
533
|
@position = parse_integer(data["position"])
|
|
398
534
|
@subscribers = parse_array(data["subscribers"], "Person")
|
|
399
535
|
end
|
|
@@ -419,6 +555,7 @@ module Basecamp
|
|
|
419
555
|
"color" => @color,
|
|
420
556
|
"comments_count" => @comments_count,
|
|
421
557
|
"description" => @description,
|
|
558
|
+
"on_hold" => @on_hold,
|
|
422
559
|
"position" => @position,
|
|
423
560
|
"subscribers" => @subscribers,
|
|
424
561
|
}.compact
|
|
@@ -429,6 +566,45 @@ module Basecamp
|
|
|
429
566
|
end
|
|
430
567
|
end
|
|
431
568
|
|
|
569
|
+
# CardColumnOnHold
|
|
570
|
+
class CardColumnOnHold
|
|
571
|
+
include TypeHelpers
|
|
572
|
+
attr_accessor :cards_count, :cards_url, :created_at, :id, :inherits_status, :status, :title, :updated_at
|
|
573
|
+
|
|
574
|
+
# @return [Array<Symbol>]
|
|
575
|
+
def self.required_fields
|
|
576
|
+
%i[cards_count cards_url created_at id inherits_status status title updated_at].freeze
|
|
577
|
+
end
|
|
578
|
+
|
|
579
|
+
def initialize(data = {})
|
|
580
|
+
@cards_count = parse_integer(data["cards_count"])
|
|
581
|
+
@cards_url = data["cards_url"]
|
|
582
|
+
@created_at = parse_datetime(data["created_at"])
|
|
583
|
+
@id = parse_integer(data["id"])
|
|
584
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
585
|
+
@status = data["status"]
|
|
586
|
+
@title = data["title"]
|
|
587
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
588
|
+
end
|
|
589
|
+
|
|
590
|
+
def to_h
|
|
591
|
+
{
|
|
592
|
+
"cards_count" => @cards_count,
|
|
593
|
+
"cards_url" => @cards_url,
|
|
594
|
+
"created_at" => @created_at,
|
|
595
|
+
"id" => @id,
|
|
596
|
+
"inherits_status" => @inherits_status,
|
|
597
|
+
"status" => @status,
|
|
598
|
+
"title" => @title,
|
|
599
|
+
"updated_at" => @updated_at,
|
|
600
|
+
}.compact
|
|
601
|
+
end
|
|
602
|
+
|
|
603
|
+
def to_json(*args)
|
|
604
|
+
to_h.to_json(*args)
|
|
605
|
+
end
|
|
606
|
+
end
|
|
607
|
+
|
|
432
608
|
# CardStep
|
|
433
609
|
class CardStep
|
|
434
610
|
include TypeHelpers
|
|
@@ -1241,53 +1417,57 @@ module Basecamp
|
|
|
1241
1417
|
end
|
|
1242
1418
|
end
|
|
1243
1419
|
|
|
1244
|
-
#
|
|
1245
|
-
class
|
|
1420
|
+
# Gauge
|
|
1421
|
+
class Gauge
|
|
1246
1422
|
include TypeHelpers
|
|
1247
|
-
attr_accessor :
|
|
1423
|
+
attr_accessor :created_at, :id, :updated_at, :app_url, :bookmark_url, :bucket, :creator, :description, :enabled, :inherits_status, :last_needle_color, :last_needle_position, :previous_needle_position, :status, :title, :type, :url, :visible_to_clients
|
|
1248
1424
|
|
|
1249
1425
|
# @return [Array<Symbol>]
|
|
1250
1426
|
def self.required_fields
|
|
1251
|
-
%i[
|
|
1427
|
+
%i[created_at id updated_at].freeze
|
|
1252
1428
|
end
|
|
1253
1429
|
|
|
1254
1430
|
def initialize(data = {})
|
|
1255
|
-
@app_url = data["app_url"]
|
|
1256
|
-
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1257
1431
|
@created_at = parse_datetime(data["created_at"])
|
|
1258
|
-
@creator = parse_type(data["creator"], "Person")
|
|
1259
1432
|
@id = parse_integer(data["id"])
|
|
1433
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1434
|
+
@app_url = data["app_url"]
|
|
1435
|
+
@bookmark_url = data["bookmark_url"]
|
|
1436
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1437
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1438
|
+
@description = data["description"]
|
|
1439
|
+
@enabled = parse_boolean(data["enabled"])
|
|
1260
1440
|
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1441
|
+
@last_needle_color = data["last_needle_color"]
|
|
1442
|
+
@last_needle_position = parse_integer(data["last_needle_position"])
|
|
1443
|
+
@previous_needle_position = parse_integer(data["previous_needle_position"])
|
|
1261
1444
|
@status = data["status"]
|
|
1262
1445
|
@title = data["title"]
|
|
1263
1446
|
@type = data["type"]
|
|
1264
|
-
@updated_at = parse_datetime(data["updated_at"])
|
|
1265
1447
|
@url = data["url"]
|
|
1266
1448
|
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1267
|
-
@bookmark_url = data["bookmark_url"]
|
|
1268
|
-
@forwards_count = parse_integer(data["forwards_count"])
|
|
1269
|
-
@forwards_url = data["forwards_url"]
|
|
1270
|
-
@position = parse_integer(data["position"])
|
|
1271
1449
|
end
|
|
1272
1450
|
|
|
1273
1451
|
def to_h
|
|
1274
1452
|
{
|
|
1453
|
+
"created_at" => @created_at,
|
|
1454
|
+
"id" => @id,
|
|
1455
|
+
"updated_at" => @updated_at,
|
|
1275
1456
|
"app_url" => @app_url,
|
|
1457
|
+
"bookmark_url" => @bookmark_url,
|
|
1276
1458
|
"bucket" => @bucket,
|
|
1277
|
-
"created_at" => @created_at,
|
|
1278
1459
|
"creator" => @creator,
|
|
1279
|
-
"
|
|
1460
|
+
"description" => @description,
|
|
1461
|
+
"enabled" => @enabled,
|
|
1280
1462
|
"inherits_status" => @inherits_status,
|
|
1463
|
+
"last_needle_color" => @last_needle_color,
|
|
1464
|
+
"last_needle_position" => @last_needle_position,
|
|
1465
|
+
"previous_needle_position" => @previous_needle_position,
|
|
1281
1466
|
"status" => @status,
|
|
1282
1467
|
"title" => @title,
|
|
1283
1468
|
"type" => @type,
|
|
1284
|
-
"updated_at" => @updated_at,
|
|
1285
1469
|
"url" => @url,
|
|
1286
1470
|
"visible_to_clients" => @visible_to_clients,
|
|
1287
|
-
"bookmark_url" => @bookmark_url,
|
|
1288
|
-
"forwards_count" => @forwards_count,
|
|
1289
|
-
"forwards_url" => @forwards_url,
|
|
1290
|
-
"position" => @position,
|
|
1291
1471
|
}.compact
|
|
1292
1472
|
end
|
|
1293
1473
|
|
|
@@ -1296,65 +1476,67 @@ module Basecamp
|
|
|
1296
1476
|
end
|
|
1297
1477
|
end
|
|
1298
1478
|
|
|
1299
|
-
#
|
|
1300
|
-
class
|
|
1479
|
+
# GaugeNeedle
|
|
1480
|
+
class GaugeNeedle
|
|
1301
1481
|
include TypeHelpers
|
|
1302
|
-
attr_accessor :
|
|
1482
|
+
attr_accessor :created_at, :id, :updated_at, :app_url, :bookmark_url, :boosts_count, :boosts_url, :bucket, :color, :comment_count, :comments_count, :comments_url, :creator, :description, :inherits_status, :parent, :position, :status, :subscription_url, :title, :type, :url, :visible_to_clients
|
|
1303
1483
|
|
|
1304
1484
|
# @return [Array<Symbol>]
|
|
1305
1485
|
def self.required_fields
|
|
1306
|
-
%i[
|
|
1486
|
+
%i[created_at id updated_at].freeze
|
|
1307
1487
|
end
|
|
1308
1488
|
|
|
1309
1489
|
def initialize(data = {})
|
|
1310
|
-
@app_url = data["app_url"]
|
|
1311
|
-
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1312
|
-
@content = data["content"]
|
|
1313
1490
|
@created_at = parse_datetime(data["created_at"])
|
|
1314
|
-
@creator = parse_type(data["creator"], "Person")
|
|
1315
1491
|
@id = parse_integer(data["id"])
|
|
1316
|
-
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1317
|
-
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1318
|
-
@status = data["status"]
|
|
1319
|
-
@subject = data["subject"]
|
|
1320
|
-
@title = data["title"]
|
|
1321
|
-
@type = data["type"]
|
|
1322
1492
|
@updated_at = parse_datetime(data["updated_at"])
|
|
1323
|
-
@
|
|
1324
|
-
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1493
|
+
@app_url = data["app_url"]
|
|
1325
1494
|
@bookmark_url = data["bookmark_url"]
|
|
1326
1495
|
@boosts_count = parse_integer(data["boosts_count"])
|
|
1327
1496
|
@boosts_url = data["boosts_url"]
|
|
1328
|
-
@
|
|
1497
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1498
|
+
@color = data["color"]
|
|
1499
|
+
@comment_count = parse_integer(data["comment_count"])
|
|
1329
1500
|
@comments_count = parse_integer(data["comments_count"])
|
|
1330
1501
|
@comments_url = data["comments_url"]
|
|
1502
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1503
|
+
@description = data["description"]
|
|
1504
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1505
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1506
|
+
@position = parse_integer(data["position"])
|
|
1507
|
+
@status = data["status"]
|
|
1331
1508
|
@subscription_url = data["subscription_url"]
|
|
1509
|
+
@title = data["title"]
|
|
1510
|
+
@type = data["type"]
|
|
1511
|
+
@url = data["url"]
|
|
1512
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1332
1513
|
end
|
|
1333
1514
|
|
|
1334
1515
|
def to_h
|
|
1335
1516
|
{
|
|
1517
|
+
"created_at" => @created_at,
|
|
1518
|
+
"id" => @id,
|
|
1519
|
+
"updated_at" => @updated_at,
|
|
1336
1520
|
"app_url" => @app_url,
|
|
1521
|
+
"bookmark_url" => @bookmark_url,
|
|
1522
|
+
"boosts_count" => @boosts_count,
|
|
1523
|
+
"boosts_url" => @boosts_url,
|
|
1337
1524
|
"bucket" => @bucket,
|
|
1338
|
-
"
|
|
1339
|
-
"
|
|
1525
|
+
"color" => @color,
|
|
1526
|
+
"comment_count" => @comment_count,
|
|
1527
|
+
"comments_count" => @comments_count,
|
|
1528
|
+
"comments_url" => @comments_url,
|
|
1340
1529
|
"creator" => @creator,
|
|
1341
|
-
"
|
|
1530
|
+
"description" => @description,
|
|
1342
1531
|
"inherits_status" => @inherits_status,
|
|
1343
1532
|
"parent" => @parent,
|
|
1533
|
+
"position" => @position,
|
|
1344
1534
|
"status" => @status,
|
|
1345
|
-
"
|
|
1535
|
+
"subscription_url" => @subscription_url,
|
|
1346
1536
|
"title" => @title,
|
|
1347
1537
|
"type" => @type,
|
|
1348
|
-
"updated_at" => @updated_at,
|
|
1349
1538
|
"url" => @url,
|
|
1350
1539
|
"visible_to_clients" => @visible_to_clients,
|
|
1351
|
-
"bookmark_url" => @bookmark_url,
|
|
1352
|
-
"boosts_count" => @boosts_count,
|
|
1353
|
-
"boosts_url" => @boosts_url,
|
|
1354
|
-
"category" => @category,
|
|
1355
|
-
"comments_count" => @comments_count,
|
|
1356
|
-
"comments_url" => @comments_url,
|
|
1357
|
-
"subscription_url" => @subscription_url,
|
|
1358
1540
|
}.compact
|
|
1359
1541
|
end
|
|
1360
1542
|
|
|
@@ -1363,55 +1545,27 @@ module Basecamp
|
|
|
1363
1545
|
end
|
|
1364
1546
|
end
|
|
1365
1547
|
|
|
1366
|
-
#
|
|
1367
|
-
class
|
|
1548
|
+
# GaugeNeedlePayload
|
|
1549
|
+
class GaugeNeedlePayload
|
|
1368
1550
|
include TypeHelpers
|
|
1369
|
-
attr_accessor :
|
|
1551
|
+
attr_accessor :position, :color, :description
|
|
1370
1552
|
|
|
1371
1553
|
# @return [Array<Symbol>]
|
|
1372
1554
|
def self.required_fields
|
|
1373
|
-
%i[
|
|
1555
|
+
%i[position].freeze
|
|
1374
1556
|
end
|
|
1375
1557
|
|
|
1376
1558
|
def initialize(data = {})
|
|
1377
|
-
@app_url = data["app_url"]
|
|
1378
|
-
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1379
|
-
@created_at = parse_datetime(data["created_at"])
|
|
1380
|
-
@creator = parse_type(data["creator"], "Person")
|
|
1381
|
-
@id = parse_integer(data["id"])
|
|
1382
|
-
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1383
|
-
@status = data["status"]
|
|
1384
|
-
@title = data["title"]
|
|
1385
|
-
@type = data["type"]
|
|
1386
|
-
@updated_at = parse_datetime(data["updated_at"])
|
|
1387
|
-
@url = data["url"]
|
|
1388
|
-
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1389
|
-
@app_messages_url = data["app_messages_url"]
|
|
1390
|
-
@bookmark_url = data["bookmark_url"]
|
|
1391
|
-
@messages_count = parse_integer(data["messages_count"])
|
|
1392
|
-
@messages_url = data["messages_url"]
|
|
1393
1559
|
@position = parse_integer(data["position"])
|
|
1560
|
+
@color = data["color"]
|
|
1561
|
+
@description = data["description"]
|
|
1394
1562
|
end
|
|
1395
1563
|
|
|
1396
1564
|
def to_h
|
|
1397
1565
|
{
|
|
1398
|
-
"app_url" => @app_url,
|
|
1399
|
-
"bucket" => @bucket,
|
|
1400
|
-
"created_at" => @created_at,
|
|
1401
|
-
"creator" => @creator,
|
|
1402
|
-
"id" => @id,
|
|
1403
|
-
"inherits_status" => @inherits_status,
|
|
1404
|
-
"status" => @status,
|
|
1405
|
-
"title" => @title,
|
|
1406
|
-
"type" => @type,
|
|
1407
|
-
"updated_at" => @updated_at,
|
|
1408
|
-
"url" => @url,
|
|
1409
|
-
"visible_to_clients" => @visible_to_clients,
|
|
1410
|
-
"app_messages_url" => @app_messages_url,
|
|
1411
|
-
"bookmark_url" => @bookmark_url,
|
|
1412
|
-
"messages_count" => @messages_count,
|
|
1413
|
-
"messages_url" => @messages_url,
|
|
1414
1566
|
"position" => @position,
|
|
1567
|
+
"color" => @color,
|
|
1568
|
+
"description" => @description,
|
|
1415
1569
|
}.compact
|
|
1416
1570
|
end
|
|
1417
1571
|
|
|
@@ -1420,31 +1574,649 @@ module Basecamp
|
|
|
1420
1574
|
end
|
|
1421
1575
|
end
|
|
1422
1576
|
|
|
1423
|
-
#
|
|
1424
|
-
class
|
|
1577
|
+
# GaugeNeedleUpdatePayload
|
|
1578
|
+
class GaugeNeedleUpdatePayload
|
|
1425
1579
|
include TypeHelpers
|
|
1426
|
-
attr_accessor :
|
|
1427
|
-
|
|
1428
|
-
# @return [Array<Symbol>]
|
|
1429
|
-
def self.required_fields
|
|
1430
|
-
%i[created_at icon id name updated_at].freeze
|
|
1431
|
-
end
|
|
1580
|
+
attr_accessor :description
|
|
1432
1581
|
|
|
1433
1582
|
def initialize(data = {})
|
|
1434
|
-
@
|
|
1435
|
-
@icon = data["icon"]
|
|
1436
|
-
@id = parse_integer(data["id"])
|
|
1437
|
-
@name = data["name"]
|
|
1438
|
-
@updated_at = parse_datetime(data["updated_at"])
|
|
1583
|
+
@description = data["description"]
|
|
1439
1584
|
end
|
|
1440
1585
|
|
|
1441
1586
|
def to_h
|
|
1442
1587
|
{
|
|
1443
|
-
"
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1588
|
+
"description" => @description,
|
|
1589
|
+
}.compact
|
|
1590
|
+
end
|
|
1591
|
+
|
|
1592
|
+
def to_json(*args)
|
|
1593
|
+
to_h.to_json(*args)
|
|
1594
|
+
end
|
|
1595
|
+
end
|
|
1596
|
+
|
|
1597
|
+
# GaugeTogglePayload
|
|
1598
|
+
class GaugeTogglePayload
|
|
1599
|
+
include TypeHelpers
|
|
1600
|
+
attr_accessor :enabled
|
|
1601
|
+
|
|
1602
|
+
# @return [Array<Symbol>]
|
|
1603
|
+
def self.required_fields
|
|
1604
|
+
%i[enabled].freeze
|
|
1605
|
+
end
|
|
1606
|
+
|
|
1607
|
+
def initialize(data = {})
|
|
1608
|
+
@enabled = parse_boolean(data["enabled"])
|
|
1609
|
+
end
|
|
1610
|
+
|
|
1611
|
+
def to_h
|
|
1612
|
+
{
|
|
1613
|
+
"enabled" => @enabled,
|
|
1614
|
+
}.compact
|
|
1615
|
+
end
|
|
1616
|
+
|
|
1617
|
+
def to_json(*args)
|
|
1618
|
+
to_h.to_json(*args)
|
|
1619
|
+
end
|
|
1620
|
+
end
|
|
1621
|
+
|
|
1622
|
+
# HillChart
|
|
1623
|
+
class HillChart
|
|
1624
|
+
include TypeHelpers
|
|
1625
|
+
attr_accessor :enabled, :stale, :app_update_url, :app_versions_url, :dots, :updated_at
|
|
1626
|
+
|
|
1627
|
+
# @return [Array<Symbol>]
|
|
1628
|
+
def self.required_fields
|
|
1629
|
+
%i[enabled stale].freeze
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
def initialize(data = {})
|
|
1633
|
+
@enabled = parse_boolean(data["enabled"])
|
|
1634
|
+
@stale = parse_boolean(data["stale"])
|
|
1635
|
+
@app_update_url = data["app_update_url"]
|
|
1636
|
+
@app_versions_url = data["app_versions_url"]
|
|
1637
|
+
@dots = parse_array(data["dots"], "HillChartDot")
|
|
1638
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1639
|
+
end
|
|
1640
|
+
|
|
1641
|
+
def to_h
|
|
1642
|
+
{
|
|
1643
|
+
"enabled" => @enabled,
|
|
1644
|
+
"stale" => @stale,
|
|
1645
|
+
"app_update_url" => @app_update_url,
|
|
1646
|
+
"app_versions_url" => @app_versions_url,
|
|
1647
|
+
"dots" => @dots,
|
|
1648
|
+
"updated_at" => @updated_at,
|
|
1649
|
+
}.compact
|
|
1650
|
+
end
|
|
1651
|
+
|
|
1652
|
+
def to_json(*args)
|
|
1653
|
+
to_h.to_json(*args)
|
|
1654
|
+
end
|
|
1655
|
+
end
|
|
1656
|
+
|
|
1657
|
+
# HillChartDot
|
|
1658
|
+
class HillChartDot
|
|
1659
|
+
include TypeHelpers
|
|
1660
|
+
attr_accessor :color, :id, :label, :position, :app_url, :url
|
|
1661
|
+
|
|
1662
|
+
# @return [Array<Symbol>]
|
|
1663
|
+
def self.required_fields
|
|
1664
|
+
%i[color id label position].freeze
|
|
1665
|
+
end
|
|
1666
|
+
|
|
1667
|
+
def initialize(data = {})
|
|
1668
|
+
@color = data["color"]
|
|
1669
|
+
@id = parse_integer(data["id"])
|
|
1670
|
+
@label = data["label"]
|
|
1671
|
+
@position = parse_integer(data["position"])
|
|
1672
|
+
@app_url = data["app_url"]
|
|
1673
|
+
@url = data["url"]
|
|
1674
|
+
end
|
|
1675
|
+
|
|
1676
|
+
def to_h
|
|
1677
|
+
{
|
|
1678
|
+
"color" => @color,
|
|
1679
|
+
"id" => @id,
|
|
1680
|
+
"label" => @label,
|
|
1681
|
+
"position" => @position,
|
|
1682
|
+
"app_url" => @app_url,
|
|
1683
|
+
"url" => @url,
|
|
1684
|
+
}.compact
|
|
1685
|
+
end
|
|
1686
|
+
|
|
1687
|
+
def to_json(*args)
|
|
1688
|
+
to_h.to_json(*args)
|
|
1689
|
+
end
|
|
1690
|
+
end
|
|
1691
|
+
|
|
1692
|
+
# Inbox
|
|
1693
|
+
class Inbox
|
|
1694
|
+
include TypeHelpers
|
|
1695
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :forwards_count, :forwards_url, :position
|
|
1696
|
+
|
|
1697
|
+
# @return [Array<Symbol>]
|
|
1698
|
+
def self.required_fields
|
|
1699
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
1700
|
+
end
|
|
1701
|
+
|
|
1702
|
+
def initialize(data = {})
|
|
1703
|
+
@app_url = data["app_url"]
|
|
1704
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1705
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1706
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1707
|
+
@id = parse_integer(data["id"])
|
|
1708
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1709
|
+
@status = data["status"]
|
|
1710
|
+
@title = data["title"]
|
|
1711
|
+
@type = data["type"]
|
|
1712
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1713
|
+
@url = data["url"]
|
|
1714
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1715
|
+
@bookmark_url = data["bookmark_url"]
|
|
1716
|
+
@forwards_count = parse_integer(data["forwards_count"])
|
|
1717
|
+
@forwards_url = data["forwards_url"]
|
|
1718
|
+
@position = parse_integer(data["position"])
|
|
1719
|
+
end
|
|
1720
|
+
|
|
1721
|
+
def to_h
|
|
1722
|
+
{
|
|
1723
|
+
"app_url" => @app_url,
|
|
1724
|
+
"bucket" => @bucket,
|
|
1725
|
+
"created_at" => @created_at,
|
|
1726
|
+
"creator" => @creator,
|
|
1727
|
+
"id" => @id,
|
|
1728
|
+
"inherits_status" => @inherits_status,
|
|
1729
|
+
"status" => @status,
|
|
1730
|
+
"title" => @title,
|
|
1731
|
+
"type" => @type,
|
|
1732
|
+
"updated_at" => @updated_at,
|
|
1733
|
+
"url" => @url,
|
|
1734
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1735
|
+
"bookmark_url" => @bookmark_url,
|
|
1736
|
+
"forwards_count" => @forwards_count,
|
|
1737
|
+
"forwards_url" => @forwards_url,
|
|
1738
|
+
"position" => @position,
|
|
1739
|
+
}.compact
|
|
1740
|
+
end
|
|
1741
|
+
|
|
1742
|
+
def to_json(*args)
|
|
1743
|
+
to_h.to_json(*args)
|
|
1744
|
+
end
|
|
1745
|
+
end
|
|
1746
|
+
|
|
1747
|
+
# LineupMarker
|
|
1748
|
+
class LineupMarker
|
|
1749
|
+
include TypeHelpers
|
|
1750
|
+
attr_accessor :created_at, :date, :id, :name, :updated_at
|
|
1751
|
+
|
|
1752
|
+
# @return [Array<Symbol>]
|
|
1753
|
+
def self.required_fields
|
|
1754
|
+
%i[created_at date id name updated_at].freeze
|
|
1755
|
+
end
|
|
1756
|
+
|
|
1757
|
+
def initialize(data = {})
|
|
1758
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1759
|
+
@date = data["date"]
|
|
1760
|
+
@id = parse_integer(data["id"])
|
|
1761
|
+
@name = data["name"]
|
|
1762
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1763
|
+
end
|
|
1764
|
+
|
|
1765
|
+
def to_h
|
|
1766
|
+
{
|
|
1767
|
+
"created_at" => @created_at,
|
|
1768
|
+
"date" => @date,
|
|
1769
|
+
"id" => @id,
|
|
1770
|
+
"name" => @name,
|
|
1771
|
+
"updated_at" => @updated_at,
|
|
1772
|
+
}.compact
|
|
1773
|
+
end
|
|
1774
|
+
|
|
1775
|
+
def to_json(*args)
|
|
1776
|
+
to_h.to_json(*args)
|
|
1777
|
+
end
|
|
1778
|
+
end
|
|
1779
|
+
|
|
1780
|
+
# Message
|
|
1781
|
+
class Message
|
|
1782
|
+
include TypeHelpers
|
|
1783
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :subject, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :category, :comments_count, :comments_url, :subscription_url
|
|
1784
|
+
|
|
1785
|
+
# @return [Array<Symbol>]
|
|
1786
|
+
def self.required_fields
|
|
1787
|
+
%i[app_url bucket content created_at creator id inherits_status parent status subject title type updated_at url visible_to_clients].freeze
|
|
1788
|
+
end
|
|
1789
|
+
|
|
1790
|
+
def initialize(data = {})
|
|
1791
|
+
@app_url = data["app_url"]
|
|
1792
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1793
|
+
@content = data["content"]
|
|
1794
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1795
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1796
|
+
@id = parse_integer(data["id"])
|
|
1797
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1798
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1799
|
+
@status = data["status"]
|
|
1800
|
+
@subject = data["subject"]
|
|
1801
|
+
@title = data["title"]
|
|
1802
|
+
@type = data["type"]
|
|
1803
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1804
|
+
@url = data["url"]
|
|
1805
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1806
|
+
@bookmark_url = data["bookmark_url"]
|
|
1807
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
1808
|
+
@boosts_url = data["boosts_url"]
|
|
1809
|
+
@category = parse_type(data["category"], "MessageType")
|
|
1810
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
1811
|
+
@comments_url = data["comments_url"]
|
|
1812
|
+
@subscription_url = data["subscription_url"]
|
|
1813
|
+
end
|
|
1814
|
+
|
|
1815
|
+
def to_h
|
|
1816
|
+
{
|
|
1817
|
+
"app_url" => @app_url,
|
|
1818
|
+
"bucket" => @bucket,
|
|
1819
|
+
"content" => @content,
|
|
1820
|
+
"created_at" => @created_at,
|
|
1821
|
+
"creator" => @creator,
|
|
1822
|
+
"id" => @id,
|
|
1823
|
+
"inherits_status" => @inherits_status,
|
|
1824
|
+
"parent" => @parent,
|
|
1825
|
+
"status" => @status,
|
|
1826
|
+
"subject" => @subject,
|
|
1827
|
+
"title" => @title,
|
|
1828
|
+
"type" => @type,
|
|
1829
|
+
"updated_at" => @updated_at,
|
|
1830
|
+
"url" => @url,
|
|
1831
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1832
|
+
"bookmark_url" => @bookmark_url,
|
|
1833
|
+
"boosts_count" => @boosts_count,
|
|
1834
|
+
"boosts_url" => @boosts_url,
|
|
1835
|
+
"category" => @category,
|
|
1836
|
+
"comments_count" => @comments_count,
|
|
1837
|
+
"comments_url" => @comments_url,
|
|
1838
|
+
"subscription_url" => @subscription_url,
|
|
1839
|
+
}.compact
|
|
1840
|
+
end
|
|
1841
|
+
|
|
1842
|
+
def to_json(*args)
|
|
1843
|
+
to_h.to_json(*args)
|
|
1844
|
+
end
|
|
1845
|
+
end
|
|
1846
|
+
|
|
1847
|
+
# MessageBoard
|
|
1848
|
+
class MessageBoard
|
|
1849
|
+
include TypeHelpers
|
|
1850
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_messages_url, :bookmark_url, :messages_count, :messages_url, :position
|
|
1851
|
+
|
|
1852
|
+
# @return [Array<Symbol>]
|
|
1853
|
+
def self.required_fields
|
|
1854
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
def initialize(data = {})
|
|
1858
|
+
@app_url = data["app_url"]
|
|
1859
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1860
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1861
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1862
|
+
@id = parse_integer(data["id"])
|
|
1863
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1864
|
+
@status = data["status"]
|
|
1865
|
+
@title = data["title"]
|
|
1866
|
+
@type = data["type"]
|
|
1867
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1868
|
+
@url = data["url"]
|
|
1869
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1870
|
+
@app_messages_url = data["app_messages_url"]
|
|
1871
|
+
@bookmark_url = data["bookmark_url"]
|
|
1872
|
+
@messages_count = parse_integer(data["messages_count"])
|
|
1873
|
+
@messages_url = data["messages_url"]
|
|
1874
|
+
@position = parse_integer(data["position"])
|
|
1875
|
+
end
|
|
1876
|
+
|
|
1877
|
+
def to_h
|
|
1878
|
+
{
|
|
1879
|
+
"app_url" => @app_url,
|
|
1880
|
+
"bucket" => @bucket,
|
|
1881
|
+
"created_at" => @created_at,
|
|
1882
|
+
"creator" => @creator,
|
|
1883
|
+
"id" => @id,
|
|
1884
|
+
"inherits_status" => @inherits_status,
|
|
1885
|
+
"status" => @status,
|
|
1886
|
+
"title" => @title,
|
|
1887
|
+
"type" => @type,
|
|
1888
|
+
"updated_at" => @updated_at,
|
|
1889
|
+
"url" => @url,
|
|
1890
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1891
|
+
"app_messages_url" => @app_messages_url,
|
|
1892
|
+
"bookmark_url" => @bookmark_url,
|
|
1893
|
+
"messages_count" => @messages_count,
|
|
1894
|
+
"messages_url" => @messages_url,
|
|
1895
|
+
"position" => @position,
|
|
1896
|
+
}.compact
|
|
1897
|
+
end
|
|
1898
|
+
|
|
1899
|
+
def to_json(*args)
|
|
1900
|
+
to_h.to_json(*args)
|
|
1901
|
+
end
|
|
1902
|
+
end
|
|
1903
|
+
|
|
1904
|
+
# MessageType
|
|
1905
|
+
class MessageType
|
|
1906
|
+
include TypeHelpers
|
|
1907
|
+
attr_accessor :created_at, :icon, :id, :name, :updated_at
|
|
1908
|
+
|
|
1909
|
+
# @return [Array<Symbol>]
|
|
1910
|
+
def self.required_fields
|
|
1911
|
+
%i[created_at icon id name updated_at].freeze
|
|
1912
|
+
end
|
|
1913
|
+
|
|
1914
|
+
def initialize(data = {})
|
|
1915
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1916
|
+
@icon = data["icon"]
|
|
1917
|
+
@id = parse_integer(data["id"])
|
|
1918
|
+
@name = data["name"]
|
|
1919
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1920
|
+
end
|
|
1921
|
+
|
|
1922
|
+
def to_h
|
|
1923
|
+
{
|
|
1924
|
+
"created_at" => @created_at,
|
|
1925
|
+
"icon" => @icon,
|
|
1926
|
+
"id" => @id,
|
|
1927
|
+
"name" => @name,
|
|
1928
|
+
"updated_at" => @updated_at,
|
|
1929
|
+
}.compact
|
|
1930
|
+
end
|
|
1931
|
+
|
|
1932
|
+
def to_json(*args)
|
|
1933
|
+
to_h.to_json(*args)
|
|
1934
|
+
end
|
|
1935
|
+
end
|
|
1936
|
+
|
|
1937
|
+
# MyAssignment
|
|
1938
|
+
class MyAssignment
|
|
1939
|
+
include TypeHelpers
|
|
1940
|
+
attr_accessor :id, :app_url, :assignees, :bucket, :children, :comments_count, :completed, :content, :due_on, :has_description, :parent, :priority_recording_id, :starts_on, :type
|
|
1941
|
+
|
|
1942
|
+
# @return [Array<Symbol>]
|
|
1943
|
+
def self.required_fields
|
|
1944
|
+
%i[id].freeze
|
|
1945
|
+
end
|
|
1946
|
+
|
|
1947
|
+
def initialize(data = {})
|
|
1948
|
+
@id = parse_integer(data["id"])
|
|
1949
|
+
@app_url = data["app_url"]
|
|
1950
|
+
@assignees = parse_array(data["assignees"], "MyAssignmentAssignee")
|
|
1951
|
+
@bucket = parse_type(data["bucket"], "MyAssignmentBucket")
|
|
1952
|
+
@children = parse_array(data["children"], "MyAssignment")
|
|
1953
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
1954
|
+
@completed = parse_boolean(data["completed"])
|
|
1955
|
+
@content = data["content"]
|
|
1956
|
+
@due_on = data["due_on"]
|
|
1957
|
+
@has_description = parse_boolean(data["has_description"])
|
|
1958
|
+
@parent = parse_type(data["parent"], "MyAssignmentParent")
|
|
1959
|
+
@priority_recording_id = parse_integer(data["priority_recording_id"])
|
|
1960
|
+
@starts_on = data["starts_on"]
|
|
1961
|
+
@type = data["type"]
|
|
1962
|
+
end
|
|
1963
|
+
|
|
1964
|
+
def to_h
|
|
1965
|
+
{
|
|
1966
|
+
"id" => @id,
|
|
1967
|
+
"app_url" => @app_url,
|
|
1968
|
+
"assignees" => @assignees,
|
|
1969
|
+
"bucket" => @bucket,
|
|
1970
|
+
"children" => @children,
|
|
1971
|
+
"comments_count" => @comments_count,
|
|
1972
|
+
"completed" => @completed,
|
|
1973
|
+
"content" => @content,
|
|
1974
|
+
"due_on" => @due_on,
|
|
1975
|
+
"has_description" => @has_description,
|
|
1976
|
+
"parent" => @parent,
|
|
1977
|
+
"priority_recording_id" => @priority_recording_id,
|
|
1978
|
+
"starts_on" => @starts_on,
|
|
1979
|
+
"type" => @type,
|
|
1980
|
+
}.compact
|
|
1981
|
+
end
|
|
1982
|
+
|
|
1983
|
+
def to_json(*args)
|
|
1984
|
+
to_h.to_json(*args)
|
|
1985
|
+
end
|
|
1986
|
+
end
|
|
1987
|
+
|
|
1988
|
+
# MyAssignmentAssignee
|
|
1989
|
+
class MyAssignmentAssignee
|
|
1990
|
+
include TypeHelpers
|
|
1991
|
+
attr_accessor :id, :avatar_url, :name
|
|
1992
|
+
|
|
1993
|
+
# @return [Array<Symbol>]
|
|
1994
|
+
def self.required_fields
|
|
1995
|
+
%i[id].freeze
|
|
1996
|
+
end
|
|
1997
|
+
|
|
1998
|
+
def initialize(data = {})
|
|
1999
|
+
@id = parse_integer(data["id"])
|
|
2000
|
+
@avatar_url = data["avatar_url"]
|
|
2001
|
+
@name = data["name"]
|
|
2002
|
+
end
|
|
2003
|
+
|
|
2004
|
+
def to_h
|
|
2005
|
+
{
|
|
2006
|
+
"id" => @id,
|
|
2007
|
+
"avatar_url" => @avatar_url,
|
|
2008
|
+
"name" => @name,
|
|
2009
|
+
}.compact
|
|
2010
|
+
end
|
|
2011
|
+
|
|
2012
|
+
def to_json(*args)
|
|
2013
|
+
to_h.to_json(*args)
|
|
2014
|
+
end
|
|
2015
|
+
end
|
|
2016
|
+
|
|
2017
|
+
# MyAssignmentBucket
|
|
2018
|
+
class MyAssignmentBucket
|
|
2019
|
+
include TypeHelpers
|
|
2020
|
+
attr_accessor :id, :app_url, :name
|
|
2021
|
+
|
|
2022
|
+
# @return [Array<Symbol>]
|
|
2023
|
+
def self.required_fields
|
|
2024
|
+
%i[id].freeze
|
|
2025
|
+
end
|
|
2026
|
+
|
|
2027
|
+
def initialize(data = {})
|
|
2028
|
+
@id = parse_integer(data["id"])
|
|
2029
|
+
@app_url = data["app_url"]
|
|
2030
|
+
@name = data["name"]
|
|
2031
|
+
end
|
|
2032
|
+
|
|
2033
|
+
def to_h
|
|
2034
|
+
{
|
|
2035
|
+
"id" => @id,
|
|
2036
|
+
"app_url" => @app_url,
|
|
2037
|
+
"name" => @name,
|
|
2038
|
+
}.compact
|
|
2039
|
+
end
|
|
2040
|
+
|
|
2041
|
+
def to_json(*args)
|
|
2042
|
+
to_h.to_json(*args)
|
|
2043
|
+
end
|
|
2044
|
+
end
|
|
2045
|
+
|
|
2046
|
+
# MyAssignmentParent
|
|
2047
|
+
class MyAssignmentParent
|
|
2048
|
+
include TypeHelpers
|
|
2049
|
+
attr_accessor :id, :app_url, :title
|
|
2050
|
+
|
|
2051
|
+
# @return [Array<Symbol>]
|
|
2052
|
+
def self.required_fields
|
|
2053
|
+
%i[id].freeze
|
|
2054
|
+
end
|
|
2055
|
+
|
|
2056
|
+
def initialize(data = {})
|
|
2057
|
+
@id = parse_integer(data["id"])
|
|
2058
|
+
@app_url = data["app_url"]
|
|
2059
|
+
@title = data["title"]
|
|
2060
|
+
end
|
|
2061
|
+
|
|
2062
|
+
def to_h
|
|
2063
|
+
{
|
|
2064
|
+
"id" => @id,
|
|
2065
|
+
"app_url" => @app_url,
|
|
2066
|
+
"title" => @title,
|
|
2067
|
+
}.compact
|
|
2068
|
+
end
|
|
2069
|
+
|
|
2070
|
+
def to_json(*args)
|
|
2071
|
+
to_h.to_json(*args)
|
|
2072
|
+
end
|
|
2073
|
+
end
|
|
2074
|
+
|
|
2075
|
+
# Notification
|
|
2076
|
+
class Notification
|
|
2077
|
+
include TypeHelpers
|
|
2078
|
+
attr_accessor :created_at, :id, :updated_at, :app_url, :bookmark_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
|
|
2079
|
+
|
|
2080
|
+
# @return [Array<Symbol>]
|
|
2081
|
+
def self.required_fields
|
|
2082
|
+
%i[created_at id updated_at].freeze
|
|
2083
|
+
end
|
|
2084
|
+
|
|
2085
|
+
def initialize(data = {})
|
|
2086
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2087
|
+
@id = parse_integer(data["id"])
|
|
2088
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2089
|
+
@app_url = data["app_url"]
|
|
2090
|
+
@bookmark_url = data["bookmark_url"]
|
|
2091
|
+
@bucket_name = data["bucket_name"]
|
|
2092
|
+
@content_excerpt = data["content_excerpt"]
|
|
2093
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2094
|
+
@image_url = data["image_url"]
|
|
2095
|
+
@memory_url = data["memory_url"]
|
|
2096
|
+
@named = parse_boolean(data["named"])
|
|
2097
|
+
@participants = parse_array(data["participants"], "Person")
|
|
2098
|
+
@previewable_attachments = parse_array(data["previewable_attachments"], "PreviewableAttachment")
|
|
2099
|
+
@read_at = parse_datetime(data["read_at"])
|
|
2100
|
+
@readable_identifier = data["readable_identifier"]
|
|
2101
|
+
@readable_sgid = data["readable_sgid"]
|
|
2102
|
+
@section = data["section"]
|
|
2103
|
+
@subscribed = parse_boolean(data["subscribed"])
|
|
2104
|
+
@subscription_url = data["subscription_url"]
|
|
2105
|
+
@title = data["title"]
|
|
2106
|
+
@type = data["type"]
|
|
2107
|
+
@unread_at = parse_datetime(data["unread_at"])
|
|
2108
|
+
@unread_count = parse_integer(data["unread_count"])
|
|
2109
|
+
@unread_url = data["unread_url"]
|
|
2110
|
+
end
|
|
2111
|
+
|
|
2112
|
+
def to_h
|
|
2113
|
+
{
|
|
2114
|
+
"created_at" => @created_at,
|
|
2115
|
+
"id" => @id,
|
|
1447
2116
|
"updated_at" => @updated_at,
|
|
2117
|
+
"app_url" => @app_url,
|
|
2118
|
+
"bookmark_url" => @bookmark_url,
|
|
2119
|
+
"bucket_name" => @bucket_name,
|
|
2120
|
+
"content_excerpt" => @content_excerpt,
|
|
2121
|
+
"creator" => @creator,
|
|
2122
|
+
"image_url" => @image_url,
|
|
2123
|
+
"memory_url" => @memory_url,
|
|
2124
|
+
"named" => @named,
|
|
2125
|
+
"participants" => @participants,
|
|
2126
|
+
"previewable_attachments" => @previewable_attachments,
|
|
2127
|
+
"read_at" => @read_at,
|
|
2128
|
+
"readable_identifier" => @readable_identifier,
|
|
2129
|
+
"readable_sgid" => @readable_sgid,
|
|
2130
|
+
"section" => @section,
|
|
2131
|
+
"subscribed" => @subscribed,
|
|
2132
|
+
"subscription_url" => @subscription_url,
|
|
2133
|
+
"title" => @title,
|
|
2134
|
+
"type" => @type,
|
|
2135
|
+
"unread_at" => @unread_at,
|
|
2136
|
+
"unread_count" => @unread_count,
|
|
2137
|
+
"unread_url" => @unread_url,
|
|
2138
|
+
}.compact
|
|
2139
|
+
end
|
|
2140
|
+
|
|
2141
|
+
def to_json(*args)
|
|
2142
|
+
to_h.to_json(*args)
|
|
2143
|
+
end
|
|
2144
|
+
end
|
|
2145
|
+
|
|
2146
|
+
# OutOfOffice
|
|
2147
|
+
class OutOfOffice
|
|
2148
|
+
include TypeHelpers
|
|
2149
|
+
attr_accessor :enabled, :end_date, :ongoing, :person, :start_date
|
|
2150
|
+
|
|
2151
|
+
def initialize(data = {})
|
|
2152
|
+
@enabled = parse_boolean(data["enabled"])
|
|
2153
|
+
@end_date = data["end_date"]
|
|
2154
|
+
@ongoing = parse_boolean(data["ongoing"])
|
|
2155
|
+
@person = parse_type(data["person"], "OutOfOfficePerson")
|
|
2156
|
+
@start_date = data["start_date"]
|
|
2157
|
+
end
|
|
2158
|
+
|
|
2159
|
+
def to_h
|
|
2160
|
+
{
|
|
2161
|
+
"enabled" => @enabled,
|
|
2162
|
+
"end_date" => @end_date,
|
|
2163
|
+
"ongoing" => @ongoing,
|
|
2164
|
+
"person" => @person,
|
|
2165
|
+
"start_date" => @start_date,
|
|
2166
|
+
}.compact
|
|
2167
|
+
end
|
|
2168
|
+
|
|
2169
|
+
def to_json(*args)
|
|
2170
|
+
to_h.to_json(*args)
|
|
2171
|
+
end
|
|
2172
|
+
end
|
|
2173
|
+
|
|
2174
|
+
# OutOfOfficePayload
|
|
2175
|
+
class OutOfOfficePayload
|
|
2176
|
+
include TypeHelpers
|
|
2177
|
+
attr_accessor :end_date, :start_date
|
|
2178
|
+
|
|
2179
|
+
# @return [Array<Symbol>]
|
|
2180
|
+
def self.required_fields
|
|
2181
|
+
%i[end_date start_date].freeze
|
|
2182
|
+
end
|
|
2183
|
+
|
|
2184
|
+
def initialize(data = {})
|
|
2185
|
+
@end_date = data["end_date"]
|
|
2186
|
+
@start_date = data["start_date"]
|
|
2187
|
+
end
|
|
2188
|
+
|
|
2189
|
+
def to_h
|
|
2190
|
+
{
|
|
2191
|
+
"end_date" => @end_date,
|
|
2192
|
+
"start_date" => @start_date,
|
|
2193
|
+
}.compact
|
|
2194
|
+
end
|
|
2195
|
+
|
|
2196
|
+
def to_json(*args)
|
|
2197
|
+
to_h.to_json(*args)
|
|
2198
|
+
end
|
|
2199
|
+
end
|
|
2200
|
+
|
|
2201
|
+
# OutOfOfficePerson
|
|
2202
|
+
class OutOfOfficePerson
|
|
2203
|
+
include TypeHelpers
|
|
2204
|
+
attr_accessor :id, :name
|
|
2205
|
+
|
|
2206
|
+
# @return [Array<Symbol>]
|
|
2207
|
+
def self.required_fields
|
|
2208
|
+
%i[id].freeze
|
|
2209
|
+
end
|
|
2210
|
+
|
|
2211
|
+
def initialize(data = {})
|
|
2212
|
+
@id = parse_integer(data["id"])
|
|
2213
|
+
@name = data["name"]
|
|
2214
|
+
end
|
|
2215
|
+
|
|
2216
|
+
def to_h
|
|
2217
|
+
{
|
|
2218
|
+
"id" => @id,
|
|
2219
|
+
"name" => @name,
|
|
1448
2220
|
}.compact
|
|
1449
2221
|
end
|
|
1450
2222
|
|
|
@@ -1547,6 +2319,92 @@ module Basecamp
|
|
|
1547
2319
|
end
|
|
1548
2320
|
end
|
|
1549
2321
|
|
|
2322
|
+
# Preferences
|
|
2323
|
+
class Preferences
|
|
2324
|
+
include TypeHelpers
|
|
2325
|
+
attr_accessor :app_url, :first_week_day, :time_format, :time_zone_name, :url
|
|
2326
|
+
|
|
2327
|
+
def initialize(data = {})
|
|
2328
|
+
@app_url = data["app_url"]
|
|
2329
|
+
@first_week_day = data["first_week_day"]
|
|
2330
|
+
@time_format = data["time_format"]
|
|
2331
|
+
@time_zone_name = data["time_zone_name"]
|
|
2332
|
+
@url = data["url"]
|
|
2333
|
+
end
|
|
2334
|
+
|
|
2335
|
+
def to_h
|
|
2336
|
+
{
|
|
2337
|
+
"app_url" => @app_url,
|
|
2338
|
+
"first_week_day" => @first_week_day,
|
|
2339
|
+
"time_format" => @time_format,
|
|
2340
|
+
"time_zone_name" => @time_zone_name,
|
|
2341
|
+
"url" => @url,
|
|
2342
|
+
}.compact
|
|
2343
|
+
end
|
|
2344
|
+
|
|
2345
|
+
def to_json(*args)
|
|
2346
|
+
to_h.to_json(*args)
|
|
2347
|
+
end
|
|
2348
|
+
end
|
|
2349
|
+
|
|
2350
|
+
# PreferencesPayload
|
|
2351
|
+
class PreferencesPayload
|
|
2352
|
+
include TypeHelpers
|
|
2353
|
+
attr_accessor :first_week_day, :time_format, :time_zone_name
|
|
2354
|
+
|
|
2355
|
+
def initialize(data = {})
|
|
2356
|
+
@first_week_day = data["first_week_day"]
|
|
2357
|
+
@time_format = data["time_format"]
|
|
2358
|
+
@time_zone_name = data["time_zone_name"]
|
|
2359
|
+
end
|
|
2360
|
+
|
|
2361
|
+
def to_h
|
|
2362
|
+
{
|
|
2363
|
+
"first_week_day" => @first_week_day,
|
|
2364
|
+
"time_format" => @time_format,
|
|
2365
|
+
"time_zone_name" => @time_zone_name,
|
|
2366
|
+
}.compact
|
|
2367
|
+
end
|
|
2368
|
+
|
|
2369
|
+
def to_json(*args)
|
|
2370
|
+
to_h.to_json(*args)
|
|
2371
|
+
end
|
|
2372
|
+
end
|
|
2373
|
+
|
|
2374
|
+
# PreviewableAttachment
|
|
2375
|
+
class PreviewableAttachment
|
|
2376
|
+
include TypeHelpers
|
|
2377
|
+
attr_accessor :app_url, :content_type, :filename, :filesize, :height, :id, :url, :width
|
|
2378
|
+
|
|
2379
|
+
def initialize(data = {})
|
|
2380
|
+
@app_url = data["app_url"]
|
|
2381
|
+
@content_type = data["content_type"]
|
|
2382
|
+
@filename = data["filename"]
|
|
2383
|
+
@filesize = parse_integer(data["filesize"])
|
|
2384
|
+
@height = parse_integer(data["height"])
|
|
2385
|
+
@id = parse_integer(data["id"])
|
|
2386
|
+
@url = data["url"]
|
|
2387
|
+
@width = parse_integer(data["width"])
|
|
2388
|
+
end
|
|
2389
|
+
|
|
2390
|
+
def to_h
|
|
2391
|
+
{
|
|
2392
|
+
"app_url" => @app_url,
|
|
2393
|
+
"content_type" => @content_type,
|
|
2394
|
+
"filename" => @filename,
|
|
2395
|
+
"filesize" => @filesize,
|
|
2396
|
+
"height" => @height,
|
|
2397
|
+
"id" => @id,
|
|
2398
|
+
"url" => @url,
|
|
2399
|
+
"width" => @width,
|
|
2400
|
+
}.compact
|
|
2401
|
+
end
|
|
2402
|
+
|
|
2403
|
+
def to_json(*args)
|
|
2404
|
+
to_h.to_json(*args)
|
|
2405
|
+
end
|
|
2406
|
+
end
|
|
2407
|
+
|
|
1550
2408
|
# Project
|
|
1551
2409
|
class Project
|
|
1552
2410
|
include TypeHelpers
|
|
@@ -2783,7 +3641,7 @@ module Basecamp
|
|
|
2783
3641
|
# Todoset
|
|
2784
3642
|
class Todoset
|
|
2785
3643
|
include TypeHelpers
|
|
2786
|
-
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :bookmark_url, :completed, :
|
|
3644
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :app_todolists_url, :bookmark_url, :completed, :completed_ratio, :position, :todolists_count, :todolists_url
|
|
2787
3645
|
|
|
2788
3646
|
# @return [Array<Symbol>]
|
|
2789
3647
|
def self.required_fields
|
|
@@ -2807,10 +3665,7 @@ module Basecamp
|
|
|
2807
3665
|
@app_todolists_url = data["app_todolists_url"]
|
|
2808
3666
|
@bookmark_url = data["bookmark_url"]
|
|
2809
3667
|
@completed = parse_boolean(data["completed"])
|
|
2810
|
-
@completed_count = parse_integer(data["completed_count"])
|
|
2811
3668
|
@completed_ratio = data["completed_ratio"]
|
|
2812
|
-
@on_schedule_count = parse_integer(data["on_schedule_count"])
|
|
2813
|
-
@over_schedule_count = parse_integer(data["over_schedule_count"])
|
|
2814
3669
|
@position = parse_integer(data["position"])
|
|
2815
3670
|
@todolists_count = parse_integer(data["todolists_count"])
|
|
2816
3671
|
@todolists_url = data["todolists_url"]
|
|
@@ -2834,10 +3689,7 @@ module Basecamp
|
|
|
2834
3689
|
"app_todolists_url" => @app_todolists_url,
|
|
2835
3690
|
"bookmark_url" => @bookmark_url,
|
|
2836
3691
|
"completed" => @completed,
|
|
2837
|
-
"completed_count" => @completed_count,
|
|
2838
3692
|
"completed_ratio" => @completed_ratio,
|
|
2839
|
-
"on_schedule_count" => @on_schedule_count,
|
|
2840
|
-
"over_schedule_count" => @over_schedule_count,
|
|
2841
3693
|
"position" => @position,
|
|
2842
3694
|
"todolists_count" => @todolists_count,
|
|
2843
3695
|
"todolists_url" => @todolists_url,
|