Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Client

Hierarchy

  • AmeriaClient
    • Client

Index

Constructors

constructor

  • new Client(params: AmeriaClientParams): Client
  • Parameters

    • params: AmeriaClientParams

    Returns Client

Properties

clientId

clientId: string

host

host: string

password

password: string

username

username: string

Methods

activateBinding

  • activateBinding(cardHolderId: string, paymentType: string | number): Promise<any>
  • Parameters

    • cardHolderId: string
    • paymentType: string | number

    Returns Promise<any>

ameriaFetch

  • ameriaFetch(path: AmeriaFns, body: any): Promise<any>
  • Parameters

    • path: AmeriaFns
    • body: any

    Returns Promise<any>

cancelPayment

  • cancelPayment(paymentId: string): Promise<ICancelPaymentResponse>
  • Parameters

    • paymentId: string

    Returns Promise<ICancelPaymentResponse>

deactivateBinding

  • deactivateBinding(cardHolderId: string, paymentType: string | number): Promise<any>
  • Parameters

    • cardHolderId: string
    • paymentType: string | number

    Returns Promise<any>

getBindings

  • getBindings(paymentType: string | number): Promise<any>
  • Parameters

    • paymentType: string | number

    Returns Promise<any>

getPaymentDetails

  • getPaymentDetails(paymentId: string): Promise<IPaymentDetailsResponse>
  • Parameters

    • paymentId: string

    Returns Promise<IPaymentDetailsResponse>

getPaymentId

  • getPaymentId(orderId: string): Promise<IPaymentDetailsResponse>
  • Parameters

    • orderId: string

    Returns Promise<IPaymentDetailsResponse>

getPendingTransactions

  • getPendingTransactions(params: { endDate: Date; startDate: Date }): Promise<any>
  • Parameters

    • params: { endDate: Date; startDate: Date }
      • endDate: Date
      • startDate: Date

    Returns Promise<any>

initPayment

  • initPayment(params: { amount: number; backUrl: string; desc: string; lang?: "en" | "hy" | "ru"; opaque: string; orderId: string | number; userId?: string }): Promise<IInitPaymentResponse & { url: null | string }>
  • Parameters

    • params: { amount: number; backUrl: string; desc: string; lang?: "en" | "hy" | "ru"; opaque: string; orderId: string | number; userId?: string }
      • amount: number
      • backUrl: string
      • desc: string
      • Optional lang?: "en" | "hy" | "ru"
      • opaque: string
      • orderId: string | number
      • Optional userId?: string

    Returns Promise<IInitPaymentResponse & { url: null | string }>

makeBindingPayment

  • makeBindingPayment(params: { amount: number; backURL: string; cardHolderID: string; currency: string; description: string; opaque: string; orderID: string | number; paymentType: string | number }): Promise<any>
  • Parameters

    • params: { amount: number; backURL: string; cardHolderID: string; currency: string; description: string; opaque: string; orderID: string | number; paymentType: string | number }
      • amount: number
      • backURL: string
      • cardHolderID: string
      • currency: string
      • description: string
      • opaque: string
      • orderID: string | number
      • paymentType: string | number

    Returns Promise<any>

refundPayment

  • refundPayment(paymentId: string, amount: number): Promise<IRefundPaymentResponses>
  • Parameters

    • paymentId: string
    • amount: number

    Returns Promise<IRefundPaymentResponses>

Generated using TypeDoc