Completed
Push — master ( 212bcc...86d4f9 )
by
unknown
15:01
created

ProductCatalog::createHotel()   B

Complexity

Conditions 2
Paths 2

Size

Total Lines 33
Code Lines 27

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 33
rs 8.8571
cc 2
eloc 27
nc 2
nop 3
1
<?php
2
/**
3
 * Copyright (c) 2015-present, Facebook, Inc. All rights reserved.
4
 *
5
 * You are hereby granted a non-exclusive, worldwide, royalty-free license to
6
 * use, copy, modify, and distribute this software in source code or binary
7
 * form for use in connection with the web services and APIs provided by
8
 * Facebook.
9
 *
10
 * As with any software that integrates with the Facebook platform, your use
11
 * of this software is subject to the Facebook Developer Principles and
12
 * Policies [http://developers.facebook.com/policy/]. This copyright notice
13
 * shall be included in all copies or substantial portions of the software.
14
 *
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
 * DEALINGS IN THE SOFTWARE.
22
 *
23
 */
24
25
namespace FacebookAds\Object;
26
27
use FacebookAds\ApiRequest;
28
use FacebookAds\Cursor;
29
use FacebookAds\Http\RequestInterface;
30
use FacebookAds\TypeChecker;
31
use FacebookAds\Object\Fields\ProductCatalogFields;
32
use FacebookAds\Object\Values\AdVideoContentCategoryValues;
33
use FacebookAds\Object\Values\AdVideoUnpublishedContentTypeValues;
34
use FacebookAds\Object\Values\AdVideoUploadPhaseValues;
35
use FacebookAds\Object\Values\ProductCatalogHotelRoomsBatchStandardValues;
36
use FacebookAds\Object\Values\ProductCatalogVerticalValues;
37
use FacebookAds\Object\Values\ProductFeedDelimiterValues;
38
use FacebookAds\Object\Values\ProductFeedEncodingValues;
39
use FacebookAds\Object\Values\ProductFeedQuotedFieldsModeValues;
40
use FacebookAds\Object\Values\ProductItemAvailabilityValues;
41
use FacebookAds\Object\Values\ProductItemConditionValues;
42
use FacebookAds\Object\Values\ProductItemGenderValues;
43
use FacebookAds\Object\Values\ProductItemVisibilityValues;
44
45
/**
46
 * This class is auto-genereated.
47
 *
48
 * For any issues or feature requests related to this class, please let us know
49
 * on github and we'll fix in our codegen framework. We'll not be able to accept
50
 * pull request for this class.
51
 *
52
 */
