mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix fmt
This commit is contained in:
@@ -15,6 +15,8 @@ import Email from 'Common/Types/Email';
|
||||
|
||||
export type SubscriptionItem = Stripe.SubscriptionItem;
|
||||
|
||||
export type Coupon = Stripe.Coupon;
|
||||
|
||||
export interface PaymentMethod {
|
||||
id: string;
|
||||
type: string;
|
||||
@@ -163,7 +165,7 @@ export class BillingService extends BaseService {
|
||||
durationInMonths: number;
|
||||
maxRedemptions: number;
|
||||
}): Promise<string> {
|
||||
const coupon = await this.stripe.coupons.create({
|
||||
const coupon: Coupon = await this.stripe.coupons.create({
|
||||
name: data.name,
|
||||
percent_off: data.percentOff,
|
||||
duration: 'repeating',
|
||||
|
||||
@@ -5,13 +5,14 @@ import BillingService from 'CommonServer/Services/BillingService';
|
||||
import Sleep from 'Common/Types/Sleep';
|
||||
|
||||
const main: Function = async () => {
|
||||
for (let i = 0; i < 2000; i++) {
|
||||
const code = await BillingService.generateCouponCode({
|
||||
for (let i: number = 0; i < 2000; i++) {
|
||||
const code: string = await BillingService.generateCouponCode({
|
||||
name: 'Name',
|
||||
percentOff: 100,
|
||||
durationInMonths: 12,
|
||||
maxRedemptions: 1,
|
||||
});
|
||||
//eslint-disable-next-line no-console
|
||||
console.log(code);
|
||||
await Sleep.sleep(50);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user