UNPKG

chargebee-typescript

Version:

A library in typescript for integrating with Chargebee.

416 lines (415 loc) 12.5 kB
import { ListResult } from '../list_result'; import { RequestWrapper } from "../request_wrapper"; import { Model } from "./model"; import { filter } from "../filter"; export declare class Order extends Model { id: string; document_number?: string; invoice_id?: string; subscription_id?: string; customer_id?: string; status?: string; cancellation_reason?: string; payment_status?: string; order_type?: string; price_type: string; reference_id?: string; fulfillment_status?: string; order_date?: number; shipping_date?: number; note?: string; tracking_id?: string; tracking_url?: string; batch_id?: string; created_by?: string; shipment_carrier?: string; invoice_round_off_amount?: number; tax?: number; amount_paid?: number; amount_adjusted?: number; refundable_credits_issued?: number; refundable_credits?: number; rounding_adjustement?: number; paid_on?: number; shipping_cut_off_date?: number; created_at: number; status_update_at?: number; delivered_at?: number; shipped_at?: number; resource_version?: number; updated_at?: number; cancelled_at?: number; resent_status?: string; is_resent: boolean; original_order_id?: string; order_line_items?: Array<OrderLineItem>; shipping_address?: ShippingAddress; billing_address?: BillingAddress; discount?: number; sub_total?: number; total?: number; line_item_taxes?: Array<LineItemTax>; line_item_discounts?: Array<LineItemDiscount>; linked_credit_notes?: Array<LinkedCreditNote>; deleted: boolean; currency_code?: string; is_gifted?: boolean; gift_note?: string; gift_id?: string; resend_reason?: string; resent_orders?: Array<ResentOrder>; business_entity_id?: string; static create(params?: _order.create_params): RequestWrapper; static update(order_id: string, params?: _order.update_params): RequestWrapper; static import_order(params?: _order.import_order_params): RequestWrapper; static assign_order_number(order_id: string, params?: any): RequestWrapper; static cancel(order_id: string, params?: _order.cancel_params): RequestWrapper; static create_refundable_credit_note(order_id: string, params?: _order.create_refundable_credit_note_params): RequestWrapper; static reopen(order_id: string, params?: _order.reopen_params): RequestWrapper; static retrieve(order_id: string, params?: any): RequestWrapper; static delete(order_id: string, params?: any): RequestWrapper; static list(params?: _order.order_list_params): RequestWrapper<ListResult>; static orders_for_invoice(invoice_id: string, params?: any): RequestWrapper<ListResult>; static resend(order_id: string, params?: _order.resend_params): RequestWrapper; } export declare class OrderLineItem extends Model { id: string; invoice_id: string; invoice_line_item_id: string; unit_price?: number; description?: string; amount?: number; fulfillment_quantity?: number; fulfillment_amount?: number; tax_amount?: number; amount_paid?: number; amount_adjusted?: number; refundable_credits_issued?: number; refundable_credits?: number; is_shippable: boolean; sku?: string; status?: string; entity_type: string; item_level_discount_amount?: number; discount_amount?: number; entity_id?: string; } export declare class ShippingAddress extends Model { first_name?: string; last_name?: string; email?: string; company?: string; phone?: string; line1?: string; line2?: string; line3?: string; city?: string; state_code?: string; state?: string; country?: string; zip?: string; validation_status?: string; index: number; } export declare class BillingAddress extends Model { first_name?: string; last_name?: string; email?: string; company?: string; phone?: string; line1?: string; line2?: string; line3?: string; city?: string; state_code?: string; state?: string; country?: string; zip?: string; validation_status?: string; } export declare class LineItemTax extends Model { line_item_id?: string; tax_name: string; tax_rate: number; date_to?: number; date_from?: number; prorated_taxable_amount?: number; is_partial_tax_applied?: boolean; is_non_compliance_tax?: boolean; taxable_amount: number; tax_amount: number; tax_juris_type?: string; tax_juris_name?: string; tax_juris_code?: string; tax_amount_in_local_currency?: number; local_currency_code?: string; } export declare class LineItemDiscount extends Model { line_item_id: string; discount_type: string; coupon_id?: string; entity_id?: string; discount_amount: number; } export declare class LinkedCreditNote extends Model { amount?: number; type: string; id: string; status: string; amount_adjusted?: number; amount_refunded?: number; } export declare class ResentOrder extends Model { order_id: string; reason?: string; amount?: number; } export declare namespace _order { interface create_params { id?: string; invoice_id: string; status?: string; reference_id?: string; fulfillment_status?: string; note?: string; tracking_id?: string; tracking_url?: string; batch_id?: string; } interface update_params { reference_id?: string; batch_id?: string; note?: string; shipping_date?: number; order_date?: number; cancelled_at?: number; cancellation_reason?: string; shipped_at?: number; delivered_at?: number; tracking_url?: string; tracking_id?: string; shipment_carrier?: string; fulfillment_status?: string; status?: string; shipping_address?: shipping_address_update_params; order_line_items?: Array<order_line_items_update_params>; } interface import_order_params { id?: string; document_number?: string; invoice_id: string; status: string; subscription_id?: string; customer_id?: string; created_at: number; order_date: number; shipping_date: number; reference_id?: string; fulfillment_status?: string; note?: string; tracking_id?: string; tracking_url?: string; batch_id?: string; shipment_carrier?: string; shipping_cut_off_date?: number; delivered_at?: number; shipped_at?: number; cancelled_at?: number; cancellation_reason?: string; refundable_credits_issued?: number; shipping_address?: shipping_address_import_order_params; billing_address?: billing_address_import_order_params; } interface cancel_params { cancellation_reason: string; customer_notes?: string; comment?: string; cancelled_at?: number; credit_note?: credit_note_cancel_params; } interface create_refundable_credit_note_params { customer_notes?: string; comment?: string; credit_note?: credit_note_create_refundable_credit_note_params; } interface reopen_params { void_cancellation_credit_notes?: boolean; } interface order_list_params { limit?: number; offset?: string; include_deleted?: boolean; exclude_deleted_credit_notes?: boolean; id?: filter._string; invoice_id?: filter._string; subscription_id?: filter._string; status?: filter._enum; shipping_date?: filter._timestamp; shipped_at?: filter._timestamp; order_type?: filter._enum; order_date?: filter._timestamp; paid_on?: filter._timestamp; updated_at?: filter._timestamp; created_at?: filter._timestamp; resent_status?: filter._enum; is_resent?: filter._boolean; original_order_id?: filter._string; "sort_by[asc]"?: string; "sort_by[desc]"?: string; } interface resend_params { shipping_date?: number; resend_reason?: string; order_line_items?: Array<order_line_items_resend_params>; } interface shipping_address_update_params { first_name?: string; } interface shipping_address_update_params { last_name?: string; } interface shipping_address_update_params { email?: string; } interface shipping_address_update_params { company?: string; } interface shipping_address_update_params { phone?: string; } interface shipping_address_update_params { line1?: string; } interface shipping_address_update_params { line2?: string; } interface shipping_address_update_params { line3?: string; } interface shipping_address_update_params { city?: string; } interface shipping_address_update_params { state_code?: string; } interface shipping_address_update_params { state?: string; } interface shipping_address_update_params { zip?: string; } interface shipping_address_update_params { country?: string; } interface shipping_address_update_params { validation_status?: string; } interface order_line_items_update_params { id?: string; } interface order_line_items_update_params { status?: string; } interface order_line_items_update_params { sku?: string; } interface shipping_address_import_order_params { first_name?: string; } interface shipping_address_import_order_params { last_name?: string; } interface shipping_address_import_order_params { email?: string; } interface shipping_address_import_order_params { company?: string; } interface shipping_address_import_order_params { phone?: string; } interface shipping_address_import_order_params { line1?: string; } interface shipping_address_import_order_params { line2?: string; } interface shipping_address_import_order_params { line3?: string; } interface shipping_address_import_order_params { city?: string; } interface shipping_address_import_order_params { state_code?: string; } interface shipping_address_import_order_params { state?: string; } interface shipping_address_import_order_params { zip?: string; } interface shipping_address_import_order_params { country?: string; } interface shipping_address_import_order_params { validation_status?: string; } interface billing_address_import_order_params { first_name?: string; } interface billing_address_import_order_params { last_name?: string; } interface billing_address_import_order_params { email?: string; } interface billing_address_import_order_params { company?: string; } interface billing_address_import_order_params { phone?: string; } interface billing_address_import_order_params { line1?: string; } interface billing_address_import_order_params { line2?: string; } interface billing_address_import_order_params { line3?: string; } interface billing_address_import_order_params { city?: string; } interface billing_address_import_order_params { state_code?: string; } interface billing_address_import_order_params { state?: string; } interface billing_address_import_order_params { zip?: string; } interface billing_address_import_order_params { country?: string; } interface billing_address_import_order_params { validation_status?: string; } interface credit_note_cancel_params { total?: number; } interface credit_note_create_refundable_credit_note_params { reason_code: string; } interface credit_note_create_refundable_credit_note_params { total: number; } interface order_line_items_resend_params { id?: string; } interface order_line_items_resend_params { fulfillment_quantity?: number; } }