-
Notifications
You must be signed in to change notification settings - Fork 0
/
KalturaDiscountDetailsService.js
50 lines (46 loc) · 1.47 KB
/
KalturaDiscountDetailsService.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/**
*Class definition for the Kaltura service: discountDetails.
**/
var KalturaDiscountDetailsService = {
/**
* Internal API !!! Insert new DiscountDetails for partner.
* @param discountDetails KalturaDiscountDetails Discount details Object (optional)
**/
add: function(discountDetails){
var kparams = new Object();
kparams.discountDetails = discountDetails;
return new KalturaRequestBuilder("discountdetails", "add", kparams);
},
/**
* Internal API !!! Delete DiscountDetails.
* @param id int DiscountDetails id (optional)
**/
deleteAction: function(id){
var kparams = new Object();
kparams.id = id;
return new KalturaRequestBuilder("discountdetails", "delete", kparams);
},
/**
* Returns the list of available discounts details, can be filtered by discount codes.
* @param filter KalturaDiscountDetailsFilter Filter (optional, default: null)
**/
listAction: function(filter){
if(!filter)
filter = null;
var kparams = new Object();
if (filter != null)
kparams.filter = filter;
return new KalturaRequestBuilder("discountdetails", "list", kparams);
},
/**
* Update discount details.
* @param id int DiscountDetails id (optional)
* @param discountDetails KalturaDiscountDetails Discount details Object (optional)
**/
update: function(id, discountDetails){
var kparams = new Object();
kparams.id = id;
kparams.discountDetails = discountDetails;
return new KalturaRequestBuilder("discountdetails", "update", kparams);
}
}