From 447dba8df6c7a89f114275a6ac98591f74cbfc56 Mon Sep 17 00:00:00 2001 From: akim95 Date: Tue, 8 Nov 2016 23:13:54 +0800 Subject: [PATCH] remove billplz typings --- billplz/billplz-tests.ts | 46 ----------------------- billplz/billplz.d.ts | 80 ---------------------------------------- 2 files changed, 126 deletions(-) delete mode 100644 billplz/billplz-tests.ts delete mode 100644 billplz/billplz.d.ts diff --git a/billplz/billplz-tests.ts b/billplz/billplz-tests.ts deleted file mode 100644 index 4f0e4633a2..0000000000 --- a/billplz/billplz-tests.ts +++ /dev/null @@ -1,46 +0,0 @@ -/// - -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'); diff --git a/billplz/billplz.d.ts b/billplz/billplz.d.ts deleted file mode 100644 index 53355f280b..0000000000 --- a/billplz/billplz.d.ts +++ /dev/null @@ -1,80 +0,0 @@ -// Type definitions for billplz 1.0.2 -// Project: https://github.com/suhz/node-billplz -// Definitions by: Akim -// 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; -}