import { CreateParameters } from "@mollie/api-client/dist/types/src/binders/orders/parameters"; import { Amount } from "@mollie/api-client/dist/types/src/data/global"; import { OrderAddress as MollieOrderAddress } from "@mollie/api-client/dist/types/src/data/orders/data"; import { Customer, Order } from "@deenruv/core"; import { OrderAddress } from "./graphql/generated-shop-types"; /** * Check if given address has mandatory fields for Mollie Order and map to a MollieOrderAddress. * Returns undefined if address doesn't have all mandatory fields */ export declare function toMollieAddress(address: OrderAddress, customer: Customer): MollieOrderAddress | undefined; /** * Map all order and shipping lines to a single array of Mollie order lines */ export declare function toMollieOrderLines(order: Order, alreadyPaid: number): CreateParameters["lines"]; /** * Stringify and fixed decimals */ export declare function toAmount(value: number, orderCurrency: string): Amount; /** * Return to number of cents. E.g. '10.00' => 1000 */ export declare function amountToCents(amount: Amount): number; /** * Recalculate tax amount per order line instead of per unit for Mollie. * Deenruv calculates tax per unit, but Mollie expects the tax to be calculated per order line (the total of the quantities). * See https://github.com/aexol-studio/deenruv/issues/1939#issuecomment-1362962133 for more information on the rounding issue. */ export declare function calculateLineTaxAmount(taxRate: number, orderLinePriceWithTax: number): number; /** * Lookup one of Mollies allowed locales based on an orders countrycode or channel default. * If both lookups fail, resolve to en_US to prevent payment failure */ export declare function getLocale(countryCode: string, channelLanguage: string): string;