Skip to content

Commit 19db741

Browse files
committed
add bundle price cast
1 parent d1f6ac7 commit 19db741

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/entities/Bundle.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ import BaseEntity from './BaseEntity';
2222
* Bundle name.
2323
* @property string name
2424
*
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+
*
2532
* Arbitrary additional user properties of string type may be associated with each bundle. The name of user property
2633
* must not be equal to any of the fixed property names listed above and must be none of id, deleted.
2734
*
@@ -36,6 +43,8 @@ export default class Bundle extends BaseEntity {
3643
number: 'string',
3744
active: 'boolean',
3845
name: 'string',
46+
price: 'double',
47+
currency: 'string',
3948
},
4049
});
4150
}
@@ -72,6 +81,22 @@ export default class Bundle extends BaseEntity {
7281
return this.getProperty('description', def);
7382
}
7483

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+
75100
setLicenseTemplateNumbers(licenseTemplateNumbers) {
76101
const numbers = (Array.isArray(licenseTemplateNumbers))
77102
? licenseTemplateNumbers.join(',')

0 commit comments

Comments
 (0)