paypal/paypal_webhooks/src/paypal_webhooks/private/metaclient

Search:
Group by:

Types

QueryTable = OrderedTable[string, string]
WebhooksClient = ref object of RootObj
  baseUri*: string
  httpClient*: AsyncHttpClient
  accessToken*: Option[string]
  refreshToken*: Option[string]
  tokenExpiry*: Option[int]
  oauthClientId*: Option[string]
  oauthClientSecret*: Option[string]
WebhooksClientError = object of CatchableError

Consts

oauthTokenUrl = "/v1/oauth2/token"

Procs

proc `$`(query: QueryTable): string {....raises: [KeyError], tags: [], forbids: [].}
proc canAutoRefresh(client: WebhooksClient): bool {....raises: [], tags: [],
    forbids: [].}
proc configureOAuth(client: WebhooksClient; clientId, clientSecret: string) {.
    ...raises: [], tags: [], forbids: [].}
proc exchangeCodeForToken(clientId, clientSecret, code, redirectUri: string): Future[
    JsonNode] {....stackTrace: false, raises: [Exception, ValueError, KeyError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    JsonParsingError],
                tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect],
                forbids: [].}
proc getAuthorizationUrl(clientId, redirectUri: string;
                         scopes: openArray[string] = []; state = ""): string {.
    ...raises: [], tags: [], forbids: [].}
proc httpDelete(client: WebhooksClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}
proc httpDelete(client: WebhooksClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, JsonParsingError], tags: [RootEffect, ReadIOEffect,
    TimeEffect, WriteIOEffect], forbids: [].}
proc httpDelete[T](client: WebhooksClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpGet(client: WebhooksClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}
proc httpGet(client: WebhooksClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, JsonParsingError], tags: [RootEffect, ReadIOEffect,
    TimeEffect, WriteIOEffect], forbids: [].}
proc httpPatch(client: WebhooksClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}
proc httpPatch[T](client: WebhooksClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpPost(client: WebhooksClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}
proc httpPost(client: WebhooksClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, JsonParsingError], tags: [RootEffect, ReadIOEffect,
    TimeEffect, WriteIOEffect], forbids: [].}
proc httpPost[T](client: WebhooksClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc httpPut(client: WebhooksClient; endpoint: string): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}
proc httpPut(client: WebhooksClient; endpoint: string; query: QueryTable): Future[
    AsyncResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, JsonParsingError], tags: [RootEffect, ReadIOEffect,
    TimeEffect, WriteIOEffect], forbids: [].}
proc httpPut[T](client: WebhooksClient; endpoint: string; body: T): Future[
    AsyncResponse] {....stackTrace: false.}
proc initWebhooksClient(): WebhooksClient {....raises: [KeyError], tags: [],
    forbids: [].}
proc setTokens(client: WebhooksClient; accessToken, refreshToken: string;
               expiresIn: Option[int] = none(int)) {....raises: [], tags: [],
    forbids: [].}
proc tryRefreshToken(client: WebhooksClient): Future[bool] {....stackTrace: false, raises: [
    Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError,
    OSError, IOError, ProtocolError, JsonParsingError],
    tags: [RootEffect, ReadIOEffect, TimeEffect, WriteIOEffect], forbids: [].}