mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
remove billplz typings
This commit is contained in:
@@ -1,46 +0,0 @@
|
||||
/// <reference path="billplz.d.ts" />
|
||||
|
||||
import * as Billplz from 'billplz';
|
||||
|
||||
const billplz = new Billplz({
|
||||
key: 'your-api-key',
|
||||
endpoint: 'http://localhost/',
|
||||
sandbox: true
|
||||
});
|
||||
|
||||
// test create collection
|
||||
billplz.create_collection({
|
||||
title: 'your-title'
|
||||
});
|
||||
|
||||
// test create open collection
|
||||
billplz.create_collectionOpen({
|
||||
title: 'your-title',
|
||||
description: 'your-description',
|
||||
amount: 100
|
||||
});
|
||||
|
||||
// test create bill
|
||||
billplz.create_bill({
|
||||
collection_id: 'your-collection-id',
|
||||
description: 'your-description',
|
||||
email: 'your-email',
|
||||
mobile: 12345,
|
||||
name: 'your-name',
|
||||
amount: 100,
|
||||
callback_url: 'https://example.com/webhook/',
|
||||
redirect_url: 'https://example.com/done',
|
||||
due_at: '0000-00-00'
|
||||
});
|
||||
|
||||
// test get bill
|
||||
billplz.get_bill('your-bill-id');
|
||||
|
||||
// test delete bill
|
||||
billplz.delete_bill('your-bill-id');
|
||||
|
||||
// test change collection status
|
||||
billplz.change_collection_status('your-collection-id', 'status-here');
|
||||
|
||||
// test registration check
|
||||
billplz.registration_check('your-bank-account-number');
|
||||
Vendored
-80
@@ -1,80 +0,0 @@
|
||||
// Type definitions for billplz 1.0.2
|
||||
// Project: https://github.com/suhz/node-billplz
|
||||
// Definitions by: Akim <https://github.com/Akim95>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module Billplz {
|
||||
// api options type
|
||||
interface BillplzOptions {
|
||||
key: string;
|
||||
endpoint?: string;
|
||||
sandbox?: boolean;
|
||||
}
|
||||
|
||||
// collection type
|
||||
interface CollectionArguments {
|
||||
title: string;
|
||||
}
|
||||
|
||||
// open collection type
|
||||
interface OpenCollectionArguments {
|
||||
title: string;
|
||||
description: string;
|
||||
amount: number;
|
||||
fixed_amount?: boolean;
|
||||
fixed_quantity?: boolean;
|
||||
payment_button?: string;
|
||||
reference_1_label?: string
|
||||
reference_2_label?: string;
|
||||
email_link?: string;
|
||||
tax?: number;
|
||||
}
|
||||
|
||||
// bill type
|
||||
interface BillArguments {
|
||||
collection_id: string;
|
||||
email: string;
|
||||
mobile: number;
|
||||
name: string;
|
||||
amount: number;
|
||||
callback_url: string;
|
||||
description: string;
|
||||
due_at?: string;
|
||||
redirect_url?: string;
|
||||
deliver?: boolean;
|
||||
reference_1_label?: string;
|
||||
reference_1?: string;
|
||||
reference_2_label?: string;
|
||||
reference_2?: string;
|
||||
}
|
||||
}
|
||||
|
||||
declare class Billplz {
|
||||
// constructor
|
||||
constructor(options: string | Billplz.BillplzOptions);
|
||||
|
||||
// create_collection
|
||||
create_collection(title: Billplz.CollectionArguments, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// create collectionOpen
|
||||
create_collectionOpen(args: Billplz.OpenCollectionArguments, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// create bill
|
||||
create_bill(args: Billplz.BillArguments, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// get bill
|
||||
get_bill(billId: string, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// delete bill
|
||||
delete_bill(billId: string, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// change_collection status
|
||||
change_collection_status(collectionId: string, status: string, callback?: (res: any, err: any) => void): void;
|
||||
|
||||
// registration check
|
||||
registration_check(bankAccountNumber: string, callback?: (res: any, err: any) => void): void;
|
||||
}
|
||||
|
||||
declare module "billplz" {
|
||||
export = Billplz;
|
||||
}
|
||||
Reference in New Issue
Block a user