openapi

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 21 Imported by: 0

README

Go API client for openapi

OFAC (Office of Foreign Assets Control) API is designed to facilitate the enforcement of US government economic sanctions programs required by federal law. This project implements a modern REST HTTP API for companies and organizations to obey federal law and use OFAC data in their applications.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://github.com/moov-io/ofac

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
go get github.com/antihax/optional

Put the package under your project folder and add the following in import:

import "./openapi"

Documentation for API Endpoints

All URIs are relative to http://localhost:8084

Class Method HTTP request Description
OFACApi AddOFACCompanyNameWatch Post /companies/watch Add company watch by name. The match percentage will be included in the webhook's JSON payload.
OFACApi AddOFACCompanyWatch Post /companies/{companyID}/watch Add OFAC watch on a Company
OFACApi AddOFACCustomerNameWatch Post /customers/watch Add customer watch by name. The match percentage will be included in the webhook's JSON payload.
OFACApi AddOFACCustomerWatch Post /customers/{customerID}/watch Add OFAC watch on a Customer
OFACApi GetLatestDownloads Get /downloads Return list of recent downloads of OFAC data
OFACApi GetOFACCompany Get /companies/{companyID} Get information about a company, trust or organization such as addresses, alternate names, and remarks.
OFACApi GetOFACCustomer Get /customers/{customerID} Get information about a customer, addresses, alternate names, and their SDN metadata.
OFACApi GetSDN Get /sdn/{sdnID} Specially designated national
OFACApi GetSDNAddresses Get /sdn/{sdnID}/addresses Get addresses for a given SDN
OFACApi GetSDNAltNames Get /sdn/{sdnID}/alts Get alternate names for a given SDN
OFACApi GetUIValues Get /ui/values/{key} Return an ordered distinct list of keys for an SDN property.
OFACApi Ping Get /ping Ping the OFAC service to check if running
OFACApi RemoveOFACCompanyNameWatch Delete /companies/watch/{watchID} Remove a Company name watch
OFACApi RemoveOFACCompanyWatch Delete /companies/{companyID}/watch/{watchID} Remove company watch
OFACApi RemoveOFACCustomerNameWatch Delete /customers/watch/{watchID} Remove a Customer name watch
OFACApi RemoveOFACCustomerWatch Delete /customers/{customerID}/watch/{watchID} Remove customer watch
OFACApi Search Get /search Search SDN names and metadata
OFACApi UpdateOFACCompanyStatus Put /companies/{companyID} Update a Companies sanction status to always block or always allow transactions.
OFACApi UpdateOFACCustomerStatus Put /customers/{customerID} Update a Customer's sanction status to always block or always allow transactions.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes an oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {
	OFACApi *OFACApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the OFAC API API vv1 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

ChangeBasePath changes base path to allow switching to mocks

func (*APIClient) GetConfig added in v0.12.0

func (c *APIClient) GetConfig() *Configuration

Allow modification of underlying config for alternate implementations and testing Caution: modifying the configuration while live can cause data races and potentially unwanted behavior

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the OpenAPI operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

APIResponse stores the API response returned by the server.

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

NewAPIResponse returns a new APIResonse object.

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

NewAPIResponseWithError returns a new APIResponse object with the provided error message.

type AddOFACCompanyNameWatchOpts added in v0.8.0

type AddOFACCompanyNameWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

AddOFACCompanyNameWatchOpts Optional parameters for the method 'AddOFACCompanyNameWatch'

type AddOFACCompanyWatchOpts added in v0.8.0

type AddOFACCompanyWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

AddOFACCompanyWatchOpts Optional parameters for the method 'AddOFACCompanyWatch'

type AddOFACCustomerNameWatchOpts added in v0.8.0

type AddOFACCustomerNameWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

AddOFACCustomerNameWatchOpts Optional parameters for the method 'AddOFACCustomerNameWatch'

type AddOFACCustomerWatchOpts added in v0.8.0

type AddOFACCustomerWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

AddOFACCustomerWatchOpts Optional parameters for the method 'AddOFACCustomerWatch'

type Alt

