Documentation
¶
Overview ¶
Package commerceguard provides primitives to interact with the openapi HTTP API.
Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.5.0 DO NOT EDIT.
Index ¶
- Constants
- func NewVerifyChargebackRiskRequest(server string, version string, params *VerifyChargebackRiskParams, ...) (*http.Request, error)
- func NewVerifyChargebackRiskRequestWithBody(server string, version string, params *VerifyChargebackRiskParams, ...) (*http.Request, error)
- type ChargebackContactInformationV1
- type ChargebackErrorResponseV1
- type ChargebackErrorResponseV1ResponseErrorsCode
- type ChargebackScoreRankV1
- type ChargebackScoreRankV1Rank
- type ChargebackVerifyRequestV1
- type ChargebackVerifyResponseV1
- type ChargebackVerifyResponseV1Decision
- type Client
- type ClientInterface
- type ClientOption
- type ClientWithResponses
- func (c *ClientWithResponses) VerifyChargebackRiskWithBodyWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, ...) (*VerifyChargebackRiskResponse, error)
- func (c *ClientWithResponses) VerifyChargebackRiskWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, ...) (*VerifyChargebackRiskResponse, error)
- type ClientWithResponsesInterface
- type HttpRequestDoer
- type RequestEditorFn
- type VerifyChargebackRiskJSONRequestBody
- type VerifyChargebackRiskParams
- type VerifyChargebackRiskResponse
Constants ¶
const (
OAuth2Scopes = "OAuth2.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func NewVerifyChargebackRiskRequest ¶
func NewVerifyChargebackRiskRequest(server string, version string, params *VerifyChargebackRiskParams, body VerifyChargebackRiskJSONRequestBody) (*http.Request, error)
NewVerifyChargebackRiskRequest calls the generic VerifyChargebackRisk builder with application/json body
func NewVerifyChargebackRiskRequestWithBody ¶
func NewVerifyChargebackRiskRequestWithBody(server string, version string, params *VerifyChargebackRiskParams, contentType string, body io.Reader) (*http.Request, error)
NewVerifyChargebackRiskRequestWithBody generates requests for VerifyChargebackRisk with any type of body
Types ¶
type ChargebackContactInformationV1 ¶
type ChargebackContactInformationV1 struct {
// Address Address details
Address struct {
// AddressLine Street address lines
AddressLine []string `json:"addressLine"`
// City City or locality
City string `json:"city"`
// CountryCode The <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> country or territory code
CountryCode string `json:"countryCode"`
// PostalCode Postal or ZIP code
PostalCode string `json:"postalCode"`
// StateProvinceCode State or province abbreviation
StateProvinceCode string `json:"stateProvinceCode"`
} `json:"address"`
// Name Person's name details
Name struct {
// FirstName First name
FirstName string `json:"firstName"`
// LastName Last name
LastName string `json:"lastName"`
} `json:"name"`
// Phone Contact phone number details
Phone struct {
// CountryCode Numeric country calling code
CountryCode string `json:"countryCode"`
// Number Phone number excluding country code
Number string `json:"number"`
} `json:"phone"`
}
ChargebackContactInformationV1 Contact information structure used for billing and shipping
type ChargebackErrorResponseV1 ¶
type ChargebackErrorResponseV1 struct {
Response struct {
// Errors List of error objects
Errors []struct {
// Code Error code for the error type
Code ChargebackErrorResponseV1ResponseErrorsCode `json:"code"`
// Message Detailed error message
Message string `json:"message"`
} `json:"errors"`
} `json:"response"`
}
ChargebackErrorResponseV1 Standard error response structure for invalid or failed requests
type ChargebackErrorResponseV1ResponseErrorsCode ¶
type ChargebackErrorResponseV1ResponseErrorsCode string
ChargebackErrorResponseV1ResponseErrorsCode Error code for the error type
const ( DEPENDENCYVALIDATIONFAILED ChargebackErrorResponseV1ResponseErrorsCode = "DEPENDENCY_VALIDATION_FAILED" INTERNALSERVERERROR ChargebackErrorResponseV1ResponseErrorsCode = "INTERNAL_SERVER_ERROR" INVALIDFIELD ChargebackErrorResponseV1ResponseErrorsCode = "INVALID_FIELD" INVALIDREQUEST ChargebackErrorResponseV1ResponseErrorsCode = "INVALID_REQUEST" MISSINGFIELD ChargebackErrorResponseV1ResponseErrorsCode = "MISSING_FIELD" RATELIMITEXCEEDED ChargebackErrorResponseV1ResponseErrorsCode = "RATE_LIMIT_EXCEEDED" SERVERERROR ChargebackErrorResponseV1ResponseErrorsCode = "SERVER_ERROR" UNAUTHORIZED ChargebackErrorResponseV1ResponseErrorsCode = "UNAUTHORIZED" UNSUPPORTED ChargebackErrorResponseV1ResponseErrorsCode = "UNSUPPORTED" )
Defines values for ChargebackErrorResponseV1ResponseErrorsCode.
type ChargebackScoreRankV1 ¶
type ChargebackScoreRankV1 struct {
// Rank Risk rank for the category
Rank *ChargebackScoreRankV1Rank `json:"rank,omitempty"`
// Score Score value for this risk category, range 0 to 999
Score *float32 `json:"score,omitempty"`
}
ChargebackScoreRankV1 defines model for ChargebackScoreRankV1.
type ChargebackScoreRankV1Rank ¶
type ChargebackScoreRankV1Rank string
ChargebackScoreRankV1Rank Risk rank for the category
const ( High ChargebackScoreRankV1Rank = "high" Low ChargebackScoreRankV1Rank = "low" Medium ChargebackScoreRankV1Rank = "medium" NoRisk ChargebackScoreRankV1Rank = "no_risk" )
Defines values for ChargebackScoreRankV1Rank.
type ChargebackVerifyRequestV1 ¶
type ChargebackVerifyRequestV1 struct {
// BillingContact Contact information structure used for billing and shipping
BillingContact ChargebackContactInformationV1 `json:"billingContact"`
// CurrencyCode The <a href="https://www.iso.org/iso-4217-currency-codes.html" target="_blank">ISO 4217</a> currency
CurrencyCode string `json:"currencyCode"`
// OrderCreatedAt The <a href="https://www.rfc-editor.org/rfc/rfc3339#section-5.6" target="_blank">RFC 3339</a> date and time
OrderCreatedAt time.Time `json:"orderCreatedAt"`
// OrderId Unique order identifier
OrderId string `json:"orderId"`
// OrderValue Total order value
OrderValue float32 `json:"orderValue"`
// PaymentInformation Payment details, nullable
PaymentInformation *struct {
// Issuer Card issuer (e.g., Visa)
Issuer *string `json:"issuer,omitempty"`
// IssuerIdNumber First 6 digits of the card number (issuer identification number)
IssuerIdNumber *int `json:"issuerIdNumber,omitempty"`
// LastDigits Last 4 digits of the card used
LastDigits *int `json:"lastDigits,omitempty"`
// Method Payment method used for transaction
Method *string `json:"method,omitempty"`
// TxnId Payment transaction ID
TxnId *string `json:"txnId,omitempty"`
} `json:"paymentInformation"`
// Products List of products in the order
Products []struct {
// Name Product name
Name string `json:"name"`
// Sku Stock keeping unit identifier
Sku string `json:"sku"`
} `json:"products"`
// ShippingContact Contact information structure used for billing and shipping
ShippingContact ChargebackContactInformationV1 `json:"shippingContact"`
UserInformation struct {
// Email Customer's email address
Email openapi_types.Email `json:"email"`
// IpAddress IPv4 or IPv6 address
IpAddress string `json:"ipAddress"`
} `json:"userInformation"`
}
ChargebackVerifyRequestV1 defines model for ChargebackVerifyRequestV1.
type ChargebackVerifyResponseV1 ¶
type ChargebackVerifyResponseV1 struct {
// CategoryScores Detailed category risk scores
CategoryScores *struct {
AddressReliabilityScore *ChargebackScoreRankV1 `json:"addressReliabilityScore,omitempty"`
DigitalIdentityScore *ChargebackScoreRankV1 `json:"digitalIdentityScore,omitempty"`
PaymentReliabilityScore *ChargebackScoreRankV1 `json:"paymentReliabilityScore,omitempty"`
ProxyScore *ChargebackScoreRankV1 `json:"proxyScore,omitempty"`
} `json:"categoryScores,omitempty"`
// Decision Risk decision—whether to reject, review, or undecided
Decision *ChargebackVerifyResponseV1Decision `json:"decision,omitempty"`
// SuperScore Overall risk score from 0 (lowest) to 999 (highest risk)
SuperScore *float32 `json:"superScore,omitempty"`
}
ChargebackVerifyResponseV1 defines model for ChargebackVerifyResponseV1.
type ChargebackVerifyResponseV1Decision ¶
type ChargebackVerifyResponseV1Decision string
ChargebackVerifyResponseV1Decision Risk decision—whether to reject, review, or undecided
const ( Reject ChargebackVerifyResponseV1Decision = "reject" Review ChargebackVerifyResponseV1Decision = "review" Undecided ChargebackVerifyResponseV1Decision = "undecided" )
Defines values for ChargebackVerifyResponseV1Decision.
type Client ¶
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
Client which conforms to the OpenAPI3 specification for this service.
func NewClient ¶
func NewClient(server string, opts ...ClientOption) (*Client, error)
Creates a new Client, with reasonable defaults
func (*Client) VerifyChargebackRisk ¶
func (c *Client) VerifyChargebackRisk(ctx context.Context, version string, params *VerifyChargebackRiskParams, body VerifyChargebackRiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
func (*Client) VerifyChargebackRiskWithBody ¶
type ClientInterface ¶
type ClientInterface interface {
// VerifyChargebackRiskWithBody request with any body
VerifyChargebackRiskWithBody(ctx context.Context, version string, params *VerifyChargebackRiskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
VerifyChargebackRisk(ctx context.Context, version string, params *VerifyChargebackRiskParams, body VerifyChargebackRiskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}
The interface specification for the client above.
type ClientOption ¶
ClientOption allows setting custom parameters during construction
func WithHTTPClient ¶
func WithHTTPClient(doer HttpRequestDoer) ClientOption
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.
type ClientWithResponses ¶
type ClientWithResponses struct {
ClientInterface
}
ClientWithResponses builds on ClientInterface to offer response payloads
func NewClientWithResponses ¶
func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
func (*ClientWithResponses) VerifyChargebackRiskWithBodyWithResponse ¶
func (c *ClientWithResponses) VerifyChargebackRiskWithBodyWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyChargebackRiskResponse, error)
VerifyChargebackRiskWithBodyWithResponse request with arbitrary body returning *VerifyChargebackRiskResponse
func (*ClientWithResponses) VerifyChargebackRiskWithResponse ¶
func (c *ClientWithResponses) VerifyChargebackRiskWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, body VerifyChargebackRiskJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyChargebackRiskResponse, error)
type ClientWithResponsesInterface ¶
type ClientWithResponsesInterface interface {
// VerifyChargebackRiskWithBodyWithResponse request with any body
VerifyChargebackRiskWithBodyWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*VerifyChargebackRiskResponse, error)
VerifyChargebackRiskWithResponse(ctx context.Context, version string, params *VerifyChargebackRiskParams, body VerifyChargebackRiskJSONRequestBody, reqEditors ...RequestEditorFn) (*VerifyChargebackRiskResponse, error)
}
ClientWithResponsesInterface is the interface specification for the client with responses above.
type HttpRequestDoer ¶
Doer performs HTTP requests.
The standard http.Client implements this interface.
type RequestEditorFn ¶
RequestEditorFn is the function signature for the RequestEditor callback function
type VerifyChargebackRiskJSONRequestBody ¶
type VerifyChargebackRiskJSONRequestBody = ChargebackVerifyRequestV1
VerifyChargebackRiskJSONRequestBody defines body for VerifyChargebackRisk for application/json ContentType.
type VerifyChargebackRiskParams ¶
type VerifyChargebackRiskParams struct {
// PartnerId Unique Partner ID
PartnerId string `json:"partnerId"`
// TransSrc Optional transaction source
TransSrc *string `json:"transSrc,omitempty"`
// TransId Optional unique transaction ID for idempotency
TransId *string `json:"transId,omitempty"`
}
VerifyChargebackRiskParams defines parameters for VerifyChargebackRisk.
type VerifyChargebackRiskResponse ¶
type VerifyChargebackRiskResponse struct {
Body []byte
HTTPResponse *http.Response
JSON200 *ChargebackVerifyResponseV1
JSON400 *ChargebackErrorResponseV1
JSON401 *ChargebackErrorResponseV1
JSON403 *ChargebackErrorResponseV1
JSON422 *ChargebackErrorResponseV1
JSON500 *ChargebackErrorResponseV1
}
func ParseVerifyChargebackRiskResponse ¶
func ParseVerifyChargebackRiskResponse(rsp *http.Response) (*VerifyChargebackRiskResponse, error)
ParseVerifyChargebackRiskResponse parses an HTTP response from a VerifyChargebackRiskWithResponse call
func (VerifyChargebackRiskResponse) Status ¶
func (r VerifyChargebackRiskResponse) Status() string
Status returns HTTPResponse.Status
func (VerifyChargebackRiskResponse) StatusCode ¶
func (r VerifyChargebackRiskResponse) StatusCode() int
StatusCode returns HTTPResponse.StatusCode