UNPKG

@mia-burton/klarna-node

Version:
108 lines (94 loc) 2.44 kB
import { Address } from "./address.type" import { OrderLine } from "./order-line.type" export class PaymentSession { private _billingAddress?: Address private _shippingAddress?: Address private _locale!: string private _amount!: number private _lines!: Array<OrderLine> private _country!: string private _currency!: string private _mertchantReference!: string private _authorizationToken!: string private _clientToken!: string private _status!: ('complete' | 'incomplete') private _urls!: Urls public get billingAddress(): Address | undefined { return this._billingAddress } public set billingAddress(value: Address | undefined) { this._billingAddress = value } public get shippingAddress(): Address | undefined { return this._shippingAddress } public set shippingAddress(value: Address | undefined) { this._shippingAddress = value } public get locale(): string { return this._locale } public set locale(value: string) { this._locale = value } public get amount(): number { return this._amount } public set amount(value: number) { this._amount = value } public get lines(): Array<OrderLine> { return this._lines } public set lines(value: Array<OrderLine>) { this._lines = value } public get country(): string { return this._country } public set country(value: string) { this._country = value } public get currency(): string { return this._currency } public set currency(value: string) { this._currency = value } public get mertchantReference(): string { return this._mertchantReference } public set mertchantReference(value: string) { this._mertchantReference = value } public get authorizationToken(): string { return this._authorizationToken } public set authorizationToken(value: string) { this._authorizationToken = value } public get clientToken(): string { return this._clientToken } public set clientToken(value: string) { this._clientToken = value } public get status(): ('complete'|'incomplete') { return this._status } public set status(value: ('complete'|'incomplete')) { this._status = value } public get urls() { return this._urls } public set urls(value: Urls) { this._urls = value } } interface Urls { confirmation: string notification?: string push?: string authorization: string }