basecamp-sdk 0.2.1
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 +7 -0
- data/.rubocop.yml +14 -0
- data/.yardopts +6 -0
- data/README.md +293 -0
- data/Rakefile +26 -0
- data/basecamp-sdk.gemspec +46 -0
- data/lib/basecamp/auth_strategy.rb +38 -0
- data/lib/basecamp/chain_hooks.rb +45 -0
- data/lib/basecamp/client.rb +428 -0
- data/lib/basecamp/config.rb +143 -0
- data/lib/basecamp/errors.rb +289 -0
- data/lib/basecamp/generated/metadata.json +2281 -0
- data/lib/basecamp/generated/services/attachments_service.rb +24 -0
- data/lib/basecamp/generated/services/boosts_service.rb +70 -0
- data/lib/basecamp/generated/services/campfires_service.rb +122 -0
- data/lib/basecamp/generated/services/card_columns_service.rb +103 -0
- data/lib/basecamp/generated/services/card_steps_service.rb +57 -0
- data/lib/basecamp/generated/services/card_tables_service.rb +20 -0
- data/lib/basecamp/generated/services/cards_service.rb +66 -0
- data/lib/basecamp/generated/services/checkins_service.rb +157 -0
- data/lib/basecamp/generated/services/client_approvals_service.rb +28 -0
- data/lib/basecamp/generated/services/client_correspondences_service.rb +28 -0
- data/lib/basecamp/generated/services/client_replies_service.rb +30 -0
- data/lib/basecamp/generated/services/client_visibility_service.rb +21 -0
- data/lib/basecamp/generated/services/comments_service.rb +49 -0
- data/lib/basecamp/generated/services/documents_service.rb +52 -0
- data/lib/basecamp/generated/services/events_service.rb +20 -0
- data/lib/basecamp/generated/services/forwards_service.rb +67 -0
- data/lib/basecamp/generated/services/lineup_service.rb +44 -0
- data/lib/basecamp/generated/services/message_boards_service.rb +20 -0
- data/lib/basecamp/generated/services/message_types_service.rb +59 -0
- data/lib/basecamp/generated/services/messages_service.rb +75 -0
- data/lib/basecamp/generated/services/people_service.rb +73 -0
- data/lib/basecamp/generated/services/projects_service.rb +63 -0
- data/lib/basecamp/generated/services/recordings_service.rb +64 -0
- data/lib/basecamp/generated/services/reports_service.rb +56 -0
- data/lib/basecamp/generated/services/schedules_service.rb +92 -0
- data/lib/basecamp/generated/services/search_service.rb +31 -0
- data/lib/basecamp/generated/services/subscriptions_service.rb +50 -0
- data/lib/basecamp/generated/services/templates_service.rb +82 -0
- data/lib/basecamp/generated/services/timeline_service.rb +20 -0
- data/lib/basecamp/generated/services/timesheets_service.rb +81 -0
- data/lib/basecamp/generated/services/todolist_groups_service.rb +41 -0
- data/lib/basecamp/generated/services/todolists_service.rb +53 -0
- data/lib/basecamp/generated/services/todos_service.rb +106 -0
- data/lib/basecamp/generated/services/todosets_service.rb +20 -0
- data/lib/basecamp/generated/services/tools_service.rb +80 -0
- data/lib/basecamp/generated/services/uploads_service.rb +61 -0
- data/lib/basecamp/generated/services/vaults_service.rb +49 -0
- data/lib/basecamp/generated/services/webhooks_service.rb +63 -0
- data/lib/basecamp/generated/types.rb +3196 -0
- data/lib/basecamp/hooks.rb +70 -0
- data/lib/basecamp/http.rb +440 -0
- data/lib/basecamp/logger_hooks.rb +46 -0
- data/lib/basecamp/noop_hooks.rb +9 -0
- data/lib/basecamp/oauth/discovery.rb +123 -0
- data/lib/basecamp/oauth/errors.rb +35 -0
- data/lib/basecamp/oauth/exchange.rb +291 -0
- data/lib/basecamp/oauth/pkce.rb +68 -0
- data/lib/basecamp/oauth/types.rb +133 -0
- data/lib/basecamp/oauth.rb +56 -0
- data/lib/basecamp/oauth_token_provider.rb +108 -0
- data/lib/basecamp/operation_info.rb +17 -0
- data/lib/basecamp/request_info.rb +10 -0
- data/lib/basecamp/request_result.rb +14 -0
- data/lib/basecamp/security.rb +112 -0
- data/lib/basecamp/services/attachments_service.rb +33 -0
- data/lib/basecamp/services/authorization_service.rb +47 -0
- data/lib/basecamp/services/base_service.rb +146 -0
- data/lib/basecamp/services/campfires_service.rb +141 -0
- data/lib/basecamp/services/card_columns_service.rb +106 -0
- data/lib/basecamp/services/card_steps_service.rb +86 -0
- data/lib/basecamp/services/card_tables_service.rb +23 -0
- data/lib/basecamp/services/cards_service.rb +93 -0
- data/lib/basecamp/services/checkins_service.rb +127 -0
- data/lib/basecamp/services/client_approvals_service.rb +33 -0
- data/lib/basecamp/services/client_correspondences_service.rb +33 -0
- data/lib/basecamp/services/client_replies_service.rb +35 -0
- data/lib/basecamp/services/comments_service.rb +63 -0
- data/lib/basecamp/services/documents_service.rb +74 -0
- data/lib/basecamp/services/events_service.rb +27 -0
- data/lib/basecamp/services/forwards_service.rb +80 -0
- data/lib/basecamp/services/lineup_service.rb +67 -0
- data/lib/basecamp/services/message_boards_service.rb +24 -0
- data/lib/basecamp/services/message_types_service.rb +79 -0
- data/lib/basecamp/services/messages_service.rb +133 -0
- data/lib/basecamp/services/people_service.rb +73 -0
- data/lib/basecamp/services/projects_service.rb +67 -0
- data/lib/basecamp/services/recordings_service.rb +127 -0
- data/lib/basecamp/services/reports_service.rb +80 -0
- data/lib/basecamp/services/schedules_service.rb +156 -0
- data/lib/basecamp/services/search_service.rb +36 -0
- data/lib/basecamp/services/subscriptions_service.rb +67 -0
- data/lib/basecamp/services/templates_service.rb +96 -0
- data/lib/basecamp/services/timeline_service.rb +62 -0
- data/lib/basecamp/services/timesheet_service.rb +68 -0
- data/lib/basecamp/services/todolist_groups_service.rb +100 -0
- data/lib/basecamp/services/todolists_service.rb +104 -0
- data/lib/basecamp/services/todos_service.rb +156 -0
- data/lib/basecamp/services/todosets_service.rb +23 -0
- data/lib/basecamp/services/tools_service.rb +89 -0
- data/lib/basecamp/services/uploads_service.rb +84 -0
- data/lib/basecamp/services/vaults_service.rb +84 -0
- data/lib/basecamp/services/webhooks_service.rb +88 -0
- data/lib/basecamp/static_token_provider.rb +24 -0
- data/lib/basecamp/token_provider.rb +42 -0
- data/lib/basecamp/version.rb +6 -0
- data/lib/basecamp/webhooks/event.rb +52 -0
- data/lib/basecamp/webhooks/rack_middleware.rb +49 -0
- data/lib/basecamp/webhooks/receiver.rb +161 -0
- data/lib/basecamp/webhooks/verify.rb +36 -0
- data/lib/basecamp.rb +107 -0
- data/scripts/generate-metadata.rb +106 -0
- data/scripts/generate-services.rb +778 -0
- data/scripts/generate-types.rb +191 -0
- metadata +316 -0
|
@@ -0,0 +1,3196 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Auto-generated from OpenAPI spec. Do not edit manually.
|
|
4
|
+
# Generated: 2026-02-27T01:07:43Z
|
|
5
|
+
|
|
6
|
+
require "json"
|
|
7
|
+
require "time"
|
|
8
|
+
|
|
9
|
+
# Type conversion helpers
|
|
10
|
+
module TypeHelpers
|
|
11
|
+
module_function
|
|
12
|
+
|
|
13
|
+
def identity(value)
|
|
14
|
+
value
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def parse_integer(value)
|
|
18
|
+
return nil if value.nil?
|
|
19
|
+
value.to_i
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def parse_float(value)
|
|
23
|
+
return nil if value.nil?
|
|
24
|
+
value.to_f
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def parse_boolean(value)
|
|
28
|
+
return nil if value.nil?
|
|
29
|
+
!!value
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def parse_datetime(value)
|
|
33
|
+
return nil if value.nil?
|
|
34
|
+
return value if value.is_a?(Time)
|
|
35
|
+
Time.parse(value.to_s)
|
|
36
|
+
rescue ArgumentError
|
|
37
|
+
nil
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def parse_type(value, type_name)
|
|
41
|
+
return nil if value.nil?
|
|
42
|
+
return value unless value.is_a?(Hash)
|
|
43
|
+
|
|
44
|
+
type_class = Basecamp::Types.const_get(type_name)
|
|
45
|
+
type_class.new(value)
|
|
46
|
+
rescue NameError
|
|
47
|
+
value
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def parse_array(value, type_name)
|
|
51
|
+
return nil if value.nil?
|
|
52
|
+
return value unless value.is_a?(Array)
|
|
53
|
+
|
|
54
|
+
type_class = Basecamp::Types.const_get(type_name)
|
|
55
|
+
value.map { |item| item.is_a?(Hash) ? type_class.new(item) : item }
|
|
56
|
+
rescue NameError
|
|
57
|
+
value
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
module Basecamp
|
|
62
|
+
module Types
|
|
63
|
+
include TypeHelpers
|
|
64
|
+
|
|
65
|
+
# Assignable
|
|
66
|
+
class Assignable
|
|
67
|
+
include TypeHelpers
|
|
68
|
+
attr_accessor :app_url, :assignees, :bucket, :due_on, :id, :parent, :starts_on, :title, :type, :url
|
|
69
|
+
|
|
70
|
+
def initialize(data = {})
|
|
71
|
+
@app_url = data["app_url"]
|
|
72
|
+
@assignees = parse_array(data["assignees"], "Person")
|
|
73
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
74
|
+
@due_on = data["due_on"]
|
|
75
|
+
@id = parse_integer(data["id"])
|
|
76
|
+
@parent = parse_type(data["parent"], "TodoParent")
|
|
77
|
+
@starts_on = data["starts_on"]
|
|
78
|
+
@title = data["title"]
|
|
79
|
+
@type = data["type"]
|
|
80
|
+
@url = data["url"]
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def to_h
|
|
84
|
+
{
|
|
85
|
+
"app_url" => @app_url,
|
|
86
|
+
"assignees" => @assignees,
|
|
87
|
+
"bucket" => @bucket,
|
|
88
|
+
"due_on" => @due_on,
|
|
89
|
+
"id" => @id,
|
|
90
|
+
"parent" => @parent,
|
|
91
|
+
"starts_on" => @starts_on,
|
|
92
|
+
"title" => @title,
|
|
93
|
+
"type" => @type,
|
|
94
|
+
"url" => @url,
|
|
95
|
+
}.compact
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
def to_json(*args)
|
|
99
|
+
to_h.to_json(*args)
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Boost
|
|
104
|
+
class Boost
|
|
105
|
+
include TypeHelpers
|
|
106
|
+
attr_accessor :created_at, :id, :booster, :content, :recording
|
|
107
|
+
|
|
108
|
+
# @return [Array<Symbol>]
|
|
109
|
+
def self.required_fields
|
|
110
|
+
%i[created_at id].freeze
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def initialize(data = {})
|
|
114
|
+
@created_at = parse_datetime(data["created_at"])
|
|
115
|
+
@id = parse_integer(data["id"])
|
|
116
|
+
@booster = parse_type(data["booster"], "Person")
|
|
117
|
+
@content = data["content"]
|
|
118
|
+
@recording = parse_type(data["recording"], "RecordingParent")
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def to_h
|
|
122
|
+
{
|
|
123
|
+
"created_at" => @created_at,
|
|
124
|
+
"id" => @id,
|
|
125
|
+
"booster" => @booster,
|
|
126
|
+
"content" => @content,
|
|
127
|
+
"recording" => @recording,
|
|
128
|
+
}.compact
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
def to_json(*args)
|
|
132
|
+
to_h.to_json(*args)
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Campfire
|
|
137
|
+
class Campfire
|
|
138
|
+
include TypeHelpers
|
|
139
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :lines_url, :position, :subscription_url, :topic
|
|
140
|
+
|
|
141
|
+
# @return [Array<Symbol>]
|
|
142
|
+
def self.required_fields
|
|
143
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def initialize(data = {})
|
|
147
|
+
@app_url = data["app_url"]
|
|
148
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
149
|
+
@created_at = parse_datetime(data["created_at"])
|
|
150
|
+
@creator = parse_type(data["creator"], "Person")
|
|
151
|
+
@id = parse_integer(data["id"])
|
|
152
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
153
|
+
@status = data["status"]
|
|
154
|
+
@title = data["title"]
|
|
155
|
+
@type = data["type"]
|
|
156
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
157
|
+
@url = data["url"]
|
|
158
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
159
|
+
@bookmark_url = data["bookmark_url"]
|
|
160
|
+
@lines_url = data["lines_url"]
|
|
161
|
+
@position = parse_integer(data["position"])
|
|
162
|
+
@subscription_url = data["subscription_url"]
|
|
163
|
+
@topic = data["topic"]
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def to_h
|
|
167
|
+
{
|
|
168
|
+
"app_url" => @app_url,
|
|
169
|
+
"bucket" => @bucket,
|
|
170
|
+
"created_at" => @created_at,
|
|
171
|
+
"creator" => @creator,
|
|
172
|
+
"id" => @id,
|
|
173
|
+
"inherits_status" => @inherits_status,
|
|
174
|
+
"status" => @status,
|
|
175
|
+
"title" => @title,
|
|
176
|
+
"type" => @type,
|
|
177
|
+
"updated_at" => @updated_at,
|
|
178
|
+
"url" => @url,
|
|
179
|
+
"visible_to_clients" => @visible_to_clients,
|
|
180
|
+
"bookmark_url" => @bookmark_url,
|
|
181
|
+
"lines_url" => @lines_url,
|
|
182
|
+
"position" => @position,
|
|
183
|
+
"subscription_url" => @subscription_url,
|
|
184
|
+
"topic" => @topic,
|
|
185
|
+
}.compact
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
def to_json(*args)
|
|
189
|
+
to_h.to_json(*args)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# CampfireLine
|
|
194
|
+
class CampfireLine
|
|
195
|
+
include TypeHelpers
|
|
196
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url
|
|
197
|
+
|
|
198
|
+
# @return [Array<Symbol>]
|
|
199
|
+
def self.required_fields
|
|
200
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
def initialize(data = {})
|
|
204
|
+
@app_url = data["app_url"]
|
|
205
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
206
|
+
@content = data["content"]
|
|
207
|
+
@created_at = parse_datetime(data["created_at"])
|
|
208
|
+
@creator = parse_type(data["creator"], "Person")
|
|
209
|
+
@id = parse_integer(data["id"])
|
|
210
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
211
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
212
|
+
@status = data["status"]
|
|
213
|
+
@title = data["title"]
|
|
214
|
+
@type = data["type"]
|
|
215
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
216
|
+
@url = data["url"]
|
|
217
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
218
|
+
@bookmark_url = data["bookmark_url"]
|
|
219
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
220
|
+
@boosts_url = data["boosts_url"]
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
def to_h
|
|
224
|
+
{
|
|
225
|
+
"app_url" => @app_url,
|
|
226
|
+
"bucket" => @bucket,
|
|
227
|
+
"content" => @content,
|
|
228
|
+
"created_at" => @created_at,
|
|
229
|
+
"creator" => @creator,
|
|
230
|
+
"id" => @id,
|
|
231
|
+
"inherits_status" => @inherits_status,
|
|
232
|
+
"parent" => @parent,
|
|
233
|
+
"status" => @status,
|
|
234
|
+
"title" => @title,
|
|
235
|
+
"type" => @type,
|
|
236
|
+
"updated_at" => @updated_at,
|
|
237
|
+
"url" => @url,
|
|
238
|
+
"visible_to_clients" => @visible_to_clients,
|
|
239
|
+
"bookmark_url" => @bookmark_url,
|
|
240
|
+
"boosts_count" => @boosts_count,
|
|
241
|
+
"boosts_url" => @boosts_url,
|
|
242
|
+
}.compact
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
def to_json(*args)
|
|
246
|
+
to_h.to_json(*args)
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Card
|
|
251
|
+
class Card
|
|
252
|
+
include TypeHelpers
|
|
253
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :assignees, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :completed, :completed_at, :completer, :completion_subscribers, :completion_url, :content, :description, :due_on, :position, :steps, :subscription_url
|
|
254
|
+
|
|
255
|
+
# @return [Array<Symbol>]
|
|
256
|
+
def self.required_fields
|
|
257
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
def initialize(data = {})
|
|
261
|
+
@app_url = data["app_url"]
|
|
262
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
263
|
+
@created_at = parse_datetime(data["created_at"])
|
|
264
|
+
@creator = parse_type(data["creator"], "Person")
|
|
265
|
+
@id = parse_integer(data["id"])
|
|
266
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
267
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
268
|
+
@status = data["status"]
|
|
269
|
+
@title = data["title"]
|
|
270
|
+
@type = data["type"]
|
|
271
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
272
|
+
@url = data["url"]
|
|
273
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
274
|
+
@assignees = parse_array(data["assignees"], "Person")
|
|
275
|
+
@bookmark_url = data["bookmark_url"]
|
|
276
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
277
|
+
@boosts_url = data["boosts_url"]
|
|
278
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
279
|
+
@comments_url = data["comments_url"]
|
|
280
|
+
@completed = parse_boolean(data["completed"])
|
|
281
|
+
@completed_at = parse_datetime(data["completed_at"])
|
|
282
|
+
@completer = parse_type(data["completer"], "Person")
|
|
283
|
+
@completion_subscribers = parse_array(data["completion_subscribers"], "Person")
|
|
284
|
+
@completion_url = data["completion_url"]
|
|
285
|
+
@content = data["content"]
|
|
286
|
+
@description = data["description"]
|
|
287
|
+
@due_on = data["due_on"]
|
|
288
|
+
@position = parse_integer(data["position"])
|
|
289
|
+
@steps = parse_array(data["steps"], "CardStep")
|
|
290
|
+
@subscription_url = data["subscription_url"]
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
def to_h
|
|
294
|
+
{
|
|
295
|
+
"app_url" => @app_url,
|
|
296
|
+
"bucket" => @bucket,
|
|
297
|
+
"created_at" => @created_at,
|
|
298
|
+
"creator" => @creator,
|
|
299
|
+
"id" => @id,
|
|
300
|
+
"inherits_status" => @inherits_status,
|
|
301
|
+
"parent" => @parent,
|
|
302
|
+
"status" => @status,
|
|
303
|
+
"title" => @title,
|
|
304
|
+
"type" => @type,
|
|
305
|
+
"updated_at" => @updated_at,
|
|
306
|
+
"url" => @url,
|
|
307
|
+
"visible_to_clients" => @visible_to_clients,
|
|
308
|
+
"assignees" => @assignees,
|
|
309
|
+
"bookmark_url" => @bookmark_url,
|
|
310
|
+
"boosts_count" => @boosts_count,
|
|
311
|
+
"boosts_url" => @boosts_url,
|
|
312
|
+
"comments_count" => @comments_count,
|
|
313
|
+
"comments_url" => @comments_url,
|
|
314
|
+
"completed" => @completed,
|
|
315
|
+
"completed_at" => @completed_at,
|
|
316
|
+
"completer" => @completer,
|
|
317
|
+
"completion_subscribers" => @completion_subscribers,
|
|
318
|
+
"completion_url" => @completion_url,
|
|
319
|
+
"content" => @content,
|
|
320
|
+
"description" => @description,
|
|
321
|
+
"due_on" => @due_on,
|
|
322
|
+
"position" => @position,
|
|
323
|
+
"steps" => @steps,
|
|
324
|
+
"subscription_url" => @subscription_url,
|
|
325
|
+
}.compact
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
def to_json(*args)
|
|
329
|
+
to_h.to_json(*args)
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# CardColumn
|
|
334
|
+
class CardColumn
|
|
335
|
+
include TypeHelpers
|
|
336
|
+
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
|
|
337
|
+
|
|
338
|
+
# @return [Array<Symbol>]
|
|
339
|
+
def self.required_fields
|
|
340
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
def initialize(data = {})
|
|
344
|
+
@app_url = data["app_url"]
|
|
345
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
346
|
+
@created_at = parse_datetime(data["created_at"])
|
|
347
|
+
@creator = parse_type(data["creator"], "Person")
|
|
348
|
+
@id = parse_integer(data["id"])
|
|
349
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
350
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
351
|
+
@status = data["status"]
|
|
352
|
+
@title = data["title"]
|
|
353
|
+
@type = data["type"]
|
|
354
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
355
|
+
@url = data["url"]
|
|
356
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
357
|
+
@bookmark_url = data["bookmark_url"]
|
|
358
|
+
@cards_count = parse_integer(data["cards_count"])
|
|
359
|
+
@cards_url = data["cards_url"]
|
|
360
|
+
@color = data["color"]
|
|
361
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
362
|
+
@description = data["description"]
|
|
363
|
+
@position = parse_integer(data["position"])
|
|
364
|
+
@subscribers = parse_array(data["subscribers"], "Person")
|
|
365
|
+
end
|
|
366
|
+
|
|
367
|
+
def to_h
|
|
368
|
+
{
|
|
369
|
+
"app_url" => @app_url,
|
|
370
|
+
"bucket" => @bucket,
|
|
371
|
+
"created_at" => @created_at,
|
|
372
|
+
"creator" => @creator,
|
|
373
|
+
"id" => @id,
|
|
374
|
+
"inherits_status" => @inherits_status,
|
|
375
|
+
"parent" => @parent,
|
|
376
|
+
"status" => @status,
|
|
377
|
+
"title" => @title,
|
|
378
|
+
"type" => @type,
|
|
379
|
+
"updated_at" => @updated_at,
|
|
380
|
+
"url" => @url,
|
|
381
|
+
"visible_to_clients" => @visible_to_clients,
|
|
382
|
+
"bookmark_url" => @bookmark_url,
|
|
383
|
+
"cards_count" => @cards_count,
|
|
384
|
+
"cards_url" => @cards_url,
|
|
385
|
+
"color" => @color,
|
|
386
|
+
"comments_count" => @comments_count,
|
|
387
|
+
"description" => @description,
|
|
388
|
+
"position" => @position,
|
|
389
|
+
"subscribers" => @subscribers,
|
|
390
|
+
}.compact
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
def to_json(*args)
|
|
394
|
+
to_h.to_json(*args)
|
|
395
|
+
end
|
|
396
|
+
end
|
|
397
|
+
|
|
398
|
+
# CardStep
|
|
399
|
+
class CardStep
|
|
400
|
+
include TypeHelpers
|
|
401
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :assignees, :bookmark_url, :completed, :completed_at, :completer, :completion_url, :due_on, :position
|
|
402
|
+
|
|
403
|
+
# @return [Array<Symbol>]
|
|
404
|
+
def self.required_fields
|
|
405
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
def initialize(data = {})
|
|
409
|
+
@app_url = data["app_url"]
|
|
410
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
411
|
+
@created_at = parse_datetime(data["created_at"])
|
|
412
|
+
@creator = parse_type(data["creator"], "Person")
|
|
413
|
+
@id = parse_integer(data["id"])
|
|
414
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
415
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
416
|
+
@status = data["status"]
|
|
417
|
+
@title = data["title"]
|
|
418
|
+
@type = data["type"]
|
|
419
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
420
|
+
@url = data["url"]
|
|
421
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
422
|
+
@assignees = parse_array(data["assignees"], "Person")
|
|
423
|
+
@bookmark_url = data["bookmark_url"]
|
|
424
|
+
@completed = parse_boolean(data["completed"])
|
|
425
|
+
@completed_at = parse_datetime(data["completed_at"])
|
|
426
|
+
@completer = parse_type(data["completer"], "Person")
|
|
427
|
+
@completion_url = data["completion_url"]
|
|
428
|
+
@due_on = data["due_on"]
|
|
429
|
+
@position = parse_integer(data["position"])
|
|
430
|
+
end
|
|
431
|
+
|
|
432
|
+
def to_h
|
|
433
|
+
{
|
|
434
|
+
"app_url" => @app_url,
|
|
435
|
+
"bucket" => @bucket,
|
|
436
|
+
"created_at" => @created_at,
|
|
437
|
+
"creator" => @creator,
|
|
438
|
+
"id" => @id,
|
|
439
|
+
"inherits_status" => @inherits_status,
|
|
440
|
+
"parent" => @parent,
|
|
441
|
+
"status" => @status,
|
|
442
|
+
"title" => @title,
|
|
443
|
+
"type" => @type,
|
|
444
|
+
"updated_at" => @updated_at,
|
|
445
|
+
"url" => @url,
|
|
446
|
+
"visible_to_clients" => @visible_to_clients,
|
|
447
|
+
"assignees" => @assignees,
|
|
448
|
+
"bookmark_url" => @bookmark_url,
|
|
449
|
+
"completed" => @completed,
|
|
450
|
+
"completed_at" => @completed_at,
|
|
451
|
+
"completer" => @completer,
|
|
452
|
+
"completion_url" => @completion_url,
|
|
453
|
+
"due_on" => @due_on,
|
|
454
|
+
"position" => @position,
|
|
455
|
+
}.compact
|
|
456
|
+
end
|
|
457
|
+
|
|
458
|
+
def to_json(*args)
|
|
459
|
+
to_h.to_json(*args)
|
|
460
|
+
end
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
# CardTable
|
|
464
|
+
class CardTable
|
|
465
|
+
include TypeHelpers
|
|
466
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :lists, :subscribers, :subscription_url
|
|
467
|
+
|
|
468
|
+
# @return [Array<Symbol>]
|
|
469
|
+
def self.required_fields
|
|
470
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
471
|
+
end
|
|
472
|
+
|
|
473
|
+
def initialize(data = {})
|
|
474
|
+
@app_url = data["app_url"]
|
|
475
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
476
|
+
@created_at = parse_datetime(data["created_at"])
|
|
477
|
+
@creator = parse_type(data["creator"], "Person")
|
|
478
|
+
@id = parse_integer(data["id"])
|
|
479
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
480
|
+
@status = data["status"]
|
|
481
|
+
@title = data["title"]
|
|
482
|
+
@type = data["type"]
|
|
483
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
484
|
+
@url = data["url"]
|
|
485
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
486
|
+
@bookmark_url = data["bookmark_url"]
|
|
487
|
+
@lists = parse_array(data["lists"], "CardColumn")
|
|
488
|
+
@subscribers = parse_array(data["subscribers"], "Person")
|
|
489
|
+
@subscription_url = data["subscription_url"]
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
def to_h
|
|
493
|
+
{
|
|
494
|
+
"app_url" => @app_url,
|
|
495
|
+
"bucket" => @bucket,
|
|
496
|
+
"created_at" => @created_at,
|
|
497
|
+
"creator" => @creator,
|
|
498
|
+
"id" => @id,
|
|
499
|
+
"inherits_status" => @inherits_status,
|
|
500
|
+
"status" => @status,
|
|
501
|
+
"title" => @title,
|
|
502
|
+
"type" => @type,
|
|
503
|
+
"updated_at" => @updated_at,
|
|
504
|
+
"url" => @url,
|
|
505
|
+
"visible_to_clients" => @visible_to_clients,
|
|
506
|
+
"bookmark_url" => @bookmark_url,
|
|
507
|
+
"lists" => @lists,
|
|
508
|
+
"subscribers" => @subscribers,
|
|
509
|
+
"subscription_url" => @subscription_url,
|
|
510
|
+
}.compact
|
|
511
|
+
end
|
|
512
|
+
|
|
513
|
+
def to_json(*args)
|
|
514
|
+
to_h.to_json(*args)
|
|
515
|
+
end
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Chatbot
|
|
519
|
+
class Chatbot
|
|
520
|
+
include TypeHelpers
|
|
521
|
+
attr_accessor :created_at, :id, :service_name, :updated_at, :app_url, :command_url, :lines_url, :url
|
|
522
|
+
|
|
523
|
+
# @return [Array<Symbol>]
|
|
524
|
+
def self.required_fields
|
|
525
|
+
%i[created_at id service_name updated_at].freeze
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
def initialize(data = {})
|
|
529
|
+
@created_at = parse_datetime(data["created_at"])
|
|
530
|
+
@id = parse_integer(data["id"])
|
|
531
|
+
@service_name = data["service_name"]
|
|
532
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
533
|
+
@app_url = data["app_url"]
|
|
534
|
+
@command_url = data["command_url"]
|
|
535
|
+
@lines_url = data["lines_url"]
|
|
536
|
+
@url = data["url"]
|
|
537
|
+
end
|
|
538
|
+
|
|
539
|
+
def to_h
|
|
540
|
+
{
|
|
541
|
+
"created_at" => @created_at,
|
|
542
|
+
"id" => @id,
|
|
543
|
+
"service_name" => @service_name,
|
|
544
|
+
"updated_at" => @updated_at,
|
|
545
|
+
"app_url" => @app_url,
|
|
546
|
+
"command_url" => @command_url,
|
|
547
|
+
"lines_url" => @lines_url,
|
|
548
|
+
"url" => @url,
|
|
549
|
+
}.compact
|
|
550
|
+
end
|
|
551
|
+
|
|
552
|
+
def to_json(*args)
|
|
553
|
+
to_h.to_json(*args)
|
|
554
|
+
end
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
# ClientApproval
|
|
558
|
+
class ClientApproval
|
|
559
|
+
include TypeHelpers
|
|
560
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :approval_status, :approver, :bookmark_url, :content, :due_on, :replies_count, :replies_url, :responses, :subject, :subscription_url
|
|
561
|
+
|
|
562
|
+
# @return [Array<Symbol>]
|
|
563
|
+
def self.required_fields
|
|
564
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
565
|
+
end
|
|
566
|
+
|
|
567
|
+
def initialize(data = {})
|
|
568
|
+
@app_url = data["app_url"]
|
|
569
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
570
|
+
@created_at = parse_datetime(data["created_at"])
|
|
571
|
+
@creator = parse_type(data["creator"], "Person")
|
|
572
|
+
@id = parse_integer(data["id"])
|
|
573
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
574
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
575
|
+
@status = data["status"]
|
|
576
|
+
@title = data["title"]
|
|
577
|
+
@type = data["type"]
|
|
578
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
579
|
+
@url = data["url"]
|
|
580
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
581
|
+
@approval_status = data["approval_status"]
|
|
582
|
+
@approver = parse_type(data["approver"], "Person")
|
|
583
|
+
@bookmark_url = data["bookmark_url"]
|
|
584
|
+
@content = data["content"]
|
|
585
|
+
@due_on = data["due_on"]
|
|
586
|
+
@replies_count = parse_integer(data["replies_count"])
|
|
587
|
+
@replies_url = data["replies_url"]
|
|
588
|
+
@responses = parse_array(data["responses"], "ClientApprovalResponse")
|
|
589
|
+
@subject = data["subject"]
|
|
590
|
+
@subscription_url = data["subscription_url"]
|
|
591
|
+
end
|
|
592
|
+
|
|
593
|
+
def to_h
|
|
594
|
+
{
|
|
595
|
+
"app_url" => @app_url,
|
|
596
|
+
"bucket" => @bucket,
|
|
597
|
+
"created_at" => @created_at,
|
|
598
|
+
"creator" => @creator,
|
|
599
|
+
"id" => @id,
|
|
600
|
+
"inherits_status" => @inherits_status,
|
|
601
|
+
"parent" => @parent,
|
|
602
|
+
"status" => @status,
|
|
603
|
+
"title" => @title,
|
|
604
|
+
"type" => @type,
|
|
605
|
+
"updated_at" => @updated_at,
|
|
606
|
+
"url" => @url,
|
|
607
|
+
"visible_to_clients" => @visible_to_clients,
|
|
608
|
+
"approval_status" => @approval_status,
|
|
609
|
+
"approver" => @approver,
|
|
610
|
+
"bookmark_url" => @bookmark_url,
|
|
611
|
+
"content" => @content,
|
|
612
|
+
"due_on" => @due_on,
|
|
613
|
+
"replies_count" => @replies_count,
|
|
614
|
+
"replies_url" => @replies_url,
|
|
615
|
+
"responses" => @responses,
|
|
616
|
+
"subject" => @subject,
|
|
617
|
+
"subscription_url" => @subscription_url,
|
|
618
|
+
}.compact
|
|
619
|
+
end
|
|
620
|
+
|
|
621
|
+
def to_json(*args)
|
|
622
|
+
to_h.to_json(*args)
|
|
623
|
+
end
|
|
624
|
+
end
|
|
625
|
+
|
|
626
|
+
# ClientApprovalResponse
|
|
627
|
+
class ClientApprovalResponse
|
|
628
|
+
include TypeHelpers
|
|
629
|
+
attr_accessor :app_url, :approved, :bookmark_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :visible_to_clients
|
|
630
|
+
|
|
631
|
+
def initialize(data = {})
|
|
632
|
+
@app_url = data["app_url"]
|
|
633
|
+
@approved = parse_boolean(data["approved"])
|
|
634
|
+
@bookmark_url = data["bookmark_url"]
|
|
635
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
636
|
+
@content = data["content"]
|
|
637
|
+
@created_at = parse_datetime(data["created_at"])
|
|
638
|
+
@creator = parse_type(data["creator"], "Person")
|
|
639
|
+
@id = parse_integer(data["id"])
|
|
640
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
641
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
642
|
+
@status = data["status"]
|
|
643
|
+
@title = data["title"]
|
|
644
|
+
@type = data["type"]
|
|
645
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
646
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
def to_h
|
|
650
|
+
{
|
|
651
|
+
"app_url" => @app_url,
|
|
652
|
+
"approved" => @approved,
|
|
653
|
+
"bookmark_url" => @bookmark_url,
|
|
654
|
+
"bucket" => @bucket,
|
|
655
|
+
"content" => @content,
|
|
656
|
+
"created_at" => @created_at,
|
|
657
|
+
"creator" => @creator,
|
|
658
|
+
"id" => @id,
|
|
659
|
+
"inherits_status" => @inherits_status,
|
|
660
|
+
"parent" => @parent,
|
|
661
|
+
"status" => @status,
|
|
662
|
+
"title" => @title,
|
|
663
|
+
"type" => @type,
|
|
664
|
+
"updated_at" => @updated_at,
|
|
665
|
+
"visible_to_clients" => @visible_to_clients,
|
|
666
|
+
}.compact
|
|
667
|
+
end
|
|
668
|
+
|
|
669
|
+
def to_json(*args)
|
|
670
|
+
to_h.to_json(*args)
|
|
671
|
+
end
|
|
672
|
+
end
|
|
673
|
+
|
|
674
|
+
# ClientCompany
|
|
675
|
+
class ClientCompany
|
|
676
|
+
include TypeHelpers
|
|
677
|
+
attr_accessor :id, :name
|
|
678
|
+
|
|
679
|
+
# @return [Array<Symbol>]
|
|
680
|
+
def self.required_fields
|
|
681
|
+
%i[id name].freeze
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
def initialize(data = {})
|
|
685
|
+
@id = parse_integer(data["id"])
|
|
686
|
+
@name = data["name"]
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
def to_h
|
|
690
|
+
{
|
|
691
|
+
"id" => @id,
|
|
692
|
+
"name" => @name,
|
|
693
|
+
}.compact
|
|
694
|
+
end
|
|
695
|
+
|
|
696
|
+
def to_json(*args)
|
|
697
|
+
to_h.to_json(*args)
|
|
698
|
+
end
|
|
699
|
+
end
|
|
700
|
+
|
|
701
|
+
# ClientCorrespondence
|
|
702
|
+
class ClientCorrespondence
|
|
703
|
+
include TypeHelpers
|
|
704
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :subject, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :content, :replies_count, :replies_url, :subscription_url
|
|
705
|
+
|
|
706
|
+
# @return [Array<Symbol>]
|
|
707
|
+
def self.required_fields
|
|
708
|
+
%i[app_url bucket created_at creator id inherits_status parent status subject title type updated_at url visible_to_clients].freeze
|
|
709
|
+
end
|
|
710
|
+
|
|
711
|
+
def initialize(data = {})
|
|
712
|
+
@app_url = data["app_url"]
|
|
713
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
714
|
+
@created_at = parse_datetime(data["created_at"])
|
|
715
|
+
@creator = parse_type(data["creator"], "Person")
|
|
716
|
+
@id = parse_integer(data["id"])
|
|
717
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
718
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
719
|
+
@status = data["status"]
|
|
720
|
+
@subject = data["subject"]
|
|
721
|
+
@title = data["title"]
|
|
722
|
+
@type = data["type"]
|
|
723
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
724
|
+
@url = data["url"]
|
|
725
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
726
|
+
@bookmark_url = data["bookmark_url"]
|
|
727
|
+
@content = data["content"]
|
|
728
|
+
@replies_count = parse_integer(data["replies_count"])
|
|
729
|
+
@replies_url = data["replies_url"]
|
|
730
|
+
@subscription_url = data["subscription_url"]
|
|
731
|
+
end
|
|
732
|
+
|
|
733
|
+
def to_h
|
|
734
|
+
{
|
|
735
|
+
"app_url" => @app_url,
|
|
736
|
+
"bucket" => @bucket,
|
|
737
|
+
"created_at" => @created_at,
|
|
738
|
+
"creator" => @creator,
|
|
739
|
+
"id" => @id,
|
|
740
|
+
"inherits_status" => @inherits_status,
|
|
741
|
+
"parent" => @parent,
|
|
742
|
+
"status" => @status,
|
|
743
|
+
"subject" => @subject,
|
|
744
|
+
"title" => @title,
|
|
745
|
+
"type" => @type,
|
|
746
|
+
"updated_at" => @updated_at,
|
|
747
|
+
"url" => @url,
|
|
748
|
+
"visible_to_clients" => @visible_to_clients,
|
|
749
|
+
"bookmark_url" => @bookmark_url,
|
|
750
|
+
"content" => @content,
|
|
751
|
+
"replies_count" => @replies_count,
|
|
752
|
+
"replies_url" => @replies_url,
|
|
753
|
+
"subscription_url" => @subscription_url,
|
|
754
|
+
}.compact
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
def to_json(*args)
|
|
758
|
+
to_h.to_json(*args)
|
|
759
|
+
end
|
|
760
|
+
end
|
|
761
|
+
|
|
762
|
+
# ClientReply
|
|
763
|
+
class ClientReply
|
|
764
|
+
include TypeHelpers
|
|
765
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url
|
|
766
|
+
|
|
767
|
+
# @return [Array<Symbol>]
|
|
768
|
+
def self.required_fields
|
|
769
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
770
|
+
end
|
|
771
|
+
|
|
772
|
+
def initialize(data = {})
|
|
773
|
+
@app_url = data["app_url"]
|
|
774
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
775
|
+
@content = data["content"]
|
|
776
|
+
@created_at = parse_datetime(data["created_at"])
|
|
777
|
+
@creator = parse_type(data["creator"], "Person")
|
|
778
|
+
@id = parse_integer(data["id"])
|
|
779
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
780
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
781
|
+
@status = data["status"]
|
|
782
|
+
@title = data["title"]
|
|
783
|
+
@type = data["type"]
|
|
784
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
785
|
+
@url = data["url"]
|
|
786
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
787
|
+
@bookmark_url = data["bookmark_url"]
|
|
788
|
+
end
|
|
789
|
+
|
|
790
|
+
def to_h
|
|
791
|
+
{
|
|
792
|
+
"app_url" => @app_url,
|
|
793
|
+
"bucket" => @bucket,
|
|
794
|
+
"content" => @content,
|
|
795
|
+
"created_at" => @created_at,
|
|
796
|
+
"creator" => @creator,
|
|
797
|
+
"id" => @id,
|
|
798
|
+
"inherits_status" => @inherits_status,
|
|
799
|
+
"parent" => @parent,
|
|
800
|
+
"status" => @status,
|
|
801
|
+
"title" => @title,
|
|
802
|
+
"type" => @type,
|
|
803
|
+
"updated_at" => @updated_at,
|
|
804
|
+
"url" => @url,
|
|
805
|
+
"visible_to_clients" => @visible_to_clients,
|
|
806
|
+
"bookmark_url" => @bookmark_url,
|
|
807
|
+
}.compact
|
|
808
|
+
end
|
|
809
|
+
|
|
810
|
+
def to_json(*args)
|
|
811
|
+
to_h.to_json(*args)
|
|
812
|
+
end
|
|
813
|
+
end
|
|
814
|
+
|
|
815
|
+
# ClientSide
|
|
816
|
+
class ClientSide
|
|
817
|
+
include TypeHelpers
|
|
818
|
+
attr_accessor :app_url, :url
|
|
819
|
+
|
|
820
|
+
def initialize(data = {})
|
|
821
|
+
@app_url = data["app_url"]
|
|
822
|
+
@url = data["url"]
|
|
823
|
+
end
|
|
824
|
+
|
|
825
|
+
def to_h
|
|
826
|
+
{
|
|
827
|
+
"app_url" => @app_url,
|
|
828
|
+
"url" => @url,
|
|
829
|
+
}.compact
|
|
830
|
+
end
|
|
831
|
+
|
|
832
|
+
def to_json(*args)
|
|
833
|
+
to_h.to_json(*args)
|
|
834
|
+
end
|
|
835
|
+
end
|
|
836
|
+
|
|
837
|
+
# Comment
|
|
838
|
+
class Comment
|
|
839
|
+
include TypeHelpers
|
|
840
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url
|
|
841
|
+
|
|
842
|
+
# @return [Array<Symbol>]
|
|
843
|
+
def self.required_fields
|
|
844
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
845
|
+
end
|
|
846
|
+
|
|
847
|
+
def initialize(data = {})
|
|
848
|
+
@app_url = data["app_url"]
|
|
849
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
850
|
+
@content = data["content"]
|
|
851
|
+
@created_at = parse_datetime(data["created_at"])
|
|
852
|
+
@creator = parse_type(data["creator"], "Person")
|
|
853
|
+
@id = parse_integer(data["id"])
|
|
854
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
855
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
856
|
+
@status = data["status"]
|
|
857
|
+
@title = data["title"]
|
|
858
|
+
@type = data["type"]
|
|
859
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
860
|
+
@url = data["url"]
|
|
861
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
862
|
+
@bookmark_url = data["bookmark_url"]
|
|
863
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
864
|
+
@boosts_url = data["boosts_url"]
|
|
865
|
+
end
|
|
866
|
+
|
|
867
|
+
def to_h
|
|
868
|
+
{
|
|
869
|
+
"app_url" => @app_url,
|
|
870
|
+
"bucket" => @bucket,
|
|
871
|
+
"content" => @content,
|
|
872
|
+
"created_at" => @created_at,
|
|
873
|
+
"creator" => @creator,
|
|
874
|
+
"id" => @id,
|
|
875
|
+
"inherits_status" => @inherits_status,
|
|
876
|
+
"parent" => @parent,
|
|
877
|
+
"status" => @status,
|
|
878
|
+
"title" => @title,
|
|
879
|
+
"type" => @type,
|
|
880
|
+
"updated_at" => @updated_at,
|
|
881
|
+
"url" => @url,
|
|
882
|
+
"visible_to_clients" => @visible_to_clients,
|
|
883
|
+
"bookmark_url" => @bookmark_url,
|
|
884
|
+
"boosts_count" => @boosts_count,
|
|
885
|
+
"boosts_url" => @boosts_url,
|
|
886
|
+
}.compact
|
|
887
|
+
end
|
|
888
|
+
|
|
889
|
+
def to_json(*args)
|
|
890
|
+
to_h.to_json(*args)
|
|
891
|
+
end
|
|
892
|
+
end
|
|
893
|
+
|
|
894
|
+
# CreatePersonRequest
|
|
895
|
+
class CreatePersonRequest
|
|
896
|
+
include TypeHelpers
|
|
897
|
+
attr_accessor :email_address, :name, :company_name, :title
|
|
898
|
+
|
|
899
|
+
# @return [Array<Symbol>]
|
|
900
|
+
def self.required_fields
|
|
901
|
+
%i[email_address name].freeze
|
|
902
|
+
end
|
|
903
|
+
|
|
904
|
+
def initialize(data = {})
|
|
905
|
+
@email_address = data["email_address"]
|
|
906
|
+
@name = data["name"]
|
|
907
|
+
@company_name = data["company_name"]
|
|
908
|
+
@title = data["title"]
|
|
909
|
+
end
|
|
910
|
+
|
|
911
|
+
def to_h
|
|
912
|
+
{
|
|
913
|
+
"email_address" => @email_address,
|
|
914
|
+
"name" => @name,
|
|
915
|
+
"company_name" => @company_name,
|
|
916
|
+
"title" => @title,
|
|
917
|
+
}.compact
|
|
918
|
+
end
|
|
919
|
+
|
|
920
|
+
def to_json(*args)
|
|
921
|
+
to_h.to_json(*args)
|
|
922
|
+
end
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
# DockItem
|
|
926
|
+
class DockItem
|
|
927
|
+
include TypeHelpers
|
|
928
|
+
attr_accessor :app_url, :enabled, :id, :name, :title, :url, :position
|
|
929
|
+
|
|
930
|
+
# @return [Array<Symbol>]
|
|
931
|
+
def self.required_fields
|
|
932
|
+
%i[app_url enabled id name title url].freeze
|
|
933
|
+
end
|
|
934
|
+
|
|
935
|
+
def initialize(data = {})
|
|
936
|
+
@app_url = data["app_url"]
|
|
937
|
+
@enabled = parse_boolean(data["enabled"])
|
|
938
|
+
@id = parse_integer(data["id"])
|
|
939
|
+
@name = data["name"]
|
|
940
|
+
@title = data["title"]
|
|
941
|
+
@url = data["url"]
|
|
942
|
+
@position = parse_integer(data["position"])
|
|
943
|
+
end
|
|
944
|
+
|
|
945
|
+
def to_h
|
|
946
|
+
{
|
|
947
|
+
"app_url" => @app_url,
|
|
948
|
+
"enabled" => @enabled,
|
|
949
|
+
"id" => @id,
|
|
950
|
+
"name" => @name,
|
|
951
|
+
"title" => @title,
|
|
952
|
+
"url" => @url,
|
|
953
|
+
"position" => @position,
|
|
954
|
+
}.compact
|
|
955
|
+
end
|
|
956
|
+
|
|
957
|
+
def to_json(*args)
|
|
958
|
+
to_h.to_json(*args)
|
|
959
|
+
end
|
|
960
|
+
end
|
|
961
|
+
|
|
962
|
+
# Document
|
|
963
|
+
class Document
|
|
964
|
+
include TypeHelpers
|
|
965
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :content, :position, :subscription_url
|
|
966
|
+
|
|
967
|
+
# @return [Array<Symbol>]
|
|
968
|
+
def self.required_fields
|
|
969
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
970
|
+
end
|
|
971
|
+
|
|
972
|
+
def initialize(data = {})
|
|
973
|
+
@app_url = data["app_url"]
|
|
974
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
975
|
+
@created_at = parse_datetime(data["created_at"])
|
|
976
|
+
@creator = parse_type(data["creator"], "Person")
|
|
977
|
+
@id = parse_integer(data["id"])
|
|
978
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
979
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
980
|
+
@status = data["status"]
|
|
981
|
+
@title = data["title"]
|
|
982
|
+
@type = data["type"]
|
|
983
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
984
|
+
@url = data["url"]
|
|
985
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
986
|
+
@bookmark_url = data["bookmark_url"]
|
|
987
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
988
|
+
@boosts_url = data["boosts_url"]
|
|
989
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
990
|
+
@comments_url = data["comments_url"]
|
|
991
|
+
@content = data["content"]
|
|
992
|
+
@position = parse_integer(data["position"])
|
|
993
|
+
@subscription_url = data["subscription_url"]
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
def to_h
|
|
997
|
+
{
|
|
998
|
+
"app_url" => @app_url,
|
|
999
|
+
"bucket" => @bucket,
|
|
1000
|
+
"created_at" => @created_at,
|
|
1001
|
+
"creator" => @creator,
|
|
1002
|
+
"id" => @id,
|
|
1003
|
+
"inherits_status" => @inherits_status,
|
|
1004
|
+
"parent" => @parent,
|
|
1005
|
+
"status" => @status,
|
|
1006
|
+
"title" => @title,
|
|
1007
|
+
"type" => @type,
|
|
1008
|
+
"updated_at" => @updated_at,
|
|
1009
|
+
"url" => @url,
|
|
1010
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1011
|
+
"bookmark_url" => @bookmark_url,
|
|
1012
|
+
"boosts_count" => @boosts_count,
|
|
1013
|
+
"boosts_url" => @boosts_url,
|
|
1014
|
+
"comments_count" => @comments_count,
|
|
1015
|
+
"comments_url" => @comments_url,
|
|
1016
|
+
"content" => @content,
|
|
1017
|
+
"position" => @position,
|
|
1018
|
+
"subscription_url" => @subscription_url,
|
|
1019
|
+
}.compact
|
|
1020
|
+
end
|
|
1021
|
+
|
|
1022
|
+
def to_json(*args)
|
|
1023
|
+
to_h.to_json(*args)
|
|
1024
|
+
end
|
|
1025
|
+
end
|
|
1026
|
+
|
|
1027
|
+
# Event
|
|
1028
|
+
class Event
|
|
1029
|
+
include TypeHelpers
|
|
1030
|
+
attr_accessor :action, :created_at, :creator, :id, :recording_id, :boosts_count, :boosts_url, :details
|
|
1031
|
+
|
|
1032
|
+
# @return [Array<Symbol>]
|
|
1033
|
+
def self.required_fields
|
|
1034
|
+
%i[action created_at creator id recording_id].freeze
|
|
1035
|
+
end
|
|
1036
|
+
|
|
1037
|
+
def initialize(data = {})
|
|
1038
|
+
@action = data["action"]
|
|
1039
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1040
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1041
|
+
@id = parse_integer(data["id"])
|
|
1042
|
+
@recording_id = parse_integer(data["recording_id"])
|
|
1043
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
1044
|
+
@boosts_url = data["boosts_url"]
|
|
1045
|
+
@details = parse_type(data["details"], "EventDetails")
|
|
1046
|
+
end
|
|
1047
|
+
|
|
1048
|
+
def to_h
|
|
1049
|
+
{
|
|
1050
|
+
"action" => @action,
|
|
1051
|
+
"created_at" => @created_at,
|
|
1052
|
+
"creator" => @creator,
|
|
1053
|
+
"id" => @id,
|
|
1054
|
+
"recording_id" => @recording_id,
|
|
1055
|
+
"boosts_count" => @boosts_count,
|
|
1056
|
+
"boosts_url" => @boosts_url,
|
|
1057
|
+
"details" => @details,
|
|
1058
|
+
}.compact
|
|
1059
|
+
end
|
|
1060
|
+
|
|
1061
|
+
def to_json(*args)
|
|
1062
|
+
to_h.to_json(*args)
|
|
1063
|
+
end
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
# EventDetails
|
|
1067
|
+
class EventDetails
|
|
1068
|
+
include TypeHelpers
|
|
1069
|
+
attr_accessor :added_person_ids, :notified_recipient_ids, :removed_person_ids
|
|
1070
|
+
|
|
1071
|
+
def initialize(data = {})
|
|
1072
|
+
@added_person_ids = data["added_person_ids"]
|
|
1073
|
+
@notified_recipient_ids = data["notified_recipient_ids"]
|
|
1074
|
+
@removed_person_ids = data["removed_person_ids"]
|
|
1075
|
+
end
|
|
1076
|
+
|
|
1077
|
+
def to_h
|
|
1078
|
+
{
|
|
1079
|
+
"added_person_ids" => @added_person_ids,
|
|
1080
|
+
"notified_recipient_ids" => @notified_recipient_ids,
|
|
1081
|
+
"removed_person_ids" => @removed_person_ids,
|
|
1082
|
+
}.compact
|
|
1083
|
+
end
|
|
1084
|
+
|
|
1085
|
+
def to_json(*args)
|
|
1086
|
+
to_h.to_json(*args)
|
|
1087
|
+
end
|
|
1088
|
+
end
|
|
1089
|
+
|
|
1090
|
+
# Forward
|
|
1091
|
+
class Forward
|
|
1092
|
+
include TypeHelpers
|
|
1093
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :subject, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :content, :from, :replies_count, :replies_url, :subscription_url
|
|
1094
|
+
|
|
1095
|
+
# @return [Array<Symbol>]
|
|
1096
|
+
def self.required_fields
|
|
1097
|
+
%i[app_url bucket created_at creator id inherits_status parent status subject title type updated_at url visible_to_clients].freeze
|
|
1098
|
+
end
|
|
1099
|
+
|
|
1100
|
+
def initialize(data = {})
|
|
1101
|
+
@app_url = data["app_url"]
|
|
1102
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1103
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1104
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1105
|
+
@id = parse_integer(data["id"])
|
|
1106
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1107
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1108
|
+
@status = data["status"]
|
|
1109
|
+
@subject = data["subject"]
|
|
1110
|
+
@title = data["title"]
|
|
1111
|
+
@type = data["type"]
|
|
1112
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1113
|
+
@url = data["url"]
|
|
1114
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1115
|
+
@bookmark_url = data["bookmark_url"]
|
|
1116
|
+
@content = data["content"]
|
|
1117
|
+
@from = data["from"]
|
|
1118
|
+
@replies_count = parse_integer(data["replies_count"])
|
|
1119
|
+
@replies_url = data["replies_url"]
|
|
1120
|
+
@subscription_url = data["subscription_url"]
|
|
1121
|
+
end
|
|
1122
|
+
|
|
1123
|
+
def to_h
|
|
1124
|
+
{
|
|
1125
|
+
"app_url" => @app_url,
|
|
1126
|
+
"bucket" => @bucket,
|
|
1127
|
+
"created_at" => @created_at,
|
|
1128
|
+
"creator" => @creator,
|
|
1129
|
+
"id" => @id,
|
|
1130
|
+
"inherits_status" => @inherits_status,
|
|
1131
|
+
"parent" => @parent,
|
|
1132
|
+
"status" => @status,
|
|
1133
|
+
"subject" => @subject,
|
|
1134
|
+
"title" => @title,
|
|
1135
|
+
"type" => @type,
|
|
1136
|
+
"updated_at" => @updated_at,
|
|
1137
|
+
"url" => @url,
|
|
1138
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1139
|
+
"bookmark_url" => @bookmark_url,
|
|
1140
|
+
"content" => @content,
|
|
1141
|
+
"from" => @from,
|
|
1142
|
+
"replies_count" => @replies_count,
|
|
1143
|
+
"replies_url" => @replies_url,
|
|
1144
|
+
"subscription_url" => @subscription_url,
|
|
1145
|
+
}.compact
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
def to_json(*args)
|
|
1149
|
+
to_h.to_json(*args)
|
|
1150
|
+
end
|
|
1151
|
+
end
|
|
1152
|
+
|
|
1153
|
+
# ForwardReply
|
|
1154
|
+
class ForwardReply
|
|
1155
|
+
include TypeHelpers
|
|
1156
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url
|
|
1157
|
+
|
|
1158
|
+
# @return [Array<Symbol>]
|
|
1159
|
+
def self.required_fields
|
|
1160
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
1161
|
+
end
|
|
1162
|
+
|
|
1163
|
+
def initialize(data = {})
|
|
1164
|
+
@app_url = data["app_url"]
|
|
1165
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1166
|
+
@content = data["content"]
|
|
1167
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1168
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1169
|
+
@id = parse_integer(data["id"])
|
|
1170
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1171
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1172
|
+
@status = data["status"]
|
|
1173
|
+
@title = data["title"]
|
|
1174
|
+
@type = data["type"]
|
|
1175
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1176
|
+
@url = data["url"]
|
|
1177
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1178
|
+
@bookmark_url = data["bookmark_url"]
|
|
1179
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
1180
|
+
@boosts_url = data["boosts_url"]
|
|
1181
|
+
end
|
|
1182
|
+
|
|
1183
|
+
def to_h
|
|
1184
|
+
{
|
|
1185
|
+
"app_url" => @app_url,
|
|
1186
|
+
"bucket" => @bucket,
|
|
1187
|
+
"content" => @content,
|
|
1188
|
+
"created_at" => @created_at,
|
|
1189
|
+
"creator" => @creator,
|
|
1190
|
+
"id" => @id,
|
|
1191
|
+
"inherits_status" => @inherits_status,
|
|
1192
|
+
"parent" => @parent,
|
|
1193
|
+
"status" => @status,
|
|
1194
|
+
"title" => @title,
|
|
1195
|
+
"type" => @type,
|
|
1196
|
+
"updated_at" => @updated_at,
|
|
1197
|
+
"url" => @url,
|
|
1198
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1199
|
+
"bookmark_url" => @bookmark_url,
|
|
1200
|
+
"boosts_count" => @boosts_count,
|
|
1201
|
+
"boosts_url" => @boosts_url,
|
|
1202
|
+
}.compact
|
|
1203
|
+
end
|
|
1204
|
+
|
|
1205
|
+
def to_json(*args)
|
|
1206
|
+
to_h.to_json(*args)
|
|
1207
|
+
end
|
|
1208
|
+
end
|
|
1209
|
+
|
|
1210
|
+
# Inbox
|
|
1211
|
+
class Inbox
|
|
1212
|
+
include TypeHelpers
|
|
1213
|
+
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
|
|
1214
|
+
|
|
1215
|
+
# @return [Array<Symbol>]
|
|
1216
|
+
def self.required_fields
|
|
1217
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
1218
|
+
end
|
|
1219
|
+
|
|
1220
|
+
def initialize(data = {})
|
|
1221
|
+
@app_url = data["app_url"]
|
|
1222
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1223
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1224
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1225
|
+
@id = parse_integer(data["id"])
|
|
1226
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1227
|
+
@status = data["status"]
|
|
1228
|
+
@title = data["title"]
|
|
1229
|
+
@type = data["type"]
|
|
1230
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1231
|
+
@url = data["url"]
|
|
1232
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1233
|
+
@bookmark_url = data["bookmark_url"]
|
|
1234
|
+
@forwards_count = parse_integer(data["forwards_count"])
|
|
1235
|
+
@forwards_url = data["forwards_url"]
|
|
1236
|
+
@position = parse_integer(data["position"])
|
|
1237
|
+
end
|
|
1238
|
+
|
|
1239
|
+
def to_h
|
|
1240
|
+
{
|
|
1241
|
+
"app_url" => @app_url,
|
|
1242
|
+
"bucket" => @bucket,
|
|
1243
|
+
"created_at" => @created_at,
|
|
1244
|
+
"creator" => @creator,
|
|
1245
|
+
"id" => @id,
|
|
1246
|
+
"inherits_status" => @inherits_status,
|
|
1247
|
+
"status" => @status,
|
|
1248
|
+
"title" => @title,
|
|
1249
|
+
"type" => @type,
|
|
1250
|
+
"updated_at" => @updated_at,
|
|
1251
|
+
"url" => @url,
|
|
1252
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1253
|
+
"bookmark_url" => @bookmark_url,
|
|
1254
|
+
"forwards_count" => @forwards_count,
|
|
1255
|
+
"forwards_url" => @forwards_url,
|
|
1256
|
+
"position" => @position,
|
|
1257
|
+
}.compact
|
|
1258
|
+
end
|
|
1259
|
+
|
|
1260
|
+
def to_json(*args)
|
|
1261
|
+
to_h.to_json(*args)
|
|
1262
|
+
end
|
|
1263
|
+
end
|
|
1264
|
+
|
|
1265
|
+
# Message
|
|
1266
|
+
class Message
|
|
1267
|
+
include TypeHelpers
|
|
1268
|
+
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
|
|
1269
|
+
|
|
1270
|
+
# @return [Array<Symbol>]
|
|
1271
|
+
def self.required_fields
|
|
1272
|
+
%i[app_url bucket content created_at creator id inherits_status parent status subject title type updated_at url visible_to_clients].freeze
|
|
1273
|
+
end
|
|
1274
|
+
|
|
1275
|
+
def initialize(data = {})
|
|
1276
|
+
@app_url = data["app_url"]
|
|
1277
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1278
|
+
@content = data["content"]
|
|
1279
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1280
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1281
|
+
@id = parse_integer(data["id"])
|
|
1282
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1283
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1284
|
+
@status = data["status"]
|
|
1285
|
+
@subject = data["subject"]
|
|
1286
|
+
@title = data["title"]
|
|
1287
|
+
@type = data["type"]
|
|
1288
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1289
|
+
@url = data["url"]
|
|
1290
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1291
|
+
@bookmark_url = data["bookmark_url"]
|
|
1292
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
1293
|
+
@boosts_url = data["boosts_url"]
|
|
1294
|
+
@category = parse_type(data["category"], "MessageType")
|
|
1295
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
1296
|
+
@comments_url = data["comments_url"]
|
|
1297
|
+
@subscription_url = data["subscription_url"]
|
|
1298
|
+
end
|
|
1299
|
+
|
|
1300
|
+
def to_h
|
|
1301
|
+
{
|
|
1302
|
+
"app_url" => @app_url,
|
|
1303
|
+
"bucket" => @bucket,
|
|
1304
|
+
"content" => @content,
|
|
1305
|
+
"created_at" => @created_at,
|
|
1306
|
+
"creator" => @creator,
|
|
1307
|
+
"id" => @id,
|
|
1308
|
+
"inherits_status" => @inherits_status,
|
|
1309
|
+
"parent" => @parent,
|
|
1310
|
+
"status" => @status,
|
|
1311
|
+
"subject" => @subject,
|
|
1312
|
+
"title" => @title,
|
|
1313
|
+
"type" => @type,
|
|
1314
|
+
"updated_at" => @updated_at,
|
|
1315
|
+
"url" => @url,
|
|
1316
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1317
|
+
"bookmark_url" => @bookmark_url,
|
|
1318
|
+
"boosts_count" => @boosts_count,
|
|
1319
|
+
"boosts_url" => @boosts_url,
|
|
1320
|
+
"category" => @category,
|
|
1321
|
+
"comments_count" => @comments_count,
|
|
1322
|
+
"comments_url" => @comments_url,
|
|
1323
|
+
"subscription_url" => @subscription_url,
|
|
1324
|
+
}.compact
|
|
1325
|
+
end
|
|
1326
|
+
|
|
1327
|
+
def to_json(*args)
|
|
1328
|
+
to_h.to_json(*args)
|
|
1329
|
+
end
|
|
1330
|
+
end
|
|
1331
|
+
|
|
1332
|
+
# MessageBoard
|
|
1333
|
+
class MessageBoard
|
|
1334
|
+
include TypeHelpers
|
|
1335
|
+
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
|
|
1336
|
+
|
|
1337
|
+
# @return [Array<Symbol>]
|
|
1338
|
+
def self.required_fields
|
|
1339
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
1340
|
+
end
|
|
1341
|
+
|
|
1342
|
+
def initialize(data = {})
|
|
1343
|
+
@app_url = data["app_url"]
|
|
1344
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
1345
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1346
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1347
|
+
@id = parse_integer(data["id"])
|
|
1348
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1349
|
+
@status = data["status"]
|
|
1350
|
+
@title = data["title"]
|
|
1351
|
+
@type = data["type"]
|
|
1352
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1353
|
+
@url = data["url"]
|
|
1354
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1355
|
+
@app_messages_url = data["app_messages_url"]
|
|
1356
|
+
@bookmark_url = data["bookmark_url"]
|
|
1357
|
+
@messages_count = parse_integer(data["messages_count"])
|
|
1358
|
+
@messages_url = data["messages_url"]
|
|
1359
|
+
@position = parse_integer(data["position"])
|
|
1360
|
+
end
|
|
1361
|
+
|
|
1362
|
+
def to_h
|
|
1363
|
+
{
|
|
1364
|
+
"app_url" => @app_url,
|
|
1365
|
+
"bucket" => @bucket,
|
|
1366
|
+
"created_at" => @created_at,
|
|
1367
|
+
"creator" => @creator,
|
|
1368
|
+
"id" => @id,
|
|
1369
|
+
"inherits_status" => @inherits_status,
|
|
1370
|
+
"status" => @status,
|
|
1371
|
+
"title" => @title,
|
|
1372
|
+
"type" => @type,
|
|
1373
|
+
"updated_at" => @updated_at,
|
|
1374
|
+
"url" => @url,
|
|
1375
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1376
|
+
"app_messages_url" => @app_messages_url,
|
|
1377
|
+
"bookmark_url" => @bookmark_url,
|
|
1378
|
+
"messages_count" => @messages_count,
|
|
1379
|
+
"messages_url" => @messages_url,
|
|
1380
|
+
"position" => @position,
|
|
1381
|
+
}.compact
|
|
1382
|
+
end
|
|
1383
|
+
|
|
1384
|
+
def to_json(*args)
|
|
1385
|
+
to_h.to_json(*args)
|
|
1386
|
+
end
|
|
1387
|
+
end
|
|
1388
|
+
|
|
1389
|
+
# MessageType
|
|
1390
|
+
class MessageType
|
|
1391
|
+
include TypeHelpers
|
|
1392
|
+
attr_accessor :created_at, :icon, :id, :name, :updated_at
|
|
1393
|
+
|
|
1394
|
+
# @return [Array<Symbol>]
|
|
1395
|
+
def self.required_fields
|
|
1396
|
+
%i[created_at icon id name updated_at].freeze
|
|
1397
|
+
end
|
|
1398
|
+
|
|
1399
|
+
def initialize(data = {})
|
|
1400
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1401
|
+
@icon = data["icon"]
|
|
1402
|
+
@id = parse_integer(data["id"])
|
|
1403
|
+
@name = data["name"]
|
|
1404
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1405
|
+
end
|
|
1406
|
+
|
|
1407
|
+
def to_h
|
|
1408
|
+
{
|
|
1409
|
+
"created_at" => @created_at,
|
|
1410
|
+
"icon" => @icon,
|
|
1411
|
+
"id" => @id,
|
|
1412
|
+
"name" => @name,
|
|
1413
|
+
"updated_at" => @updated_at,
|
|
1414
|
+
}.compact
|
|
1415
|
+
end
|
|
1416
|
+
|
|
1417
|
+
def to_json(*args)
|
|
1418
|
+
to_h.to_json(*args)
|
|
1419
|
+
end
|
|
1420
|
+
end
|
|
1421
|
+
|
|
1422
|
+
# Person
|
|
1423
|
+
class Person
|
|
1424
|
+
include TypeHelpers
|
|
1425
|
+
attr_accessor :id, :name, :admin, :attachable_sgid, :avatar_url, :bio, :can_access_hill_charts, :can_access_timesheet, :can_manage_people, :can_manage_projects, :can_ping, :client, :company, :created_at, :email_address, :employee, :location, :owner, :personable_type, :time_zone, :title, :updated_at
|
|
1426
|
+
|
|
1427
|
+
# @return [Array<Symbol>]
|
|
1428
|
+
def self.required_fields
|
|
1429
|
+
%i[id name].freeze
|
|
1430
|
+
end
|
|
1431
|
+
|
|
1432
|
+
def initialize(data = {})
|
|
1433
|
+
@id = parse_integer(data["id"])
|
|
1434
|
+
@name = data["name"]
|
|
1435
|
+
@admin = parse_boolean(data["admin"])
|
|
1436
|
+
@attachable_sgid = data["attachable_sgid"]
|
|
1437
|
+
@avatar_url = data["avatar_url"]
|
|
1438
|
+
@bio = data["bio"]
|
|
1439
|
+
@can_access_hill_charts = parse_boolean(data["can_access_hill_charts"])
|
|
1440
|
+
@can_access_timesheet = parse_boolean(data["can_access_timesheet"])
|
|
1441
|
+
@can_manage_people = parse_boolean(data["can_manage_people"])
|
|
1442
|
+
@can_manage_projects = parse_boolean(data["can_manage_projects"])
|
|
1443
|
+
@can_ping = parse_boolean(data["can_ping"])
|
|
1444
|
+
@client = parse_boolean(data["client"])
|
|
1445
|
+
@company = parse_type(data["company"], "PersonCompany")
|
|
1446
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1447
|
+
@email_address = data["email_address"]
|
|
1448
|
+
@employee = parse_boolean(data["employee"])
|
|
1449
|
+
@location = data["location"]
|
|
1450
|
+
@owner = parse_boolean(data["owner"])
|
|
1451
|
+
@personable_type = data["personable_type"]
|
|
1452
|
+
@time_zone = data["time_zone"]
|
|
1453
|
+
@title = data["title"]
|
|
1454
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1455
|
+
end
|
|
1456
|
+
|
|
1457
|
+
def to_h
|
|
1458
|
+
{
|
|
1459
|
+
"id" => @id,
|
|
1460
|
+
"name" => @name,
|
|
1461
|
+
"admin" => @admin,
|
|
1462
|
+
"attachable_sgid" => @attachable_sgid,
|
|
1463
|
+
"avatar_url" => @avatar_url,
|
|
1464
|
+
"bio" => @bio,
|
|
1465
|
+
"can_access_hill_charts" => @can_access_hill_charts,
|
|
1466
|
+
"can_access_timesheet" => @can_access_timesheet,
|
|
1467
|
+
"can_manage_people" => @can_manage_people,
|
|
1468
|
+
"can_manage_projects" => @can_manage_projects,
|
|
1469
|
+
"can_ping" => @can_ping,
|
|
1470
|
+
"client" => @client,
|
|
1471
|
+
"company" => @company,
|
|
1472
|
+
"created_at" => @created_at,
|
|
1473
|
+
"email_address" => @email_address,
|
|
1474
|
+
"employee" => @employee,
|
|
1475
|
+
"location" => @location,
|
|
1476
|
+
"owner" => @owner,
|
|
1477
|
+
"personable_type" => @personable_type,
|
|
1478
|
+
"time_zone" => @time_zone,
|
|
1479
|
+
"title" => @title,
|
|
1480
|
+
"updated_at" => @updated_at,
|
|
1481
|
+
}.compact
|
|
1482
|
+
end
|
|
1483
|
+
|
|
1484
|
+
def to_json(*args)
|
|
1485
|
+
to_h.to_json(*args)
|
|
1486
|
+
end
|
|
1487
|
+
end
|
|
1488
|
+
|
|
1489
|
+
# PersonCompany
|
|
1490
|
+
class PersonCompany
|
|
1491
|
+
include TypeHelpers
|
|
1492
|
+
attr_accessor :id, :name
|
|
1493
|
+
|
|
1494
|
+
# @return [Array<Symbol>]
|
|
1495
|
+
def self.required_fields
|
|
1496
|
+
%i[id name].freeze
|
|
1497
|
+
end
|
|
1498
|
+
|
|
1499
|
+
def initialize(data = {})
|
|
1500
|
+
@id = parse_integer(data["id"])
|
|
1501
|
+
@name = data["name"]
|
|
1502
|
+
end
|
|
1503
|
+
|
|
1504
|
+
def to_h
|
|
1505
|
+
{
|
|
1506
|
+
"id" => @id,
|
|
1507
|
+
"name" => @name,
|
|
1508
|
+
}.compact
|
|
1509
|
+
end
|
|
1510
|
+
|
|
1511
|
+
def to_json(*args)
|
|
1512
|
+
to_h.to_json(*args)
|
|
1513
|
+
end
|
|
1514
|
+
end
|
|
1515
|
+
|
|
1516
|
+
# Project
|
|
1517
|
+
class Project
|
|
1518
|
+
include TypeHelpers
|
|
1519
|
+
attr_accessor :app_url, :created_at, :id, :name, :status, :updated_at, :url, :bookmark_url, :bookmarked, :client_company, :clients_enabled, :clientside, :description, :dock, :purpose
|
|
1520
|
+
|
|
1521
|
+
# @return [Array<Symbol>]
|
|
1522
|
+
def self.required_fields
|
|
1523
|
+
%i[app_url created_at id name status updated_at url].freeze
|
|
1524
|
+
end
|
|
1525
|
+
|
|
1526
|
+
def initialize(data = {})
|
|
1527
|
+
@app_url = data["app_url"]
|
|
1528
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1529
|
+
@id = parse_integer(data["id"])
|
|
1530
|
+
@name = data["name"]
|
|
1531
|
+
@status = data["status"]
|
|
1532
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1533
|
+
@url = data["url"]
|
|
1534
|
+
@bookmark_url = data["bookmark_url"]
|
|
1535
|
+
@bookmarked = parse_boolean(data["bookmarked"])
|
|
1536
|
+
@client_company = parse_type(data["client_company"], "ClientCompany")
|
|
1537
|
+
@clients_enabled = parse_boolean(data["clients_enabled"])
|
|
1538
|
+
@clientside = parse_type(data["clientside"], "ClientSide")
|
|
1539
|
+
@description = data["description"]
|
|
1540
|
+
@dock = parse_array(data["dock"], "DockItem")
|
|
1541
|
+
@purpose = data["purpose"]
|
|
1542
|
+
end
|
|
1543
|
+
|
|
1544
|
+
def to_h
|
|
1545
|
+
{
|
|
1546
|
+
"app_url" => @app_url,
|
|
1547
|
+
"created_at" => @created_at,
|
|
1548
|
+
"id" => @id,
|
|
1549
|
+
"name" => @name,
|
|
1550
|
+
"status" => @status,
|
|
1551
|
+
"updated_at" => @updated_at,
|
|
1552
|
+
"url" => @url,
|
|
1553
|
+
"bookmark_url" => @bookmark_url,
|
|
1554
|
+
"bookmarked" => @bookmarked,
|
|
1555
|
+
"client_company" => @client_company,
|
|
1556
|
+
"clients_enabled" => @clients_enabled,
|
|
1557
|
+
"clientside" => @clientside,
|
|
1558
|
+
"description" => @description,
|
|
1559
|
+
"dock" => @dock,
|
|
1560
|
+
"purpose" => @purpose,
|
|
1561
|
+
}.compact
|
|
1562
|
+
end
|
|
1563
|
+
|
|
1564
|
+
def to_json(*args)
|
|
1565
|
+
to_h.to_json(*args)
|
|
1566
|
+
end
|
|
1567
|
+
end
|
|
1568
|
+
|
|
1569
|
+
# ProjectAccessResult
|
|
1570
|
+
class ProjectAccessResult
|
|
1571
|
+
include TypeHelpers
|
|
1572
|
+
attr_accessor :granted, :revoked
|
|
1573
|
+
|
|
1574
|
+
def initialize(data = {})
|
|
1575
|
+
@granted = parse_array(data["granted"], "Person")
|
|
1576
|
+
@revoked = parse_array(data["revoked"], "Person")
|
|
1577
|
+
end
|
|
1578
|
+
|
|
1579
|
+
def to_h
|
|
1580
|
+
{
|
|
1581
|
+
"granted" => @granted,
|
|
1582
|
+
"revoked" => @revoked,
|
|
1583
|
+
}.compact
|
|
1584
|
+
end
|
|
1585
|
+
|
|
1586
|
+
def to_json(*args)
|
|
1587
|
+
to_h.to_json(*args)
|
|
1588
|
+
end
|
|
1589
|
+
end
|
|
1590
|
+
|
|
1591
|
+
# ProjectConstruction
|
|
1592
|
+
class ProjectConstruction
|
|
1593
|
+
include TypeHelpers
|
|
1594
|
+
attr_accessor :id, :status, :project, :url
|
|
1595
|
+
|
|
1596
|
+
# @return [Array<Symbol>]
|
|
1597
|
+
def self.required_fields
|
|
1598
|
+
%i[id status].freeze
|
|
1599
|
+
end
|
|
1600
|
+
|
|
1601
|
+
def initialize(data = {})
|
|
1602
|
+
@id = parse_integer(data["id"])
|
|
1603
|
+
@status = data["status"]
|
|
1604
|
+
@project = parse_type(data["project"], "Project")
|
|
1605
|
+
@url = data["url"]
|
|
1606
|
+
end
|
|
1607
|
+
|
|
1608
|
+
def to_h
|
|
1609
|
+
{
|
|
1610
|
+
"id" => @id,
|
|
1611
|
+
"status" => @status,
|
|
1612
|
+
"project" => @project,
|
|
1613
|
+
"url" => @url,
|
|
1614
|
+
}.compact
|
|
1615
|
+
end
|
|
1616
|
+
|
|
1617
|
+
def to_json(*args)
|
|
1618
|
+
to_h.to_json(*args)
|
|
1619
|
+
end
|
|
1620
|
+
end
|
|
1621
|
+
|
|
1622
|
+
# Question
|
|
1623
|
+
class Question
|
|
1624
|
+
include TypeHelpers
|
|
1625
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :answers_count, :answers_url, :bookmark_url, :paused, :schedule, :subscription_url
|
|
1626
|
+
|
|
1627
|
+
# @return [Array<Symbol>]
|
|
1628
|
+
def self.required_fields
|
|
1629
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
1630
|
+
end
|
|
1631
|
+
|
|
1632
|
+
def initialize(data = {})
|
|
1633
|
+
@app_url = data["app_url"]
|
|
1634
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1635
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1636
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1637
|
+
@id = parse_integer(data["id"])
|
|
1638
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1639
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1640
|
+
@status = data["status"]
|
|
1641
|
+
@title = data["title"]
|
|
1642
|
+
@type = data["type"]
|
|
1643
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1644
|
+
@url = data["url"]
|
|
1645
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1646
|
+
@answers_count = parse_integer(data["answers_count"])
|
|
1647
|
+
@answers_url = data["answers_url"]
|
|
1648
|
+
@bookmark_url = data["bookmark_url"]
|
|
1649
|
+
@paused = parse_boolean(data["paused"])
|
|
1650
|
+
@schedule = parse_type(data["schedule"], "QuestionSchedule")
|
|
1651
|
+
@subscription_url = data["subscription_url"]
|
|
1652
|
+
end
|
|
1653
|
+
|
|
1654
|
+
def to_h
|
|
1655
|
+
{
|
|
1656
|
+
"app_url" => @app_url,
|
|
1657
|
+
"bucket" => @bucket,
|
|
1658
|
+
"created_at" => @created_at,
|
|
1659
|
+
"creator" => @creator,
|
|
1660
|
+
"id" => @id,
|
|
1661
|
+
"inherits_status" => @inherits_status,
|
|
1662
|
+
"parent" => @parent,
|
|
1663
|
+
"status" => @status,
|
|
1664
|
+
"title" => @title,
|
|
1665
|
+
"type" => @type,
|
|
1666
|
+
"updated_at" => @updated_at,
|
|
1667
|
+
"url" => @url,
|
|
1668
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1669
|
+
"answers_count" => @answers_count,
|
|
1670
|
+
"answers_url" => @answers_url,
|
|
1671
|
+
"bookmark_url" => @bookmark_url,
|
|
1672
|
+
"paused" => @paused,
|
|
1673
|
+
"schedule" => @schedule,
|
|
1674
|
+
"subscription_url" => @subscription_url,
|
|
1675
|
+
}.compact
|
|
1676
|
+
end
|
|
1677
|
+
|
|
1678
|
+
def to_json(*args)
|
|
1679
|
+
to_h.to_json(*args)
|
|
1680
|
+
end
|
|
1681
|
+
end
|
|
1682
|
+
|
|
1683
|
+
# QuestionAnswer
|
|
1684
|
+
class QuestionAnswer
|
|
1685
|
+
include TypeHelpers
|
|
1686
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :group_on, :subscription_url
|
|
1687
|
+
|
|
1688
|
+
# @return [Array<Symbol>]
|
|
1689
|
+
def self.required_fields
|
|
1690
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
1691
|
+
end
|
|
1692
|
+
|
|
1693
|
+
def initialize(data = {})
|
|
1694
|
+
@app_url = data["app_url"]
|
|
1695
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1696
|
+
@content = data["content"]
|
|
1697
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1698
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1699
|
+
@id = parse_integer(data["id"])
|
|
1700
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1701
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1702
|
+
@status = data["status"]
|
|
1703
|
+
@title = data["title"]
|
|
1704
|
+
@type = data["type"]
|
|
1705
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1706
|
+
@url = data["url"]
|
|
1707
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1708
|
+
@bookmark_url = data["bookmark_url"]
|
|
1709
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
1710
|
+
@boosts_url = data["boosts_url"]
|
|
1711
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
1712
|
+
@comments_url = data["comments_url"]
|
|
1713
|
+
@group_on = data["group_on"]
|
|
1714
|
+
@subscription_url = data["subscription_url"]
|
|
1715
|
+
end
|
|
1716
|
+
|
|
1717
|
+
def to_h
|
|
1718
|
+
{
|
|
1719
|
+
"app_url" => @app_url,
|
|
1720
|
+
"bucket" => @bucket,
|
|
1721
|
+
"content" => @content,
|
|
1722
|
+
"created_at" => @created_at,
|
|
1723
|
+
"creator" => @creator,
|
|
1724
|
+
"id" => @id,
|
|
1725
|
+
"inherits_status" => @inherits_status,
|
|
1726
|
+
"parent" => @parent,
|
|
1727
|
+
"status" => @status,
|
|
1728
|
+
"title" => @title,
|
|
1729
|
+
"type" => @type,
|
|
1730
|
+
"updated_at" => @updated_at,
|
|
1731
|
+
"url" => @url,
|
|
1732
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1733
|
+
"bookmark_url" => @bookmark_url,
|
|
1734
|
+
"boosts_count" => @boosts_count,
|
|
1735
|
+
"boosts_url" => @boosts_url,
|
|
1736
|
+
"comments_count" => @comments_count,
|
|
1737
|
+
"comments_url" => @comments_url,
|
|
1738
|
+
"group_on" => @group_on,
|
|
1739
|
+
"subscription_url" => @subscription_url,
|
|
1740
|
+
}.compact
|
|
1741
|
+
end
|
|
1742
|
+
|
|
1743
|
+
def to_json(*args)
|
|
1744
|
+
to_h.to_json(*args)
|
|
1745
|
+
end
|
|
1746
|
+
end
|
|
1747
|
+
|
|
1748
|
+
# QuestionAnswerPayload
|
|
1749
|
+
class QuestionAnswerPayload
|
|
1750
|
+
include TypeHelpers
|
|
1751
|
+
attr_accessor :content, :group_on
|
|
1752
|
+
|
|
1753
|
+
# @return [Array<Symbol>]
|
|
1754
|
+
def self.required_fields
|
|
1755
|
+
%i[content].freeze
|
|
1756
|
+
end
|
|
1757
|
+
|
|
1758
|
+
def initialize(data = {})
|
|
1759
|
+
@content = data["content"]
|
|
1760
|
+
@group_on = data["group_on"]
|
|
1761
|
+
end
|
|
1762
|
+
|
|
1763
|
+
def to_h
|
|
1764
|
+
{
|
|
1765
|
+
"content" => @content,
|
|
1766
|
+
"group_on" => @group_on,
|
|
1767
|
+
}.compact
|
|
1768
|
+
end
|
|
1769
|
+
|
|
1770
|
+
def to_json(*args)
|
|
1771
|
+
to_h.to_json(*args)
|
|
1772
|
+
end
|
|
1773
|
+
end
|
|
1774
|
+
|
|
1775
|
+
# QuestionAnswerUpdatePayload
|
|
1776
|
+
class QuestionAnswerUpdatePayload
|
|
1777
|
+
include TypeHelpers
|
|
1778
|
+
attr_accessor :content
|
|
1779
|
+
|
|
1780
|
+
# @return [Array<Symbol>]
|
|
1781
|
+
def self.required_fields
|
|
1782
|
+
%i[content].freeze
|
|
1783
|
+
end
|
|
1784
|
+
|
|
1785
|
+
def initialize(data = {})
|
|
1786
|
+
@content = data["content"]
|
|
1787
|
+
end
|
|
1788
|
+
|
|
1789
|
+
def to_h
|
|
1790
|
+
{
|
|
1791
|
+
"content" => @content,
|
|
1792
|
+
}.compact
|
|
1793
|
+
end
|
|
1794
|
+
|
|
1795
|
+
def to_json(*args)
|
|
1796
|
+
to_h.to_json(*args)
|
|
1797
|
+
end
|
|
1798
|
+
end
|
|
1799
|
+
|
|
1800
|
+
# QuestionReminder
|
|
1801
|
+
class QuestionReminder
|
|
1802
|
+
include TypeHelpers
|
|
1803
|
+
attr_accessor :group_on, :question, :remind_at, :reminder_id
|
|
1804
|
+
|
|
1805
|
+
def initialize(data = {})
|
|
1806
|
+
@group_on = data["group_on"]
|
|
1807
|
+
@question = parse_type(data["question"], "Question")
|
|
1808
|
+
@remind_at = parse_datetime(data["remind_at"])
|
|
1809
|
+
@reminder_id = parse_integer(data["reminder_id"])
|
|
1810
|
+
end
|
|
1811
|
+
|
|
1812
|
+
def to_h
|
|
1813
|
+
{
|
|
1814
|
+
"group_on" => @group_on,
|
|
1815
|
+
"question" => @question,
|
|
1816
|
+
"remind_at" => @remind_at,
|
|
1817
|
+
"reminder_id" => @reminder_id,
|
|
1818
|
+
}.compact
|
|
1819
|
+
end
|
|
1820
|
+
|
|
1821
|
+
def to_json(*args)
|
|
1822
|
+
to_h.to_json(*args)
|
|
1823
|
+
end
|
|
1824
|
+
end
|
|
1825
|
+
|
|
1826
|
+
# QuestionSchedule
|
|
1827
|
+
class QuestionSchedule
|
|
1828
|
+
include TypeHelpers
|
|
1829
|
+
attr_accessor :days, :end_date, :frequency, :hour, :minute, :month_interval, :start_date, :week_instance, :week_interval
|
|
1830
|
+
|
|
1831
|
+
def initialize(data = {})
|
|
1832
|
+
@days = data["days"]
|
|
1833
|
+
@end_date = data["end_date"]
|
|
1834
|
+
@frequency = data["frequency"]
|
|
1835
|
+
@hour = parse_integer(data["hour"])
|
|
1836
|
+
@minute = parse_integer(data["minute"])
|
|
1837
|
+
@month_interval = parse_integer(data["month_interval"])
|
|
1838
|
+
@start_date = data["start_date"]
|
|
1839
|
+
@week_instance = parse_integer(data["week_instance"])
|
|
1840
|
+
@week_interval = parse_integer(data["week_interval"])
|
|
1841
|
+
end
|
|
1842
|
+
|
|
1843
|
+
def to_h
|
|
1844
|
+
{
|
|
1845
|
+
"days" => @days,
|
|
1846
|
+
"end_date" => @end_date,
|
|
1847
|
+
"frequency" => @frequency,
|
|
1848
|
+
"hour" => @hour,
|
|
1849
|
+
"minute" => @minute,
|
|
1850
|
+
"month_interval" => @month_interval,
|
|
1851
|
+
"start_date" => @start_date,
|
|
1852
|
+
"week_instance" => @week_instance,
|
|
1853
|
+
"week_interval" => @week_interval,
|
|
1854
|
+
}.compact
|
|
1855
|
+
end
|
|
1856
|
+
|
|
1857
|
+
def to_json(*args)
|
|
1858
|
+
to_h.to_json(*args)
|
|
1859
|
+
end
|
|
1860
|
+
end
|
|
1861
|
+
|
|
1862
|
+
# Questionnaire
|
|
1863
|
+
class Questionnaire
|
|
1864
|
+
include TypeHelpers
|
|
1865
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :name, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :questions_count, :questions_url
|
|
1866
|
+
|
|
1867
|
+
# @return [Array<Symbol>]
|
|
1868
|
+
def self.required_fields
|
|
1869
|
+
%i[app_url bucket created_at creator id inherits_status name status title type updated_at url visible_to_clients].freeze
|
|
1870
|
+
end
|
|
1871
|
+
|
|
1872
|
+
def initialize(data = {})
|
|
1873
|
+
@app_url = data["app_url"]
|
|
1874
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1875
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1876
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1877
|
+
@id = parse_integer(data["id"])
|
|
1878
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1879
|
+
@name = data["name"]
|
|
1880
|
+
@status = data["status"]
|
|
1881
|
+
@title = data["title"]
|
|
1882
|
+
@type = data["type"]
|
|
1883
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1884
|
+
@url = data["url"]
|
|
1885
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1886
|
+
@bookmark_url = data["bookmark_url"]
|
|
1887
|
+
@questions_count = parse_integer(data["questions_count"])
|
|
1888
|
+
@questions_url = data["questions_url"]
|
|
1889
|
+
end
|
|
1890
|
+
|
|
1891
|
+
def to_h
|
|
1892
|
+
{
|
|
1893
|
+
"app_url" => @app_url,
|
|
1894
|
+
"bucket" => @bucket,
|
|
1895
|
+
"created_at" => @created_at,
|
|
1896
|
+
"creator" => @creator,
|
|
1897
|
+
"id" => @id,
|
|
1898
|
+
"inherits_status" => @inherits_status,
|
|
1899
|
+
"name" => @name,
|
|
1900
|
+
"status" => @status,
|
|
1901
|
+
"title" => @title,
|
|
1902
|
+
"type" => @type,
|
|
1903
|
+
"updated_at" => @updated_at,
|
|
1904
|
+
"url" => @url,
|
|
1905
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1906
|
+
"bookmark_url" => @bookmark_url,
|
|
1907
|
+
"questions_count" => @questions_count,
|
|
1908
|
+
"questions_url" => @questions_url,
|
|
1909
|
+
}.compact
|
|
1910
|
+
end
|
|
1911
|
+
|
|
1912
|
+
def to_json(*args)
|
|
1913
|
+
to_h.to_json(*args)
|
|
1914
|
+
end
|
|
1915
|
+
end
|
|
1916
|
+
|
|
1917
|
+
# Recording
|
|
1918
|
+
class Recording
|
|
1919
|
+
include TypeHelpers
|
|
1920
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :comments_count, :comments_url, :content, :subscription_url
|
|
1921
|
+
|
|
1922
|
+
# @return [Array<Symbol>]
|
|
1923
|
+
def self.required_fields
|
|
1924
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
1925
|
+
end
|
|
1926
|
+
|
|
1927
|
+
def initialize(data = {})
|
|
1928
|
+
@app_url = data["app_url"]
|
|
1929
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
1930
|
+
@created_at = parse_datetime(data["created_at"])
|
|
1931
|
+
@creator = parse_type(data["creator"], "Person")
|
|
1932
|
+
@id = parse_integer(data["id"])
|
|
1933
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
1934
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
1935
|
+
@status = data["status"]
|
|
1936
|
+
@title = data["title"]
|
|
1937
|
+
@type = data["type"]
|
|
1938
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
1939
|
+
@url = data["url"]
|
|
1940
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
1941
|
+
@bookmark_url = data["bookmark_url"]
|
|
1942
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
1943
|
+
@comments_url = data["comments_url"]
|
|
1944
|
+
@content = data["content"]
|
|
1945
|
+
@subscription_url = data["subscription_url"]
|
|
1946
|
+
end
|
|
1947
|
+
|
|
1948
|
+
def to_h
|
|
1949
|
+
{
|
|
1950
|
+
"app_url" => @app_url,
|
|
1951
|
+
"bucket" => @bucket,
|
|
1952
|
+
"created_at" => @created_at,
|
|
1953
|
+
"creator" => @creator,
|
|
1954
|
+
"id" => @id,
|
|
1955
|
+
"inherits_status" => @inherits_status,
|
|
1956
|
+
"parent" => @parent,
|
|
1957
|
+
"status" => @status,
|
|
1958
|
+
"title" => @title,
|
|
1959
|
+
"type" => @type,
|
|
1960
|
+
"updated_at" => @updated_at,
|
|
1961
|
+
"url" => @url,
|
|
1962
|
+
"visible_to_clients" => @visible_to_clients,
|
|
1963
|
+
"bookmark_url" => @bookmark_url,
|
|
1964
|
+
"comments_count" => @comments_count,
|
|
1965
|
+
"comments_url" => @comments_url,
|
|
1966
|
+
"content" => @content,
|
|
1967
|
+
"subscription_url" => @subscription_url,
|
|
1968
|
+
}.compact
|
|
1969
|
+
end
|
|
1970
|
+
|
|
1971
|
+
def to_json(*args)
|
|
1972
|
+
to_h.to_json(*args)
|
|
1973
|
+
end
|
|
1974
|
+
end
|
|
1975
|
+
|
|
1976
|
+
# RecordingBucket
|
|
1977
|
+
class RecordingBucket
|
|
1978
|
+
include TypeHelpers
|
|
1979
|
+
attr_accessor :id, :name, :type
|
|
1980
|
+
|
|
1981
|
+
# @return [Array<Symbol>]
|
|
1982
|
+
def self.required_fields
|
|
1983
|
+
%i[id name type].freeze
|
|
1984
|
+
end
|
|
1985
|
+
|
|
1986
|
+
def initialize(data = {})
|
|
1987
|
+
@id = parse_integer(data["id"])
|
|
1988
|
+
@name = data["name"]
|
|
1989
|
+
@type = data["type"]
|
|
1990
|
+
end
|
|
1991
|
+
|
|
1992
|
+
def to_h
|
|
1993
|
+
{
|
|
1994
|
+
"id" => @id,
|
|
1995
|
+
"name" => @name,
|
|
1996
|
+
"type" => @type,
|
|
1997
|
+
}.compact
|
|
1998
|
+
end
|
|
1999
|
+
|
|
2000
|
+
def to_json(*args)
|
|
2001
|
+
to_h.to_json(*args)
|
|
2002
|
+
end
|
|
2003
|
+
end
|
|
2004
|
+
|
|
2005
|
+
# RecordingParent
|
|
2006
|
+
class RecordingParent
|
|
2007
|
+
include TypeHelpers
|
|
2008
|
+
attr_accessor :app_url, :id, :title, :type, :url
|
|
2009
|
+
|
|
2010
|
+
# @return [Array<Symbol>]
|
|
2011
|
+
def self.required_fields
|
|
2012
|
+
%i[app_url id title type url].freeze
|
|
2013
|
+
end
|
|
2014
|
+
|
|
2015
|
+
def initialize(data = {})
|
|
2016
|
+
@app_url = data["app_url"]
|
|
2017
|
+
@id = parse_integer(data["id"])
|
|
2018
|
+
@title = data["title"]
|
|
2019
|
+
@type = data["type"]
|
|
2020
|
+
@url = data["url"]
|
|
2021
|
+
end
|
|
2022
|
+
|
|
2023
|
+
def to_h
|
|
2024
|
+
{
|
|
2025
|
+
"app_url" => @app_url,
|
|
2026
|
+
"id" => @id,
|
|
2027
|
+
"title" => @title,
|
|
2028
|
+
"type" => @type,
|
|
2029
|
+
"url" => @url,
|
|
2030
|
+
}.compact
|
|
2031
|
+
end
|
|
2032
|
+
|
|
2033
|
+
def to_json(*args)
|
|
2034
|
+
to_h.to_json(*args)
|
|
2035
|
+
end
|
|
2036
|
+
end
|
|
2037
|
+
|
|
2038
|
+
# Schedule
|
|
2039
|
+
class Schedule
|
|
2040
|
+
include TypeHelpers
|
|
2041
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :entries_count, :entries_url, :include_due_assignments, :position
|
|
2042
|
+
|
|
2043
|
+
# @return [Array<Symbol>]
|
|
2044
|
+
def self.required_fields
|
|
2045
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
2046
|
+
end
|
|
2047
|
+
|
|
2048
|
+
def initialize(data = {})
|
|
2049
|
+
@app_url = data["app_url"]
|
|
2050
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2051
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2052
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2053
|
+
@id = parse_integer(data["id"])
|
|
2054
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2055
|
+
@status = data["status"]
|
|
2056
|
+
@title = data["title"]
|
|
2057
|
+
@type = data["type"]
|
|
2058
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2059
|
+
@url = data["url"]
|
|
2060
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2061
|
+
@bookmark_url = data["bookmark_url"]
|
|
2062
|
+
@entries_count = parse_integer(data["entries_count"])
|
|
2063
|
+
@entries_url = data["entries_url"]
|
|
2064
|
+
@include_due_assignments = parse_boolean(data["include_due_assignments"])
|
|
2065
|
+
@position = parse_integer(data["position"])
|
|
2066
|
+
end
|
|
2067
|
+
|
|
2068
|
+
def to_h
|
|
2069
|
+
{
|
|
2070
|
+
"app_url" => @app_url,
|
|
2071
|
+
"bucket" => @bucket,
|
|
2072
|
+
"created_at" => @created_at,
|
|
2073
|
+
"creator" => @creator,
|
|
2074
|
+
"id" => @id,
|
|
2075
|
+
"inherits_status" => @inherits_status,
|
|
2076
|
+
"status" => @status,
|
|
2077
|
+
"title" => @title,
|
|
2078
|
+
"type" => @type,
|
|
2079
|
+
"updated_at" => @updated_at,
|
|
2080
|
+
"url" => @url,
|
|
2081
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2082
|
+
"bookmark_url" => @bookmark_url,
|
|
2083
|
+
"entries_count" => @entries_count,
|
|
2084
|
+
"entries_url" => @entries_url,
|
|
2085
|
+
"include_due_assignments" => @include_due_assignments,
|
|
2086
|
+
"position" => @position,
|
|
2087
|
+
}.compact
|
|
2088
|
+
end
|
|
2089
|
+
|
|
2090
|
+
def to_json(*args)
|
|
2091
|
+
to_h.to_json(*args)
|
|
2092
|
+
end
|
|
2093
|
+
end
|
|
2094
|
+
|
|
2095
|
+
# ScheduleAttributes
|
|
2096
|
+
class ScheduleAttributes
|
|
2097
|
+
include TypeHelpers
|
|
2098
|
+
attr_accessor :end_date, :start_date
|
|
2099
|
+
|
|
2100
|
+
def initialize(data = {})
|
|
2101
|
+
@end_date = data["end_date"]
|
|
2102
|
+
@start_date = data["start_date"]
|
|
2103
|
+
end
|
|
2104
|
+
|
|
2105
|
+
def to_h
|
|
2106
|
+
{
|
|
2107
|
+
"end_date" => @end_date,
|
|
2108
|
+
"start_date" => @start_date,
|
|
2109
|
+
}.compact
|
|
2110
|
+
end
|
|
2111
|
+
|
|
2112
|
+
def to_json(*args)
|
|
2113
|
+
to_h.to_json(*args)
|
|
2114
|
+
end
|
|
2115
|
+
end
|
|
2116
|
+
|
|
2117
|
+
# ScheduleEntry
|
|
2118
|
+
class ScheduleEntry
|
|
2119
|
+
include TypeHelpers
|
|
2120
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :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
|
|
2121
|
+
|
|
2122
|
+
# @return [Array<Symbol>]
|
|
2123
|
+
def self.required_fields
|
|
2124
|
+
%i[app_url bucket created_at creator id inherits_status parent status summary title type updated_at url visible_to_clients].freeze
|
|
2125
|
+
end
|
|
2126
|
+
|
|
2127
|
+
def initialize(data = {})
|
|
2128
|
+
@app_url = data["app_url"]
|
|
2129
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2130
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2131
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2132
|
+
@id = parse_integer(data["id"])
|
|
2133
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2134
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
2135
|
+
@status = data["status"]
|
|
2136
|
+
@summary = data["summary"]
|
|
2137
|
+
@title = data["title"]
|
|
2138
|
+
@type = data["type"]
|
|
2139
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2140
|
+
@url = data["url"]
|
|
2141
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2142
|
+
@all_day = parse_boolean(data["all_day"])
|
|
2143
|
+
@bookmark_url = data["bookmark_url"]
|
|
2144
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
2145
|
+
@boosts_url = data["boosts_url"]
|
|
2146
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
2147
|
+
@comments_url = data["comments_url"]
|
|
2148
|
+
@description = data["description"]
|
|
2149
|
+
@ends_at = parse_datetime(data["ends_at"])
|
|
2150
|
+
@participants = parse_array(data["participants"], "Person")
|
|
2151
|
+
@starts_at = parse_datetime(data["starts_at"])
|
|
2152
|
+
@subscription_url = data["subscription_url"]
|
|
2153
|
+
end
|
|
2154
|
+
|
|
2155
|
+
def to_h
|
|
2156
|
+
{
|
|
2157
|
+
"app_url" => @app_url,
|
|
2158
|
+
"bucket" => @bucket,
|
|
2159
|
+
"created_at" => @created_at,
|
|
2160
|
+
"creator" => @creator,
|
|
2161
|
+
"id" => @id,
|
|
2162
|
+
"inherits_status" => @inherits_status,
|
|
2163
|
+
"parent" => @parent,
|
|
2164
|
+
"status" => @status,
|
|
2165
|
+
"summary" => @summary,
|
|
2166
|
+
"title" => @title,
|
|
2167
|
+
"type" => @type,
|
|
2168
|
+
"updated_at" => @updated_at,
|
|
2169
|
+
"url" => @url,
|
|
2170
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2171
|
+
"all_day" => @all_day,
|
|
2172
|
+
"bookmark_url" => @bookmark_url,
|
|
2173
|
+
"boosts_count" => @boosts_count,
|
|
2174
|
+
"boosts_url" => @boosts_url,
|
|
2175
|
+
"comments_count" => @comments_count,
|
|
2176
|
+
"comments_url" => @comments_url,
|
|
2177
|
+
"description" => @description,
|
|
2178
|
+
"ends_at" => @ends_at,
|
|
2179
|
+
"participants" => @participants,
|
|
2180
|
+
"starts_at" => @starts_at,
|
|
2181
|
+
"subscription_url" => @subscription_url,
|
|
2182
|
+
}.compact
|
|
2183
|
+
end
|
|
2184
|
+
|
|
2185
|
+
def to_json(*args)
|
|
2186
|
+
to_h.to_json(*args)
|
|
2187
|
+
end
|
|
2188
|
+
end
|
|
2189
|
+
|
|
2190
|
+
# SearchMetadata
|
|
2191
|
+
class SearchMetadata
|
|
2192
|
+
include TypeHelpers
|
|
2193
|
+
attr_accessor :projects
|
|
2194
|
+
|
|
2195
|
+
def initialize(data = {})
|
|
2196
|
+
@projects = parse_array(data["projects"], "SearchProject")
|
|
2197
|
+
end
|
|
2198
|
+
|
|
2199
|
+
def to_h
|
|
2200
|
+
{
|
|
2201
|
+
"projects" => @projects,
|
|
2202
|
+
}.compact
|
|
2203
|
+
end
|
|
2204
|
+
|
|
2205
|
+
def to_json(*args)
|
|
2206
|
+
to_h.to_json(*args)
|
|
2207
|
+
end
|
|
2208
|
+
end
|
|
2209
|
+
|
|
2210
|
+
# SearchProject
|
|
2211
|
+
class SearchProject
|
|
2212
|
+
include TypeHelpers
|
|
2213
|
+
attr_accessor :id, :name
|
|
2214
|
+
|
|
2215
|
+
def initialize(data = {})
|
|
2216
|
+
@id = parse_integer(data["id"])
|
|
2217
|
+
@name = data["name"]
|
|
2218
|
+
end
|
|
2219
|
+
|
|
2220
|
+
def to_h
|
|
2221
|
+
{
|
|
2222
|
+
"id" => @id,
|
|
2223
|
+
"name" => @name,
|
|
2224
|
+
}.compact
|
|
2225
|
+
end
|
|
2226
|
+
|
|
2227
|
+
def to_json(*args)
|
|
2228
|
+
to_h.to_json(*args)
|
|
2229
|
+
end
|
|
2230
|
+
end
|
|
2231
|
+
|
|
2232
|
+
# SearchResult
|
|
2233
|
+
class SearchResult
|
|
2234
|
+
include TypeHelpers
|
|
2235
|
+
attr_accessor :app_url, :id, :title, :type, :url, :bookmark_url, :bucket, :content, :created_at, :creator, :description, :inherits_status, :parent, :status, :subject, :updated_at, :visible_to_clients
|
|
2236
|
+
|
|
2237
|
+
# @return [Array<Symbol>]
|
|
2238
|
+
def self.required_fields
|
|
2239
|
+
%i[app_url id title type url].freeze
|
|
2240
|
+
end
|
|
2241
|
+
|
|
2242
|
+
def initialize(data = {})
|
|
2243
|
+
@app_url = data["app_url"]
|
|
2244
|
+
@id = parse_integer(data["id"])
|
|
2245
|
+
@title = data["title"]
|
|
2246
|
+
@type = data["type"]
|
|
2247
|
+
@url = data["url"]
|
|
2248
|
+
@bookmark_url = data["bookmark_url"]
|
|
2249
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
2250
|
+
@content = data["content"]
|
|
2251
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2252
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2253
|
+
@description = data["description"]
|
|
2254
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2255
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
2256
|
+
@status = data["status"]
|
|
2257
|
+
@subject = data["subject"]
|
|
2258
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2259
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2260
|
+
end
|
|
2261
|
+
|
|
2262
|
+
def to_h
|
|
2263
|
+
{
|
|
2264
|
+
"app_url" => @app_url,
|
|
2265
|
+
"id" => @id,
|
|
2266
|
+
"title" => @title,
|
|
2267
|
+
"type" => @type,
|
|
2268
|
+
"url" => @url,
|
|
2269
|
+
"bookmark_url" => @bookmark_url,
|
|
2270
|
+
"bucket" => @bucket,
|
|
2271
|
+
"content" => @content,
|
|
2272
|
+
"created_at" => @created_at,
|
|
2273
|
+
"creator" => @creator,
|
|
2274
|
+
"description" => @description,
|
|
2275
|
+
"inherits_status" => @inherits_status,
|
|
2276
|
+
"parent" => @parent,
|
|
2277
|
+
"status" => @status,
|
|
2278
|
+
"subject" => @subject,
|
|
2279
|
+
"updated_at" => @updated_at,
|
|
2280
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2281
|
+
}.compact
|
|
2282
|
+
end
|
|
2283
|
+
|
|
2284
|
+
def to_json(*args)
|
|
2285
|
+
to_h.to_json(*args)
|
|
2286
|
+
end
|
|
2287
|
+
end
|
|
2288
|
+
|
|
2289
|
+
# Subscription
|
|
2290
|
+
class Subscription
|
|
2291
|
+
include TypeHelpers
|
|
2292
|
+
attr_accessor :count, :subscribed, :url, :subscribers
|
|
2293
|
+
|
|
2294
|
+
# @return [Array<Symbol>]
|
|
2295
|
+
def self.required_fields
|
|
2296
|
+
%i[count subscribed url].freeze
|
|
2297
|
+
end
|
|
2298
|
+
|
|
2299
|
+
def initialize(data = {})
|
|
2300
|
+
@count = parse_integer(data["count"])
|
|
2301
|
+
@subscribed = parse_boolean(data["subscribed"])
|
|
2302
|
+
@url = data["url"]
|
|
2303
|
+
@subscribers = parse_array(data["subscribers"], "Person")
|
|
2304
|
+
end
|
|
2305
|
+
|
|
2306
|
+
def to_h
|
|
2307
|
+
{
|
|
2308
|
+
"count" => @count,
|
|
2309
|
+
"subscribed" => @subscribed,
|
|
2310
|
+
"url" => @url,
|
|
2311
|
+
"subscribers" => @subscribers,
|
|
2312
|
+
}.compact
|
|
2313
|
+
end
|
|
2314
|
+
|
|
2315
|
+
def to_json(*args)
|
|
2316
|
+
to_h.to_json(*args)
|
|
2317
|
+
end
|
|
2318
|
+
end
|
|
2319
|
+
|
|
2320
|
+
# Template
|
|
2321
|
+
class Template
|
|
2322
|
+
include TypeHelpers
|
|
2323
|
+
attr_accessor :created_at, :id, :name, :updated_at, :app_url, :description, :dock, :status, :url
|
|
2324
|
+
|
|
2325
|
+
# @return [Array<Symbol>]
|
|
2326
|
+
def self.required_fields
|
|
2327
|
+
%i[created_at id name updated_at].freeze
|
|
2328
|
+
end
|
|
2329
|
+
|
|
2330
|
+
def initialize(data = {})
|
|
2331
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2332
|
+
@id = parse_integer(data["id"])
|
|
2333
|
+
@name = data["name"]
|
|
2334
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2335
|
+
@app_url = data["app_url"]
|
|
2336
|
+
@description = data["description"]
|
|
2337
|
+
@dock = parse_array(data["dock"], "DockItem")
|
|
2338
|
+
@status = data["status"]
|
|
2339
|
+
@url = data["url"]
|
|
2340
|
+
end
|
|
2341
|
+
|
|
2342
|
+
def to_h
|
|
2343
|
+
{
|
|
2344
|
+
"created_at" => @created_at,
|
|
2345
|
+
"id" => @id,
|
|
2346
|
+
"name" => @name,
|
|
2347
|
+
"updated_at" => @updated_at,
|
|
2348
|
+
"app_url" => @app_url,
|
|
2349
|
+
"description" => @description,
|
|
2350
|
+
"dock" => @dock,
|
|
2351
|
+
"status" => @status,
|
|
2352
|
+
"url" => @url,
|
|
2353
|
+
}.compact
|
|
2354
|
+
end
|
|
2355
|
+
|
|
2356
|
+
def to_json(*args)
|
|
2357
|
+
to_h.to_json(*args)
|
|
2358
|
+
end
|
|
2359
|
+
end
|
|
2360
|
+
|
|
2361
|
+
# TimelineEvent
|
|
2362
|
+
class TimelineEvent
|
|
2363
|
+
include TypeHelpers
|
|
2364
|
+
attr_accessor :action, :app_url, :bucket, :created_at, :creator, :id, :kind, :parent_recording_id, :summary_excerpt, :target, :title, :url
|
|
2365
|
+
|
|
2366
|
+
def initialize(data = {})
|
|
2367
|
+
@action = data["action"]
|
|
2368
|
+
@app_url = data["app_url"]
|
|
2369
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2370
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2371
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2372
|
+
@id = parse_integer(data["id"])
|
|
2373
|
+
@kind = data["kind"]
|
|
2374
|
+
@parent_recording_id = parse_integer(data["parent_recording_id"])
|
|
2375
|
+
@summary_excerpt = data["summary_excerpt"]
|
|
2376
|
+
@target = data["target"]
|
|
2377
|
+
@title = data["title"]
|
|
2378
|
+
@url = data["url"]
|
|
2379
|
+
end
|
|
2380
|
+
|
|
2381
|
+
def to_h
|
|
2382
|
+
{
|
|
2383
|
+
"action" => @action,
|
|
2384
|
+
"app_url" => @app_url,
|
|
2385
|
+
"bucket" => @bucket,
|
|
2386
|
+
"created_at" => @created_at,
|
|
2387
|
+
"creator" => @creator,
|
|
2388
|
+
"id" => @id,
|
|
2389
|
+
"kind" => @kind,
|
|
2390
|
+
"parent_recording_id" => @parent_recording_id,
|
|
2391
|
+
"summary_excerpt" => @summary_excerpt,
|
|
2392
|
+
"target" => @target,
|
|
2393
|
+
"title" => @title,
|
|
2394
|
+
"url" => @url,
|
|
2395
|
+
}.compact
|
|
2396
|
+
end
|
|
2397
|
+
|
|
2398
|
+
def to_json(*args)
|
|
2399
|
+
to_h.to_json(*args)
|
|
2400
|
+
end
|
|
2401
|
+
end
|
|
2402
|
+
|
|
2403
|
+
# TimesheetEntry
|
|
2404
|
+
class TimesheetEntry
|
|
2405
|
+
include TypeHelpers
|
|
2406
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :date, :description, :hours, :person
|
|
2407
|
+
|
|
2408
|
+
# @return [Array<Symbol>]
|
|
2409
|
+
def self.required_fields
|
|
2410
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
2411
|
+
end
|
|
2412
|
+
|
|
2413
|
+
def initialize(data = {})
|
|
2414
|
+
@app_url = data["app_url"]
|
|
2415
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2416
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2417
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2418
|
+
@id = parse_integer(data["id"])
|
|
2419
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2420
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
2421
|
+
@status = data["status"]
|
|
2422
|
+
@title = data["title"]
|
|
2423
|
+
@type = data["type"]
|
|
2424
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2425
|
+
@url = data["url"]
|
|
2426
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2427
|
+
@bookmark_url = data["bookmark_url"]
|
|
2428
|
+
@date = data["date"]
|
|
2429
|
+
@description = data["description"]
|
|
2430
|
+
@hours = data["hours"]
|
|
2431
|
+
@person = parse_type(data["person"], "Person")
|
|
2432
|
+
end
|
|
2433
|
+
|
|
2434
|
+
def to_h
|
|
2435
|
+
{
|
|
2436
|
+
"app_url" => @app_url,
|
|
2437
|
+
"bucket" => @bucket,
|
|
2438
|
+
"created_at" => @created_at,
|
|
2439
|
+
"creator" => @creator,
|
|
2440
|
+
"id" => @id,
|
|
2441
|
+
"inherits_status" => @inherits_status,
|
|
2442
|
+
"parent" => @parent,
|
|
2443
|
+
"status" => @status,
|
|
2444
|
+
"title" => @title,
|
|
2445
|
+
"type" => @type,
|
|
2446
|
+
"updated_at" => @updated_at,
|
|
2447
|
+
"url" => @url,
|
|
2448
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2449
|
+
"bookmark_url" => @bookmark_url,
|
|
2450
|
+
"date" => @date,
|
|
2451
|
+
"description" => @description,
|
|
2452
|
+
"hours" => @hours,
|
|
2453
|
+
"person" => @person,
|
|
2454
|
+
}.compact
|
|
2455
|
+
end
|
|
2456
|
+
|
|
2457
|
+
def to_json(*args)
|
|
2458
|
+
to_h.to_json(*args)
|
|
2459
|
+
end
|
|
2460
|
+
end
|
|
2461
|
+
|
|
2462
|
+
# Todo
|
|
2463
|
+
class Todo
|
|
2464
|
+
include TypeHelpers
|
|
2465
|
+
attr_accessor :app_url, :bucket, :content, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :assignees, :bookmark_url, :boosts_count, :boosts_url, :comments_count, :comments_url, :completed, :completion_subscribers, :completion_url, :description, :due_on, :position, :starts_on, :subscription_url
|
|
2466
|
+
|
|
2467
|
+
# @return [Array<Symbol>]
|
|
2468
|
+
def self.required_fields
|
|
2469
|
+
%i[app_url bucket content created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
2470
|
+
end
|
|
2471
|
+
|
|
2472
|
+
def initialize(data = {})
|
|
2473
|
+
@app_url = data["app_url"]
|
|
2474
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2475
|
+
@content = data["content"]
|
|
2476
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2477
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2478
|
+
@id = parse_integer(data["id"])
|
|
2479
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2480
|
+
@parent = parse_type(data["parent"], "TodoParent")
|
|
2481
|
+
@status = data["status"]
|
|
2482
|
+
@title = data["title"]
|
|
2483
|
+
@type = data["type"]
|
|
2484
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2485
|
+
@url = data["url"]
|
|
2486
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2487
|
+
@assignees = parse_array(data["assignees"], "Person")
|
|
2488
|
+
@bookmark_url = data["bookmark_url"]
|
|
2489
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
2490
|
+
@boosts_url = data["boosts_url"]
|
|
2491
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
2492
|
+
@comments_url = data["comments_url"]
|
|
2493
|
+
@completed = parse_boolean(data["completed"])
|
|
2494
|
+
@completion_subscribers = parse_array(data["completion_subscribers"], "Person")
|
|
2495
|
+
@completion_url = data["completion_url"]
|
|
2496
|
+
@description = data["description"]
|
|
2497
|
+
@due_on = data["due_on"]
|
|
2498
|
+
@position = parse_integer(data["position"])
|
|
2499
|
+
@starts_on = data["starts_on"]
|
|
2500
|
+
@subscription_url = data["subscription_url"]
|
|
2501
|
+
end
|
|
2502
|
+
|
|
2503
|
+
def to_h
|
|
2504
|
+
{
|
|
2505
|
+
"app_url" => @app_url,
|
|
2506
|
+
"bucket" => @bucket,
|
|
2507
|
+
"content" => @content,
|
|
2508
|
+
"created_at" => @created_at,
|
|
2509
|
+
"creator" => @creator,
|
|
2510
|
+
"id" => @id,
|
|
2511
|
+
"inherits_status" => @inherits_status,
|
|
2512
|
+
"parent" => @parent,
|
|
2513
|
+
"status" => @status,
|
|
2514
|
+
"title" => @title,
|
|
2515
|
+
"type" => @type,
|
|
2516
|
+
"updated_at" => @updated_at,
|
|
2517
|
+
"url" => @url,
|
|
2518
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2519
|
+
"assignees" => @assignees,
|
|
2520
|
+
"bookmark_url" => @bookmark_url,
|
|
2521
|
+
"boosts_count" => @boosts_count,
|
|
2522
|
+
"boosts_url" => @boosts_url,
|
|
2523
|
+
"comments_count" => @comments_count,
|
|
2524
|
+
"comments_url" => @comments_url,
|
|
2525
|
+
"completed" => @completed,
|
|
2526
|
+
"completion_subscribers" => @completion_subscribers,
|
|
2527
|
+
"completion_url" => @completion_url,
|
|
2528
|
+
"description" => @description,
|
|
2529
|
+
"due_on" => @due_on,
|
|
2530
|
+
"position" => @position,
|
|
2531
|
+
"starts_on" => @starts_on,
|
|
2532
|
+
"subscription_url" => @subscription_url,
|
|
2533
|
+
}.compact
|
|
2534
|
+
end
|
|
2535
|
+
|
|
2536
|
+
def to_json(*args)
|
|
2537
|
+
to_h.to_json(*args)
|
|
2538
|
+
end
|
|
2539
|
+
end
|
|
2540
|
+
|
|
2541
|
+
# TodoBucket
|
|
2542
|
+
class TodoBucket
|
|
2543
|
+
include TypeHelpers
|
|
2544
|
+
attr_accessor :id, :name, :type
|
|
2545
|
+
|
|
2546
|
+
# @return [Array<Symbol>]
|
|
2547
|
+
def self.required_fields
|
|
2548
|
+
%i[id name type].freeze
|
|
2549
|
+
end
|
|
2550
|
+
|
|
2551
|
+
def initialize(data = {})
|
|
2552
|
+
@id = parse_integer(data["id"])
|
|
2553
|
+
@name = data["name"]
|
|
2554
|
+
@type = data["type"]
|
|
2555
|
+
end
|
|
2556
|
+
|
|
2557
|
+
def to_h
|
|
2558
|
+
{
|
|
2559
|
+
"id" => @id,
|
|
2560
|
+
"name" => @name,
|
|
2561
|
+
"type" => @type,
|
|
2562
|
+
}.compact
|
|
2563
|
+
end
|
|
2564
|
+
|
|
2565
|
+
def to_json(*args)
|
|
2566
|
+
to_h.to_json(*args)
|
|
2567
|
+
end
|
|
2568
|
+
end
|
|
2569
|
+
|
|
2570
|
+
# TodoParent
|
|
2571
|
+
class TodoParent
|
|
2572
|
+
include TypeHelpers
|
|
2573
|
+
attr_accessor :app_url, :id, :title, :type, :url
|
|
2574
|
+
|
|
2575
|
+
# @return [Array<Symbol>]
|
|
2576
|
+
def self.required_fields
|
|
2577
|
+
%i[app_url id title type url].freeze
|
|
2578
|
+
end
|
|
2579
|
+
|
|
2580
|
+
def initialize(data = {})
|
|
2581
|
+
@app_url = data["app_url"]
|
|
2582
|
+
@id = parse_integer(data["id"])
|
|
2583
|
+
@title = data["title"]
|
|
2584
|
+
@type = data["type"]
|
|
2585
|
+
@url = data["url"]
|
|
2586
|
+
end
|
|
2587
|
+
|
|
2588
|
+
def to_h
|
|
2589
|
+
{
|
|
2590
|
+
"app_url" => @app_url,
|
|
2591
|
+
"id" => @id,
|
|
2592
|
+
"title" => @title,
|
|
2593
|
+
"type" => @type,
|
|
2594
|
+
"url" => @url,
|
|
2595
|
+
}.compact
|
|
2596
|
+
end
|
|
2597
|
+
|
|
2598
|
+
def to_json(*args)
|
|
2599
|
+
to_h.to_json(*args)
|
|
2600
|
+
end
|
|
2601
|
+
end
|
|
2602
|
+
|
|
2603
|
+
# Todolist
|
|
2604
|
+
class Todolist
|
|
2605
|
+
include TypeHelpers
|
|
2606
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :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
|
|
2607
|
+
|
|
2608
|
+
# @return [Array<Symbol>]
|
|
2609
|
+
def self.required_fields
|
|
2610
|
+
%i[app_url bucket created_at creator id inherits_status name parent status title type updated_at url visible_to_clients].freeze
|
|
2611
|
+
end
|
|
2612
|
+
|
|
2613
|
+
def initialize(data = {})
|
|
2614
|
+
@app_url = data["app_url"]
|
|
2615
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2616
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2617
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2618
|
+
@id = parse_integer(data["id"])
|
|
2619
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2620
|
+
@name = data["name"]
|
|
2621
|
+
@parent = parse_type(data["parent"], "TodoParent")
|
|
2622
|
+
@status = data["status"]
|
|
2623
|
+
@title = data["title"]
|
|
2624
|
+
@type = data["type"]
|
|
2625
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2626
|
+
@url = data["url"]
|
|
2627
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2628
|
+
@app_todos_url = data["app_todos_url"]
|
|
2629
|
+
@bookmark_url = data["bookmark_url"]
|
|
2630
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
2631
|
+
@boosts_url = data["boosts_url"]
|
|
2632
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
2633
|
+
@comments_url = data["comments_url"]
|
|
2634
|
+
@completed = parse_boolean(data["completed"])
|
|
2635
|
+
@completed_ratio = data["completed_ratio"]
|
|
2636
|
+
@description = data["description"]
|
|
2637
|
+
@groups_url = data["groups_url"]
|
|
2638
|
+
@position = parse_integer(data["position"])
|
|
2639
|
+
@subscription_url = data["subscription_url"]
|
|
2640
|
+
@todos_url = data["todos_url"]
|
|
2641
|
+
end
|
|
2642
|
+
|
|
2643
|
+
def to_h
|
|
2644
|
+
{
|
|
2645
|
+
"app_url" => @app_url,
|
|
2646
|
+
"bucket" => @bucket,
|
|
2647
|
+
"created_at" => @created_at,
|
|
2648
|
+
"creator" => @creator,
|
|
2649
|
+
"id" => @id,
|
|
2650
|
+
"inherits_status" => @inherits_status,
|
|
2651
|
+
"name" => @name,
|
|
2652
|
+
"parent" => @parent,
|
|
2653
|
+
"status" => @status,
|
|
2654
|
+
"title" => @title,
|
|
2655
|
+
"type" => @type,
|
|
2656
|
+
"updated_at" => @updated_at,
|
|
2657
|
+
"url" => @url,
|
|
2658
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2659
|
+
"app_todos_url" => @app_todos_url,
|
|
2660
|
+
"bookmark_url" => @bookmark_url,
|
|
2661
|
+
"boosts_count" => @boosts_count,
|
|
2662
|
+
"boosts_url" => @boosts_url,
|
|
2663
|
+
"comments_count" => @comments_count,
|
|
2664
|
+
"comments_url" => @comments_url,
|
|
2665
|
+
"completed" => @completed,
|
|
2666
|
+
"completed_ratio" => @completed_ratio,
|
|
2667
|
+
"description" => @description,
|
|
2668
|
+
"groups_url" => @groups_url,
|
|
2669
|
+
"position" => @position,
|
|
2670
|
+
"subscription_url" => @subscription_url,
|
|
2671
|
+
"todos_url" => @todos_url,
|
|
2672
|
+
}.compact
|
|
2673
|
+
end
|
|
2674
|
+
|
|
2675
|
+
def to_json(*args)
|
|
2676
|
+
to_h.to_json(*args)
|
|
2677
|
+
end
|
|
2678
|
+
end
|
|
2679
|
+
|
|
2680
|
+
# TodolistGroup
|
|
2681
|
+
class TodolistGroup
|
|
2682
|
+
include TypeHelpers
|
|
2683
|
+
attr_accessor :app_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
|
|
2684
|
+
|
|
2685
|
+
# @return [Array<Symbol>]
|
|
2686
|
+
def self.required_fields
|
|
2687
|
+
%i[app_url bucket created_at creator id inherits_status name parent status title type updated_at url visible_to_clients].freeze
|
|
2688
|
+
end
|
|
2689
|
+
|
|
2690
|
+
def initialize(data = {})
|
|
2691
|
+
@app_url = data["app_url"]
|
|
2692
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2693
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2694
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2695
|
+
@id = parse_integer(data["id"])
|
|
2696
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2697
|
+
@name = data["name"]
|
|
2698
|
+
@parent = parse_type(data["parent"], "TodoParent")
|
|
2699
|
+
@status = data["status"]
|
|
2700
|
+
@title = data["title"]
|
|
2701
|
+
@type = data["type"]
|
|
2702
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2703
|
+
@url = data["url"]
|
|
2704
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2705
|
+
@app_todos_url = data["app_todos_url"]
|
|
2706
|
+
@bookmark_url = data["bookmark_url"]
|
|
2707
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
2708
|
+
@comments_url = data["comments_url"]
|
|
2709
|
+
@completed = parse_boolean(data["completed"])
|
|
2710
|
+
@completed_ratio = data["completed_ratio"]
|
|
2711
|
+
@position = parse_integer(data["position"])
|
|
2712
|
+
@subscription_url = data["subscription_url"]
|
|
2713
|
+
@todos_url = data["todos_url"]
|
|
2714
|
+
end
|
|
2715
|
+
|
|
2716
|
+
def to_h
|
|
2717
|
+
{
|
|
2718
|
+
"app_url" => @app_url,
|
|
2719
|
+
"bucket" => @bucket,
|
|
2720
|
+
"created_at" => @created_at,
|
|
2721
|
+
"creator" => @creator,
|
|
2722
|
+
"id" => @id,
|
|
2723
|
+
"inherits_status" => @inherits_status,
|
|
2724
|
+
"name" => @name,
|
|
2725
|
+
"parent" => @parent,
|
|
2726
|
+
"status" => @status,
|
|
2727
|
+
"title" => @title,
|
|
2728
|
+
"type" => @type,
|
|
2729
|
+
"updated_at" => @updated_at,
|
|
2730
|
+
"url" => @url,
|
|
2731
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2732
|
+
"app_todos_url" => @app_todos_url,
|
|
2733
|
+
"bookmark_url" => @bookmark_url,
|
|
2734
|
+
"comments_count" => @comments_count,
|
|
2735
|
+
"comments_url" => @comments_url,
|
|
2736
|
+
"completed" => @completed,
|
|
2737
|
+
"completed_ratio" => @completed_ratio,
|
|
2738
|
+
"position" => @position,
|
|
2739
|
+
"subscription_url" => @subscription_url,
|
|
2740
|
+
"todos_url" => @todos_url,
|
|
2741
|
+
}.compact
|
|
2742
|
+
end
|
|
2743
|
+
|
|
2744
|
+
def to_json(*args)
|
|
2745
|
+
to_h.to_json(*args)
|
|
2746
|
+
end
|
|
2747
|
+
end
|
|
2748
|
+
|
|
2749
|
+
# Todoset
|
|
2750
|
+
class Todoset
|
|
2751
|
+
include TypeHelpers
|
|
2752
|
+
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_count, :completed_ratio, :on_schedule_count, :over_schedule_count, :position, :todolists_count, :todolists_url
|
|
2753
|
+
|
|
2754
|
+
# @return [Array<Symbol>]
|
|
2755
|
+
def self.required_fields
|
|
2756
|
+
%i[app_url bucket created_at creator id inherits_status name status title type updated_at url visible_to_clients].freeze
|
|
2757
|
+
end
|
|
2758
|
+
|
|
2759
|
+
def initialize(data = {})
|
|
2760
|
+
@app_url = data["app_url"]
|
|
2761
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2762
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2763
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2764
|
+
@id = parse_integer(data["id"])
|
|
2765
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2766
|
+
@name = data["name"]
|
|
2767
|
+
@status = data["status"]
|
|
2768
|
+
@title = data["title"]
|
|
2769
|
+
@type = data["type"]
|
|
2770
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2771
|
+
@url = data["url"]
|
|
2772
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2773
|
+
@app_todolists_url = data["app_todolists_url"]
|
|
2774
|
+
@bookmark_url = data["bookmark_url"]
|
|
2775
|
+
@completed = parse_boolean(data["completed"])
|
|
2776
|
+
@completed_count = parse_integer(data["completed_count"])
|
|
2777
|
+
@completed_ratio = data["completed_ratio"]
|
|
2778
|
+
@on_schedule_count = parse_integer(data["on_schedule_count"])
|
|
2779
|
+
@over_schedule_count = parse_integer(data["over_schedule_count"])
|
|
2780
|
+
@position = parse_integer(data["position"])
|
|
2781
|
+
@todolists_count = parse_integer(data["todolists_count"])
|
|
2782
|
+
@todolists_url = data["todolists_url"]
|
|
2783
|
+
end
|
|
2784
|
+
|
|
2785
|
+
def to_h
|
|
2786
|
+
{
|
|
2787
|
+
"app_url" => @app_url,
|
|
2788
|
+
"bucket" => @bucket,
|
|
2789
|
+
"created_at" => @created_at,
|
|
2790
|
+
"creator" => @creator,
|
|
2791
|
+
"id" => @id,
|
|
2792
|
+
"inherits_status" => @inherits_status,
|
|
2793
|
+
"name" => @name,
|
|
2794
|
+
"status" => @status,
|
|
2795
|
+
"title" => @title,
|
|
2796
|
+
"type" => @type,
|
|
2797
|
+
"updated_at" => @updated_at,
|
|
2798
|
+
"url" => @url,
|
|
2799
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2800
|
+
"app_todolists_url" => @app_todolists_url,
|
|
2801
|
+
"bookmark_url" => @bookmark_url,
|
|
2802
|
+
"completed" => @completed,
|
|
2803
|
+
"completed_count" => @completed_count,
|
|
2804
|
+
"completed_ratio" => @completed_ratio,
|
|
2805
|
+
"on_schedule_count" => @on_schedule_count,
|
|
2806
|
+
"over_schedule_count" => @over_schedule_count,
|
|
2807
|
+
"position" => @position,
|
|
2808
|
+
"todolists_count" => @todolists_count,
|
|
2809
|
+
"todolists_url" => @todolists_url,
|
|
2810
|
+
}.compact
|
|
2811
|
+
end
|
|
2812
|
+
|
|
2813
|
+
def to_json(*args)
|
|
2814
|
+
to_h.to_json(*args)
|
|
2815
|
+
end
|
|
2816
|
+
end
|
|
2817
|
+
|
|
2818
|
+
# Tool
|
|
2819
|
+
class Tool
|
|
2820
|
+
include TypeHelpers
|
|
2821
|
+
attr_accessor :created_at, :enabled, :id, :name, :title, :updated_at, :app_url, :bucket, :position, :status, :url
|
|
2822
|
+
|
|
2823
|
+
# @return [Array<Symbol>]
|
|
2824
|
+
def self.required_fields
|
|
2825
|
+
%i[created_at enabled id name title updated_at].freeze
|
|
2826
|
+
end
|
|
2827
|
+
|
|
2828
|
+
def initialize(data = {})
|
|
2829
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2830
|
+
@enabled = parse_boolean(data["enabled"])
|
|
2831
|
+
@id = parse_integer(data["id"])
|
|
2832
|
+
@name = data["name"]
|
|
2833
|
+
@title = data["title"]
|
|
2834
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2835
|
+
@app_url = data["app_url"]
|
|
2836
|
+
@bucket = parse_type(data["bucket"], "RecordingBucket")
|
|
2837
|
+
@position = parse_integer(data["position"])
|
|
2838
|
+
@status = data["status"]
|
|
2839
|
+
@url = data["url"]
|
|
2840
|
+
end
|
|
2841
|
+
|
|
2842
|
+
def to_h
|
|
2843
|
+
{
|
|
2844
|
+
"created_at" => @created_at,
|
|
2845
|
+
"enabled" => @enabled,
|
|
2846
|
+
"id" => @id,
|
|
2847
|
+
"name" => @name,
|
|
2848
|
+
"title" => @title,
|
|
2849
|
+
"updated_at" => @updated_at,
|
|
2850
|
+
"app_url" => @app_url,
|
|
2851
|
+
"bucket" => @bucket,
|
|
2852
|
+
"position" => @position,
|
|
2853
|
+
"status" => @status,
|
|
2854
|
+
"url" => @url,
|
|
2855
|
+
}.compact
|
|
2856
|
+
end
|
|
2857
|
+
|
|
2858
|
+
def to_json(*args)
|
|
2859
|
+
to_h.to_json(*args)
|
|
2860
|
+
end
|
|
2861
|
+
end
|
|
2862
|
+
|
|
2863
|
+
# Upload
|
|
2864
|
+
class Upload
|
|
2865
|
+
include TypeHelpers
|
|
2866
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :parent, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :boosts_count, :boosts_url, :byte_size, :comments_count, :comments_url, :content_type, :description, :download_url, :filename, :height, :position, :subscription_url, :width
|
|
2867
|
+
|
|
2868
|
+
# @return [Array<Symbol>]
|
|
2869
|
+
def self.required_fields
|
|
2870
|
+
%i[app_url bucket created_at creator id inherits_status parent status title type updated_at url visible_to_clients].freeze
|
|
2871
|
+
end
|
|
2872
|
+
|
|
2873
|
+
def initialize(data = {})
|
|
2874
|
+
@app_url = data["app_url"]
|
|
2875
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2876
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2877
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2878
|
+
@id = parse_integer(data["id"])
|
|
2879
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2880
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
2881
|
+
@status = data["status"]
|
|
2882
|
+
@title = data["title"]
|
|
2883
|
+
@type = data["type"]
|
|
2884
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2885
|
+
@url = data["url"]
|
|
2886
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2887
|
+
@bookmark_url = data["bookmark_url"]
|
|
2888
|
+
@boosts_count = parse_integer(data["boosts_count"])
|
|
2889
|
+
@boosts_url = data["boosts_url"]
|
|
2890
|
+
@byte_size = parse_integer(data["byte_size"])
|
|
2891
|
+
@comments_count = parse_integer(data["comments_count"])
|
|
2892
|
+
@comments_url = data["comments_url"]
|
|
2893
|
+
@content_type = data["content_type"]
|
|
2894
|
+
@description = data["description"]
|
|
2895
|
+
@download_url = data["download_url"]
|
|
2896
|
+
@filename = data["filename"]
|
|
2897
|
+
@height = parse_integer(data["height"])
|
|
2898
|
+
@position = parse_integer(data["position"])
|
|
2899
|
+
@subscription_url = data["subscription_url"]
|
|
2900
|
+
@width = parse_integer(data["width"])
|
|
2901
|
+
end
|
|
2902
|
+
|
|
2903
|
+
def to_h
|
|
2904
|
+
{
|
|
2905
|
+
"app_url" => @app_url,
|
|
2906
|
+
"bucket" => @bucket,
|
|
2907
|
+
"created_at" => @created_at,
|
|
2908
|
+
"creator" => @creator,
|
|
2909
|
+
"id" => @id,
|
|
2910
|
+
"inherits_status" => @inherits_status,
|
|
2911
|
+
"parent" => @parent,
|
|
2912
|
+
"status" => @status,
|
|
2913
|
+
"title" => @title,
|
|
2914
|
+
"type" => @type,
|
|
2915
|
+
"updated_at" => @updated_at,
|
|
2916
|
+
"url" => @url,
|
|
2917
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2918
|
+
"bookmark_url" => @bookmark_url,
|
|
2919
|
+
"boosts_count" => @boosts_count,
|
|
2920
|
+
"boosts_url" => @boosts_url,
|
|
2921
|
+
"byte_size" => @byte_size,
|
|
2922
|
+
"comments_count" => @comments_count,
|
|
2923
|
+
"comments_url" => @comments_url,
|
|
2924
|
+
"content_type" => @content_type,
|
|
2925
|
+
"description" => @description,
|
|
2926
|
+
"download_url" => @download_url,
|
|
2927
|
+
"filename" => @filename,
|
|
2928
|
+
"height" => @height,
|
|
2929
|
+
"position" => @position,
|
|
2930
|
+
"subscription_url" => @subscription_url,
|
|
2931
|
+
"width" => @width,
|
|
2932
|
+
}.compact
|
|
2933
|
+
end
|
|
2934
|
+
|
|
2935
|
+
def to_json(*args)
|
|
2936
|
+
to_h.to_json(*args)
|
|
2937
|
+
end
|
|
2938
|
+
end
|
|
2939
|
+
|
|
2940
|
+
# Vault
|
|
2941
|
+
class Vault
|
|
2942
|
+
include TypeHelpers
|
|
2943
|
+
attr_accessor :app_url, :bucket, :created_at, :creator, :id, :inherits_status, :status, :title, :type, :updated_at, :url, :visible_to_clients, :bookmark_url, :documents_count, :documents_url, :parent, :position, :uploads_count, :uploads_url, :vaults_count, :vaults_url
|
|
2944
|
+
|
|
2945
|
+
# @return [Array<Symbol>]
|
|
2946
|
+
def self.required_fields
|
|
2947
|
+
%i[app_url bucket created_at creator id inherits_status status title type updated_at url visible_to_clients].freeze
|
|
2948
|
+
end
|
|
2949
|
+
|
|
2950
|
+
def initialize(data = {})
|
|
2951
|
+
@app_url = data["app_url"]
|
|
2952
|
+
@bucket = parse_type(data["bucket"], "TodoBucket")
|
|
2953
|
+
@created_at = parse_datetime(data["created_at"])
|
|
2954
|
+
@creator = parse_type(data["creator"], "Person")
|
|
2955
|
+
@id = parse_integer(data["id"])
|
|
2956
|
+
@inherits_status = parse_boolean(data["inherits_status"])
|
|
2957
|
+
@status = data["status"]
|
|
2958
|
+
@title = data["title"]
|
|
2959
|
+
@type = data["type"]
|
|
2960
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
2961
|
+
@url = data["url"]
|
|
2962
|
+
@visible_to_clients = parse_boolean(data["visible_to_clients"])
|
|
2963
|
+
@bookmark_url = data["bookmark_url"]
|
|
2964
|
+
@documents_count = parse_integer(data["documents_count"])
|
|
2965
|
+
@documents_url = data["documents_url"]
|
|
2966
|
+
@parent = parse_type(data["parent"], "RecordingParent")
|
|
2967
|
+
@position = parse_integer(data["position"])
|
|
2968
|
+
@uploads_count = parse_integer(data["uploads_count"])
|
|
2969
|
+
@uploads_url = data["uploads_url"]
|
|
2970
|
+
@vaults_count = parse_integer(data["vaults_count"])
|
|
2971
|
+
@vaults_url = data["vaults_url"]
|
|
2972
|
+
end
|
|
2973
|
+
|
|
2974
|
+
def to_h
|
|
2975
|
+
{
|
|
2976
|
+
"app_url" => @app_url,
|
|
2977
|
+
"bucket" => @bucket,
|
|
2978
|
+
"created_at" => @created_at,
|
|
2979
|
+
"creator" => @creator,
|
|
2980
|
+
"id" => @id,
|
|
2981
|
+
"inherits_status" => @inherits_status,
|
|
2982
|
+
"status" => @status,
|
|
2983
|
+
"title" => @title,
|
|
2984
|
+
"type" => @type,
|
|
2985
|
+
"updated_at" => @updated_at,
|
|
2986
|
+
"url" => @url,
|
|
2987
|
+
"visible_to_clients" => @visible_to_clients,
|
|
2988
|
+
"bookmark_url" => @bookmark_url,
|
|
2989
|
+
"documents_count" => @documents_count,
|
|
2990
|
+
"documents_url" => @documents_url,
|
|
2991
|
+
"parent" => @parent,
|
|
2992
|
+
"position" => @position,
|
|
2993
|
+
"uploads_count" => @uploads_count,
|
|
2994
|
+
"uploads_url" => @uploads_url,
|
|
2995
|
+
"vaults_count" => @vaults_count,
|
|
2996
|
+
"vaults_url" => @vaults_url,
|
|
2997
|
+
}.compact
|
|
2998
|
+
end
|
|
2999
|
+
|
|
3000
|
+
def to_json(*args)
|
|
3001
|
+
to_h.to_json(*args)
|
|
3002
|
+
end
|
|
3003
|
+
end
|
|
3004
|
+
|
|
3005
|
+
# Webhook
|
|
3006
|
+
class Webhook
|
|
3007
|
+
include TypeHelpers
|
|
3008
|
+
attr_accessor :app_url, :created_at, :id, :payload_url, :updated_at, :url, :active, :recent_deliveries, :types
|
|
3009
|
+
|
|
3010
|
+
# @return [Array<Symbol>]
|
|
3011
|
+
def self.required_fields
|
|
3012
|
+
%i[app_url created_at id payload_url updated_at url].freeze
|
|
3013
|
+
end
|
|
3014
|
+
|
|
3015
|
+
def initialize(data = {})
|
|
3016
|
+
@app_url = data["app_url"]
|
|
3017
|
+
@created_at = parse_datetime(data["created_at"])
|
|
3018
|
+
@id = parse_integer(data["id"])
|
|
3019
|
+
@payload_url = data["payload_url"]
|
|
3020
|
+
@updated_at = parse_datetime(data["updated_at"])
|
|
3021
|
+
@url = data["url"]
|
|
3022
|
+
@active = parse_boolean(data["active"])
|
|
3023
|
+
@recent_deliveries = parse_array(data["recent_deliveries"], "WebhookDelivery")
|
|
3024
|
+
@types = data["types"]
|
|
3025
|
+
end
|
|
3026
|
+
|
|
3027
|
+
def to_h
|
|
3028
|
+
{
|
|
3029
|
+
"app_url" => @app_url,
|
|
3030
|
+
"created_at" => @created_at,
|
|
3031
|
+
"id" => @id,
|
|
3032
|
+
"payload_url" => @payload_url,
|
|
3033
|
+
"updated_at" => @updated_at,
|
|
3034
|
+
"url" => @url,
|
|
3035
|
+
"active" => @active,
|
|
3036
|
+
"recent_deliveries" => @recent_deliveries,
|
|
3037
|
+
"types" => @types,
|
|
3038
|
+
}.compact
|
|
3039
|
+
end
|
|
3040
|
+
|
|
3041
|
+
def to_json(*args)
|
|
3042
|
+
to_h.to_json(*args)
|
|
3043
|
+
end
|
|
3044
|
+
end
|
|
3045
|
+
|
|
3046
|
+
# WebhookCopy
|
|
3047
|
+
class WebhookCopy
|
|
3048
|
+
include TypeHelpers
|
|
3049
|
+
attr_accessor :app_url, :bucket, :id, :url
|
|
3050
|
+
|
|
3051
|
+
def initialize(data = {})
|
|
3052
|
+
@app_url = data["app_url"]
|
|
3053
|
+
@bucket = parse_type(data["bucket"], "WebhookCopyBucket")
|
|
3054
|
+
@id = parse_integer(data["id"])
|
|
3055
|
+
@url = data["url"]
|
|
3056
|
+
end
|
|
3057
|
+
|
|
3058
|
+
def to_h
|
|
3059
|
+
{
|
|
3060
|
+
"app_url" => @app_url,
|
|
3061
|
+
"bucket" => @bucket,
|
|
3062
|
+
"id" => @id,
|
|
3063
|
+
"url" => @url,
|
|
3064
|
+
}.compact
|
|
3065
|
+
end
|
|
3066
|
+
|
|
3067
|
+
def to_json(*args)
|
|
3068
|
+
to_h.to_json(*args)
|
|
3069
|
+
end
|
|
3070
|
+
end
|
|
3071
|
+
|
|
3072
|
+
# WebhookCopyBucket
|
|
3073
|
+
class WebhookCopyBucket
|
|
3074
|
+
include TypeHelpers
|
|
3075
|
+
attr_accessor :id
|
|
3076
|
+
|
|
3077
|
+
def initialize(data = {})
|
|
3078
|
+
@id = parse_integer(data["id"])
|
|
3079
|
+
end
|
|
3080
|
+
|
|
3081
|
+
def to_h
|
|
3082
|
+
{
|
|
3083
|
+
"id" => @id,
|
|
3084
|
+
}.compact
|
|
3085
|
+
end
|
|
3086
|
+
|
|
3087
|
+
def to_json(*args)
|
|
3088
|
+
to_h.to_json(*args)
|
|
3089
|
+
end
|
|
3090
|
+
end
|
|
3091
|
+
|
|
3092
|
+
# WebhookDelivery
|
|
3093
|
+
class WebhookDelivery
|
|
3094
|
+
include TypeHelpers
|
|
3095
|
+
attr_accessor :created_at, :id, :request, :response
|
|
3096
|
+
|
|
3097
|
+
def initialize(data = {})
|
|
3098
|
+
@created_at = parse_datetime(data["created_at"])
|
|
3099
|
+
@id = parse_integer(data["id"])
|
|
3100
|
+
@request = parse_type(data["request"], "WebhookDeliveryRequest")
|
|
3101
|
+
@response = parse_type(data["response"], "WebhookDeliveryResponse")
|
|
3102
|
+
end
|
|
3103
|
+
|
|
3104
|
+
def to_h
|
|
3105
|
+
{
|
|
3106
|
+
"created_at" => @created_at,
|
|
3107
|
+
"id" => @id,
|
|
3108
|
+
"request" => @request,
|
|
3109
|
+
"response" => @response,
|
|
3110
|
+
}.compact
|
|
3111
|
+
end
|
|
3112
|
+
|
|
3113
|
+
def to_json(*args)
|
|
3114
|
+
to_h.to_json(*args)
|
|
3115
|
+
end
|
|
3116
|
+
end
|
|
3117
|
+
|
|
3118
|
+
# WebhookDeliveryRequest
|
|
3119
|
+
class WebhookDeliveryRequest
|
|
3120
|
+
include TypeHelpers
|
|
3121
|
+
attr_accessor :body, :headers
|
|
3122
|
+
|
|
3123
|
+
def initialize(data = {})
|
|
3124
|
+
@body = parse_type(data["body"], "WebhookEvent")
|
|
3125
|
+
@headers = parse_type(data["headers"], "WebhookHeadersMap")
|
|
3126
|
+
end
|
|
3127
|
+
|
|
3128
|
+
def to_h
|
|
3129
|
+
{
|
|
3130
|
+
"body" => @body,
|
|
3131
|
+
"headers" => @headers,
|
|
3132
|
+
}.compact
|
|
3133
|
+
end
|
|
3134
|
+
|
|
3135
|
+
def to_json(*args)
|
|
3136
|
+
to_h.to_json(*args)
|
|
3137
|
+
end
|
|
3138
|
+
end
|
|
3139
|
+
|
|
3140
|
+
# WebhookDeliveryResponse
|
|
3141
|
+
class WebhookDeliveryResponse
|
|
3142
|
+
include TypeHelpers
|
|
3143
|
+
attr_accessor :code, :headers, :message
|
|
3144
|
+
|
|
3145
|
+
def initialize(data = {})
|
|
3146
|
+
@code = parse_integer(data["code"])
|
|
3147
|
+
@headers = parse_type(data["headers"], "WebhookHeadersMap")
|
|
3148
|
+
@message = data["message"]
|
|
3149
|
+
end
|
|
3150
|
+
|
|
3151
|
+
def to_h
|
|
3152
|
+
{
|
|
3153
|
+
"code" => @code,
|
|
3154
|
+
"headers" => @headers,
|
|
3155
|
+
"message" => @message,
|
|
3156
|
+
}.compact
|
|
3157
|
+
end
|
|
3158
|
+
|
|
3159
|
+
def to_json(*args)
|
|
3160
|
+
to_h.to_json(*args)
|
|
3161
|
+
end
|
|
3162
|
+
end
|
|
3163
|
+
|
|
3164
|
+
# WebhookEvent
|
|
3165
|
+
class WebhookEvent
|
|
3166
|
+
include TypeHelpers
|
|
3167
|
+
attr_accessor :copy, :created_at, :creator, :details, :id, :kind, :recording
|
|
3168
|
+
|
|
3169
|
+
def initialize(data = {})
|
|
3170
|
+
@copy = parse_type(data["copy"], "WebhookCopy")
|
|
3171
|
+
@created_at = parse_datetime(data["created_at"])
|
|
3172
|
+
@creator = parse_type(data["creator"], "Person")
|
|
3173
|
+
@details = data["details"]
|
|
3174
|
+
@id = parse_integer(data["id"])
|
|
3175
|
+
@kind = data["kind"]
|
|
3176
|
+
@recording = parse_type(data["recording"], "Recording")
|
|
3177
|
+
end
|
|
3178
|
+
|
|
3179
|
+
def to_h
|
|
3180
|
+
{
|
|
3181
|
+
"copy" => @copy,
|
|
3182
|
+
"created_at" => @created_at,
|
|
3183
|
+
"creator" => @creator,
|
|
3184
|
+
"details" => @details,
|
|
3185
|
+
"id" => @id,
|
|
3186
|
+
"kind" => @kind,
|
|
3187
|
+
"recording" => @recording,
|
|
3188
|
+
}.compact
|
|
3189
|
+
end
|
|
3190
|
+
|
|
3191
|
+
def to_json(*args)
|
|
3192
|
+
to_h.to_json(*args)
|
|
3193
|
+
end
|
|
3194
|
+
end
|
|
3195
|
+
end
|
|
3196
|
+
end
|