Categorygithub.com/dojah-inc/dojah-sdks/go
package
4.1.0+incompatible
Repository: https://github.com/dojah-inc/dojah-sdks.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go API client for dojah

Use Dojah to verify, onboard and manage user identity across Africa!

Overview

This API client was generated by the Konfig.

  • API version: 1.0.0
  • Package version: 4.1.0

Installation

Add package to your project:

go get github.com/dojah-inc/dojah-sdks/go

Add the following in import:

import dojah "github.com/dojah-inc/dojah-sdks/go"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

import dojah "github.com/dojah-inc/dojah-sdks/go"
configuration := dojah.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, dojah.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

import dojah "github.com/dojah-inc/dojah-sdks/go"
configuration := dojah.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, dojah.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

import dojah "github.com/dojah-inc/dojah-sdks/go"
configuration := dojah.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, dojah.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
configuration.Context = context.WithValue(configuration.Context, dojah.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to https://api.dojah.io

ClassMethodHTTP requestDescription
AMLApiGetScreeningInfoGet /api/v1/aml/screening/infoGet AML Info
AMLApiScreenAmlPost /api/v1/aml/screening/platformAML Screening
AuthenticationApiGetSenderIdGet /api/v1/messaging/sender_idsMessaging - Get Sender IDs
AuthenticationApiGetSmsStatusGet /v1/messaging/sms/get_statusMessaging - Get SMS Status
AuthenticationApiRequestSenderIdPost /api/v1/messaging/sender_idMessaging - Request Sender ID
AuthenticationApiSendOtpPost /api/v1/messaging/otpMessaging - Send OTP
AuthenticationApiSendSmsPost /api/v1/messaging/smsMessaging - Send SMS
AuthenticationApiValidateOtpGet /api/v1/messaging/otp/validateMessaging - Validate OTP
DocumentAnalysisApiAnalyzeDocumentPost /api/v1/document/analysisKYC - Document Analysis
FraudApiGetEmailReputationGet /api/v1/kyc/emailEmail Reputation
FraudApiGetIpReputationGet /api/v1/fraud/ipIP Reputation
FraudApiScreenPhoneGet /api/v1/fraud/phonePhone Screening
FraudApiScreenUserGet /api/v1/fraud/userUser Screening
GHKYCApiGetDriversLicenseGet /api/v1/gh/kyc/dlDriver's License
GHKYCApiGetPassportGet /api/v1/gh/kyc/passportPassport
GHKYCApiGetSsnitGet /api/v1/gh/kyc/ssnitSSNIT
GHKYCApiGetVoterGet /api/v1/gh/kyc/voterVoter ID Lookup
GeneralApiGetBanksGet /v1/general/banksGeneral - Get Banks
GeneralApiGetBinGet /v1/general/binGeneral Resolve BIN
GeneralApiGetNubanGet /api/v1/general/accountGeneral Resolve NUBAN
GlobalKYCApiCaEkycGet /api/v1/ca/kycCanada Ekyc
GlobalKYCApiGetUsSsnGet /api/v1/us/kycUS SSN
GlobalKYCApiUkTwoPlusTwoGet /api/v1/uk/kycUK 2+2
KEKYCApiGetNationalIdGet /api/v1/ke/kyc/idKYC - National ID
KEKYCApiGetPassportGet /api/v1/ke/kyc/passportKYC - Passport
KYBApiBusinessDetailGet /api/v1/kyb/business/detailBusiness Detail
KYBApiBusinessSearchGet /api/v1/kyb/business/searchBusiness Search
KYBApiGetCacGet /api/v1/kyc/cacKYC - Get CAC
KYBApiGetTinGet /api/v1/kyc/tinKYC - Fetch Tin
KYCApiCheckLivenessPost /api/v1/ml/livenessLiveness Check
KYCApiGetAccountsGet /api/v1/kyc/accountsKYC - Fetch Accounts
KYCApiGetAddressVerificationGet /api/v1/kyc/addressFetch Address Verification Data
KYCApiGetBvnFromNubanGet /api/v1/kyc/nuban/bvnLookup BVN from NUBAN
KYCApiGetVinGet /api/v1/kyc/vinKYC - Get VIN
KYCApiSubmitAddressPost /api/v1/kyc/addressSubmit Address
MLApiVerifyPhotoIdWithSelfiePost /api/v1/kyc/photoid/verifyKYC - Selfie Photo ID Verification
NigeriaKYCApiGetBasicBvnGet /api/v1/kyc/bvnKYC - Get Basic BVN Info
NigeriaKYCApiGetBasicBvn1Get /api/v1/kyc/bvn/basicKYC - Lookup BVN Basic 1
NigeriaKYCApiGetBasicPhoneNumberGet /api/v1/kyc/phone_number/basicKYC Lookup Phone Number Basic
NigeriaKYCApiGetDriversLicenseGet /api/v1/kyc/dlKYC - Get Drivers License Info
NigeriaKYCApiGetNinGet /api/v1/kyc/ninKYC - Get NIN Info
NigeriaKYCApiGetNormalBvnGet /api/v1/kyc/bvn/fullKYC - Lookup BVN Normal
NigeriaKYCApiGetNubanGet /api/v1/kyc/nubanKYC - Get NUBAN Information
NigeriaKYCApiGetPassportGet /api/v1/kyc/passportKYC - Passport
NigeriaKYCApiGetPhoneNumberGet /api/v1/kyc/phone_numberKYC - Lookup Phone Number
NigeriaKYCApiGetPremiumBvnGet /api/v1/kyc/bvn/advanceKYC - Lookup BVN Premium
NigeriaKYCApiGetVninGet /api/v1/kyc/vninLookup VNIN
PurchaseApiSendAirtimePost /v1/purchase/airtimePurchase - Send Airtime
ServicesApiGetWalletBalanceGet /api/v1/balanceGet Dojah Wallet Balance
TZKYCApiGetNinGet /api/v1/tz/kyc/ninLookup TZ NIN
UGKYCApiGetVoterGet /api/v1/ug/kyc/voterVoters ID
VerificationsApiValidateBvnGet /v1/kyc/bvnKYC - Validate BVN
VerificationsApiVerifyAgeGet /v1/kyc/age_verificationKYC - Age Verification
VerificationsApiVerifySelfieBvnPost /v1/kyc/bvn/verifyKYV - Selfie BVN Verificatoin
VerificationsApiVerifySelfieNinPost /api/v1/kyc/nin/verifyKYC - Selfie NIN Verification
VerificationsApiVerifySelfieVninPost /api/v1/kyc/vnin/verifyKYC - Selfie vNIN verification
WebHooksApiDeleteWebhookDelete /api/v1/webhook/deleteDelete Webhook
WebHooksApiGetWebhooksGet /api/v1/webhook/fetchFetch All Webhooks
WebHooksApiNotifyWebhookPost /api/v1/webhook/notifyPost Hook
WebHooksApiSubscribeServicePost /api/v1/webhook/subscribeSubscribe to service
ZAFKYCApiGetIdGet /api/v1/za/kyc/idKYC - Lookup ID
ZWKYCApiCheckCreditGet /api/v1/zw/kyc/fcbCredit Check
ZWKYCApiVerifyIdGet /api/v1/zw/kyc/ninNational ID Verification

Documentation For Models

Documentation For Authorization

apikeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: "apikeyAuth" and passed in as the auth context for each request.

Example

import dojah "github.com/dojah-inc/dojah-sdks/go"
apiKey := os.Getenv("API_KEY")
configuration := dojah.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, dojah.ContextAPIKeys, map[string]newscatcherapi.APIKey{
    "apikeyAuth": {Key: apiKey}
})
client := dojah.NewAPIClient(configuration)
resp, httpRes, err := client.Service.Operation(args).Execute()

appIdAuth

  • Type: API key
  • API key parameter name: AppId
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: "appIdAuth" and passed in as the auth context for each request.

Example

import dojah "github.com/dojah-inc/dojah-sdks/go"
apiKey := os.Getenv("API_KEY")
configuration := dojah.NewConfiguration()
configuration.Context = context.WithValue(configuration.Context, dojah.ContextAPIKeys, map[string]newscatcherapi.APIKey{
    "appIdAuth": {Key: apiKey}
})
client := dojah.NewAPIClient(configuration)
resp, httpRes, err := client.Service.Operation(args).Execute()

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime