Skip to content

Latest commit

 

History

History
391 lines (226 loc) · 8.08 KB

purchase.md

File metadata and controls

391 lines (226 loc) · 8.08 KB

@swedbank-pay/sdkPurchase

Class: Purchase

Hierarchy

Payment

PaymentOrderResponse

Purchase

Index

Constructors

Properties

Methods

Constructors

constructor

+ new Purchase(config: MerchantConfig, response: object): Purchase

Inherited from Payment.constructor

Overrides SwedbankBase.constructor

Parameters:

config: MerchantConfig

response: object

Name Type
operations Operation[]
payment PaymentProperties

Returns: Purchase

Properties

amount

amount: number

Inherited from Payment.amount

Overrides Payment.amount


config

config: MerchantConfig

Inherited from SwedbankBase.config

Overrides SwedbankBase.config


created

created: Date

Inherited from Payment.created

Overrides Payment.created


description

description: string

Inherited from Payment.description

Overrides Payment.description


id

id: string

Inherited from Payment.id

Overrides Payment.id


initiatingSystemUserAgent

initiatingSystemUserAgent: string

Inherited from Payment.initiatingSystemUserAgent

Overrides Payment.initiatingSystemUserAgent


instrument

instrument: string

Inherited from Payment.instrument

Overrides Payment.instrument


language

language: string

Inherited from Payment.language

Overrides Payment.language


number

number: number

Inherited from Payment.number

Overrides Payment.number


operations

operations: Operation[]

Inherited from PaymentOrderResponse.operations


payerReference

payerReference: string

Inherited from Payment.payerReference

Overrides Payment.payerReference


paymentOrder

paymentOrder: PaymentOrderProperties

Inherited from PaymentOrderResponse.paymentOrder


remainingCancellationAmount

remainingCancellationAmount: number

Inherited from Payment.remainingCancellationAmount

Overrides Payment.remainingCancellationAmount


remainingCaptureAmount

remainingCaptureAmount: number

Inherited from Payment.remainingCaptureAmount

Overrides Payment.remainingCaptureAmount


remainingReversalAmount

remainingReversalAmount: number

Inherited from Payment.remainingReversalAmount

Overrides Payment.remainingReversalAmount


state

state: string

Inherited from Payment.state

Overrides Payment.state


updated

updated: Date

Inherited from Payment.updated

Overrides Payment.updated


userAgent

userAgent: string

Inherited from Payment.userAgent

Overrides Payment.userAgent

Methods

GenericResource

GenericResourceT›(id?: string): Promise‹T›

Inherited from SwedbankBase.GenericResource

Overrides SwedbankBase.GenericResource

Type parameters:

T

Parameters:

Name Type
id? string

Returns: Promise‹T›


getOperations

getOperations(): Operation[]

Inherited from Payment.getOperations

Overrides Payment.getOperations

Returns: Operation[]


getPrices

getPrices(): Promise‹Price[]›

Inherited from Payment.getPrices

Overrides Payment.getPrices

Returns: Promise‹Price[]›


getRedirectAuthorization

getRedirectAuthorization(): string

Returns: string


getUrl

getUrl(env?: 'test' | 'prod'): string

Inherited from SwedbankBase.getUrl

Overrides SwedbankBase.getUrl

Parameters:

Name Type
env? 'test' | 'prod'

Returns: string

URL to API


request

requestT›(path: string, body?: object, method?: Method): Promise‹Response‹T››

Inherited from SwedbankBase.request

Overrides SwedbankBase.request

Type parameters:

T

Parameters:

Name Type
path string
body? object
method? Method

Returns: Promise‹Response‹T››


runOperation

runOperationT›(url: string, body?: object, method?: Method): Promise‹Response‹T››

Inherited from SwedbankBase.runOperation

Overrides SwedbankBase.runOperation

Type parameters:

T

Parameters:

Name Type
url string
body? object
method? Method

Returns: Promise‹Response‹T››