type Alt struct {
	EntityID         string  `json:"entityID,omitempty"`
	AlternateID      string  `json:"alternateID,omitempty"`
	AlternateType    string  `json:"alternateType,omitempty"`
	AlternateName    string  `json:"alternateName,omitempty"`
	AlternateRemarks string  `json:"alternateRemarks,omitempty"`
	Match            float32 `json:"match,omitempty"`
}

Alt Alternate name from OFAC list

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

Configuration stores the configuration of the API client

func NewConfiguration

func NewConfiguration() *Configuration

NewConfiguration returns a new Configuration object

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

AddDefaultHeader adds a new HTTP header to the default header in the request

type Download

type Download struct {
	SDNs      int32     `json:"SDNs,omitempty"`
	AltNames  int32     `json:"altNames,omitempty"`
	Addresses int32     `json:"addresses,omitempty"`
	Timestamp time.Time `json:"timestamp,omitempty"`
}

Download Metadata and stats about downloaded OFAC data

type Dpl added in v0.9.0

type Dpl struct {
	// Name of the Denied Person
	Name string `json:"name,omitempty"`
	// Denied Person's street address
	StreetAddress string `json:"streetAddress,omitempty"`
	// Denied Person's city
	City string `json:"city,omitempty"`
	// Denied Person's state
	State string `json:"state,omitempty"`
	// Denied Person's country
	Country string `json:"country,omitempty"`
	// Denied Person's postal code
	PostalCode string `json:"postalCode,omitempty"`
	// Date when denial came into effect
	EffectiveDate string `json:"effectiveDate,omitempty"`
	// Date when denial expires, if blank denial never expires
	ExpirationDate string `json:"expirationDate,omitempty"`
	// Denotes whether or not the Denied Person was added by a standard order
	StandardOrder string `json:"standardOrder,omitempty"`
	// Most recent date when the Denied Person record was updated
	LastUpdate string `json:"lastUpdate,omitempty"`
	// Most recent action taken regarding the denial
	Action string `json:"action,omitempty"`
	// Reference to the order's citation in the Federal Register
	FrCitation string  `json:"frCitation,omitempty"`
	Match      float32 `json:"match,omitempty"`
}

Dpl BIS Denied Persons List item

type EntityAddress added in v0.12.0

type EntityAddress struct {
	EntityID                    string  `json:"entityID,omitempty"`
	AddressID                   string  `json:"addressID,omitempty"`
	Address                     string  `json:"address,omitempty"`
	CityStateProvincePostalCode string  `json:"cityStateProvincePostalCode,omitempty"`
	Country                     string  `json:"country,omitempty"`
	Match                       float32 `json:"match,omitempty"`
}

EntityAddress Physical address from OFAC list

type Error added in v0.11.0

type Error struct {
	// An error message describing the problem intended for humans.
	Error string `json:"error"`
}

Error struct for Error

type GenericOpenAPIError

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

GenericOpenAPIError Provides access to the body, error and model on returned errors.

func (GenericOpenAPIError) Body

func (e GenericOpenAPIError) Body() []byte

Body returns the raw bytes of the response

func (GenericOpenAPIError) Error

func (e GenericOpenAPIError) Error() string

Error returns non-empty string if there was an error.

func (GenericOpenAPIError) Model

func (e GenericOpenAPIError) Model() interface{}

Model returns the unpacked model of the error

type GetLatestDownloadsOpts

type GetLatestDownloadsOpts struct {
	XRequestID optional.String
	XUserID    optional.String
	Limit      optional.Int32
}

GetLatestDownloadsOpts Optional parameters for the method 'GetLatestDownloads'

type GetOFACCompanyOpts added in v0.8.0

type GetOFACCompanyOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

GetOFACCompanyOpts Optional parameters for the method 'GetOFACCompany'

type GetOFACCustomerOpts added in v0.8.0

type GetOFACCustomerOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

GetOFACCustomerOpts Optional parameters for the method 'GetOFACCustomer'

type GetSDNAddressesOpts

type GetSDNAddressesOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

GetSDNAddressesOpts Optional parameters for the method 'GetSDNAddresses'

type GetSDNAltNamesOpts

type GetSDNAltNamesOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

GetSDNAltNamesOpts Optional parameters for the method 'GetSDNAltNames'

