chargebee-typescript
Version:
A library in typescript for integrating with Chargebee.
64 lines (63 loc) • 2.26 kB
TypeScript
import { ListResult } from '../list_result';
import { RequestWrapper } from "../request_wrapper";
import { Model } from "./model";
import { filter } from "../filter";
export declare class PaymentVoucher extends Model {
id: string;
id_at_gateway?: string;
payment_voucher_type: string;
expires_at?: number;
status?: string;
subscription_id?: string;
currency_code: string;
amount?: number;
gateway_account_id?: string;
payment_source_id?: string;
gateway: string;
payload?: string;
error_code?: string;
error_text?: string;
url?: string;
date?: number;
resource_version?: number;
updated_at?: number;
customer_id: string;
linked_invoices?: Array<LinkedInvoice>;
static create(params?: _payment_voucher.create_params): RequestWrapper;
static retrieve(payment_voucher_id: string, params?: any): RequestWrapper;
static payment_vouchers_for_invoice(invoice_id: string, params?: _payment_voucher.payment_voucher_payment_vouchers_for_invoice_params): RequestWrapper<ListResult>;
static payment_vouchers_for_customer(customer_id: string, params?: _payment_voucher.payment_voucher_payment_vouchers_for_customer_params): RequestWrapper<ListResult>;
}
export declare class LinkedInvoice extends Model {
invoice_id: string;
txn_id: string;
applied_at: number;
}
export declare namespace _payment_voucher {
interface create_params {
customer_id: string;
payment_source_id?: string;
voucher_payment_source?: voucher_payment_source_create_params;
invoice_allocations?: Array<invoice_allocations_create_params>;
}
interface payment_voucher_payment_vouchers_for_invoice_params {
limit?: number;
offset?: string;
status?: filter._enum;
"sort_by[asc]"?: string;
"sort_by[desc]"?: string;
}
interface payment_voucher_payment_vouchers_for_customer_params {
limit?: number;
offset?: string;
status?: filter._enum;
"sort_by[asc]"?: string;
"sort_by[desc]"?: string;
}
interface voucher_payment_source_create_params {
voucher_type: string;
}
interface invoice_allocations_create_params {
invoice_id: string;
}
}