@selldone/sdk-storefront
Version:
A TypeScript SDK to connect to your shop and build a fully functional storefront and website by simply developing a frontend web application. All backend operations are seamlessly managed by the serverless Selldone solution.
31 lines (30 loc) • 2.04 kB
TypeScript
import { Currency, type ICurrency } from "../../enums/payment/Currency";
export declare class CurrencyHelper {
static SetUserSelectedCurrency(path: string, currency: keyof typeof Currency): void;
static GetUserSelectedCurrency(path: string): ICurrency;
static GetUserSelectedCurrencyFactor(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): number;
static GetUserSelectedCurrencyName(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null, unicode?: boolean): string;
static GetUserSelectedCurrencyFloats(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): number | ICurrency;
static GetUserSelectedCurrencyRoundFactor(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): number | ICurrency;
static GetUserSelectedCurrencyFormat(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): string | ICurrency;
static GetUserSelectedCurrencyUnicode(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): string | ICurrency;
/**
* Default sign position (Standard can override by merchants)
* @param current_currency
* @param opt_currency
* @returns {boolean}
* @constructor
*/
static GetUserSelectedCurrencySignAtEnd(current_currency: typeof Currency | keyof typeof Currency, opt_currency?: keyof typeof Currency | null): boolean;
/**
*
* @param amount
* @param currency
* @param local
* @returns {string} $xx.xx
* @constructor
*/
static ConvertToString(amount: number, currency: keyof typeof Currency, local?: string): string | number;
static NeedToSHowCurrencyFlag(availableCurrencies: (keyof typeof Currency)[]): boolean;
static GetCountryByCurrencyCode(currencyCode: keyof typeof Currency | null): string | null;
}