type GetSDNOpts

type GetSDNOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

GetSDNOpts Optional parameters for the method 'GetSDN'

type GetUIValuesOpts added in v0.11.0

type GetUIValuesOpts struct {
	Limit optional.Int32
}

GetUIValuesOpts Optional parameters for the method 'GetUIValues'

type OFACApiService added in v0.3.0

type OFACApiService service

OFACApiService OFACApi service

func (*OFACApiService) AddOFACCompanyNameWatch added in v0.8.0

func (a *OFACApiService) AddOFACCompanyNameWatch(ctx _context.Context, name string, watchRequest WatchRequest, localVarOptionals *AddOFACCompanyNameWatchOpts) (Watch, *_nethttp.Response, error)

AddOFACCompanyNameWatch Add company watch by name. The match percentage will be included in the webhook's JSON payload.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name Company name used to match and send watch notifications
  • @param watchRequest
  • @param optional nil or *AddOFACCompanyNameWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return Watch

func (*OFACApiService) AddOFACCompanyWatch added in v0.8.0

func (a *OFACApiService) AddOFACCompanyWatch(ctx _context.Context, companyID string, watchRequest WatchRequest, localVarOptionals *AddOFACCompanyWatchOpts) (Watch, *_nethttp.Response, error)

AddOFACCompanyWatch Add OFAC watch on a Company

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param companyID Company ID
  • @param watchRequest
  • @param optional nil or *AddOFACCompanyWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return Watch

func (*OFACApiService) AddOFACCustomerNameWatch added in v0.8.0

func (a *OFACApiService) AddOFACCustomerNameWatch(ctx _context.Context, name string, watchRequest WatchRequest, localVarOptionals *AddOFACCustomerNameWatchOpts) (Watch, *_nethttp.Response, error)

AddOFACCustomerNameWatch Add customer watch by name. The match percentage will be included in the webhook's JSON payload.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param name Individual name used to match and send watch notifications
  • @param watchRequest
  • @param optional nil or *AddOFACCustomerNameWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return Watch

func (*OFACApiService) AddOFACCustomerWatch added in v0.8.0

func (a *OFACApiService) AddOFACCustomerWatch(ctx _context.Context, customerID string, watchRequest WatchRequest, localVarOptionals *AddOFACCustomerWatchOpts) (Watch, *_nethttp.Response, error)

AddOFACCustomerWatch Add OFAC watch on a Customer

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customerID Customer ID
  • @param watchRequest
  • @param optional nil or *AddOFACCustomerWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return Watch

func (*OFACApiService) GetLatestDownloads added in v0.3.0

func (a *OFACApiService) GetLatestDownloads(ctx _context.Context, localVarOptionals *GetLatestDownloadsOpts) ([]Download, *_nethttp.Response, error)

GetLatestDownloads Return list of recent downloads of OFAC data

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *GetLatestDownloadsOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search
  • @param "Limit" (optional.Int32) - Maximum results returned by a search

@return []Download

func (*OFACApiService) GetOFACCompany added in v0.8.0

func (a *OFACApiService) GetOFACCompany(ctx _context.Context, companyID string, localVarOptionals *GetOFACCompanyOpts) (OfacCompany, *_nethttp.Response, error)

GetOFACCompany Get information about a company, trust or organization such as addresses, alternate names, and remarks.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param companyID Company ID
  • @param optional nil or *GetOFACCompanyOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return OfacCompany

func (*OFACApiService) GetOFACCustomer added in v0.8.0

func (a *OFACApiService) GetOFACCustomer(ctx _context.Context, customerID string, localVarOptionals *GetOFACCustomerOpts) (OfacCustomer, *_nethttp.Response, error)

GetOFACCustomer Get information about a customer, addresses, alternate names, and their SDN metadata.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customerID Customer ID
  • @param optional nil or *GetOFACCustomerOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return OfacCustomer

func (*OFACApiService) GetSDN added in v0.3.0

func (a *OFACApiService) GetSDN(ctx _context.Context, sdnID string, localVarOptionals *GetSDNOpts) (Sdn, *_nethttp.Response, error)

GetSDN Specially designated national

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sdnID SDN ID
  • @param optional nil or *GetSDNOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return Sdn

