aboutsummaryrefslogtreecommitdiffstats
path: root/src/models/Order.ts
blob: 546b813a0f7d51361e9b1233ebf5c3ccd4df5a03 (plain) (blame)
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
// TODO: Can this file be deleted?

interface IOrder {
  id: string;
  subscriptionId: string;
  name: string;
  invoiceUrl: string;
  price: string;
  date: string;
}

export default class Order {
  id: string = '';

  subscriptionId: string = '';

  name: string = '';

  invoiceUrl: string = '';

  price: string = '';

  date: string = '';

  constructor(data: IOrder) {
    this.id = data.id;
    this.subscriptionId = data.subscriptionId;
    this.name = data.name || this.name;
    this.invoiceUrl = data.invoiceUrl || this.invoiceUrl;
    this.price = data.price || this.price;
    this.date = data.date || this.date;
  }
}