File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,13 @@ import BaseEntity from './BaseEntity';
22
22
* Bundle name.
23
23
* @property string name
24
24
*
25
+ * Price for the bundle. If >0, it must always be accompanied by the currency specification.
26
+ * @property double price
27
+ *
28
+ * Specifies currency for the bundle price. Check data types to discover which currencies are
29
+ * supported.
30
+ * @property string currency
31
+ *
25
32
* Arbitrary additional user properties of string type may be associated with each bundle. The name of user property
26
33
* must not be equal to any of the fixed property names listed above and must be none of id, deleted.
27
34
*
@@ -36,6 +43,8 @@ export default class Bundle extends BaseEntity {
36
43
number : 'string' ,
37
44
active : 'boolean' ,
38
45
name : 'string' ,
46
+ price : 'double' ,
47
+ currency : 'string' ,
39
48
} ,
40
49
} ) ;
41
50
}
@@ -72,6 +81,22 @@ export default class Bundle extends BaseEntity {
72
81
return this . getProperty ( 'description' , def ) ;
73
82
}
74
83
84
+ setPrice ( price ) {
85
+ return this . setProperty ( 'price' , price ) ;
86
+ }
87
+
88
+ getPrice ( def ) {
89
+ return this . getProperty ( 'price' , def ) ;
90
+ }
91
+
92
+ setCurrency ( currency ) {
93
+ return this . setProperty ( 'currency' , currency ) ;
94
+ }
95
+
96
+ getCurrency ( def ) {
97
+ return this . getProperty ( 'currency' , def ) ;
98
+ }
99
+
75
100
setLicenseTemplateNumbers ( licenseTemplateNumbers ) {
76
101
const numbers = ( Array . isArray ( licenseTemplateNumbers ) )
77
102
? licenseTemplateNumbers . join ( ',' )
You can’t perform that action at this time.
0 commit comments