func (*OFACApiService) GetSDNAddresses added in v0.3.0

func (a *OFACApiService) GetSDNAddresses(ctx _context.Context, sdnID string, localVarOptionals *GetSDNAddressesOpts) ([]EntityAddress, *_nethttp.Response, error)

GetSDNAddresses Get addresses for a given SDN

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sdnID SDN ID
  • @param optional nil or *GetSDNAddressesOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return []EntityAddress

func (*OFACApiService) GetSDNAltNames added in v0.3.0

func (a *OFACApiService) GetSDNAltNames(ctx _context.Context, sdnID string, localVarOptionals *GetSDNAltNamesOpts) ([]Alt, *_nethttp.Response, error)

GetSDNAltNames Get alternate names for a given SDN

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param sdnID SDN ID
  • @param optional nil or *GetSDNAltNamesOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

@return []Alt

func (*OFACApiService) GetUIValues added in v0.11.0

func (a *OFACApiService) GetUIValues(ctx _context.Context, key string, localVarOptionals *GetUIValuesOpts) ([]string, *_nethttp.Response, error)

GetUIValues Return an ordered distinct list of keys for an SDN property.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param key SDN property to lookup
  • @param optional nil or *GetUIValuesOpts - Optional Parameters:
  • @param "Limit" (optional.Int32) - Maximum results returned by a search

@return []string

func (*OFACApiService) Ping added in v0.3.0

Ping Ping the OFAC service to check if running

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().

func (*OFACApiService) RemoveOFACCompanyNameWatch added in v0.8.0

func (a *OFACApiService) RemoveOFACCompanyNameWatch(ctx _context.Context, watchID string, name string, localVarOptionals *RemoveOFACCompanyNameWatchOpts) (*_nethttp.Response, error)

RemoveOFACCompanyNameWatch Remove a Company name watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param watchID Watch ID, used to identify a specific watch
  • @param name Company name watch
  • @param optional nil or *RemoveOFACCompanyNameWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

func (*OFACApiService) RemoveOFACCompanyWatch added in v0.8.0

func (a *OFACApiService) RemoveOFACCompanyWatch(ctx _context.Context, companyID string, watchID string, localVarOptionals *RemoveOFACCompanyWatchOpts) (*_nethttp.Response, error)

RemoveOFACCompanyWatch Remove company watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param companyID Company ID
  • @param watchID Watch ID, used to identify a specific watch
  • @param optional nil or *RemoveOFACCompanyWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

func (*OFACApiService) RemoveOFACCustomerNameWatch added in v0.8.0

func (a *OFACApiService) RemoveOFACCustomerNameWatch(ctx _context.Context, watchID string, name string, localVarOptionals *RemoveOFACCustomerNameWatchOpts) (*_nethttp.Response, error)

RemoveOFACCustomerNameWatch Remove a Customer name watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param watchID Watch ID, used to identify a specific watch
  • @param name Customer or Company name watch
  • @param optional nil or *RemoveOFACCustomerNameWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

func (*OFACApiService) RemoveOFACCustomerWatch added in v0.8.0

func (a *OFACApiService) RemoveOFACCustomerWatch(ctx _context.Context, customerID string, watchID string, localVarOptionals *RemoveOFACCustomerWatchOpts) (*_nethttp.Response, error)

RemoveOFACCustomerWatch Remove customer watch

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customerID Customer ID
  • @param watchID Watch ID, used to identify a specific watch
  • @param optional nil or *RemoveOFACCustomerWatchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

func (*OFACApiService) Search added in v0.8.0

func (a *OFACApiService) Search(ctx _context.Context, localVarOptionals *SearchOpts) (Search, *_nethttp.Response, error)

