Skip to content

Commit

Permalink
add bundle price cast
Browse files Browse the repository at this point in the history
  • Loading branch information
v-rudkovskiy committed Nov 18, 2024
1 parent d1f6ac7 commit 19db741
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/entities/Bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ import BaseEntity from './BaseEntity';
* Bundle name.
* @property string name
*
* Price for the bundle. If >0, it must always be accompanied by the currency specification.
* @property double price
*
* Specifies currency for the bundle price. Check data types to discover which currencies are
* supported.
* @property string currency
*
* Arbitrary additional user properties of string type may be associated with each bundle. The name of user property
* must not be equal to any of the fixed property names listed above and must be none of id, deleted.
*
Expand All @@ -36,6 +43,8 @@ export default class Bundle extends BaseEntity {
number: 'string',
active: 'boolean',
name: 'string',
price: 'double',
currency: 'string',
},
});
}
Expand Down Expand Up @@ -72,6 +81,22 @@ export default class Bundle extends BaseEntity {
return this.getProperty('description', def);
}

setPrice(price) {
return this.setProperty('price', price);
}

getPrice(def) {
return this.getProperty('price', def);
}

setCurrency(currency) {
return this.setProperty('currency', currency);
}

getCurrency(def) {
return this.getProperty('currency', def);
}

setLicenseTemplateNumbers(licenseTemplateNumbers) {
const numbers = (Array.isArray(licenseTemplateNumbers))
? licenseTemplateNumbers.join(',')
Expand Down

0 comments on commit 19db741

Please sign in to comment.