Skip to content

Basis-Theory/basistheory-swift

Repository files navigation

Basis Theory Swift client library

Getting Started

  • Sign-in to Basis Theory and go to Applications
  • Create a Basis Theory Private Application
  • All permissions should be selected
  • Paste the API Key into the BT-API-KEY variable

Installation

Swift Package Manager

Via Xcode

Add through Xcode via File -> Add Packages. Search for "https://github.com/Basis-Theory/basistheory-swift" and click on "Copy Dependency".

Via Package.swift

Add the following line under dependencies to your Package.swift:

    .package(url: "https://github.com/Basis-Theory/basistheory-swift", from: "X.X.X"),

And add BasisTheory as a dependency to your target:

    dependencies: [
        .product(name: "BasisTheory", package: "basistheory-swift"),
        ...
    ],

CocoaPods

Add the following line to your Podfile under your target:

    pod 'BasisTheory'

Documentation for API Endpoints

All URIs are relative to https://api.basistheory.com

Class Method HTTP request Description
ApplicationsAPI callGet GET /applications
ApplicationsAPI create POST /applications
ApplicationsAPI delete DELETE /applications/{id}
ApplicationsAPI getById GET /applications/{id}
ApplicationsAPI getByKey GET /applications/key
ApplicationsAPI regenerateKey POST /applications/{id}/regenerate
ApplicationsAPI update PUT /applications/{id}
LogsAPI callGet GET /logs
LogsAPI getEntityTypes GET /logs/entity-types
PermissionsAPI callGet GET /permissions
ProxiesAPI callGet GET /proxies
ProxiesAPI create POST /proxies
ProxiesAPI delete DELETE /proxies/{id}
ProxiesAPI getById GET /proxies/{id}
ProxiesAPI update PUT /proxies/{id}
ReactorFormulasAPI callGet GET /reactor-formulas
ReactorFormulasAPI create POST /reactor-formulas
ReactorFormulasAPI delete DELETE /reactor-formulas/{id}
ReactorFormulasAPI getById GET /reactor-formulas/{id}
ReactorFormulasAPI update PUT /reactor-formulas/{id}
ReactorsAPI callGet GET /reactors
ReactorsAPI create POST /reactors
ReactorsAPI delete DELETE /reactors/{id}
ReactorsAPI getById GET /reactors/{id}
ReactorsAPI react POST /reactors/{id}/react
ReactorsAPI update PUT /reactors/{id}
TenantsAPI callGet GET /tenants/self
TenantsAPI createInvitation POST /tenants/self/invitations
TenantsAPI delete DELETE /tenants/self
TenantsAPI deleteInvitation DELETE /tenants/self/invitations/{invitationId}
TenantsAPI deleteMember DELETE /tenants/self/members/{memberId}
TenantsAPI getInvitations GET /tenants/self/invitations
TenantsAPI getMembers GET /tenants/self/members
TenantsAPI getTenantOperationReport GET /tenants/self/reports/operations
TenantsAPI getTenantUsageReport GET /tenants/self/reports/usage
TenantsAPI resendInvitation POST /tenants/self/invitations/{invitationId}/resend
TenantsAPI update PUT /tenants/self
TokenizeAPI tokenize POST /tokenize
TokensAPI callGet GET /tokens
TokensAPI create POST /tokens
TokensAPI createAssociation POST /tokens/{parentId}/children/{childId}
TokensAPI createChild POST /tokens/{parentId}/children
TokensAPI delete DELETE /tokens/{id}
TokensAPI deleteAssociation DELETE /tokens/{parentId}/children/{childId}
TokensAPI getById GET /tokens/{id}
TokensAPI getChildren GET /tokens/{parentId}/children
TokensAPI search POST /tokens/search
TokensAPI update PATCH /tokens/{id}

Documentation For Models