Search Search SDN names and metadata

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param optional nil or *SearchOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search
  • @param "Q" (optional.String) - Search across Name, Alt Names, and Address fields for all SDN entries. Entries may be returned in all response sub-objects.
  • @param "Name" (optional.String) - Name which could correspond to a human on the SDN list. Only SDN results will be returned.
  • @param "Address" (optional.String) - Phsical address which could correspond to a human on the SDN list. Only Address results will be returned.
  • @param "City" (optional.String) - City name as desginated by SDN guidelines. Only Address results will be returned.
  • @param "State" (optional.String) - State name as desginated by SDN guidelines. Only Address results will be returned.
  • @param "Providence" (optional.String) - Providence name as desginated by SDN guidelines. Only Address results will be returned.
  • @param "Zip" (optional.String) - Zip code as desginated by SDN guidelines. Only Address results will be returned.
  • @param "Country" (optional.String) - Country name as desginated by SDN guidelines. Only Address results will be returned.
  • @param "AltName" (optional.String) - Alternate name which could correspond to a human on the SDN list. Only Alt name results will be returned.
  • @param "Id" (optional.String) - ID value often found in remarks property of an SDN. Takes the form of 'No. NNNNN' as an alphanumeric value.
  • @param "Limit" (optional.Int32) - Maximum results returned by a search
  • @param "SdnType" (optional.String) - Optional filter to only return SDNs whose type case-insensitively matches
  • @param "Program" (optional.String) - Optional filter to only return SDNs whose program case-insensitively matches

@return Search

func (*OFACApiService) UpdateOFACCompanyStatus added in v0.8.0

func (a *OFACApiService) UpdateOFACCompanyStatus(ctx _context.Context, companyID string, updateCompanyStatus UpdateCompanyStatus, localVarOptionals *UpdateOFACCompanyStatusOpts) (*_nethttp.Response, error)

UpdateOFACCompanyStatus Update a Companies sanction status to always block or always allow transactions.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param companyID Company ID
  • @param updateCompanyStatus
  • @param optional nil or *UpdateOFACCompanyStatusOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

func (*OFACApiService) UpdateOFACCustomerStatus added in v0.8.0

func (a *OFACApiService) UpdateOFACCustomerStatus(ctx _context.Context, customerID string, updateCustomerStatus UpdateCustomerStatus, localVarOptionals *UpdateOFACCustomerStatusOpts) (*_nethttp.Response, error)

UpdateOFACCustomerStatus Update a Customer's sanction status to always block or always allow transactions.

  • @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
  • @param customerID Customer ID
  • @param updateCustomerStatus
  • @param optional nil or *UpdateOFACCustomerStatusOpts - Optional Parameters:
  • @param "XRequestID" (optional.String) - Optional Request ID allows application developer to trace requests through the systems logs
  • @param "XUserID" (optional.String) - Optional User ID used to perform this search

type OfacCompany added in v0.5.0

type OfacCompany struct {
	// OFAC Company ID
	ID        string            `json:"ID,omitempty"`
	Sdn       Sdn               `json:"sdn,omitempty"`
	Addresses []EntityAddress   `json:"addresses,omitempty"`
	Alts      []Alt             `json:"alts,omitempty"`
	Status    OfacCompanyStatus `json:"status,omitempty"`
}

OfacCompany OFAC Company and metadata

type OfacCompanyStatus added in v0.5.0

type OfacCompanyStatus struct {
	// User ID provided when updating status
	UserID string `json:"userID,omitempty"`
	// Optional note from updating status
	Note string `json:"note,omitempty"`
	// Manually applied status for OFAC Company
	Status    string    `json:"status,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

OfacCompanyStatus Status properties of an OFAC Company

type OfacCustomer added in v0.3.0

type OfacCustomer struct {
	// OFAC Customer ID
	ID        string             `json:"ID,omitempty"`
	Sdn       Sdn                `json:"sdn,omitempty"`
	Addresses []EntityAddress    `json:"addresses,omitempty"`
	Alts      []Alt              `json:"alts,omitempty"`
	Status    OfacCustomerStatus `json:"status,omitempty"`
}

OfacCustomer OFAC Customer and metadata

type OfacCustomerStatus added in v0.4.0

type OfacCustomerStatus struct {
	// User ID provided when updating status
	UserID string `json:"userID,omitempty"`
	// Optional note from updating status
	Note string `json:"note,omitempty"`
	// Manually applied status for OFAC Customer
	Status    string    `json:"status,omitempty"`
	CreatedAt time.Time `json:"createdAt,omitempty"`
}

OfacCustomerStatus Status properties of an OFAC Customer

type RemoveOFACCompanyNameWatchOpts added in v0.8.0

type RemoveOFACCompanyNameWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

RemoveOFACCompanyNameWatchOpts Optional parameters for the method 'RemoveOFACCompanyNameWatch'

type RemoveOFACCompanyWatchOpts added in v0.8.0

type RemoveOFACCompanyWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

RemoveOFACCompanyWatchOpts Optional parameters for the method 'RemoveOFACCompanyWatch'

type RemoveOFACCustomerNameWatchOpts added in v0.8.0

type RemoveOFACCustomerNameWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

RemoveOFACCustomerNameWatchOpts Optional parameters for the method 'RemoveOFACCustomerNameWatch'

type RemoveOFACCustomerWatchOpts added in v0.8.0

type RemoveOFACCustomerWatchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

RemoveOFACCustomerWatchOpts Optional parameters for the method 'RemoveOFACCustomerWatch'

type Sdn

type Sdn struct {
	EntityID string `json:"entityID,omitempty"`
	SdnName  string `json:"sdnName,omitempty"`
	// SDN's typically represent an individual (customer) or trust/company/organization. OFAC endpoints refer to customers or companies as different entities, but underlying both is the same SDN metadata.
	SdnType string `json:"sdnType,omitempty"`
	Program string `json:"program,omitempty"`
	Title   string `json:"title,omitempty"`
	Remarks string `json:"remarks,omitempty"`
	// Remarks on SDN and often additional information about the SDN
	Match float32 `json:"match,omitempty"`
}

Sdn Specially designated national from OFAC list

type Search struct {
	SDNs          []Sdn           `json:"SDNs,omitempty"`
	AltNames      []Alt           `json:"altNames,omitempty"`
	Addresses     []EntityAddress `json:"addresses,omitempty"`
	DeniedPersons []Dpl           `json:"deniedPersons,omitempty"`
	RefreshedAt   time.Time       `json:"refreshedAt,omitempty"`
}

Search Search results containing SDNs, alternate names and/or addreses

type SearchOpts added in v0.8.0

type SearchOpts struct {
	XRequestID optional.String
	XUserID    optional.String
	Q          optional.String
	Name       optional.String
	Address    optional.String
	City       optional.String
	State      optional.String
	Providence optional.String
	Zip        optional.String
	Country    optional.String
	AltName    optional.String
	Id         optional.String
	Limit      optional.Int32
	SdnType    optional.String
	Program    optional.String
}

SearchOpts Optional parameters for the method 'Search'

type UpdateCompanyStatus added in v0.5.0

type UpdateCompanyStatus struct {
	// manual override of company/SDN sanction status
	Status string `json:"status"`
	// Free form notes about manually changing the Company status
	Notes string `json:"notes,omitempty"`
}

UpdateCompanyStatus Request body to update a company status.

type UpdateCustomerStatus

type UpdateCustomerStatus struct {
	// manual override of customer/SDN sanction status
	Status string `json:"status"`
	// Free form notes about manually changing the Customer status
	Notes string `json:"notes,omitempty"`
}

UpdateCustomerStatus Request body to update a customers status.

type UpdateOFACCompanyStatusOpts added in v0.8.0

type UpdateOFACCompanyStatusOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

UpdateOFACCompanyStatusOpts Optional parameters for the method 'UpdateOFACCompanyStatus'

type UpdateOFACCustomerStatusOpts added in v0.8.0

type UpdateOFACCustomerStatusOpts struct {
	XRequestID optional.String
	XUserID    optional.String
}

UpdateOFACCustomerStatusOpts Optional parameters for the method 'UpdateOFACCustomerStatus'

type Watch

type Watch struct {
	// Object representing a customer or company watch
	WatchID string `json:"watchID,omitempty"`
}

Watch Customer or Company watch

type WatchRequest

type WatchRequest struct {
	// Private token supplied by clients to be used for authenticating webhooks.
	AuthToken string `json:"authToken"`
	// HTTPS url for webhook on search match
	Webhook string `json:"webhook"`
}

WatchRequest Webhook or other means of notification on search criteria. OFAC will make a POST request with a body of the customer or company (SDN, AltNames, and Address).

Jump to

Keyboard shortcuts

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