@apideck/node
Version:
Apideck Node.js SDK
254 lines (253 loc) • 6.67 kB
TypeScript
/**
* Apideck
* The Apideck OpenAPI Spec: SDK Optimized
*
* The version of the OpenAPI document: 10.13.0
* Contact: support@apideck.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { Address } from './Address';
import { Allocation } from './Allocation';
import { Currency } from './Currency';
import { CustomField } from './CustomField';
import { InvoiceLineItem } from './InvoiceLineItem';
import { LinkedCustomer } from './LinkedCustomer';
import { LinkedLedgerAccount } from './LinkedLedgerAccount';
import { LinkedTrackingCategories } from './LinkedTrackingCategories';
import { PassThroughBody } from './PassThroughBody';
/**
*
* @export
* @interface CreditNote
*/
export interface CreditNote {
/**
* Unique identifier representing the entity
* @type {string}
* @memberof CreditNote
*/
readonly id: string;
/**
* Amount of transaction
* @type {number}
* @memberof CreditNote
*/
total_amount: number;
/**
* Credit note number.
* @type {string}
* @memberof CreditNote
*/
number?: string | null;
/**
*
* @type {LinkedCustomer}
* @memberof CreditNote
*/
customer?: LinkedCustomer | null;
/**
* The company or subsidiary id the transaction belongs to
* @type {string}
* @memberof CreditNote
*/
company_id?: string | null;
/**
*
* @type {Currency}
* @memberof CreditNote
*/
currency?: Currency | null;
/**
* Currency Exchange Rate at the time entity was recorded/generated.
* @type {number}
* @memberof CreditNote
*/
currency_rate?: number | null;
/**
* Amounts are including tax
* @type {boolean}
* @memberof CreditNote
*/
tax_inclusive?: boolean | null;
/**
* Sub-total amount, normally before tax.
* @type {number}
* @memberof CreditNote
*/
sub_total?: number | null;
/**
* Total tax amount applied to this invoice.
* @type {number}
* @memberof CreditNote
*/
total_tax?: number | null;
/**
* Applicable tax id/code override if tax is not supplied on a line item basis.
* @type {string}
* @memberof CreditNote
*/
tax_code?: string | null;
/**
* The balance reflecting any payments made against the transaction.
* @type {number}
* @memberof CreditNote
*/
balance?: number | null;
/**
* Indicates the total credit amount still available to apply towards the payment.
* @type {number}
* @memberof CreditNote
*/
remaining_credit?: number | null;
/**
* Status of credit notes
* @type {string}
* @memberof CreditNote
*/
status?: CreditNoteStatus;
/**
* Optional reference message ie: Debit remittance detail.
* @type {string}
* @memberof CreditNote
*/
reference?: string | null;
/**
* Date credit note issued - YYYY:MM::DDThh:mm:ss.sTZD
* @type {Date}
* @memberof CreditNote
*/
date_issued?: Date;
/**
* Date credit note paid - YYYY:MM::DDThh:mm:ss.sTZD
* @type {Date}
* @memberof CreditNote
*/
date_paid?: Date | null;
/**
* Type of payment
* @type {string}
* @memberof CreditNote
*/
type?: CreditNoteType;
/**
*
* @type {LinkedLedgerAccount}
* @memberof CreditNote
*/
account?: LinkedLedgerAccount | null;
/**
*
* @type {Array<InvoiceLineItem>}
* @memberof CreditNote
*/
line_items?: Array<InvoiceLineItem>;
/**
*
* @type {Array<Allocation>}
* @memberof CreditNote
*/
allocations?: Array<Allocation>;
/**
* Optional note to be associated with the credit note.
* @type {string}
* @memberof CreditNote
*/
note?: string | null;
/**
* Optional terms to be associated with the credit note.
* @type {string}
* @memberof CreditNote
*/
terms?: string | null;
/**
*
* @type {Address}
* @memberof CreditNote
*/
billing_address?: Address;
/**
*
* @type {Address}
* @memberof CreditNote
*/
shipping_address?: Address;
/**
*
* @type {LinkedTrackingCategories}
* @memberof CreditNote
*/
tracking_categories?: LinkedTrackingCategories | null;
/**
* When custom mappings are configured on the resource, the result is included here.
* @type {object}
* @memberof CreditNote
*/
readonly custom_mappings?: object | null;
/**
*
* @type {Array<CustomField>}
* @memberof CreditNote
*/
custom_fields?: Array<CustomField>;
/**
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
* @type {string}
* @memberof CreditNote
*/
row_version?: string | null;
/**
* The user who last updated the object.
* @type {string}
* @memberof CreditNote
*/
readonly updated_by?: string | null;
/**
* The user who created the object.
* @type {string}
* @memberof CreditNote
*/
readonly created_by?: string | null;
/**
* The date and time when the object was last updated.
* @type {Date}
* @memberof CreditNote
*/
readonly updated_at?: Date | null;
/**
* The date and time when the object was created.
* @type {Date}
* @memberof CreditNote
*/
readonly created_at?: Date | null;
/**
*
* @type {PassThroughBody}
* @memberof CreditNote
*/
pass_through?: PassThroughBody;
}
/**
* @export
* @enum {string}
*/
export declare enum CreditNoteStatus {
draft = "draft",
authorised = "authorised",
paid = "paid",
voided = "voided",
deleted = "deleted"
}
/**
* @export
* @enum {string}
*/
export declare enum CreditNoteType {
receivable_credit = "accounts_receivable_credit",
payable_credit = "accounts_payable_credit"
}
export declare function CreditNoteFromJSON(json: any): CreditNote;
export declare function CreditNoteFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreditNote;
export declare function CreditNoteToJSON(value?: CreditNote | null): any;