gonebusy-ruby-client 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +1963 -0
  4. data/lib/gonebusy/api_helper.rb +149 -0
  5. data/lib/gonebusy/configuration.rb +16 -0
  6. data/lib/gonebusy/controllers/base_controller.rb +45 -0
  7. data/lib/gonebusy/controllers/bookings_controller.rb +298 -0
  8. data/lib/gonebusy/controllers/categories_controller.rb +180 -0
  9. data/lib/gonebusy/controllers/pricing_models_controller.rb +241 -0
  10. data/lib/gonebusy/controllers/resources_controller.rb +355 -0
  11. data/lib/gonebusy/controllers/schedules_controller.rb +426 -0
  12. data/lib/gonebusy/controllers/search_controller.rb +64 -0
  13. data/lib/gonebusy/controllers/services_controller.rb +367 -0
  14. data/lib/gonebusy/controllers/users_controller.rb +288 -0
  15. data/lib/gonebusy/exceptions/api_exception.rb +16 -0
  16. data/lib/gonebusy/exceptions/entities_error_exception.rb +27 -0
  17. data/lib/gonebusy/gonebusy_client.rb +58 -0
  18. data/lib/gonebusy/http/auth/custom_auth.rb +16 -0
  19. data/lib/gonebusy/http/faraday_client.rb +41 -0
  20. data/lib/gonebusy/http/http_call_back.rb +17 -0
  21. data/lib/gonebusy/http/http_client.rb +82 -0
  22. data/lib/gonebusy/http/http_context.rb +15 -0
  23. data/lib/gonebusy/http/http_method_enum.rb +7 -0
  24. data/lib/gonebusy/http/http_request.rb +44 -0
  25. data/lib/gonebusy/http/http_response.rb +19 -0
  26. data/lib/gonebusy/models/base_model.rb +32 -0
  27. data/lib/gonebusy/models/cancel_booking_by_id_response.rb +35 -0
  28. data/lib/gonebusy/models/create_booking_body.rb +80 -0
  29. data/lib/gonebusy/models/create_booking_response.rb +35 -0
  30. data/lib/gonebusy/models/create_category_body.rb +71 -0
  31. data/lib/gonebusy/models/create_category_response.rb +35 -0
  32. data/lib/gonebusy/models/create_pricing_model_body.rb +80 -0
  33. data/lib/gonebusy/models/create_pricing_model_response.rb +35 -0
  34. data/lib/gonebusy/models/create_resource_body.rb +89 -0
  35. data/lib/gonebusy/models/create_resource_response.rb +35 -0
  36. data/lib/gonebusy/models/create_schedule_body.rb +144 -0
  37. data/lib/gonebusy/models/create_schedule_response.rb +35 -0
  38. data/lib/gonebusy/models/create_schedule_time_window_body.rb +117 -0
  39. data/lib/gonebusy/models/create_schedule_time_window_response.rb +35 -0
  40. data/lib/gonebusy/models/create_service_body.rb +98 -0
  41. data/lib/gonebusy/models/create_service_response.rb +35 -0
  42. data/lib/gonebusy/models/create_user_body.rb +89 -0
  43. data/lib/gonebusy/models/create_user_response.rb +35 -0
  44. data/lib/gonebusy/models/date_recurs_by_enum.rb +13 -0
  45. data/lib/gonebusy/models/delete_resource_by_id_response.rb +35 -0
  46. data/lib/gonebusy/models/delete_schedule_by_id_response.rb +35 -0
  47. data/lib/gonebusy/models/delete_schedule_time_window_by_id_response.rb +35 -0
  48. data/lib/gonebusy/models/delete_service_by_id_response.rb +35 -0
  49. data/lib/gonebusy/models/entities_address_entity.rb +116 -0
  50. data/lib/gonebusy/models/entities_availability_response.rb +58 -0
  51. data/lib/gonebusy/models/entities_booking_response.rb +71 -0
  52. data/lib/gonebusy/models/entities_category_response.rb +98 -0
  53. data/lib/gonebusy/models/entities_pricing_model_response.rb +89 -0
  54. data/lib/gonebusy/models/entities_resource_availabilities.rb +49 -0
  55. data/lib/gonebusy/models/entities_resource_response.rb +98 -0
  56. data/lib/gonebusy/models/entities_schedule_response.rb +76 -0
  57. data/lib/gonebusy/models/entities_search_response.rb +54 -0
  58. data/lib/gonebusy/models/entities_service_response.rb +116 -0
  59. data/lib/gonebusy/models/entities_slots.rb +45 -0
  60. data/lib/gonebusy/models/entities_thing_type_response.rb +44 -0
  61. data/lib/gonebusy/models/entities_time_window_response.rb +135 -0
  62. data/lib/gonebusy/models/entities_user_response.rb +152 -0
  63. data/lib/gonebusy/models/frequency_enum.rb +18 -0
  64. data/lib/gonebusy/models/gender_enum.rb +10 -0
  65. data/lib/gonebusy/models/get_booking_by_id_response.rb +35 -0
  66. data/lib/gonebusy/models/get_bookings_response.rb +40 -0
  67. data/lib/gonebusy/models/get_categories_response.rb +40 -0
  68. data/lib/gonebusy/models/get_category_by_id_response.rb +35 -0
  69. data/lib/gonebusy/models/get_pricing_model_by_id_response.rb +35 -0
  70. data/lib/gonebusy/models/get_pricing_models_response.rb +40 -0
  71. data/lib/gonebusy/models/get_resource_by_id_response.rb +35 -0
  72. data/lib/gonebusy/models/get_resource_things_response.rb +40 -0
  73. data/lib/gonebusy/models/get_resources_response.rb +40 -0
  74. data/lib/gonebusy/models/get_schedule_by_id_response.rb +35 -0
  75. data/lib/gonebusy/models/get_schedules_response.rb +40 -0
  76. data/lib/gonebusy/models/get_service_available_slots_by_id_response.rb +35 -0
  77. data/lib/gonebusy/models/get_service_by_id_response.rb +35 -0
  78. data/lib/gonebusy/models/get_services_response.rb +40 -0
  79. data/lib/gonebusy/models/get_user_by_id_response.rb +35 -0
  80. data/lib/gonebusy/models/get_users_pros_response.rb +40 -0
  81. data/lib/gonebusy/models/get_users_response.rb +40 -0
  82. data/lib/gonebusy/models/occurrence_enum.rb +22 -0
  83. data/lib/gonebusy/models/recurs_by_enum.rb +16 -0
  84. data/lib/gonebusy/models/search_query_response.rb +35 -0
  85. data/lib/gonebusy/models/update_booking_by_id_response.rb +35 -0
  86. data/lib/gonebusy/models/update_pricing_model_by_id_body.rb +62 -0
  87. data/lib/gonebusy/models/update_pricing_model_by_id_response.rb +35 -0
  88. data/lib/gonebusy/models/update_resource_by_id_body.rb +71 -0
  89. data/lib/gonebusy/models/update_resource_by_id_response.rb +35 -0
  90. data/lib/gonebusy/models/update_schedule_time_window_by_id_body.rb +117 -0
  91. data/lib/gonebusy/models/update_schedule_time_window_by_id_response.rb +35 -0
  92. data/lib/gonebusy/models/update_service_by_id_body.rb +89 -0
  93. data/lib/gonebusy/models/update_service_by_id_response.rb +35 -0
  94. data/lib/gonebusy/models/update_user_by_id_body.rb +89 -0
  95. data/lib/gonebusy/models/update_user_by_id_response.rb +35 -0
  96. data/lib/gonebusy.rb +105 -0
  97. metadata +186 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 40f500630fb7942d0119301e9b1c7b83b63e9756
