UNPKG

chargebee-typescript

Version:

A library in typescript for integrating with Chargebee.

161 lines (160 loc) 5.47 kB
import { ListResult } from '../list_result'; import { RequestWrapper } from "../request_wrapper"; import { Model } from "./model"; import { filter } from "../filter"; export declare class Transaction extends Model { id: string; customer_id?: string; subscription_id?: string; gateway_account_id?: string; payment_source_id?: string; payment_method: string; reference_number?: string; gateway: string; type: string; date?: number; settled_at?: number; exchange_rate?: number; currency_code: string; amount?: number; id_at_gateway?: string; status?: string; fraud_flag?: string; initiator_type?: string; three_d_secure?: boolean; authorization_reason?: string; error_code?: string; error_text?: string; voided_at?: number; resource_version?: number; updated_at?: number; fraud_reason?: string; custom_payment_method_id?: string; amount_unused?: number; masked_card_number?: string; reference_transaction_id?: string; refunded_txn_id?: string; reference_authorization_id?: string; amount_capturable?: number; reversal_transaction_id?: string; linked_invoices?: Array<LinkedInvoice>; linked_credit_notes?: Array<LinkedCreditNote>; linked_refunds?: Array<LinkedRefund>; linked_payments?: Array<LinkedPayment>; deleted: boolean; iin?: string; last4?: string; merchant_reference_id?: string; business_entity_id?: string; payment_method_details?: string; error_detail?: GatewayErrorDetail; custom_payment_method_name?: string; static create_authorization(params?: _transaction.create_authorization_params): RequestWrapper; static void_transaction(transaction_id: string, params?: any): RequestWrapper; static record_refund(transaction_id: string, params?: _transaction.record_refund_params): RequestWrapper; static reconcile(transaction_id: string, params?: _transaction.reconcile_params): RequestWrapper; static refund(transaction_id: string, params?: _transaction.refund_params): RequestWrapper; static list(params?: _transaction.transaction_list_params): RequestWrapper<ListResult>; static transactions_for_customer(customer_id: string, params?: any): RequestWrapper<ListResult>; static transactions_for_subscription(subscription_id: string, params?: any): RequestWrapper<ListResult>; static payments_for_invoice(invoice_id: string, params?: any): RequestWrapper<ListResult>; static retrieve(transaction_id: string, params?: any): RequestWrapper; static delete_offline_transaction(transaction_id: string, params?: _transaction.delete_offline_transaction_params): RequestWrapper; } export declare class LinkedInvoice extends Model { invoice_id: string; applied_amount: number; applied_at: number; invoice_date?: number; invoice_total?: number; invoice_status: string; } export declare class LinkedCreditNote extends Model { cn_id: string; applied_amount: number; applied_at: number; cn_reason_code?: string; cn_create_reason_code?: string; cn_date?: number; cn_total?: number; cn_status: string; cn_reference_invoice_id?: string; } export declare class LinkedRefund extends Model { txn_id: string; txn_status: string; txn_date: number; txn_amount: number; } export declare class LinkedPayment extends Model { id: string; status?: string; amount?: number; date?: number; } export declare class GatewayErrorDetail extends Model { request_id?: string; error_category?: string; error_code?: string; error_message?: string; decline_code?: string; decline_message?: string; network_error_code?: string; network_error_message?: string; error_field?: string; recommendation_code?: string; recommendation_message?: string; processor_error_code?: string; processor_error_message?: string; error_cause_id?: string; } export declare namespace _transaction { interface create_authorization_params { customer_id: string; payment_source_id?: string; currency_code?: string; amount: number; } interface record_refund_params { amount?: number; payment_method: string; date: number; reference_number?: string; custom_payment_method_id?: string; comment?: string; } interface reconcile_params { id_at_gateway?: string; customer_id?: string; status?: string; } interface refund_params { amount?: number; comment?: string; } interface transaction_list_params { limit?: number; offset?: string; include_deleted?: boolean; id?: filter._string; customer_id?: filter._string; subscription_id?: filter._string; payment_source_id?: filter._string; payment_method?: filter._enum; gateway?: filter._enum; gateway_account_id?: filter._string; id_at_gateway?: filter._string; reference_number?: filter._string; type?: filter._enum; date?: filter._timestamp; amount?: filter._number; amount_capturable?: filter._number; status?: filter._enum; updated_at?: filter._timestamp; "sort_by[asc]"?: string; "sort_by[desc]"?: string; } interface delete_offline_transaction_params { comment?: string; } }