visa

package module
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2023 License: MIT Imports: 13 Imported by: 0

README

Go API client for Visa

Build Status Go Report Card Docs License

This is a quick Swagger Spec for the Visa API

Overview

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

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

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

    "./visa"

Documentation for API Endpoints

All URIs are relative to http://sandbox.api.visa.com

Class Method HTTP request Description
MerchantsearchApi SearchMerchant Post /merchantsearch/v1/search Add a new pet to the store

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

Author

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func (*APIClient) CallAPI

func (c *APIClient) CallAPI(path string, method string,
	postBody interface{},
	headerParams map[string]string,
	queryParams url.Values,
	formParams map[string]string,
	fileName string,
	fileBytes []byte) (*resty.Response, error)

func (*APIClient) ParameterToString

func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string

func (*APIClient) SelectHeaderAccept

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger 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:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type Body

type Body struct {
	//SearchAttrList Merchantsearchv1searchSearchAttrList `json:"searchAttrList,omitempty"`
	SearchAttrList MerchantSearchAttrList `json:"searchAttrList,omitempty"`

	ResponseAttrList []string `json:"responseAttrList,omitempty"`

	//SearchOptions Merchantsearchv1searchSearchOptions `json:"searchOptions,omitempty"`
	SearchOptions MerchantSearchOptions `json:"searchOptions,omitempty"`

	//Header Merchantsearchv1searchHeader `json:"header,omitempty"`
	Header MerchantSearchHeader `json:"header,omitempty"`
}

type Configuration