4
+ data.tar.gz: 4884ce20af8d137ecb9d76f9d3db938f1d23d984
5
+ SHA512:
6
+ metadata.gz: fc3d73fcad9437b7eb61ac979b5f330a69afa0039307901fa0a1c4e9005819aba41f195afc97ed27c57c56b673e817fa6d184d0dfb0d53edd2b6082e8eb98a83
7
+ data.tar.gz: 292016a74993adabfcba72576ff19b780375a47a48922e5d2122a29ebeef7a66dd13effcd64fc58899317b7f21bacc57c2690f0e6b7d174af1ccd146c8fb8af1
data/LICENSE ADDED
@@ -0,0 +1,28 @@
1
+ License:
2
+ ========
3
+ The MIT License (MIT)
4
+ http://opensource.org/licenses/MIT
5
+
6
+ Copyright (c) 2016 - GoneBusy Inc.
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in
16
+ all copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
+ THE SOFTWARE.
25
+
26
+ Trade Mark:
27
+ ==========
28
+ GoneBusy is a trade mark for GoneBusy Inc.
data/README.md ADDED
@@ -0,0 +1,1963 @@
1
+ #Getting started
2
+
3
+ ## Sandbox
4
+
5
+ We have a Sandbox environment to play with!
6
+
7
+ Just use [sandbox.gonebusy.com](http://sandbox.gonebusy.com) instead of where you see beta.gonebusy.com referenced, including where to create an account to retrieve your API Key.
8
+
9
+ The Sandbox environment is completely separate from the Live site - that includes meaning your Sandbox API Key will not work in the Live environment.
10
+
11
+ ## How to Build
12
+
13
+ This client library is a Ruby gem which can be compiled and used in your Ruby and Ruby on Rails project. This library requires a few gems from the RubyGems repository.
14
+
15
+ 1. Open the command line interface or the terminal and navigate to the folder containing the source code.
16
+ 2. Run ``` gem build gonebusy.gemspec ``` to build the gem.
17
+ 3. Once built, the gem can be installed on the current work environment using ``` gem install gonebusy-0.0.2.gem ```
18
+
19
+ ![Building Gem](http://apidocs.io/illustration/ruby?step=buildSDK&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy-Ruby&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
20
+
21
+ ## How to Use
22
+
23
+ The following section explains how to use the Gonebusy Ruby Gem in a new Rails project using RubyMine™. The basic workflow presented here is also applicable if you prefer using a different editor or IDE.
24
+
25
+ ### 1. Starting a new project
26
+
27
+ Close any existing projects in RubyMine™ by selecting ``` File -> Close Project ```. Next, click on ``` Create New Project ``` to create a new project from scratch.
28
+
29
+ ![Create a new project in RubyMine](http://apidocs.io/illustration/ruby?step=createNewProject0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
30
+
31
+ Next, provide ``` TestApp ``` as the project name, choose ``` Rails Application ``` as the project type, and click ``` OK ```.
32
+
33
+ ![Create a new Rails Application in RubyMine - step 1](http://apidocs.io/illustration/ruby?step=createNewProject1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
34
+
35
+ In the next dialog make sure that correct *Ruby SDK* is being used (minimum 2.0.0) and click ``` OK ```.
36
+
37
+ ![Create a new Rails Application in RubyMine - step 2](http://apidocs.io/illustration/ruby?step=createNewProject2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
38
+
39
+ This will create a new Rails Application project with an existing set of files and folder.
40
+
41
+ ### 2. Add reference of the gem
42
+
43
+ In order to use the Gonebusy gem in the new project we must add a gem reference. Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node. The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line: ``` gem 'gonebusy', '~> 0.0.2' ```
44
+
45
+ ![Add references of the Gemfile](http://apidocs.io/illustration/ruby?step=addReference&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
46
+
47
+ ### 3. Adding a new Rails Controller
48
+
49
+ Once the ``` TestApp ``` project is created, a folder named ``` controllers ``` will be visible in the *Project Explorer* under the following path: ``` TestApp > app > controllers ```. Right click on this folder and select ``` New -> Run Rails Generator... ```.
50
+
51
+ ![Run Rails Generator on Controllers Folder](http://apidocs.io/illustration/ruby?step=addCode0&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
52
+
53
+ Selecting the said option will popup a small window where the generator names are displayed. Here, select the ``` controller ``` template.
54
+
55
+ ![Create a new Controller](http://apidocs.io/illustration/ruby?step=addCode1&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
56
+
57
+ Next, a popup window will ask you for a Controller name and included Actions. For controller name provide ``` Hello ``` and include an action named ``` Index ``` and click ``` OK ```.
58
+
59
+ ![Add a new Controller](http://apidocs.io/illustration/ruby?step=addCode2&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
60
+
61
+ A new controller class anmed ``` HelloController ``` will be created in a file named ``` hello_controller.rb ``` containing a method named ``` Index ```. In this method, add code for initialization and a sample for its usage.
62
+
63
+ ![Initialize the library](http://apidocs.io/illustration/ruby?step=addCode3&workspaceFolder=Gonebusy-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2)
64
+
65
+ ## How to Test
66
+
67
+ You can test the generated SDK and the server with automatically generated test
68
+ cases as follows:
69
+
70
+ 1. From terminal/cmd navigate to the root directory of the SDK.
71
+ 2. Invoke: `bundle exec rake`
72
+
73
+ ## Initialization
74
+
75
+ ### Authentication
76
+ In order to setup authentication and initialization of the API client, you need the following information.
77
+
78
+ | Parameter | Description |
79
+ |-----------|-------------|
80
+ | authorization | Set Authorization to "Token _your API key_" |
81
+
82
+
83
+ API client can be initialized as following.
84
+
85
+ ```ruby
86
+ # Configuration parameters and credentials
87
+ authorization = "Token <your API key>"; # Set Authorization to "Token <your API key>"
88
+
89
+ client = Gonebusy::GonebusyClient.new(authorization)
90
+ ```
91
+
92
+ The added initlization code can be debugged by putting a breakpoint in the ``` Index ``` method and running the project in debug mode by selecting ``` Run -> Debug 'Development: TestApp' ```.
93
+
94
+ ![Debug the TestApp](http://apidocs.io/illustration/ruby?step=addCode4&workspaceFolder=GoneBusy%2011-17-16-Ruby&workspaceName=Gonebusy&projectName=gonebusy&gemName=gonebusy&gemVer=0.0.2&initLine=client%2520%253D%2520GonebusyClient.new%2528%2527authorization%2527%2529)
95
+
96
+ ## Class Reference
97
+
98
+ ### <a name="list_of_controllers"></a>List of Controllers
99
+
100
+ * [BookingsController](#bookings_controller)
101
+ * [UsersController](#users_controller)
102
+ * [ServicesController](#services_controller)
103
+ * [SearchController](#search_controller)
104
+ * [SchedulesController](#schedules_controller)
105
+ * [ResourcesController](#resources_controller)
106
+ * [PricingModelsController](#pricing_models_controller)
107
+ * [CategoriesController](#categories_controller)
108
+
109
+ ### <a name="bookings_controller"></a>![Class: ](http://apidocs.io/img/class.png ".BookingsController") BookingsController
110
+
111
+ #### Get singleton instance
112
+
113
+ The singleton instance of the ``` BookingsController ``` class can be accessed from the API Client.
114
+
115
+ ```ruby
116
+ bookings = client.bookings
117
+ ```
118
+
119
+ #### <a name="create_booking"></a>![Method: ](http://apidocs.io/img/method.png ".BookingsController.create_booking") create_booking
120
+
121
+ > Create a Booking with params
122
+
123
+
124
+ ```ruby
125
+ def create_booking(options = Hash.new); end
126
+ ```
127
+
128
+ #### Parameters
129
+
130
+ | Parameter | Tags | Description |
131
+ |-----------|------|-------------|
132
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
133
+ | create_booking_body | ``` Required ``` | the content of the request |
134
+
135
+
136
+ #### Example Usage
137
+
138
+ ```ruby
139
+ collect = Hash.new
140
+
141
+ authorization = 'Authorization'
142
+ collect['authorization'] = authorization
143
+
144
+ create_booking_body = CreateBookingBody.new
145
+ collect['create_booking_body'] = create_booking_body
146
+
147
+
148
+ result = bookings.create_booking(collect)
149
+
150
+ ```
151
+
152
+ #### Errors
153
+
154
+ | Error Code | Error Description |
155
+ |------------|-------------------|
156
+ | 400 | Bad Request |
157
+ | 401 | Unauthorized/Missing Token |
158
+ | 403 | Forbidden |
159
+ | 422 | Unprocessable Entity |
160
+ | 500 | Unexpected error |
161
+
162
+
163
+
164
+ #### <a name="get_bookings"></a>![Method: ](http://apidocs.io/img/method.png ".BookingsController.get_bookings") get_bookings
165
+
166
+ > Return list of Bookings.
167
+
168
+
169
+ ```ruby
170
+ def get_bookings(options = Hash.new); end
171
+ ```
172
+
173
+ #### Parameters
174
+
175
+ | Parameter | Tags | Description |
176
+ |-----------|------|-------------|
177
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
178
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
179
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
180
+ | states | ``` Optional ``` | Comma-separated list of Booking states to retrieve only Bookings in those states. Leave blank to retrieve all Bookings. |
181
+ | user_id | ``` Optional ``` | Retrieve Bookings owned only by this User Id. You must be authorized to manage this User Id. |
182
+
183
+
184
+ #### Example Usage
185
+
186
+ ```ruby
187
+ collect = Hash.new
188
+
189
+ authorization = 'Authorization'
190
+ collect['authorization'] = authorization
191
+
192
+ page = 1
193
+ collect['page'] = page
194
+
195
+ per_page = 10
196
+ collect['per_page'] = per_page
197
+
198
+ states = 'states'
199
+ collect['states'] = states
200
+
201
+ user_id = 86
202
+ collect['user_id'] = user_id
203
+
204
+
205
+ result = bookings.get_bookings(collect)
206
+
207
+ ```
208
+
209
+ #### Errors
210
+
211
+ | Error Code | Error Description |
212
+ |------------|-------------------|
213
+ | 401 | Unauthorized/Missing Token |
214
+ | 403 | Forbidden |
215
+ | 404 | Not Found |
216
+ | 500 | Unexpected error |
217
+
218
+
219
+
220
+ #### <a name="cancel_booking_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".BookingsController.cancel_booking_by_id") cancel_booking_by_id
221
+
222
+ > Cancel a Booking by id
223
+
224
+
225
+ ```ruby
226
+ def cancel_booking_by_id(options = Hash.new); end
227
+ ```
228
+
229
+ #### Parameters
230
+
231
+ | Parameter | Tags | Description |
232
+ |-----------|------|-------------|
233
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
234
+ | id | ``` Required ``` | TODO: Add a parameter description |
235
+
236
+
237
+ #### Example Usage
238
+
239
+ ```ruby
240
+ collect = Hash.new
241
+
242
+ authorization = 'Authorization'
243
+ collect['authorization'] = authorization
244
+
245
+ id = 'id'
246
+ collect['id'] = id
247
+
248
+
249
+ result = bookings.cancel_booking_by_id(collect)
250
+
251
+ ```
252
+
253
+ #### Errors
254
+
255
+ | Error Code | Error Description |
256
+ |------------|-------------------|
257
+ | 400 | Bad Request |
258
+ | 401 | Unauthorized/Missing Token |
259
+ | 403 | Forbidden |
260
+ | 404 | Not Found |
261
+ | 500 | Unexpected error |
262
+
263
+
264
+
265
+ #### <a name="update_booking_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".BookingsController.update_booking_by_id") update_booking_by_id
266
+
267
+ > Update a Booking by id
268
+
269
+
270
+ ```ruby
271
+ def update_booking_by_id(options = Hash.new); end
272
+ ```
273
+
274
+ #### Parameters
275
+
276
+ | Parameter | Tags | Description |
277
+ |-----------|------|-------------|
278
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
279
+ | id | ``` Required ``` | TODO: Add a parameter description |
280
+
281
+
282
+ #### Example Usage
283
+
284
+ ```ruby
285
+ collect = Hash.new
286
+
287
+ authorization = 'Authorization'
288
+ collect['authorization'] = authorization
289
+
290
+ id = 'id'
291
+ collect['id'] = id
292
+
293
+
294
+ result = bookings.update_booking_by_id(collect)
295
+
296
+ ```
297
+
298
+ #### Errors
299
+
300
+ | Error Code | Error Description |
301
+ |------------|-------------------|
302
+ | 400 | Bad Request |
303
+ | 401 | Unauthorized/Missing Token |
304
+ | 403 | Forbidden |
305
+ | 404 | Not Found |
306
+ | 422 | Unprocessable Entity |
307
+ | 500 | Unexpected error |
308
+
309
+
310
+
311
+ #### <a name="get_booking_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".BookingsController.get_booking_by_id") get_booking_by_id
312
+
313
+ > Return a Booking by id.
314
+
315
+
316
+ ```ruby
317
+ def get_booking_by_id(options = Hash.new); end
318
+ ```
319
+
320
+ #### Parameters
321
+
322
+ | Parameter | Tags | Description |
323
+ |-----------|------|-------------|
324
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
325
+ | id | ``` Required ``` | TODO: Add a parameter description |
326
+
327
+
328
+ #### Example Usage
329
+
330
+ ```ruby
331
+ collect = Hash.new
332
+
333
+ authorization = 'Authorization'
334
+ collect['authorization'] = authorization
335
+
336
+ id = 'id'
337
+ collect['id'] = id
338
+
339
+
340
+ result = bookings.get_booking_by_id(collect)
341
+
342
+ ```
343
+
344
+ #### Errors
345
+
346
+ | Error Code | Error Description |
347
+ |------------|-------------------|
348
+ | 400 | Bad Request |
349
+ | 401 | Unauthorized/Missing Token |
350
+ | 403 | Forbidden |
351
+ | 404 | Not Found |
352
+ | 500 | Unexpected error |
353
+
354
+
355
+
356
+ [Back to List of Controllers](#list_of_controllers)
357
+
358
+ ### <a name="users_controller"></a>![Class: ](http://apidocs.io/img/class.png ".UsersController") UsersController
359
+
360
+ #### Get singleton instance
361
+
362
+ The singleton instance of the ``` UsersController ``` class can be accessed from the API Client.
363
+
364
+ ```ruby
365
+ users = client.users
366
+ ```
367
+
368
+ #### <a name="update_user_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".UsersController.update_user_by_id") update_user_by_id
369
+
370
+ > Update a User by id, with params.
371
+
372
+
373
+ ```ruby
374
+ def update_user_by_id(options = Hash.new); end
375
+ ```
376
+
377
+ #### Parameters
378
+
379
+ | Parameter | Tags | Description |
380
+ |-----------|------|-------------|
381
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
382
+ | id | ``` Required ``` | TODO: Add a parameter description |
383
+ | update_user_by_id_body | ``` Required ``` | the content of the request |
384
+
385
+
386
+ #### Example Usage
387
+
388
+ ```ruby
389
+ collect = Hash.new
390
+
391
+ authorization = 'Authorization'
392
+ collect['authorization'] = authorization
393
+
394
+ id = 'id'
395
+ collect['id'] = id
396
+
397
+ update_user_by_id_body = UpdateUserByIdBody.new
398
+ collect['update_user_by_id_body'] = update_user_by_id_body
399
+
400
+
401
+ result = users.update_user_by_id(collect)
402
+
403
+ ```
404
+
405
+ #### Errors
406
+
407
+ | Error Code | Error Description |
408
+ |------------|-------------------|
409
+ | 400 | Bad Request |
410
+ | 401 | Unauthorized/Missing Token |
411
+ | 403 | Forbidden |
412
+ | 404 | Not Found |
413
+ | 422 | Unprocessable Entity |
414
+ | 500 | Unexpected error |
415
+
416
+
417
+
418
+ #### <a name="get_user_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".UsersController.get_user_by_id") get_user_by_id
419
+
420
+ > Return a User by id.
421
+
422
+
423
+ ```ruby
424
+ def get_user_by_id(options = Hash.new); end
425
+ ```
426
+
427
+ #### Parameters
428
+
429
+ | Parameter | Tags | Description |
430
+ |-----------|------|-------------|
431
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
432
+ | id | ``` Required ``` | TODO: Add a parameter description |
433
+
434
+
435
+ #### Example Usage
436
+
437
+ ```ruby
438
+ collect = Hash.new
439
+
440
+ authorization = 'Authorization'
441
+ collect['authorization'] = authorization
442
+
443
+ id = 'id'
444
+ collect['id'] = id
445
+
446
+
447
+ result = users.get_user_by_id(collect)
448
+
449
+ ```
450
+
451
+ #### Errors
452
+
453
+ | Error Code | Error Description |
454
+ |------------|-------------------|
455
+ | 400 | Bad Request |
456
+ | 401 | Unauthorized/Missing Token |
457
+ | 403 | Forbidden |
458
+ | 404 | Not Found |
459
+ | 500 | Unexpected error |
460
+
461
+
462
+
463
+ #### <a name="get_users_pros"></a>![Method: ](http://apidocs.io/img/method.png ".UsersController.get_users_pros") get_users_pros
464
+
465
+ > Return list of active Pro Users.
466
+
467
+
468
+ ```ruby
469
+ def get_users_pros(authorization); end
470
+ ```
471
+
472
+ #### Parameters
473
+
474
+ | Parameter | Tags | Description |
475
+ |-----------|------|-------------|
476
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
477
+
478
+
479
+ #### Example Usage
480
+
481
+ ```ruby
482
+ authorization = 'Authorization'
483
+
484
+ result = users.get_users_pros(authorization)
485
+
486
+ ```
487
+
488
+ #### Errors
489
+
490
+ | Error Code | Error Description |
491
+ |------------|-------------------|
492
+ | 400 | Bad Request |
493
+ | 401 | Unauthorized/Missing Token |
494
+ | 403 | Forbidden |
495
+ | 500 | Unexpected error |
496
+
497
+
498
+
499
+ #### <a name="create_user"></a>![Method: ](http://apidocs.io/img/method.png ".UsersController.create_user") create_user
500
+
501
+ > Create a User
502
+
503
+
504
+ ```ruby
505
+ def create_user(options = Hash.new); end
506
+ ```
507
+
508
+ #### Parameters
509
+
510
+ | Parameter | Tags | Description |
511
+ |-----------|------|-------------|
512
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
513
+ | create_user_body | ``` Required ``` | the content of the request |
514
+
515
+
516
+ #### Example Usage
517
+
518
+ ```ruby
519
+ collect = Hash.new
520
+
521
+ authorization = 'Authorization'
522
+ collect['authorization'] = authorization
523
+
524
+ create_user_body = CreateUserBody.new
525
+ collect['create_user_body'] = create_user_body
526
+
527
+
528
+ result = users.create_user(collect)
529
+
530
+ ```
531
+
532
+ #### Errors
533
+
534
+ | Error Code | Error Description |
535
+ |------------|-------------------|
536
+ | 400 | Bad Request |
537
+ | 401 | Unauthorized/Missing Token |
538
+ | 403 | Forbidden |
539
+ | 422 | Unprocessable Entity |
540
+ | 500 | Unexpected error |
541
+
542
+
543
+
544
+ #### <a name="get_users"></a>![Method: ](http://apidocs.io/img/method.png ".UsersController.get_users") get_users
545
+
546
+ > Return all Users that your account has access to. Includes your own User as well as any Users for which you are the Account Manager.
547
+
548
+
549
+ ```ruby
550
+ def get_users(options = Hash.new); end
551
+ ```
552
+
553
+ #### Parameters
554
+
555
+ | Parameter | Tags | Description |
556
+ |-----------|------|-------------|
557
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
558
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
559
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
560
+
561
+
562
+ #### Example Usage
563
+
564
+ ```ruby
565
+ collect = Hash.new
566
+
567
+ authorization = 'Authorization'
568
+ collect['authorization'] = authorization
569
+
570
+ page = 1
571
+ collect['page'] = page
572
+
573
+ per_page = 10
574
+ collect['per_page'] = per_page
575
+
576
+
577
+ result = users.get_users(collect)
578
+
579
+ ```
580
+
581
+ #### Errors
582
+
583
+ | Error Code | Error Description |
584
+ |------------|-------------------|
585
+ | 400 | Bad Request |
586
+ | 401 | Unauthorized/Missing Token |
587
+ | 403 | Forbidden |
588
+ | 500 | Unexpected error |
589
+
590
+
591
+
592
+ [Back to List of Controllers](#list_of_controllers)
593
+
594
+ ### <a name="services_controller"></a>![Class: ](http://apidocs.io/img/class.png ".ServicesController") ServicesController
595
+
596
+ #### Get singleton instance
597
+
598
+ The singleton instance of the ``` ServicesController ``` class can be accessed from the API Client.
599
+
600
+ ```ruby
601
+ services = client.services
602
+ ```
603
+
604
+ #### <a name="delete_service_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.delete_service_by_id") delete_service_by_id
605
+
606
+ > Delete a Service by id
607
+
608
+
609
+ ```ruby
610
+ def delete_service_by_id(options = Hash.new); end
611
+ ```
612
+
613
+ #### Parameters
614
+
615
+ | Parameter | Tags | Description |
616
+ |-----------|------|-------------|
617
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
618
+ | id | ``` Required ``` | TODO: Add a parameter description |
619
+
620
+
621
+ #### Example Usage
622
+
623
+ ```ruby
624
+ collect = Hash.new
625
+
626
+ authorization = 'Authorization'
627
+ collect['authorization'] = authorization
628
+
629
+ id = 'id'
630
+ collect['id'] = id
631
+
632
+
633
+ result = services.delete_service_by_id(collect)
634
+
635
+ ```
636
+
637
+ #### Errors
638
+
639
+ | Error Code | Error Description |
640
+ |------------|-------------------|
641
+ | 400 | Bad Request |
642
+ | 401 | Unauthorized/Missing Token |
643
+ | 403 | Forbidden |
644
+ | 404 | Not Found |
645
+ | 500 | Unexpected error |
646
+
647
+
648
+
649
+ #### <a name="update_service_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.update_service_by_id") update_service_by_id
650
+
651
+ > Update a Service with params.
652
+
653
+
654
+ ```ruby
655
+ def update_service_by_id(options = Hash.new); end
656
+ ```
657
+
658
+ #### Parameters
659
+
660
+ | Parameter | Tags | Description |
661
+ |-----------|------|-------------|
662
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
663
+ | id | ``` Required ``` | TODO: Add a parameter description |
664
+ | update_service_by_id_body | ``` Required ``` | the content of the request |
665
+
666
+
667
+ #### Example Usage
668
+
669
+ ```ruby
670
+ collect = Hash.new
671
+
672
+ authorization = 'Authorization'
673
+ collect['authorization'] = authorization
674
+
675
+ id = 'id'
676
+ collect['id'] = id
677
+
678
+ update_service_by_id_body = UpdateServiceByIdBody.new
679
+ collect['update_service_by_id_body'] = update_service_by_id_body
680
+
681
+
682
+ result = services.update_service_by_id(collect)
683
+
684
+ ```
685
+
686
+ #### Errors
687
+
688
+ | Error Code | Error Description |
689
+ |------------|-------------------|
690
+ | 400 | Bad Request |
691
+ | 401 | Unauthorized/Missing Token |
692
+ | 403 | Forbidden |
693
+ | 404 | Not Found |
694
+ | 422 | Unprocessable Entity |
695
+ | 500 | Unexpected error |
696
+
697
+
698
+
699
+ #### <a name="get_service_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.get_service_by_id") get_service_by_id
700
+
701
+ > Return a Service by id.
702
+
703
+
704
+ ```ruby
705
+ def get_service_by_id(options = Hash.new); end
706
+ ```
707
+
708
+ #### Parameters
709
+
710
+ | Parameter | Tags | Description |
711
+ |-----------|------|-------------|
712
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
713
+ | id | ``` Required ``` | TODO: Add a parameter description |
714
+
715
+
716
+ #### Example Usage
717
+
718
+ ```ruby
719
+ collect = Hash.new
720
+
721
+ authorization = 'Authorization'
722
+ collect['authorization'] = authorization
723
+
724
+ id = 'id'
725
+ collect['id'] = id
726
+
727
+
728
+ result = services.get_service_by_id(collect)
729
+
730
+ ```
731
+
732
+ #### Errors
733
+
734
+ | Error Code | Error Description |
735
+ |------------|-------------------|
736
+ | 400 | Bad Request |
737
+ | 401 | Unauthorized/Missing Token |
738
+ | 403 | Forbidden |
739
+ | 404 | Not Found |
740
+ | 500 | Unexpected error |
741
+
742
+
743
+
744
+ #### <a name="create_service"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.create_service") create_service
745
+
746
+ > Create a Service with params.
747
+
748
+
749
+ ```ruby
750
+ def create_service(options = Hash.new); end
751
+ ```
752
+
753
+ #### Parameters
754
+
755
+ | Parameter | Tags | Description |
756
+ |-----------|------|-------------|
757
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
758
+ | create_service_body | ``` Required ``` | the content of the request |
759
+
760
+
761
+ #### Example Usage
762
+
763
+ ```ruby
764
+ collect = Hash.new
765
+
766
+ authorization = 'Authorization'
767
+ collect['authorization'] = authorization
768
+
769
+ create_service_body = CreateServiceBody.new
770
+ collect['create_service_body'] = create_service_body
771
+
772
+
773
+ result = services.create_service(collect)
774
+
775
+ ```
776
+
777
+ #### Errors
778
+
779
+ | Error Code | Error Description |
780
+ |------------|-------------------|
781
+ | 400 | Bad Request |
782
+ | 401 | Unauthorized/Missing Token |
783
+ | 403 | Forbidden |
784
+ | 404 | Not Found |
785
+ | 422 | Unprocessable Entity |
786
+ | 500 | Unexpected error |
787
+
788
+
789
+
790
+ #### <a name="get_services"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.get_services") get_services
791
+
792
+ > Return list of Services.
793
+
794
+
795
+ ```ruby
796
+ def get_services(options = Hash.new); end
797
+ ```
798
+
799
+ #### Parameters
800
+
801
+ | Parameter | Tags | Description |
802
+ |-----------|------|-------------|
803
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
804
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
805
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
806
+ | user_id | ``` Optional ``` | Retrieve Services provided by the User specified by Id. You must be authorized to manage this User Id. |
807
+
808
+
809
+ #### Example Usage
810
+
811
+ ```ruby
812
+ collect = Hash.new
813
+
814
+ authorization = 'Authorization'
815
+ collect['authorization'] = authorization
816
+
817
+ page = 1
818
+ collect['page'] = page
819
+
820
+ per_page = 10
821
+ collect['per_page'] = per_page
822
+
823
+ user_id = 45
824
+ collect['user_id'] = user_id
825
+
826
+
827
+ result = services.get_services(collect)
828
+
829
+ ```
830
+
831
+ #### Errors
832
+
833
+ | Error Code | Error Description |
834
+ |------------|-------------------|
835
+ | 401 | Unauthorized/Missing Token |
836
+ | 403 | Forbidden |
837
+ | 404 | Not Found |
838
+ | 500 | Unexpected error |
839
+
840
+
841
+
842
+ #### <a name="get_service_available_slots_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ServicesController.get_service_available_slots_by_id") get_service_available_slots_by_id
843
+
844
+ > Return available times for a Service.
845
+
846
+
847
+ ```ruby
848
+ def get_service_available_slots_by_id(options = Hash.new); end
849
+ ```
850
+
851
+ #### Parameters
852
+
853
+ | Parameter | Tags | Description |
854
+ |-----------|------|-------------|
855
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
856
+ | id | ``` Required ``` | TODO: Add a parameter description |
857
+ | date | ``` Optional ``` | Date to check for availability. Either this field or a date range employing start_date and end_date must be supplied. If date is provided, start_date/end_date are ignored. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
858
+ | end_date | ``` Optional ``` | End Date of a range to check for availability. If supplied, date must not be supplied and start_date must be supplied. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
859
+ | start_date | ``` Optional ``` | Start Date of a range to check for availability. If supplied, date must not be supplied and end_date must be supplied. Several formats are supported: '2014-10-31', 'October 31, 2014'. |
860
+
861
+
862
+ #### Example Usage
863
+
864
+ ```ruby
865
+ collect = Hash.new
866
+
867
+ authorization = 'Authorization'
868
+ collect['authorization'] = authorization
869
+
870
+ id = 'id'
871
+ collect['id'] = id
872
+
873
+ date = DateTime.now
874
+ collect['date'] = date
875
+
876
+ end_date = DateTime.now
877
+ collect['end_date'] = end_date
878
+
879
+ start_date = DateTime.now
880
+ collect['start_date'] = start_date
881
+
882
+
883
+ result = services.get_service_available_slots_by_id(collect)
884
+
885
+ ```
886
+
887
+ #### Errors
888
+
889
+ | Error Code | Error Description |
890
+ |------------|-------------------|
891
+ | 400 | Bad Request |
892
+ | 401 | Unauthorized/Missing Token |
893
+ | 403 | Forbidden |
894
+ | 404 | Not Found |
895
+ | 500 | Unexpected error |
896
+
897
+
898
+
899
+ [Back to List of Controllers](#list_of_controllers)
900
+
901
+ ### <a name="search_controller"></a>![Class: ](http://apidocs.io/img/class.png ".SearchController") SearchController
902
+
903
+ #### Get singleton instance
904
+
905
+ The singleton instance of the ``` SearchController ``` class can be accessed from the API Client.
906
+
907
+ ```ruby
908
+ search = client.search
909
+ ```
910
+
911
+ #### <a name="search_query"></a>![Method: ](http://apidocs.io/img/method.png ".SearchController.search_query") search_query
912
+
913
+ > Search for Providers and Provided Services.
914
+
915
+
916
+ ```ruby
917
+ def search_query(options = Hash.new); end
918
+ ```
919
+
920
+ #### Parameters
921
+
922
+ | Parameter | Tags | Description |
923
+ |-----------|------|-------------|
924
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
925
+ | query | ``` Required ``` | TODO: Add a parameter description |
926
+
927
+
928
+ #### Example Usage
929
+
930
+ ```ruby
931
+ collect = Hash.new
932
+
933
+ authorization = 'Authorization'
934
+ collect['authorization'] = authorization
935
+
936
+ query = 'query'
937
+ collect['query'] = query
938
+
939
+
940
+ result = search.search_query(collect)
941
+
942
+ ```
943
+
944
+ #### Errors
945
+
946
+ | Error Code | Error Description |
947
+ |------------|-------------------|
948
+ | 400 | Bad Request |
949
+ | 401 | Unauthorized/Missing Token |
950
+ | 500 | Unexpected error |
951
+
952
+
953
+
954
+ [Back to List of Controllers](#list_of_controllers)
955
+
956
+ ### <a name="schedules_controller"></a>![Class: ](http://apidocs.io/img/class.png ".SchedulesController") SchedulesController
957
+
958
+ #### Get singleton instance
959
+
960
+ The singleton instance of the ``` SchedulesController ``` class can be accessed from the API Client.
961
+
962
+ ```ruby
963
+ schedules = client.schedules
964
+ ```
965
+
966
+ #### <a name="delete_schedule_time_window_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.delete_schedule_time_window_by_id") delete_schedule_time_window_by_id
967
+
968
+ > Delete a TimeWindow from a Schedule
969
+
970
+
971
+ ```ruby
972
+ def delete_schedule_time_window_by_id(options = Hash.new); end
973
+ ```
974
+
975
+ #### Parameters
976
+
977
+ | Parameter | Tags | Description |
978
+ |-----------|------|-------------|
979
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
980
+ | id | ``` Required ``` | TODO: Add a parameter description |
981
+ | time_window_id | ``` Required ``` | TODO: Add a parameter description |
982
+
983
+
984
+ #### Example Usage
985
+
986
+ ```ruby
987
+ collect = Hash.new
988
+
989
+ authorization = 'Authorization'
990
+ collect['authorization'] = authorization
991
+
992
+ id = 'id'
993
+ collect['id'] = id
994
+
995
+ time_window_id = 'time_window_id'
996
+ collect['time_window_id'] = time_window_id
997
+
998
+
999
+ result = schedules.delete_schedule_time_window_by_id(collect)
1000
+
1001
+ ```
1002
+
1003
+ #### Errors
1004
+
1005
+ | Error Code | Error Description |
1006
+ |------------|-------------------|
1007
+ | 400 | Bad Request |
1008
+ | 401 | Unauthorized/Missing Token |
1009
+ | 403 | Forbidden |
1010
+ | 404 | Not Found |
1011
+ | 500 | Unexpected error |
1012
+
1013
+
1014
+
1015
+ #### <a name="create_schedule_time_window"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.create_schedule_time_window") create_schedule_time_window
1016
+
1017
+ > Add a TimeWindow to a Schedule.
1018
+
1019
+
1020
+ ```ruby
1021
+ def create_schedule_time_window(options = Hash.new); end
1022
+ ```
1023
+
1024
+ #### Parameters
1025
+
1026
+ | Parameter | Tags | Description |
1027
+ |-----------|------|-------------|
1028
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1029
+ | create_schedule_time_window_body | ``` Required ``` | the content of the request |
1030
+ | id | ``` Required ``` | TODO: Add a parameter description |
1031
+
1032
+
1033
+ #### Example Usage
1034
+
1035
+ ```ruby
1036
+ collect = Hash.new
1037
+
1038
+ authorization = 'Authorization'
1039
+ collect['authorization'] = authorization
1040
+
1041
+ create_schedule_time_window_body = CreateScheduleTimeWindowBody.new
1042
+ collect['create_schedule_time_window_body'] = create_schedule_time_window_body
1043
+
1044
+ id = 'id'
1045
+ collect['id'] = id
1046
+
1047
+
1048
+ result = schedules.create_schedule_time_window(collect)
1049
+
1050
+ ```
1051
+
1052
+ #### Errors
1053
+
1054
+ | Error Code | Error Description |
1055
+ |------------|-------------------|
1056
+ | 400 | Bad Request |
1057
+ | 401 | Unauthorized/Missing Token |
1058
+ | 403 | Forbidden |
1059
+ | 404 | Not Found |
1060
+ | 422 | Unprocessable Entity |
1061
+ | 500 | Unexpected error |
1062
+
1063
+
1064
+
1065
+ #### <a name="delete_schedule_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.delete_schedule_by_id") delete_schedule_by_id
1066
+
1067
+ > Delete a Schedule
1068
+
1069
+
1070
+ ```ruby
1071
+ def delete_schedule_by_id(options = Hash.new); end
1072
+ ```
1073
+
1074
+ #### Parameters
1075
+
1076
+ | Parameter | Tags | Description |
1077
+ |-----------|------|-------------|
1078
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1079
+ | id | ``` Required ``` | TODO: Add a parameter description |
1080
+
1081
+
1082
+ #### Example Usage
1083
+
1084
+ ```ruby
1085
+ collect = Hash.new
1086
+
1087
+ authorization = 'Authorization'
1088
+ collect['authorization'] = authorization
1089
+
1090
+ id = 'id'
1091
+ collect['id'] = id
1092
+
1093
+
1094
+ result = schedules.delete_schedule_by_id(collect)
1095
+
1096
+ ```
1097
+
1098
+ #### Errors
1099
+
1100
+ | Error Code | Error Description |
1101
+ |------------|-------------------|
1102
+ | 400 | Bad Request |
1103
+ | 401 | Unauthorized/Missing Token |
1104
+ | 403 | Forbidden |
1105
+ | 404 | Not Found |
1106
+ | 500 | Unexpected error |
1107
+
1108
+
1109
+
1110
+ #### <a name="get_schedule_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.get_schedule_by_id") get_schedule_by_id
1111
+
1112
+ > Return a Schedule by id.
1113
+
1114
+
1115
+ ```ruby
1116
+ def get_schedule_by_id(options = Hash.new); end
1117
+ ```
1118
+
1119
+ #### Parameters
1120
+
1121
+ | Parameter | Tags | Description |
1122
+ |-----------|------|-------------|
1123
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1124
+ | id | ``` Required ``` | TODO: Add a parameter description |
1125
+
1126
+
1127
+ #### Example Usage
1128
+
1129
+ ```ruby
1130
+ collect = Hash.new
1131
+
1132
+ authorization = 'Authorization'
1133
+ collect['authorization'] = authorization
1134
+
1135
+ id = 'id'
1136
+ collect['id'] = id
1137
+
1138
+
1139
+ result = schedules.get_schedule_by_id(collect)
1140
+
1141
+ ```
1142
+
1143
+ #### Errors
1144
+
1145
+ | Error Code | Error Description |
1146
+ |------------|-------------------|
1147
+ | 400 | Bad Request |
1148
+ | 401 | Unauthorized/Missing Token |
1149
+ | 403 | Forbidden |
1150
+ | 404 | Not Found |
1151
+ | 410 | Gone |
1152
+ | 500 | Unexpected error |
1153
+
1154
+
1155
+
1156
+ #### <a name="create_schedule"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.create_schedule") create_schedule
1157
+
1158
+ > Create a Schedule with params.
1159
+
1160
+
1161
+ ```ruby
1162
+ def create_schedule(options = Hash.new); end
1163
+ ```
1164
+
1165
+ #### Parameters
1166
+
1167
+ | Parameter | Tags | Description |
1168
+ |-----------|------|-------------|
1169
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1170
+ | create_schedule_body | ``` Required ``` | the content of the request |
1171
+
1172
+
1173
+ #### Example Usage
1174
+
1175
+ ```ruby
1176
+ collect = Hash.new
1177
+
1178
+ authorization = 'Authorization'
1179
+ collect['authorization'] = authorization
1180
+
1181
+ create_schedule_body = CreateScheduleBody.new
1182
+ collect['create_schedule_body'] = create_schedule_body
1183
+
1184
+
1185
+ result = schedules.create_schedule(collect)
1186
+
1187
+ ```
1188
+
1189
+ #### Errors
1190
+
1191
+ | Error Code | Error Description |
1192
+ |------------|-------------------|
1193
+ | 400 | Bad Request |
1194
+ | 401 | Unauthorized/Missing Token |
1195
+ | 403 | Forbidden |
1196
+ | 404 | Not Found |
1197
+ | 422 | Unprocessable Entity |
1198
+ | 500 | Unexpected error |
1199
+
1200
+
1201
+
1202
+ #### <a name="update_schedule_time_window_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.update_schedule_time_window_by_id") update_schedule_time_window_by_id
1203
+
1204
+ > Update a TimeWindow for a Schedule.
1205
+
1206
+
1207
+ ```ruby
1208
+ def update_schedule_time_window_by_id(options = Hash.new); end
1209
+ ```
1210
+
1211
+ #### Parameters
1212
+
1213
+ | Parameter | Tags | Description |
1214
+ |-----------|------|-------------|
1215
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1216
+ | id | ``` Required ``` | TODO: Add a parameter description |
1217
+ | time_window_id | ``` Required ``` | TODO: Add a parameter description |
1218
+ | update_schedule_time_window_by_id_body | ``` Required ``` | the content of the request |
1219
+
1220
+
1221
+ #### Example Usage
1222
+
1223
+ ```ruby
1224
+ collect = Hash.new
1225
+
1226
+ authorization = 'Authorization'
1227
+ collect['authorization'] = authorization
1228
+
1229
+ id = 'id'
1230
+ collect['id'] = id
1231
+
1232
+ time_window_id = 'time_window_id'
1233
+ collect['time_window_id'] = time_window_id
1234
+
1235
+ update_schedule_time_window_by_id_body = UpdateScheduleTimeWindowByIdBody.new
1236
+ collect['update_schedule_time_window_by_id_body'] = update_schedule_time_window_by_id_body
1237
+
1238
+
1239
+ result = schedules.update_schedule_time_window_by_id(collect)
1240
+
1241
+ ```
1242
+
1243
+ #### Errors
1244
+
1245
+ | Error Code | Error Description |
1246
+ |------------|-------------------|
1247
+ | 400 | Bad Request |
1248
+ | 401 | Unauthorized/Missing Token |
1249
+ | 403 | Forbidden |
1250
+ | 404 | Not Found |
1251
+ | 422 | Unprocessable Entity |
1252
+ | 500 | Unexpected error |
1253
+
1254
+
1255
+
1256
+ #### <a name="get_schedules"></a>![Method: ](http://apidocs.io/img/method.png ".SchedulesController.get_schedules") get_schedules
1257
+
1258
+ > Return all Schedules that your account has access to. Includes Schedules for your own User as well as any Users for which you are the Account Manager.
1259
+
1260
+
1261
+ ```ruby
1262
+ def get_schedules(options = Hash.new); end
1263
+ ```
1264
+
1265
+ #### Parameters
1266
+
1267
+ | Parameter | Tags | Description |
1268
+ |-----------|------|-------------|
1269
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1270
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
1271
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
1272
+ | user_id | ``` Optional ``` | Retrieve Schedules owned only by this User Id. You must be authorized to manage this User Id. |
1273
+
1274
+
1275
+ #### Example Usage
1276
+
1277
+ ```ruby
1278
+ collect = Hash.new
1279
+
1280
+ authorization = 'Authorization'
1281
+ collect['authorization'] = authorization
1282
+
1283
+ page = 1
1284
+ collect['page'] = page
1285
+
1286
+ per_page = 10
1287
+ collect['per_page'] = per_page
1288
+
1289
+ user_id = 45
1290
+ collect['user_id'] = user_id
1291
+
1292
+
1293
+ result = schedules.get_schedules(collect)
1294
+
1295
+ ```
1296
+
1297
+ #### Errors
1298
+
1299
+ | Error Code | Error Description |
1300
+ |------------|-------------------|
1301
+ | 400 | Bad Request |
1302
+ | 401 | Unauthorized/Missing Token |
1303
+ | 403 | Forbidden |
1304
+ | 404 | Not Found |
1305
+ | 500 | Unexpected error |
1306
+
1307
+
1308
+
1309
+ [Back to List of Controllers](#list_of_controllers)
1310
+
1311
+ ### <a name="resources_controller"></a>![Class: ](http://apidocs.io/img/class.png ".ResourcesController") ResourcesController
1312
+
1313
+ #### Get singleton instance
1314
+
1315
+ The singleton instance of the ``` ResourcesController ``` class can be accessed from the API Client.
1316
+
1317
+ ```ruby
1318
+ resources = client.resources
1319
+ ```
1320
+
1321
+ #### <a name="delete_resource_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.delete_resource_by_id") delete_resource_by_id
1322
+
1323
+ > Delete a Resource by id
1324
+
1325
+
1326
+ ```ruby
1327
+ def delete_resource_by_id(options = Hash.new); end
1328
+ ```
1329
+
1330
+ #### Parameters
1331
+
1332
+ | Parameter | Tags | Description |
1333
+ |-----------|------|-------------|
1334
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1335
+ | id | ``` Required ``` | TODO: Add a parameter description |
1336
+
1337
+
1338
+ #### Example Usage
1339
+
1340
+ ```ruby
1341
+ collect = Hash.new
1342
+
1343
+ authorization = 'Authorization'
1344
+ collect['authorization'] = authorization
1345
+
1346
+ id = 'id'
1347
+ collect['id'] = id
1348
+
1349
+
1350
+ result = resources.delete_resource_by_id(collect)
1351
+
1352
+ ```
1353
+
1354
+ #### Errors
1355
+
1356
+ | Error Code | Error Description |
1357
+ |------------|-------------------|
1358
+ | 400 | Bad Request |
1359
+ | 401 | Unauthorized/Missing Token |
1360
+ | 403 | Forbidden |
1361
+ | 404 | Not Found |
1362
+ | 500 | Unexpected error |
1363
+
1364
+
1365
+
1366
+ #### <a name="update_resource_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.update_resource_by_id") update_resource_by_id
1367
+
1368
+ > Update a Resource by id, with params
1369
+
1370
+
1371
+ ```ruby
1372
+ def update_resource_by_id(options = Hash.new); end
1373
+ ```
1374
+
1375
+ #### Parameters
1376
+
1377
+ | Parameter | Tags | Description |
1378
+ |-----------|------|-------------|
1379
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1380
+ | id | ``` Required ``` | TODO: Add a parameter description |
1381
+ | update_resource_by_id_body | ``` Required ``` | the content of the request |
1382
+
1383
+
1384
+ #### Example Usage
1385
+
1386
+ ```ruby
1387
+ collect = Hash.new
1388
+
1389
+ authorization = 'Authorization'
1390
+ collect['authorization'] = authorization
1391
+
1392
+ id = 'id'
1393
+ collect['id'] = id
1394
+
1395
+ update_resource_by_id_body = UpdateResourceByIdBody.new
1396
+ collect['update_resource_by_id_body'] = update_resource_by_id_body
1397
+
1398
+
1399
+ result = resources.update_resource_by_id(collect)
1400
+
1401
+ ```
1402
+
1403
+ #### Errors
1404
+
1405
+ | Error Code | Error Description |
1406
+ |------------|-------------------|
1407
+ | 400 | Bad Request |
1408
+ | 401 | Unauthorized/Missing Token |
1409
+ | 403 | Forbidden |
1410
+ | 404 | Not Found |
1411
+ | 422 | Unprocessable Entity |
1412
+ | 500 | Unexpected error |
1413
+
1414
+
1415
+
1416
+ #### <a name="get_resource_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.get_resource_by_id") get_resource_by_id
1417
+
1418
+ > Return a Resource by id.
1419
+
1420
+
1421
+ ```ruby
1422
+ def get_resource_by_id(options = Hash.new); end
1423
+ ```
1424
+
1425
+ #### Parameters
1426
+
1427
+ | Parameter | Tags | Description |
1428
+ |-----------|------|-------------|
1429
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1430
+ | id | ``` Required ``` | TODO: Add a parameter description |
1431
+
1432
+
1433
+ #### Example Usage
1434
+
1435
+ ```ruby
1436
+ collect = Hash.new
1437
+
1438
+ authorization = 'Authorization'
1439
+ collect['authorization'] = authorization
1440
+
1441
+ id = 'id'
1442
+ collect['id'] = id
1443
+
1444
+
1445
+ result = resources.get_resource_by_id(collect)
1446
+
1447
+ ```
1448
+
1449
+ #### Errors
1450
+
1451
+ | Error Code | Error Description |
1452
+ |------------|-------------------|
1453
+ | 400 | Bad Request |
1454
+ | 401 | Unauthorized/Missing Token |
1455
+ | 403 | Forbidden |
1456
+ | 404 | Not Found |
1457
+ | 500 | Unexpected error |
1458
+
1459
+
1460
+
1461
+ #### <a name="get_resource_things"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.get_resource_things") get_resource_things
1462
+
1463
+ > Return all Resource Things.
1464
+
1465
+
1466
+ ```ruby
1467
+ def get_resource_things(options = Hash.new); end
1468
+ ```
1469
+
1470
+ #### Parameters
1471
+
1472
+ | Parameter | Tags | Description |
1473
+ |-----------|------|-------------|
1474
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1475
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
1476
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
1477
+
1478
+
1479
+ #### Example Usage
1480
+
1481
+ ```ruby
1482
+ collect = Hash.new
1483
+
1484
+ authorization = 'Authorization'
1485
+ collect['authorization'] = authorization
1486
+
1487
+ page = 1
1488
+ collect['page'] = page
1489
+
1490
+ per_page = 10
1491
+ collect['per_page'] = per_page
1492
+
1493
+
1494
+ result = resources.get_resource_things(collect)
1495
+
1496
+ ```
1497
+
1498
+ #### Errors
1499
+
1500
+ | Error Code | Error Description |
1501
+ |------------|-------------------|
1502
+ | 400 | Bad Request |
1503
+ | 401 | Unauthorized/Missing Token |
1504
+ | 403 | Forbidden |
1505
+ | 500 | Unexpected error |
1506
+
1507
+
1508
+
1509
+ #### <a name="create_resource"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.create_resource") create_resource
1510
+
1511
+ > Create a Resource with params
1512
+
1513
+
1514
+ ```ruby
1515
+ def create_resource(options = Hash.new); end
1516
+ ```
1517
+
1518
+ #### Parameters
1519
+
1520
+ | Parameter | Tags | Description |
1521
+ |-----------|------|-------------|
1522
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1523
+ | create_resource_body | ``` Required ``` | the content of the request |
1524
+
1525
+
1526
+ #### Example Usage
1527
+
1528
+ ```ruby
1529
+ collect = Hash.new
1530
+
1531
+ authorization = 'Authorization'
1532
+ collect['authorization'] = authorization
1533
+
1534
+ create_resource_body = CreateResourceBody.new
1535
+ collect['create_resource_body'] = create_resource_body
1536
+
1537
+
1538
+ result = resources.create_resource(collect)
1539
+
1540
+ ```
1541
+
1542
+ #### Errors
1543
+
1544
+ | Error Code | Error Description |
1545
+ |------------|-------------------|
1546
+ | 400 | Bad Request |
1547
+ | 401 | Unauthorized/Missing Token |
1548
+ | 403 | Forbidden |
1549
+ | 422 | Unprocessable Entity |
1550
+ | 500 | Unexpected error |
1551
+
1552
+
1553
+
1554
+ #### <a name="get_resources"></a>![Method: ](http://apidocs.io/img/method.png ".ResourcesController.get_resources") get_resources
1555
+
1556
+ > Return list of Resources.
1557
+
1558
+
1559
+ ```ruby
1560
+ def get_resources(options = Hash.new); end
1561
+ ```
1562
+
1563
+ #### Parameters
1564
+
1565
+ | Parameter | Tags | Description |
1566
+ |-----------|------|-------------|
1567
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1568
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
1569
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
1570
+ | user_id | ``` Optional ``` | Retrieve Resources owned only by this User Id. You must be authorized to manage this User Id. |
1571
+
1572
+
1573
+ #### Example Usage
1574
+
1575
+ ```ruby
1576
+ collect = Hash.new
1577
+
1578
+ authorization = 'Authorization'
1579
+ collect['authorization'] = authorization
1580
+
1581
+ page = 1
1582
+ collect['page'] = page
1583
+
1584
+ per_page = 10
1585
+ collect['per_page'] = per_page
1586
+
1587
+ user_id = 45
1588
+ collect['user_id'] = user_id
1589
+
1590
+
1591
+ result = resources.get_resources(collect)
1592
+
1593
+ ```
1594
+
1595
+ #### Errors
1596
+
1597
+ | Error Code | Error Description |
1598
+ |------------|-------------------|
1599
+ | 401 | Unauthorized/Missing Token |
1600
+ | 403 | Forbidden |
1601
+ | 404 | Not Found |
1602
+ | 500 | Unexpected error |
1603
+
1604
+
1605
+
1606
+ [Back to List of Controllers](#list_of_controllers)
1607
+
1608
+ ### <a name="pricing_models_controller"></a>![Class: ](http://apidocs.io/img/class.png ".PricingModelsController") PricingModelsController
1609
+
1610
+ #### Get singleton instance
1611
+
1612
+ The singleton instance of the ``` PricingModelsController ``` class can be accessed from the API Client.
1613
+
1614
+ ```ruby
1615
+ pricingModels = client.pricing_models
1616
+ ```
1617
+
1618
+ #### <a name="update_pricing_model_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".PricingModelsController.update_pricing_model_by_id") update_pricing_model_by_id
1619
+
1620
+ > Update a PricingModel by id, with params
1621
+
1622
+
1623
+ ```ruby
1624
+ def update_pricing_model_by_id(options = Hash.new); end
1625
+ ```
1626
+
1627
+ #### Parameters
1628
+
1629
+ | Parameter | Tags | Description |
1630
+ |-----------|------|-------------|
1631
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1632
+ | id | ``` Required ``` | TODO: Add a parameter description |
1633
+ | update_pricing_model_by_id_body | ``` Required ``` | the content of the request |
1634
+
1635
+
1636
+ #### Example Usage
1637
+
1638
+ ```ruby
1639
+ collect = Hash.new
1640
+
1641
+ authorization = 'Authorization'
1642
+ collect['authorization'] = authorization
1643
+
1644
+ id = 'id'
1645
+ collect['id'] = id
1646
+
1647
+ update_pricing_model_by_id_body = UpdatePricingModelByIdBody.new
1648
+ collect['update_pricing_model_by_id_body'] = update_pricing_model_by_id_body
1649
+
1650
+
1651
+ result = pricingModels.update_pricing_model_by_id(collect)
1652
+
1653
+ ```
1654
+
1655
+ #### Errors
1656
+
1657
+ | Error Code | Error Description |
1658
+ |------------|-------------------|
1659
+ | 400 | Bad Request |
1660
+ | 401 | Unauthorized/Missing Token |
1661
+ | 403 | Forbidden |
1662
+ | 404 | Not Found |
1663
+ | 422 | Unprocessable Entity |
1664
+ | 500 | Unexpected error |
1665
+
1666
+
1667
+
1668
+ #### <a name="get_pricing_model_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".PricingModelsController.get_pricing_model_by_id") get_pricing_model_by_id
1669
+
1670
+ > Return a PricingModel by id.
1671
+
1672
+
1673
+ ```ruby
1674
+ def get_pricing_model_by_id(options = Hash.new); end
1675
+ ```
1676
+
1677
+ #### Parameters
1678
+
1679
+ | Parameter | Tags | Description |
1680
+ |-----------|------|-------------|
1681
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1682
+ | id | ``` Required ``` | TODO: Add a parameter description |
1683
+
1684
+
1685
+ #### Example Usage
1686
+
1687
+ ```ruby
1688
+ collect = Hash.new
1689
+
1690
+ authorization = 'Authorization'
1691
+ collect['authorization'] = authorization
1692
+
1693
+ id = 'id'
1694
+ collect['id'] = id
1695
+
1696
+
1697
+ result = pricingModels.get_pricing_model_by_id(collect)
1698
+
1699
+ ```
1700
+
1701
+ #### Errors
1702
+
1703
+ | Error Code | Error Description |
1704
+ |------------|-------------------|
1705
+ | 400 | Bad Request |
1706
+ | 401 | Unauthorized/Missing Token |
1707
+ | 403 | Forbidden |
1708
+ | 404 | Not Found |
1709
+ | 500 | Unexpected error |
1710
+
1711
+
1712
+
1713
+ #### <a name="create_pricing_model"></a>![Method: ](http://apidocs.io/img/method.png ".PricingModelsController.create_pricing_model") create_pricing_model
1714
+
1715
+ > Create a PricingModel with params
1716
+
1717
+
1718
+ ```ruby
1719
+ def create_pricing_model(options = Hash.new); end
1720
+ ```
1721
+
1722
+ #### Parameters
1723
+
1724
+ | Parameter | Tags | Description |
1725
+ |-----------|------|-------------|
1726
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1727
+ | create_pricing_model_body | ``` Required ``` | the content of the request |
1728
+
1729
+
1730
+ #### Example Usage
1731
+
1732
+ ```ruby
1733
+ collect = Hash.new
1734
+
1735
+ authorization = 'Authorization'
1736
+ collect['authorization'] = authorization
1737
+
1738
+ create_pricing_model_body = CreatePricingModelBody.new
1739
+ collect['create_pricing_model_body'] = create_pricing_model_body
1740
+
1741
+
1742
+ result = pricingModels.create_pricing_model(collect)
1743
+
1744
+ ```
1745
+
1746
+ #### Errors
1747
+
1748
+ | Error Code | Error Description |
1749
+ |------------|-------------------|
1750
+ | 400 | Bad Request |
1751
+ | 401 | Unauthorized/Missing Token |
1752
+ | 403 | Forbidden |
1753
+ | 422 | Unprocessable Entity |
1754
+ | 500 | Unexpected error |
1755
+
1756
+
1757
+
1758
+ #### <a name="get_pricing_models"></a>![Method: ](http://apidocs.io/img/method.png ".PricingModelsController.get_pricing_models") get_pricing_models
1759
+
1760
+ > Return list of PricingModels.
1761
+
1762
+
1763
+ ```ruby
1764
+ def get_pricing_models(options = Hash.new); end
1765
+ ```
1766
+
1767
+ #### Parameters
1768
+
1769
+ | Parameter | Tags | Description |
1770
+ |-----------|------|-------------|
1771
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1772
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
1773
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
1774
+ | user_id | ``` Optional ``` | Retrieve PricingModels owned only by this User Id. You must be authorized to manage this User Id. |
1775
+
1776
+
1777
+ #### Example Usage
1778
+
1779
+ ```ruby
1780
+ collect = Hash.new
1781
+
1782
+ authorization = 'Authorization'
1783
+ collect['authorization'] = authorization
1784
+
1785
+ page = 1
1786
+ collect['page'] = page
1787
+
1788
+ per_page = 10
1789
+ collect['per_page'] = per_page
1790
+
1791
+ user_id = 136
1792
+ collect['user_id'] = user_id
1793
+
1794
+
1795
+ result = pricingModels.get_pricing_models(collect)
1796
+
1797
+ ```
1798
+
1799
+ #### Errors
1800
+
1801
+ | Error Code | Error Description |
1802
+ |------------|-------------------|
1803
+ | 401 | Unauthorized/Missing Token |
1804
+ | 403 | Forbidden |
1805
+ | 404 | Not Found |
1806
+ | 500 | Unexpected error |
1807
+
1808
+
1809
+
1810
+ [Back to List of Controllers](#list_of_controllers)
1811
+
1812
+ ### <a name="categories_controller"></a>![Class: ](http://apidocs.io/img/class.png ".CategoriesController") CategoriesController
1813
+
1814
+ #### Get singleton instance
1815
+
1816
+ The singleton instance of the ``` CategoriesController ``` class can be accessed from the API Client.
1817
+
1818
+ ```ruby
1819
+ categories = client.categories
1820
+ ```
1821
+
1822
+ #### <a name="get_category_by_id"></a>![Method: ](http://apidocs.io/img/method.png ".CategoriesController.get_category_by_id") get_category_by_id
1823
+
1824
+ > Return a Category by id.
1825
+
1826
+
1827
+ ```ruby
1828
+ def get_category_by_id(options = Hash.new); end
1829
+ ```
1830
+
1831
+ #### Parameters
1832
+
1833
+ | Parameter | Tags | Description |
1834
+ |-----------|------|-------------|
1835
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1836
+ | id | ``` Required ``` | TODO: Add a parameter description |
1837
+
1838
+
1839
+ #### Example Usage
1840
+
1841
+ ```ruby
1842
+ collect = Hash.new
1843
+
1844
+ authorization = 'Authorization'
1845
+ collect['authorization'] = authorization
1846
+
1847
+ id = 'id'
1848
+ collect['id'] = id
1849
+
1850
+
1851
+ result = categories.get_category_by_id(collect)
1852
+
1853
+ ```
1854
+
1855
+ #### Errors
1856
+
1857
+ | Error Code | Error Description |
1858
+ |------------|-------------------|
1859
+ | 400 | Bad Request |
1860
+ | 401 | Unauthorized/Missing Token |
1861
+ | 403 | Forbidden |
1862
+ | 404 | Not Found |
1863
+ | 500 | Unexpected error |
1864
+
1865
+
1866
+
1867
+ #### <a name="create_category"></a>![Method: ](http://apidocs.io/img/method.png ".CategoriesController.create_category") create_category
1868
+
1869
+ > Create a Category
1870
+
1871
+
1872
+ ```ruby
1873
+ def create_category(options = Hash.new); end
1874
+ ```
1875
+
1876
+ #### Parameters
1877
+
1878
+ | Parameter | Tags | Description |
1879
+ |-----------|------|-------------|
1880
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1881
+ | create_category_body | ``` Required ``` | the content of the request |
1882
+
1883
+
1884
+ #### Example Usage
1885
+
1886
+ ```ruby
1887
+ collect = Hash.new
1888
+
1889
+ authorization = 'Authorization'
1890
+ collect['authorization'] = authorization
1891
+
1892
+ create_category_body = CreateCategoryBody.new
1893
+ collect['create_category_body'] = create_category_body
1894
+
1895
+
1896
+ result = categories.create_category(collect)
1897
+
1898
+ ```
1899
+
1900
+ #### Errors
1901
+
1902
+ | Error Code | Error Description |
1903
+ |------------|-------------------|
1904
+ | 400 | Bad Request |
1905
+ | 401 | Unauthorized/Missing Token |
1906
+ | 403 | Forbidden |
1907
+ | 422 | Unprocessable Entity |
1908
+ | 500 | Unexpected error |
1909
+
1910
+
1911
+
1912
+ #### <a name="get_categories"></a>![Method: ](http://apidocs.io/img/method.png ".CategoriesController.get_categories") get_categories
1913
+
1914
+ > Return list of Categories.
1915
+
1916
+
1917
+ ```ruby
1918
+ def get_categories(options = Hash.new); end
1919
+ ```
1920
+
1921
+ #### Parameters
1922
+
1923
+ | Parameter | Tags | Description |
1924
+ |-----------|------|-------------|
1925
+ | authorization | ``` Required ``` | A valid API key, in the format 'Token API_KEY' |
1926
+ | page | ``` Optional ``` ``` DefaultValue ``` | Page offset to fetch. |
1927
+ | per_page | ``` Optional ``` ``` DefaultValue ``` | Number of results to return per page. |
1928
+ | user_id | ``` Optional ``` | Retrieve Categories of all services provided by this User Id. You must be authorized to manage this User Id. |
1929
+
1930
+
1931
+ #### Example Usage
1932
+
1933
+ ```ruby
1934
+ collect = Hash.new
1935
+
1936
+ authorization = 'Authorization'
1937
+ collect['authorization'] = authorization
1938
+
1939
+ page = 1
1940
+ collect['page'] = page
1941
+
1942
+ per_page = 10
1943
+ collect['per_page'] = per_page
1944
+
1945
+ user_id = 136
1946
+ collect['user_id'] = user_id
1947
+
1948
+
1949
+ result = categories.get_categories(collect)
1950
+
1951
+ ```
1952
+
1953
+ #### Errors
1954
+
1955
+ | Error Code | Error Description |
1956
+ |------------|-------------------|
1957
+ | 400 | Bad Request |
1958
+ | 401 | Unauthorized/Missing Token |
1959
+ | 403 | Forbidden |
1960
+ | 500 | Unexpected error |
1961
+
1962
+
1963
+ [Back to List of Controllers](#list_of_controllers)