Skip to content

Latest commit

 

History

History
287 lines (167 loc) · 4.65 KB

payment.md

File metadata and controls

287 lines (167 loc) · 4.65 KB

@swedbank-pay/sdkPayment

Class: Payment

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

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

Overrides SwedbankBase.constructor

Parameters:

config: MerchantConfig

response: object

Name Type
operations Operation[]
payment PaymentProperties

Returns: Payment

Properties

Private _operations

_operations: Operation[]


amount

amount: number


config

config: MerchantConfig

Inherited from SwedbankBase.config


created

created: Date


description

description: string


id

id: string


initiatingSystemUserAgent

initiatingSystemUserAgent: string


instrument

instrument: string


language

language: string


number

number: number


payerReference

payerReference: string


Private prices

prices: GenericResource


remainingCancellationAmount

remainingCancellationAmount: number


remainingCaptureAmount

remainingCaptureAmount: number


remainingReversalAmount

remainingReversalAmount: number


state

state: string


updated

updated: Date


userAgent

userAgent: string

Methods

GenericResource

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

Inherited from SwedbankBase.GenericResource

Type parameters:

T

Parameters:

Name Type
id? string

Returns: Promise‹T›


getOperations

getOperations(): Operation[]

Returns: Operation[]


getPrices

getPrices(): Promise‹Price[]›

Returns: Promise‹Price[]›


getUrl

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

Inherited from 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

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

Type parameters:

T

Parameters:

Name Type
url string
body? object
method? Method

Returns: Promise‹Response‹T››