vouched

package module
v0.0.0-...-8e99be2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Vouched Golang SDK

This repository contains a Golang implementation of the Vouched API (see https://docs.vouched.id).

The package is not yet feature complete. A list of supported APIs will be documented here.

Installation

go get github.com/kthomas/vouched-golang

Ideally, you should use a package manager such as glide, in which case you can run glide get github.com/kthomas/vouched-golang.

Documentation forthcoming.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Type       *string `json:"type"`
	Message    *string `json:"message"`
	Suggestion *string `json:"suggestion"`
}

Error represents an error for a vouched KYC API call or id verification response The following are valid error types:

  • InvalidRequestError
  • FaceMatchError
  • NameMatchError
  • BirthDateMatchError
  • InvalidIdPhotoError
  • InvalidUserPhotoError
  • UNAUTHENTICATED/AuthenticationError
  • ConnectionError
  • InvalidRequestError
  • InvalidIdBackPhotoError
  • UnknownSystemError
  • InvalidIdError

type KYCApplication

type KYCApplication struct {
	ID        *string                             `json:"id"`
	Status    *string                             `json:"status"`
	Submitted *string                             `json:"submitted"`
	Request   *KYCApplicationRequest              `json:"request"`
	Result    *KYCApplicationIDVerificationResult `json:"result"`
	Errors    []*Error                            `json:"errors"`
}

KYCApplication represents a vouched KYC application

func (*KYCApplication) IsAccepted

func (k *KYCApplication) IsAccepted() bool

IsAccepted returns true if the KYC application has been accepted

func (*KYCApplication) IsRejected

func (k *KYCApplication) IsRejected() bool

IsRejected returns true if the KYC application has been rejected

func (*KYCApplication) IsUnderReview

func (k *KYCApplication) IsUnderReview() bool

IsUnderReview returns true if the KYC application is currently pending review

type KYCApplicationIDVerificationResult

type KYCApplicationIDVerificationResult struct {
	ID          *string                                        `json:"id,omitempty"`
	Type        *string                                        `json:"type,omitempty"`
	FirstName   *string                                        `json:"firstName,omitempty"`
	LastName    *string                                        `json:"lastName,omitempty"`
	State       *string                                        `json:"state,omitempty"`
	Country     *string                                        `json:"country,omitempty"`
	DOB         *string                                        `json:"dob,omitempty"`
	Success     *bool                                          `json:"success,omitempty"`
	Confidences *KYCApplicationIDVerificationResultConfidences `json:"confidences,omitempty"`
	Errors      []*Error                                       `json:"errors,omitempty"`
}

KYCApplicationIDVerificationResult represents a vouched KYC application id verification response

type KYCApplicationIDVerificationResultConfidences

type KYCApplicationIDVerificationResultConfidences struct {
	ID        *float64 `json:"id,omitempty"`
	BackID    *float64 `json:"backId,omitempty"`
	FaceMatch *float64 `json:"faceMatch,omitempty"`
	IDMatch   *float64 `json:"idMatch,omitempty"`
	Selfie    *float64 `json:"selfie,omitempty"`
}

KYCApplicationIDVerificationResultConfidences represents confidence scores for a vouched KYC application id verification response

type KYCApplicationQuery

type KYCApplicationQuery struct {
	ID         *string `json:"id"`
	Type       *string `json:"type"`
	Status     *string `json:"status"`
	WithPhotos *bool   `json:"withPhotos"`
}

KYCApplicationQuery represents a graphql request for a previously-submitted KYC application

type KYCApplicationQueryResponse

type KYCApplicationQueryResponse struct {
	Data   *KYCApplicationQueryResponseData `json:"data"`
	Errors []*Error                         `json:"errors"`
}

KYCApplicationQueryResponse represents a vouched KYC application query response

type KYCApplicationQueryResponseData

type KYCApplicationQueryResponseData struct {
	Jobs *KYCApplicationResponseJobs `json:"jobs"`
}

KYCApplicationQueryResponseData represents a vouched KYC application query response "data" object

type KYCApplicationRequest

type KYCApplicationRequest struct {
	Type        *string                          `json:"type"`
	CallbackURL *string                          `json:"callbackURL"`
	Parameters  *KYCApplicationRequestParameters `json:"parameters"`
}

KYCApplicationRequest represents a vouched KYC application request

type KYCApplicationRequestParameters

type KYCApplicationRequestParameters struct {
	FirstName         *string `json:"firstName"`
	LastName          *string `json:"lastName"`
	DOB               *string `json:"dob"`
	UserPhoto         *string `json:"userPhoto"`
	IDPhoto           *string `json:"idPhoto"`
	IDPhotoBack       *string `json:"idPhotoBack"`
	TwicPhoto         *string `json:"twicPhoto"`
	CarInsurancePhoto *string `json:"carInsurancePhoto"`
	DOTPhoto          *string `json:"dotPhoto"`
}

KYCApplicationRequestParameters represents a vouched KYC job request

type KYCApplicationResponse

type KYCApplicationResponse struct {
	Data   *KYCApplicationResponseData `json:"data"`
	Errors []*Error                    `json:"errors"`
}

KYCApplicationResponse represents a vouched KYC application submission response

type KYCApplicationResponseData

type KYCApplicationResponseData struct {
	Job *KYCApplication `json:"submitJob,omitempty"`
}

KYCApplicationResponseData represents a vouched KYC application response "data" object

type KYCApplicationResponseJobs

type KYCApplicationResponseJobs struct {
	Items []*KYCApplication `json:"items"`
}

KYCApplicationResponseJobs represents a vouched KYC application response data "jobs" object

type VouchedAPIClient

type VouchedAPIClient struct {
	Host     string
	Path     string
	Scheme   string
	Token    *string
	Username *string
	Password *string
}

VouchedAPIClient is a generic base class for calling the vouched API

func NewVouchedAPIClient

func NewVouchedAPIClient() (*VouchedAPIClient, error)

NewVouchedAPIClient initializes an VouchedAPIClient using the environment-configured API user and token to construct an HTTP basic authorization header for access to the Vouched API.

func (*VouchedAPIClient) ApproveApplication

func (v *VouchedAPIClient) ApproveApplication(applicationID string, params map[string]interface{}) (interface{}, error)

ApproveApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ApproveBusinessApplication

func (v *VouchedAPIClient) ApproveBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

ApproveBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ApproveMerchantApplication

func (v *VouchedAPIClient) ApproveMerchantApplication(applicationID string, params map[string]interface{}) (interface{}, error)

ApproveMerchantApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ApproveMerchantBusinessApplication

func (v *VouchedAPIClient) ApproveMerchantBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

ApproveMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) CloseCase

func (v *VouchedAPIClient) CloseCase(caseID string, params map[string]interface{}) (interface{}, error)

CloseCase see https://edoc.vouched.com/

func (*VouchedAPIClient) CreateCase

func (v *VouchedAPIClient) CreateCase(params map[string]interface{}) (interface{}, error)

CreateCase see https://edoc.vouched.com/

func (*VouchedAPIClient) CreateMerchant

func (v *VouchedAPIClient) CreateMerchant(params map[string]interface{}) (interface{}, error)

CreateMerchant creates a merchant account

func (*VouchedAPIClient) DownloadApplicationDocument

func (v *VouchedAPIClient) DownloadApplicationDocument(applicationID, documentID string) (interface{}, error)

DownloadApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) DownloadBusinessApplicationDocument

func (v *VouchedAPIClient) DownloadBusinessApplicationDocument(applicationID, documentID string) (interface{}, error)

DownloadBusinessApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) DownloadMerchantApplicationDocument

func (v *VouchedAPIClient) DownloadMerchantApplicationDocument(applicationID, documentID string) (interface{}, error)

DownloadMerchantApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) DownloadMerchantBusinessApplicationDocument

func (v *VouchedAPIClient) DownloadMerchantBusinessApplicationDocument(applicationID, documentID string) (interface{}, error)

DownloadMerchantBusinessApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) EvaluateFraud

func (v *VouchedAPIClient) EvaluateFraud(params map[string]interface{}) (interface{}, error)

EvaluateFraud evaluates a transaction for payment fraud; see https://edoc.vouched.com

func (*VouchedAPIClient) EvaluateMerchantFraud

func (v *VouchedAPIClient) EvaluateMerchantFraud(merchantID string, params map[string]interface{}) (interface{}, error)

EvaluateMerchantFraud evaluates a transaction for payment fraud on behalf of a given merchant; see https://edoc.vouched.com

func (*VouchedAPIClient) GetApplication

func (v *VouchedAPIClient) GetApplication(applicationID string) (interface{}, error)

GetApplication see https://edoc.vouched.com

func (*VouchedAPIClient) GetBusinessApplication

func (v *VouchedAPIClient) GetBusinessApplication(applicationID string) (interface{}, error)

GetBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) GetCase

func (v *VouchedAPIClient) GetCase(caseID string) (interface{}, error)

GetCase see https://edoc.vouched.com/

func (*VouchedAPIClient) GetMerchant

func (v *VouchedAPIClient) GetMerchant(merchantID string, params map[string]interface{}) (interface{}, error)

GetMerchant creates a merchant account

func (*VouchedAPIClient) GetMerchantApplication

func (v *VouchedAPIClient) GetMerchantApplication(applicationID string) (interface{}, error)

GetMerchantApplication see https://edoc.vouched.com

func (*VouchedAPIClient) GetMerchantBusinessApplication

func (v *VouchedAPIClient) GetMerchantBusinessApplication(applicationID string) (interface{}, error)

GetMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ListApplicationDocuments

func (v *VouchedAPIClient) ListApplicationDocuments(applicationID string) (interface{}, error)

ListApplicationDocuments see https://edoc.vouched.com

func (*VouchedAPIClient) ListBusinessApplicationDocuments

func (v *VouchedAPIClient) ListBusinessApplicationDocuments(applicationID string) (interface{}, error)

ListBusinessApplicationDocuments see https://edoc.vouched.com

func (*VouchedAPIClient) ListMerchantApplicationDocuments

func (v *VouchedAPIClient) ListMerchantApplicationDocuments(applicationID string) (interface{}, error)

ListMerchantApplicationDocuments see https://edoc.vouched.com

func (*VouchedAPIClient) ListMerchantBusinessApplicationDocuments

func (v *VouchedAPIClient) ListMerchantBusinessApplicationDocuments(applicationID string) (interface{}, error)

ListMerchantBusinessApplicationDocuments see https://edoc.vouched.com

func (*VouchedAPIClient) Post

func (v *VouchedAPIClient) Post(graphqlRequest string, params map[string]interface{}, response interface{}) (status int, err error)

Post constructs and synchronously sends an API POST request

func (*VouchedAPIClient) ProvideApplicationResponse

func (v *VouchedAPIClient) ProvideApplicationResponse(applicationID string, params map[string]interface{}) (interface{}, error)

ProvideApplicationResponse see https://edoc.vouched.com

func (*VouchedAPIClient) ProvideMerchantApplicationResponse

func (v *VouchedAPIClient) ProvideMerchantApplicationResponse(applicationID string, params map[string]interface{}) (interface{}, error)

ProvideMerchantApplicationResponse see https://edoc.vouched.com

func (*VouchedAPIClient) ReevaluateBusinessApplication

func (v *VouchedAPIClient) ReevaluateBusinessApplication(applicationID string) (interface{}, error)

ReevaluateBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ReevaluateMerchantBusinessApplication

func (v *VouchedAPIClient) ReevaluateMerchantBusinessApplication(applicationID string) (interface{}, error)

ReevaluateMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) RejectApplication

func (v *VouchedAPIClient) RejectApplication(applicationID string, params map[string]interface{}) (interface{}, error)

RejectApplication see https://edoc.vouched.com

func (*VouchedAPIClient) RejectBusinessApplication

func (v *VouchedAPIClient) RejectBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

RejectBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) RejectMerchantApplication

func (v *VouchedAPIClient) RejectMerchantApplication(applicationID string, params map[string]interface{}) (interface{}, error)

RejectMerchantApplication see https://edoc.vouched.com

func (*VouchedAPIClient) RejectMerchantBusinessApplication

func (v *VouchedAPIClient) RejectMerchantBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

RejectMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) ReportFraud

func (v *VouchedAPIClient) ReportFraud(params map[string]interface{}) (interface{}, error)

ReportFraud reports a fraud event; see https://edoc.vouched.com

func (*VouchedAPIClient) ReportMerchantTransaction

func (v *VouchedAPIClient) ReportMerchantTransaction(merchantID, txType string, params map[string]interface{}) (interface{}, error)

ReportMerchantTransaction reports various kinds of transactions including deposits, withdrawals and internal transfer

func (*VouchedAPIClient) ReportTransaction

func (v *VouchedAPIClient) ReportTransaction(txType string, params map[string]interface{}) (interface{}, error)

ReportTransaction reports various kinds of transactions including deposits, withdrawals and internal transfer

func (*VouchedAPIClient) SubmitApplication

func (v *VouchedAPIClient) SubmitApplication(params map[string]interface{}) (interface{}, error)

SubmitApplication see https://edoc.vouched.com

func (*VouchedAPIClient) SubmitBusinessApplication

func (v *VouchedAPIClient) SubmitBusinessApplication(params map[string]interface{}) (interface{}, error)

SubmitBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) SubmitMerchantApplication

func (v *VouchedAPIClient) SubmitMerchantApplication(params map[string]interface{}) (interface{}, error)

SubmitMerchantApplication see https://edoc.vouched.com

func (*VouchedAPIClient) SubmitMerchantBusinessApplication

func (v *VouchedAPIClient) SubmitMerchantBusinessApplication(merchantID string, params map[string]interface{}) (interface{}, error)

SubmitMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) UndecideApplication

func (v *VouchedAPIClient) UndecideApplication(applicationID string, params map[string]interface{}) (interface{}, error)

UndecideApplication see https://edoc.vouched.com

func (*VouchedAPIClient) UndecideBusinessApplication

func (v *VouchedAPIClient) UndecideBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

UndecideBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) UndecideMerchantApplication

func (v *VouchedAPIClient) UndecideMerchantApplication(applicationID string, params map[string]interface{}) (interface{}, error)

UndecideMerchantApplication see https://edoc.vouched.com

func (*VouchedAPIClient) UndecideMerchantBusinessApplication

func (v *VouchedAPIClient) UndecideMerchantBusinessApplication(applicationID string, params map[string]interface{}) (interface{}, error)

UndecideMerchantBusinessApplication see https://edoc.vouched.com

func (*VouchedAPIClient) UpdateCase

func (v *VouchedAPIClient) UpdateCase(caseID string, params map[string]interface{}) (interface{}, error)

UpdateCase see https://edoc.vouched.com/

func (*VouchedAPIClient) UpdateMerchant

func (v *VouchedAPIClient) UpdateMerchant(merchantID string, params map[string]interface{}) (interface{}, error)

UpdateMerchant creates a merchant account

func (*VouchedAPIClient) UploadApplicationDocument

func (v *VouchedAPIClient) UploadApplicationDocument(applicationID string, params map[string]interface{}) (interface{}, error)

UploadApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) UploadApplicationDocumentVerificationImage

func (v *VouchedAPIClient) UploadApplicationDocumentVerificationImage(applicationID string, params map[string]interface{}) (interface{}, error)

UploadApplicationDocumentVerificationImage see https://edoc.vouched.com

func (*VouchedAPIClient) UploadBusinessApplicationDocument

func (v *VouchedAPIClient) UploadBusinessApplicationDocument(applicationID string, params map[string]interface{}) (interface{}, error)

UploadBusinessApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) UploadBusinessApplicationDocumentVerificationImage

func (v *VouchedAPIClient) UploadBusinessApplicationDocumentVerificationImage(applicationID string, params map[string]interface{}) (interface{}, error)

UploadBusinessApplicationDocumentVerificationImage see https://edoc.vouched.com

func (*VouchedAPIClient) UploadMerchantApplicationDocument

func (v *VouchedAPIClient) UploadMerchantApplicationDocument(applicationID string, params map[string]interface{}) (interface{}, error)

UploadMerchantApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) UploadMerchantApplicationDocumentVerificationImage

func (v *VouchedAPIClient) UploadMerchantApplicationDocumentVerificationImage(applicationID string, params map[string]interface{}) (interface{}, error)

UploadMerchantApplicationDocumentVerificationImage see https://edoc.vouched.com

func (*VouchedAPIClient) UploadMerchantBusinessApplicationDocument

func (v *VouchedAPIClient) UploadMerchantBusinessApplicationDocument(applicationID string, params map[string]interface{}) (interface{}, error)

UploadMerchantBusinessApplicationDocument see https://edoc.vouched.com

func (*VouchedAPIClient) UploadMerchantBusinessApplicationDocumentVerificationImage

func (v *VouchedAPIClient) UploadMerchantBusinessApplicationDocumentVerificationImage(applicationID string, params map[string]interface{}) (interface{}, error)

UploadMerchantBusinessApplicationDocumentVerificationImage see https://edoc.vouched.com

Jump to

Keyboard shortcuts

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