53
54
class ProductCatalog extends AbstractCrudObject {
55
56
  protected function getEndpoint() {
57
    return 'product_catalogs';
58
  }
59
60
  /**
61
   * @return ProductCatalogFields
62
   */
63
  public static function getFieldsEnum() {
64
    return ProductCatalogFields::getInstance();
65
  }
66
67
  protected static function getReferencedEnums() {
68
    $ref_enums = array();
69
    $ref_enums['Vertical'] = ProductCatalogVerticalValues::getInstance()->getValues();
70
    return $ref_enums;
71
  }
72
73
74
  public function getAgencies(array $fields = array(), array $params = array(), $pending = false) {
75
    $this->assureId();
76
77
    $param_types = array(
78
    );
79
    $enums = array(
80
    );
81
82
    $request = new ApiRequest(
83
      $this->api,
84
      $this->data['id'],
85
      RequestInterface::METHOD_GET,
86
      '/agencies',
87
      new Business(),
88
      'EDGE',
89
      Business::getFieldsEnum()->getValues(),
90
      new TypeChecker($param_types, $enums)
91
    );
92
    $request->addParams($params);
93
    $request->addFields($fields);
94
    return $pending ? $request : $request->execute();
95
  }
96
97
  public function getExternalEventSources(array $fields = array(), array $params = array(), $pending = false) {
98
    $this->assureId();
99
100
    $param_types = array(
101
    );
102
    $enums = array(
103
    );
104
105
    $request = new ApiRequest(
106
      $this->api,
107
      $this->data['id'],
108
      RequestInterface::METHOD_GET,
109
      '/external_event_sources',
110
      new ExternalEventSource(),
111
      'EDGE',
112
      ExternalEventSource::getFieldsEnum()->getValues(),
113
      new TypeChecker($param_types, $enums)
114
    );
115
    $request->addParams($params);
116
    $request->addFields($fields);
117
    return $pending ? $request : $request->execute();
118
  }
119
120
  public function createExternalEventSource(array $fields = array(), array $params = array(), $pending = false) {
121
    $this->assureId();
122
123
    $param_types = array(
124
      'external_event_sources' => 'list<string>',
125
    );
126
    $enums = array(
127
    );
128
129
    $request = new ApiRequest(
130
      $this->api,
131
      $this->data['id'],
132
      RequestInterface::METHOD_POST,
133
      '/external_event_sources',
134
      new ExternalEventSource(),
135
      'EDGE',
136
      ExternalEventSource::getFieldsEnum()->getValues(),
137
      new TypeChecker($param_types, $enums)
138
    );
139
    $request->addParams($params);
140
    $request->addFields($fields);
141
    return $pending ? $request : $request->execute();
142
  }
143
144
  public function getHotelRoomsBatch(array $fields = array(), array $params = array(), $pending = false) {
145
    $this->assureId();
146
147
    $param_types = array(
148
      'handle' => 'string',
149
    );
150
    $enums = array(
151
    );
152
153
    $request = new ApiRequest(
154
      $this->api,
155
      $this->data['id'],
156
      RequestInterface::METHOD_GET,
157
      '/hotel_rooms_batch',
158
      new ProductCatalogHotelRoomsBatch(),
159
      'EDGE',
160
      ProductCatalogHotelRoomsBatch::getFieldsEnum()->getValues(),
161
      new TypeChecker($param_types, $enums)
162
    );
163
    $request->addParams($params);
164
    $request->addFields($fields);
165
    return $pending ? $request : $request->execute();
166
  }
167
168
  public function createHotelRoomsBatch(array $fields = array(), array $params = array(), $pending = false) {
169
    $this->assureId();
170
171
    $param_types = array(
172
      'file' => 'file',
173
      'standard' => 'standard_enum',
174
      'update_only' => 'bool',
175
    );
176
    $enums = array(
177
      'standard_enum' => ProductCatalogHotelRoomsBatchStandardValues::getInstance()->getValues(),
178
    );
179
180
    $request = new ApiRequest(
181
      $this->api,
182
      $this->data['id'],
183
      RequestInterface::METHOD_POST,
184
      '/hotel_rooms_batch',
185
      new ProductCatalogHotelRoomsBatch(),
186
      'EDGE',
187
      ProductCatalogHotelRoomsBatch::getFieldsEnum()->getValues(),
188
      new TypeChecker($param_types, $enums)
189
    );
190
    $request->addParams($params);
191
    $request->addFields($fields);
192
    return $pending ? $request : $request->execute();
193
  }
194
195
  public function getHotels(array $fields = array(), array $params = array(), $pending = false) {
196
    $this->assureId();
197
198
    $param_types = array(
199
    );
200
    $enums = array(
201
    );
202
203
    $request = new ApiRequest(
204
      $this->api,
205
      $this->data['id'],
206
      RequestInterface::METHOD_GET,
207
      '/hotels',
208
      new Hotel(),
209
      'EDGE',
210
      Hotel::getFieldsEnum()->getValues(),
211
      new TypeChecker($param_types, $enums)
212
    );
213
    $request->addParams($params);
214
    $request->addFields($fields);
215
    return $pending ? $request : $request->execute();
216
  }
217
218
  public function createHotel(array $fields = array(), array $params = array(), $pending = false) {
219
    $this->assureId();
220
221
    $param_types = array(
222
      'address' => 'Object',
223
      'applinks' => 'Object',
224
      'brand' => 'string',
225
      'description' => 'string',
226
      'guest_ratings' => 'list<Object>',
227
      'hotel_id' => 'string',
228
      'images' => 'list<Object>',
229
      'name' => 'string',
230
      'phone' => 'string',
231
      'star_rating' => 'float',
232
      'url' => 'string',
233
    );
234
    $enums = array(
235
    );
236
237
    $request = new ApiRequest(
238
      $this->api,
239
      $this->data['id'],
240
      RequestInterface::METHOD_POST,
241
      '/hotels',
242
      new Hotel(),
243
      'EDGE',
244
      Hotel::getFieldsEnum()->getValues(),
245
      new TypeChecker($param_types, $enums)
246
    );
247
    $request->addParams($params);
248
    $request->addFields($fields);
249
    return $pending ? $request : $request->execute();
250
  }
251
252
  public function getPricingVariablesBatch(array $fields = array(), array $params = array(), $pending = false) {
253
    $this->assureId();
254
255
    $param_types = array(
256
      'handle' => 'string',
257
    );
258
    $enums = array(
259
    );
260
261
    $request = new ApiRequest(
262
      $this->api,
263
      $this->data['id'],
264
      RequestInterface::METHOD_GET,
265
      '/pricing_variables_batch',
266
      new AbstractCrudObject(),
267
      'EDGE',
268
      array(),
269
      new TypeChecker($param_types, $enums)
270
    );
271
    $request->addParams($params);
272
    $request->addFields($fields);
273
    return $pending ? $request : $request->execute();
274
  }
275
276
  public function getProductFeeds(array $fields = array(), array $params = array(), $pending = false) {
277
    $this->assureId();
278
279
    $param_types = array(
280
    );
281
    $enums = array(
282
    );
283
284
    $request = new ApiRequest(
285
      $this->api,
286
      $this->data['id'],
287
      RequestInterface::METHOD_GET,
288
      '/product_feeds',
289
      new ProductFeed(),
290
      'EDGE',
291
      ProductFeed::getFieldsEnum()->getValues(),
292
      new TypeChecker($param_types, $enums)
293
    );
294
    $request->addParams($params);
295
    $request->addFields($fields);
296
    return $pending ? $request : $request->execute();
297
  }
298
299
  public function createProductFeed(array $fields = array(), array $params = array(), $pending = false) {
300
    $this->assureId();
301
302
    $param_types = array(
303
      'country' => 'string',
304
      'default_currency' => 'string',
305
      'deletion_enabled' => 'bool',
306
      'delimiter' => 'delimiter_enum',
307
      'encoding' => 'encoding_enum',
308
      'file_name' => 'string',
309
      'name' => 'string',
310
      'quoted_fields_mode' => 'quoted_fields_mode_enum',
311
      'schedule' => 'string',
312
    );
313
    $enums = array(
314
      'delimiter_enum' => ProductFeedDelimiterValues::getInstance()->getValues(),
315
      'encoding_enum' => ProductFeedEncodingValues::getInstance()->getValues(),
316
      'quoted_fields_mode_enum' => ProductFeedQuotedFieldsModeValues::getInstance()->getValues(),
317
    );
318
319
    $request = new ApiRequest(
320
      $this->api,
321
      $this->data['id'],
322
      RequestInterface::METHOD_POST,
323
      '/product_feeds',
324
      new ProductFeed(),
325
      'EDGE',
326
      ProductFeed::getFieldsEnum()->getValues(),
327
      new TypeChecker($param_types, $enums)
328
    );
329
    $request->addParams($params);
330
    $request->addFields($fields);
331
    return $pending ? $request : $request->execute();
332
  }
333
334
  public function getProductGroups(array $fields = array(), array $params = array(), $pending = false) {
335
    $this->assureId();
336
337
    $param_types = array(
338
    );
339
    $enums = array(
340
    );
341
342
    $request = new ApiRequest(
343
      $this->api,
344
      $this->data['id'],
345
      RequestInterface::METHOD_GET,
346
      '/product_groups',
347
      new ProductGroup(),
348
      'EDGE',
349
      ProductGroup::getFieldsEnum()->getValues(),
350
      new TypeChecker($param_types, $enums)
351
    );
352
    $request->addParams($params);
353
    $request->addFields($fields);
354
    return $pending ? $request : $request->execute();
355
  }
356
357
  public function createProductGroup(array $fields = array(), array $params = array(), $pending = false) {
358
    $this->assureId();
359
360
    $param_types = array(
361
      'retailer_id' => 'string',
362
      'variants' => 'list<Object>',
363
    );
364
    $enums = array(
365
    );
366
367
    $request = new ApiRequest(
368
      $this->api,
369
      $this->data['id'],
370
      RequestInterface::METHOD_POST,
371
      '/product_groups',
372
      new ProductGroup(),
373
      'EDGE',
374
      ProductGroup::getFieldsEnum()->getValues(),
375
      new TypeChecker($param_types, $enums)
376
    );
377
    $request->addParams($params);
378
    $request->addFields($fields);
379
    return $pending ? $request : $request->execute();
380
  }
381
382
  public function getProductSets(array $fields = array(), array $params = array(), $pending = false) {
383
    $this->assureId();
384
385
    $param_types = array(
386
      'ancestor_id' => 'string',
387
      'has_children' => 'bool',
388
      'parent_id' => 'string',
389
      'retailer_id' => 'string',
390
    );
391
    $enums = array(
392
    );
393
394
    $request = new ApiRequest(
395
      $this->api,
396
      $this->data['id'],
397
      RequestInterface::METHOD_GET,
398
      '/product_sets',
399
      new ProductSet(),
400
      'EDGE',
401
      ProductSet::getFieldsEnum()->getValues(),
402
      new TypeChecker($param_types, $enums)
403
    );
404
    $request->addParams($params);
405
    $request->addFields($fields);
406
    return $pending ? $request : $request->execute();
407
  }
408
409
  public function createProductSet(array $fields = array(), array $params = array(), $pending = false) {
410
    $this->assureId();
411
412
    $param_types = array(
413
      'filter' => 'Object',
414
      'name' => 'string',
415
    );
416
    $enums = array(
417
    );
418
419
    $request = new ApiRequest(
420
      $this->api,
421
      $this->data['id'],
422
      RequestInterface::METHOD_POST,
423
      '/product_sets',
424
      new ProductSet(),
425
      'EDGE',
426
      ProductSet::getFieldsEnum()->getValues(),
427
      new TypeChecker($param_types, $enums)
428
    );
429
    $request->addParams($params);
430
    $request->addFields($fields);
431
    return $pending ? $request : $request->execute();
432
  }
433
434
  public function getProductSetsBatch(array $fields = array(), array $params = array(), $pending = false) {
435
    $this->assureId();
436
437
    $param_types = array(
438
      'handle' => 'string',
439
    );
440
    $enums = array(
441
    );
442
443
    $request = new ApiRequest(
444
      $this->api,
445
      $this->data['id'],
446
      RequestInterface::METHOD_GET,
447
      '/product_sets_batch',
448
      new AbstractCrudObject(),
449
      'EDGE',
450
      array(),
451
      new TypeChecker($param_types, $enums)
452
    );
453
    $request->addParams($params);
454
    $request->addFields($fields);
455
    return $pending ? $request : $request->execute();
456
  }
457
458
  public function getProducts(array $fields = array(), array $params = array(), $pending = false) {
459
    $this->assureId();
460
461
    $param_types = array(
462
      'filter' => 'Object',
463
    );
464
    $enums = array(
465
    );
466
467
    $request = new ApiRequest(
468
      $this->api,
469
      $this->data['id'],
470
      RequestInterface::METHOD_GET,
471
      '/products',
472
      new ProductItem(),
473
      'EDGE',
474
      ProductItem::getFieldsEnum()->getValues(),
475
      new TypeChecker($param_types, $enums)
476
    );
477
    $request->addParams($params);
478
    $request->addFields($fields);
479
    return $pending ? $request : $request->execute();
480
  }
481
482
  public function createProduct(array $fields = array(), array $params = array(), $pending = false) {
483
    $this->assureId();
484
485
    $param_types = array(
486
      'additional_image_urls' => 'list<string>',
487
      'android_app_name' => 'string',
488
      'android_class' => 'string',
489
      'android_package' => 'string',
490
      'android_url' => 'string',
491
      'availability' => 'availability_enum',
492
      'brand' => 'string',
493
      'category' => 'string',
494
      'checkout_url' => 'string',
495
      'color' => 'string',
496
      'condition' => 'condition_enum',
497
      'currency' => 'string',
498
      'custom_data' => 'map',
499
      'custom_label_0' => 'string',
500
      'custom_label_1' => 'string',
501
      'custom_label_2' => 'string',
502
      'custom_label_3' => 'string',
503
      'custom_label_4' => 'string',
504
      'description' => 'string',
505
      'expiration_date' => 'string',
506
      'gender' => 'gender_enum',
507
      'gtin' => 'string',
508
      'image_url' => 'string',
509
      'inventory' => 'unsigned int',
510
      'ios_app_name' => 'string',
511
      'ios_app_store_id' => 'unsigned int',
512
      'ios_url' => 'string',
513
      'ipad_app_name' => 'string',
514
      'ipad_app_store_id' => 'unsigned int',
515
      'ipad_url' => 'string',
516
      'iphone_app_name' => 'string',
517
      'iphone_app_store_id' => 'unsigned int',
518
      'iphone_url' => 'string',
519
      'manufacturer_part_number' => 'string',
520
      'name' => 'string',
521
      'ordering_index' => 'unsigned int',
522
      'pattern' => 'string',
523
      'price' => 'unsigned int',
524
      'product_type' => 'string',
525
      'retailer_id' => 'string',
526
      'retailer_product_group_id' => 'string',
527
      'sale_price' => 'unsigned int',
528
      'sale_price_end_date' => 'datetime',
529
      'sale_price_start_date' => 'datetime',
530
      'size' => 'string',
531
      'start_date' => 'string',
532
      'url' => 'string',
533
      'visibility' => 'visibility_enum',
534
      'windows_phone_app_id' => 'unsigned int',
535
      'windows_phone_app_name' => 'string',
536
      'windows_phone_url' => 'string',
537
    );
538
    $enums = array(
539
      'availability_enum' => ProductItemAvailabilityValues::getInstance()->getValues(),
540
      'condition_enum' => ProductItemConditionValues::getInstance()->getValues(),
541
      'gender_enum' => ProductItemGenderValues::getInstance()->getValues(),
542
      'visibility_enum' => ProductItemVisibilityValues::getInstance()->getValues(),
543
    );
544
545
    $request = new ApiRequest(
546
      $this->api,
547
      $this->data['id'],
548
      RequestInterface::METHOD_POST,
549
      '/products',
550
      new ProductItem(),
551
      'EDGE',
552
      ProductItem::getFieldsEnum()->getValues(),
553
      new TypeChecker($param_types, $enums)
554
    );
555
    $request->addParams($params);
556
    $request->addFields($fields);
557
    return $pending ? $request : $request->execute();
558
  }
559
560
  public function createVideo(array $fields = array(), array $params = array(), $pending = false) {
561
    $this->assureId();
562
563
    $param_types = array(
564
      'content_category' => 'content_category_enum',
565
      'description' => 'string',
566
      'embeddable' => 'bool',
567
      'file_size' => 'unsigned int',
568
      'file_url' => 'string',
569
      'referenced_sticker_id' => 'string',
570
      'slideshow_spec' => 'map',
571
      'source' => 'string',
572
      'start_offset' => 'unsigned int',
573
      'thumb' => 'file',
574
      'title' => 'string',
575
      'unpublished_content_type' => 'unpublished_content_type_enum',
576
      'upload_phase' => 'upload_phase_enum',
577
      'upload_session_id' => 'string',
578
      'video_file_chunk' => 'string',
579
    );
580
    $enums = array(
581
      'content_category_enum' => array(
582
        'BEAUTY_FASHION',
583
        'BUSINESS',
584
        'CARS_TRUCKS',
585
        'COMEDY',
586
        'CUTE_ANIMALS',
587
        'ENTERTAINMENT',
588
        'FAMILY',
589
        'FOOD_HEALTH',
590
        'HOME',
591
        'LIFESTYLE',
592
        'MUSIC',
593
        'NEWS',
594
        'POLITICS',
595
        'SCIENCE',
596
        'SPORTS',
597
        'TECHNOLOGY',
598
        'VIDEO_GAMING',
599
        'OTHER',
600
      ),
601
      'unpublished_content_type_enum' => array(
602
        'SCHEDULED',
603
        'DRAFT',
604
        'ADS_POST',
605
      ),
606
      'upload_phase_enum' => array(
607
        'start',
608
        'transfer',
609
        'finish',
610
        'cancel',
611
      ),
612
    );
613
614
    $request = new ApiRequest(
615
      $this->api,
616
      $this->data['id'],
617
      RequestInterface::METHOD_POST,
618
      '/videos',
619
      new AbstractCrudObject(),
620
      'EDGE',
621
      array(),
622
      new TypeChecker($param_types, $enums)
623
    );
624
    $request->addParams($params);
625
    $request->addFields($fields);
626
    return $pending ? $request : $request->execute();
627
  }
628
629
  public function deleteSelf(array $fields = array(), array $params = array(), $pending = false) {
630
    $this->assureId();
631
632
    $param_types = array(
633
    );
634
    $enums = array(
635
    );
636
637
    $request = new ApiRequest(
638
      $this->api,
639
      $this->data['id'],
640
      RequestInterface::METHOD_DELETE,
641
      '/',
642
      new AbstractCrudObject(),
643
      'NODE',
644
      array(),
645
      new TypeChecker($param_types, $enums)
646
    );
647
    $request->addParams($params);
648
    $request->addFields($fields);
649
    return $pending ? $request : $request->execute();
650
  }
651
652
  public function getSelf(array $fields = array(), array $params = array(), $pending = false) {
653
    $this->assureId();
654
655
    $param_types = array(
656
    );
657
    $enums = array(
658
    );
659
660
    $request = new ApiRequest(
661
      $this->api,
662
      $this->data['id'],
663
      RequestInterface::METHOD_GET,
664
      '/',
665
      new ProductCatalog(),
666
      'NODE',
667
      ProductCatalog::getFieldsEnum()->getValues(),
668
      new TypeChecker($param_types, $enums)
669
    );
670
    $request->addParams($params);
671
    $request->addFields($fields);
672
    return $pending ? $request : $request->execute();
673
  }
674
675
  public function updateSelf(array $fields = array(), array $params = array(), $pending = false) {
676
    $this->assureId();
677
678
    $param_types = array(
679
      'name' => 'string',
680
    );
681
    $enums = array(
682
    );
683
684
    $request = new ApiRequest(
685
      $this->api,
686
      $this->data['id'],
687
      RequestInterface::METHOD_POST,
688
      '/',
689
      new ProductCatalog(),
690
      'NODE',
691
      ProductCatalog::getFieldsEnum()->getValues(),
692
      new TypeChecker($param_types, $enums)
693
    );
694
    $request->addParams($params);
695
    $request->addFields($fields);
696
    return $pending ? $request : $request->execute();
697
  }
698
699
  /**
700
   * @deprecated use createExternalEventSource instead
701
   */
702
  public function setExternalEventSources(array $pixel_ids, $pending = false) {
703
    $params = array(
704
      'external_event_sources' => $pixel_ids,
705
    );
706
    return $this->createExternalEventSource(array(), $params, $pending);
707
  }
708
709
  /**
710
   * @deprecated use deleteExternalEventSources instead
711
   */
712
  public function removeExternalEventSources(array $pixel_ids, $pending = false) {
713
    $params = array(
714
      'external_event_sources' => $pixel_ids,
715
    );
716
    return $this->deleteExternalEventSources(array(), $params, $pending);
0 ignored issues
show
Bug introduced by
The method deleteExternalEventSources() does not exist on FacebookAds\Object\ProductCatalog. Did you maybe mean delete()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
717
  }
718
719
  /**
720
   * @param int $user_id
721
   * @param string $role
722
   */
723
  public function addUserPermission($user_id, $role) {
724
    $params = array(
725
      'user' => $user_id,
726
      'role' => $role,
727
    );
728
    $this->getApi()->call(
729
      '/'.$this->assureId().'/userpermissions',
730
      RequestInterface::METHOD_POST,
731
      $params);
732
  }
733
734
  /**
735
   * @param int $user_id
736
   */
737
  public function deleteUserPermission($user_id) {
738
    $params = array(
739
      'user' => $user_id,
740
    );
741
    $this->getApi()->call(
742
      '/'.$this->assureId().'/userpermissions',
743
      RequestInterface::METHOD_DELETE,
744
      $params);
745
  }
746
}
747