qoreid

package module
v0.0.0-...-33651e7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 10 Imported by: 0

README

qoreid

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Logger error logger
	Logger = zerolog.New(os.Stderr).With().Timestamp().Logger()
)

Functions

This section is empty.

Types

type Client

type Client struct {
	Nigeria Nigeria
}

Client is an object for the objects implemeting different methods

func New

func New(h *http.Client, token string) *Client

New is the qoreid config initializer

type Config

type Config struct {
	Http    *http.Client
	BaseUrl string
	Token   string
}

Config is an object for the configs

type Nigeria

type Nigeria struct {
	// contains filtered or unexported fields
}

Nigeria is an object for methods under the nigeria

func (*Nigeria) VerifyNinWithNin

func (n *Nigeria) VerifyNinWithNin(req VerifyNinWithNinReq) (*VerifyNinWithNinRes, error)

VerifyNinWithNin Verifies a customer's identity using their National Identity Number (NIN) through the National Identity Management Commission (NIMC).

type VerifyNinWithNinReq

type VerifyNinWithNinReq struct {
	IdNumber   string `json:"IdNumber" validate:"required"`
	Firstname  string `json:"firstname" validate:"required"`
	Lastname   string `json:"lastname" validate:"required"`
	Middlename string `json:"middlename"`
	DOB        string `json:"dob"` // Format YYYY-MM-DD
	Phone      string `json:"phone"`
	Email      string `json:"email"`
	Gender     string `json:"gender"`
}

VerifyNinWithNinReq request object

type VerifyNinWithNinRes

type VerifyNinWithNinRes struct {
	ID        int `json:"id"`
	Applicant struct {
		Firstname string `json:"firstname"`
		Lastname  string `json:"lastname"`
	} `json:"applicant"`
	Summary struct {
		NINCheck struct {
			Status       string `json:"status"`
			FieldMatches struct {
				Firstname bool `json:"firstname"`
				Lastname  bool `json:"lastname"`
			} `json:"fieldMatches"`
		} `json:"nin_check"`
	} `json:"summary"`
	Status struct {
		State  string `json:"state"`
		Status string `json:"status"`
	} `json:"status"`
	NIN struct {
		NIN        string `json:"nin"`
		Firstname  string `json:"firstname"`
		Lastname   string `json:"lastname"`
		Middlename string `json:"middlename"`
		Phone      string `json:"phone"`
		Gender     string `json:"gender"`
		Birthdate  string `json:"birthdate"`
		Photo      string `json:"photo"`
		Address    string `json:"address"`
	} `json:"nin"`
}

VerifyNinWithNinRes response object

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL