prove

package module
v1.22.11 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 11 Imported by: 0

README

Go SDK

The modern way of proving identity

SDK Installation

go get github.com/speakeasy-sdks/prove-go

SDK Example Usage

package main

import(
	"context"
	"log"
	"github.com/speakeasy-sdks/prove-go"
	"github.com/speakeasy-sdks/prove-go/pkg/models/shared"
)

func main() {
    s := prove.New(
        prove.WithSecurity(shared.Security{
            BearerAuth: "",
        }),
    )

    ctx := context.Background()
    res, err := s.Identity.Verify(ctx, shared.VerifyRequest{
        Address: prove.String("00 Mallard Park"),
        City: prove.String("New Orleans"),
        ConsentStatus: shared.ConsentStatusOptedOut.ToPointer(),
        Details: prove.String("true"),
        Dob: prove.String("1982-07-19"),
        DriversLicenseNumber: prove.String("123456789"),
        DriversLicenseState: prove.String("CO"),
        EmailAddress: prove.String("mlongok@amazonaws.com"),
        ExtendedAddress: prove.String("Apartment 3A"),
        FirstName: "Marcia",
        Last4: prove.String("6227"),
        LastName: "Longo-Jones",
        LastVerified: prove.String("2022-07-19"),
        PayfoneAlias: prove.String("8EDE1ACC4VKRKKX8B91612DE9DCFB77DF0MEK1KQZ3T9PA44306E401F13F8B12A283E6E941AC03B46F6G3FD4CED48D730FC618931737A5FEE6E31E447"),
        PhoneNumber: prove.String("6464778753"),
        PhoneUpdate: prove.String("true"),
        PostalCode: prove.String("70165"),
        Region: prove.String("LA"),
        RequestID: "14f3-b0c4-90e0-90b3-11e1-0800200c9a66",
        Ssn: prove.String("470806227"),
        SubscriptionCustomerID: prove.String("ThisIsMyCustomerId222"),
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.VerifyResponse != nil {
        // handle response
    }
}

Available Resources and Operations

Identity

  • Verify - Verify Consumer Information

MobileAuth

PreFill

Trust

Maturity

This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.

Contributions

While we value open-source contributions to this SDK, this library is generated programmatically. Feel free to open a PR or a Github issue as a proof of concept and we'll do our best to include it in a future release !

SDK Created by Speakeasy

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ServerList = []string{

	"https://api.staging.payfone.com",

	"https://api.payfone.com",
}

ServerList contains the list of servers available to the SDK

Functions

func Bool

func Bool(b bool) *bool

Bool provides a helper function to return a pointer to a bool

func Float32

func Float32(f float32) *float32

Float32 provides a helper function to return a pointer to a float32

func Float64

func Float64(f float64) *float64

Float64 provides a helper function to return a pointer to a float64

func Int

func Int(i int) *int

Int provides a helper function to return a pointer to an int

func Int64

func Int64(i int64) *int64

Int64 provides a helper function to return a pointer to an int64

func String

func String(s string) *string

String provides a helper function to return a pointer to a string

Types

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient provides an interface for suplying the SDK with a custom HTTP client

type Prove

type Prove struct {
	// Operations or actions related to identity
	Identity *identity
	// Operations or actions related to retrieving an Instant Link.
	InstantLink *instantLink
	// Operations or actions related to a mobile authentication.
	MobileAuth *mobileAuth
	// Operations or actions related to identity
	PreFill *preFill
	// Operations or actions related to Trust score
	Trust *trust
	// contains filtered or unexported fields
}

func New

func New(opts ...SDKOption) *Prove

New creates a new instance of the SDK with the provided options

type SDKOption

type SDKOption func(*Prove)

func WithClient

func WithClient(client HTTPClient) SDKOption

WithClient allows the overriding of the default HTTP client used by the SDK

func WithRetryConfig

func WithRetryConfig(retryConfig utils.RetryConfig) SDKOption

func WithSecurity

func WithSecurity(security shared.Security) SDKOption

WithSecurity configures the SDK to use the provided security details

func WithServerIndex

func WithServerIndex(serverIndex int) SDKOption

WithServerIndex allows the overriding of the default server by index

func WithServerURL

func WithServerURL(serverURL string) SDKOption

WithServerURL allows the overriding of the default server URL

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption

WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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