type Configuration struct {
	Username      string            `json:"userName,omitempty"`
	Password      string            `json:"password,omitempty"`
	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey        map[string]string `json:"APIKey,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     *APIClient
	Transport     http.RoundTripper
	//Transport     *http.Transport
	Timeout *time.Duration `json:"timeout,omitempty"`
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

func (*Configuration) GetAPIKeyWithPrefix

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() string

type MerchantSearchAttrList

type MerchantSearchAttrList struct {

	// Name of the Merchant or Supplier. Note: Optional when any one of VisaMerchantId or VisaStoreId or BusinessRegistrationId or MerchantUrl or AcquirerCardAcceptorId is provided.
	MerchantName string `json:"merchantName,omitempty"`

	// Double, max: 8 characters. Unique identifier for Merchant provided by VISA. Note: Optional when any one of MerchantName or VisaStoreId or BusinessRegistrationId or MerchantUrl or AcquirerCardAcceptorId is provided.
	VisaMerchantId string `json:"visaMerchantId,omitempty"`

	// Double, max: 9 characters. Unique identifier for a Branch/Outlet. Note: Optional when any one of MerchantName or VisaMerchantId or BusinessRegistrationId or MerchantUrl or AcquirerCardAcceptorId is provided.
	VisaStoreId string `json:"visaStoreId,omitempty"`

	// Merchants Business Registration ID/Tax ID.Note: Optional when any one of MerchantName or VisaMerchantId or VisaStoreId or MerchantUrl or AcquirerCardAcceptorId is provided.
	BusinessRegistrationId string `json:"businessRegistrationId,omitempty"`

	// Address of the registered Merchant
	MerchantStreetAddress string `json:"merchantStreetAddress,omitempty"`

	// City of the registered Merchant
	MerchantCity string `json:"merchantCity,omitempty"`

	// Alpha, max: 2 characters. State of the registered Merchant. Ex: US
	MerchantState string `json:"merchantState,omitempty"`

	// Postal Code of the registered Merchant
	MerchantPostalCode string `json:"merchantPostalCode,omitempty"`

	MerchantCountryCode string `json:"merchantCountryCode,omitempty"`
}

type MerchantSearchHeader

type MerchantSearchHeader struct {

	// max: 50 characters. A string which uniquely identifies the service request. Requesting application need to create this unique message Id
	RequestMessageId string `json:"requestMessageId,omitempty"`

	// Optional. Integer Default='0'. Records displayed start at the defined number (Defaulted to 0 if not provided in request)
	StartIndex int `json:"startIndex,omitempty"`

	// YYYY-MM-DDThh:mm:ss.sss, max: 23 characters. Date and time at which Request is sent (up to milliseconds in UTC). Ex: 2008-09-19T00:00:00.000
	MessageDateTime timeutil.ISO8601NoTzMilliTime `json:"messageDateTime,omitempty"`
}

type MerchantSearchOptions

type MerchantSearchOptions struct {

	// * and ?/Wildcard Tag. Allows user to search on Merchant Name using wildcards
	WildCard []string `json:"wildCard,omitempty"`

	// Allows user to define maximum number of records to be sent in the response. If the User doesn’t set the maxRecords the value will be set by default to 25. Note: Response records will be unique and sent in order of highest to lowest Match Score
	MaxRecords int `json:"maxRecords,omitempty"`

	// Allows user to define if they would like to see which request attributes found a matching record
	MatchIndicators bool `json:"matchIndicators,omitempty"`

	// Allows user to define if they would like to see the matchScore and receive the response in order of MatchScore
	MatchScore bool `json:"matchScore,omitempty"`

	// Proximity tag. Allows user to do a proximity search on Merchant Name (upto 1 spaces). Note: Proximity Search cannot be combined with Wildcard. If wildcards are used proximity will be ignored.
	Proximity []string `json:"proximity,omitempty"`
}

type MerchantSearchRequest

type MerchantSearchRequest struct {
	SearchAttrList MerchantSearchAttrList `json:"searchAttrList,omitempty"`

	ResponseAttrList []string `json:"responseAttrList,omitempty"`

	SearchOptions MerchantSearchOptions `json:"searchOptions,omitempty"`

	Header MerchantSearchHeader `json:"header,omitempty"`
}

type MerchantSearchResponse

type MerchantSearchResponse struct {
	MerchantSearchServiceResponse MerchantSearchServiceResponse `json:"merchantSearchServiceResponse,omitempty"`
}

type MerchantSearchServiceResponse

type MerchantSearchServiceResponse struct {
	MerchantSearchResponseHeader ResponseHeader `json:"merchantSearchResponseHeader,omitempty"`

	MerchantSearchResponseStatus ResponseStatus `json:"status,omitempty"`
}

type MerchantsearchApi

type MerchantsearchApi struct {
	Configuration *Configuration
}

func NewMerchantsearchApi

func NewMerchantsearchApi() *MerchantsearchApi

func NewMerchantsearchApiWithBasePath

func NewMerchantsearchApiWithBasePath(basePath string) *MerchantsearchApi

func (MerchantsearchApi) SearchMerchant

*

  • Add a new pet to the store * *
  • @param body Pet object that needs to be added to the store
  • @return *MerchantSearchResponse

type ResponseHeader

type ResponseHeader struct {

	// A string uniquely identifies the service request. Response will contain same Message Id as received from requesting application
	RequestMessageId string `json:"requestMessageId,omitempty"`

	// Date and time at which Response is sent (up to milliseconds in UTC). Ex: 2008-09-19T00:00:00.000
	MessageDateTime time.Time `json:"messageDateTime,omitempty"`

	// A combination of Service Id, Application Id, an Integer and current Timestamp that uniquely identifies the current request-response processing
	ResponseMessageId string `json:"responseMessageId,omitempty"`

	// Record Start Index
	StartIndex string `json:"startIndex,omitempty"`

	// Record End Index
	EndIndex string `json:"endIndex,omitempty"`

	// Number of records matched
	NumRecordsMatched int32 `json:"numRecordsMatched,omitempty"`

	// Number of records returned. Note: Matched records may differ from returned records if Max Records is defined or system limit is exceeded
	NumRecordsReturned int32 `json:"numRecordsReturned,omitempty"`
}

type ResponseStatus

type ResponseStatus struct {

	// List of attributes that found a match or did not find a match
	StatusCode string `json:"statusCode,omitempty"`

	// A description of the StatusCode. A brief description indicating the result of the Service Request
	StatusDescription string `json:"statusDescription,omitempty"`
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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