-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdw.value.d.ts
75 lines (69 loc) · 2.11 KB
/
dw.value.d.ts
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
declare namespace dw.value {
declare class Quantity {
// constants
// -
// properties
available: boolean
decimalValue: Decimal
unit: string
value: number
// constructors
constructor(value: number, unit: string)
// methods
add(value: Quantity): Quantity
compareTo(other: Quantity): number
divide(divisor: number): Quantity
equals(other: Object): boolean
getDecimalValue(): Decimal
getUnit(): string
getValue(): number
hashCode(): number
isAvailable(): boolean
isOfSameUnit(value: Quantity): boolean
multiply(factor: number): Quantity
newQuantity(value: Decimal): Quantity
round(precision: number): Quantity
subtract(value: Quantity): Quantity
toString(): string
valueOf(): Object
}
declare namespace dw.value.Money {
/* constants */
const NOT_AVAILABLE: Money
/* properties */
const available: boolean
const currencyCode: string
const decimalValue: Decimal
const value: number
const valueOrNull: number
/* constructors */
function Money(value: number, currencyCode: string)
/* methods */
function add(value: Money): Money
function addPercent(percent: number): Money
function addRate(value: number): Money
function compareTo(other: Money): number
function divide(divisor: number): Money
function equals(other: Object): boolean
function getCurrencyCode(): string
function getDecimalValue(): Decimal
function getValue(): number
function getValueOrNull(): number
function hashCode(): number
function isAvailable(): boolean
function isOfSameCurrency(value: Money): boolean
function multiply(factor: number): Money
function multiply(quantity: Quantity): Money
function newMoney(value: Decimal): Money
function percentLessThan(value: Money): number
function percentOf(value: Money): number
static function prorate(dist: Money, ...values: Money): Money[]
function subtract(value: Money): Money
function subtractPercent(percent: number): Money
function subtractRate(value: number): Money
function toFormattedString(): string
function toNumberString(): string
function toString(): string
function valueOf(): Object
}
}