-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlingvist.js
58 lines (55 loc) · 1.69 KB
/
lingvist.js
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
if ($response.body) {
var objc = JSON.parse($response.body);
objc = {
"has_historical_services" : false,
"latest_historical_service_paid" : false,
"services" : [
{
"service" : "unlimited",
"is_infinite" : false,
"active_since_ts" : "2023-09-26T05:56:06.980051Z",
"subscription" : {
"uuid" : "LYH",
"period" : "P1Y",
"next_billing_ts" : null,
"is_recurring" : true,
"group_name" : "unlimited",
"free_trial_duration" : "P14D",
"is_on_one_time_discount" : false,
"one_time_discount_duration" : null,
"expiration_ts" : "9999-10-10T05:56:01Z",
"price" : {
"amount" : "348.000000",
"currency" : "CNY",
"schedule" : [
{
"amount" : 0,
"discount_percentage" : 100,
"periods" : 1,
"name" : "free-trial",
"starting_from_ts" : null,
"duration" : "P14D"
}
]
},
"is_on_permanent_discount" : false,
"is_on_free_trial" : true,
"permanent_discount_percentage" : null,
"status" : "cancelled",
"one_time_discount_percentage" : null
},
"title" : "Lingvist Unlimited. 1-year subscription",
"unlimited_bundle" : {
},
"duration" : "P1Y",
"payment_provider" : "apple-in-app",
"active_until_ts" : "9999-10-10T05:56:06.980051Z",
"is_active" : true,
"product_name" : "unlimited-12-months"
}
]
}
$done({ body: JSON.stringify(objc) });
} else {
$done({ body: JSON.stringify({}) });
}