@flagship.io/js-sdk
Version:
53 lines (52 loc) • 1.76 kB
TypeScript
import { HitAbstract, IHitAbstract } from './HitAbstract';
export declare const CURRENCY_ERROR = "{0} must be a string and have exactly 3 letters";
export declare const ERROR_MESSAGE = "Transaction Id and Transaction affiliation are required";
export interface ITransaction extends IHitAbstract {
transactionId: string;
affiliation: string;
taxes?: number;
currency?: string;
couponCode?: string;
itemCount?: number;
shippingMethod?: string;
paymentMethod?: string;
totalRevenue?: number;
shippingCosts?: number;
}
export declare class Transaction extends HitAbstract implements ITransaction {
private _transactionId;
private _affiliation;
private _taxes;
private _currency;
private _couponCode;
private _itemCount;
private _shippingMethod;
private _paymentMethod;
private _totalRevenue;
private _shippingCosts;
get transactionId(): string;
set transactionId(v: string);
get affiliation(): string;
set affiliation(v: string);
get taxes(): number;
set taxes(v: number);
get currency(): string;
set currency(v: string);
get couponCode(): string;
set couponCode(v: string);
get itemCount(): number;
set itemCount(v: number);
get shippingMethod(): string;
set shippingMethod(v: string);
get paymentMethod(): string;
set paymentMethod(v: string);
get totalRevenue(): number;
set totalRevenue(v: number);
get shippingCosts(): number;
set shippingCosts(v: number);
constructor(param: Omit<ITransaction, 'type' | 'createdAt' | 'visitorInstanceId' | 'traffic'>);
isReady(checkParent?: boolean): boolean;
toApiKeys(): any;
toObject(): Record<string, unknown>;
getErrorMessage(): string;
}