-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
44 lines (34 loc) · 854 Bytes
/
index.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
export interface Option {
url: string
account: string
key: string
}
// 0漫游流量,1非漫游流量,不带该参数时默认为0
export enum Range {
Roaming = 0,
NoRoaming = 1
}
export enum Status {
Charging = 2,
QueryFailed = 3,
Done = 4,
ChargeFailed = 5,
Unknown = 7
}
export interface IReport {
TaskId: string
Mobile: string
Status: Status
ReportTime: string
ReportCode: string
OutTradeNo: string
}
export default class Llt800 {
private readonly option: Option
constructor(option: Option)
public charge(phone: string, range: Range, packageSize: number, outTradeNo: string): Promise<string>
public queryOrder(outTradeNo: string): Promise<IReport[]>
public getBalance(): Promise<number>
public parseCallback(option: Option, data: object): IReport[]
public feedback(done: boolean): string
}