paperless

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 9 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.

Documentation

Overview

Package paperless 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

View Source
const (
	OAuth2Scopes = "OAuth2.Scopes"
)

Variables

This section is empty.

Functions

func NewDeleteOpRequest

func NewDeleteOpRequest(server string, version string, params *DeleteOpParams) (*http.Request, error)

NewDeleteOpRequest generates requests for DeleteOp

func NewDeprecatedDeleteRequest

func NewDeprecatedDeleteRequest(server string, deprecatedVersion string, params *DeprecatedDeleteParams) (*http.Request, error)

NewDeprecatedDeleteRequest generates requests for DeprecatedDelete

func NewDeprecatedPushToImageRepositoryRequest

func NewDeprecatedPushToImageRepositoryRequest(server string, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, body DeprecatedPushToImageRepositoryJSONRequestBody) (*http.Request, error)

NewDeprecatedPushToImageRepositoryRequest calls the generic DeprecatedPushToImageRepository builder with application/json body

func NewDeprecatedPushToImageRepositoryRequestWithBody

func NewDeprecatedPushToImageRepositoryRequestWithBody(server string, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, contentType string, body io.Reader) (*http.Request, error)

NewDeprecatedPushToImageRepositoryRequestWithBody generates requests for DeprecatedPushToImageRepository with any type of body

func NewDeprecatedUploadRequest

func NewDeprecatedUploadRequest(server string, deprecatedVersion string, params *DeprecatedUploadParams, body DeprecatedUploadJSONRequestBody) (*http.Request, error)

NewDeprecatedUploadRequest calls the generic DeprecatedUpload builder with application/json body

func NewDeprecatedUploadRequestWithBody

func NewDeprecatedUploadRequestWithBody(server string, deprecatedVersion string, params *DeprecatedUploadParams, contentType string, body io.Reader) (*http.Request, error)

NewDeprecatedUploadRequestWithBody generates requests for DeprecatedUpload with any type of body

func NewPushToImageRepositoryOpRequest

func NewPushToImageRepositoryOpRequest(server string, version string, params *PushToImageRepositoryOpParams, body PushToImageRepositoryOpJSONRequestBody) (*http.Request, error)

NewPushToImageRepositoryOpRequest calls the generic PushToImageRepositoryOp builder with application/json body

func NewPushToImageRepositoryOpRequestWithBody

func NewPushToImageRepositoryOpRequestWithBody(server string, version string, params *PushToImageRepositoryOpParams, contentType string, body io.Reader) (*http.Request, error)

NewPushToImageRepositoryOpRequestWithBody generates requests for PushToImageRepositoryOp with any type of body

func NewUploadOpRequest

func NewUploadOpRequest(server string, version string, params *UploadOpParams, body UploadOpJSONRequestBody) (*http.Request, error)

NewUploadOpRequest calls the generic UploadOp builder with application/json body

func NewUploadOpRequestWithBody

func NewUploadOpRequestWithBody(server string, version string, params *UploadOpParams, contentType string, body io.Reader) (*http.Request, error)

NewUploadOpRequestWithBody generates requests for UploadOp with any type of body

Types

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) DeleteOp

func (c *Client) DeleteOp(ctx context.Context, version string, params *DeleteOpParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeprecatedDelete

func (c *Client) DeprecatedDelete(ctx context.Context, deprecatedVersion string, params *DeprecatedDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeprecatedPushToImageRepository

func (c *Client) DeprecatedPushToImageRepository(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, body DeprecatedPushToImageRepositoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeprecatedPushToImageRepositoryWithBody

func (c *Client) DeprecatedPushToImageRepositoryWithBody(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeprecatedUpload

func (c *Client) DeprecatedUpload(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, body DeprecatedUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) DeprecatedUploadWithBody

func (c *Client) DeprecatedUploadWithBody(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PushToImageRepositoryOp

func (c *Client) PushToImageRepositoryOp(ctx context.Context, version string, params *PushToImageRepositoryOpParams, body PushToImageRepositoryOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) PushToImageRepositoryOpWithBody

func (c *Client) PushToImageRepositoryOpWithBody(ctx context.Context, version string, params *PushToImageRepositoryOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadOp

func (c *Client) UploadOp(ctx context.Context, version string, params *UploadOpParams, body UploadOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

func (*Client) UploadOpWithBody

func (c *Client) UploadOpWithBody(ctx context.Context, version string, params *UploadOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

type ClientInterface

type ClientInterface interface {
	// DeprecatedDelete request
	DeprecatedDelete(ctx context.Context, deprecatedVersion string, params *DeprecatedDeleteParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeprecatedPushToImageRepositoryWithBody request with any body
	DeprecatedPushToImageRepositoryWithBody(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeprecatedPushToImageRepository(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, body DeprecatedPushToImageRepositoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeprecatedUploadWithBody request with any body
	DeprecatedUploadWithBody(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	DeprecatedUpload(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, body DeprecatedUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteOp request
	DeleteOp(ctx context.Context, version string, params *DeleteOpParams, reqEditors ...RequestEditorFn) (*http.Response, error)

	// PushToImageRepositoryOpWithBody request with any body
	PushToImageRepositoryOpWithBody(ctx context.Context, version string, params *PushToImageRepositoryOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	PushToImageRepositoryOp(ctx context.Context, version string, params *PushToImageRepositoryOpParams, body PushToImageRepositoryOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// UploadOpWithBody request with any body
	UploadOpWithBody(ctx context.Context, version string, params *UploadOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	UploadOp(ctx context.Context, version string, params *UploadOpParams, body UploadOpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

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) DeleteOpWithResponse

func (c *ClientWithResponses) DeleteOpWithResponse(ctx context.Context, version string, params *DeleteOpParams, reqEditors ...RequestEditorFn) (*DeleteOpResponse, error)

DeleteOpWithResponse request returning *DeleteOpResponse

func (*ClientWithResponses) DeprecatedDeleteWithResponse

func (c *ClientWithResponses) DeprecatedDeleteWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedDeleteParams, reqEditors ...RequestEditorFn) (*DeprecatedDeleteResponse, error)

DeprecatedDeleteWithResponse request returning *DeprecatedDeleteResponse

func (*ClientWithResponses) DeprecatedPushToImageRepositoryWithBodyWithResponse

func (c *ClientWithResponses) DeprecatedPushToImageRepositoryWithBodyWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedPushToImageRepositoryResponse, error)

DeprecatedPushToImageRepositoryWithBodyWithResponse request with arbitrary body returning *DeprecatedPushToImageRepositoryResponse

func (*ClientWithResponses) DeprecatedPushToImageRepositoryWithResponse

func (c *ClientWithResponses) DeprecatedPushToImageRepositoryWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, body DeprecatedPushToImageRepositoryJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedPushToImageRepositoryResponse, error)

func (*ClientWithResponses) DeprecatedUploadWithBodyWithResponse

func (c *ClientWithResponses) DeprecatedUploadWithBodyWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedUploadResponse, error)

DeprecatedUploadWithBodyWithResponse request with arbitrary body returning *DeprecatedUploadResponse

func (*ClientWithResponses) DeprecatedUploadWithResponse

func (c *ClientWithResponses) DeprecatedUploadWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, body DeprecatedUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedUploadResponse, error)

func (*ClientWithResponses) PushToImageRepositoryOpWithBodyWithResponse

func (c *ClientWithResponses) PushToImageRepositoryOpWithBodyWithResponse(ctx context.Context, version string, params *PushToImageRepositoryOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PushToImageRepositoryOpResponse, error)

PushToImageRepositoryOpWithBodyWithResponse request with arbitrary body returning *PushToImageRepositoryOpResponse

func (*ClientWithResponses) PushToImageRepositoryOpWithResponse

func (*ClientWithResponses) UploadOpWithBodyWithResponse

func (c *ClientWithResponses) UploadOpWithBodyWithResponse(ctx context.Context, version string, params *UploadOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadOpResponse, error)

UploadOpWithBodyWithResponse request with arbitrary body returning *UploadOpResponse

func (*ClientWithResponses) UploadOpWithResponse

func (c *ClientWithResponses) UploadOpWithResponse(ctx context.Context, version string, params *UploadOpParams, body UploadOpJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadOpResponse, error)

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {
	// DeprecatedDeleteWithResponse request
	DeprecatedDeleteWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedDeleteParams, reqEditors ...RequestEditorFn) (*DeprecatedDeleteResponse, error)

	// DeprecatedPushToImageRepositoryWithBodyWithResponse request with any body
	DeprecatedPushToImageRepositoryWithBodyWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedPushToImageRepositoryResponse, error)

	DeprecatedPushToImageRepositoryWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedPushToImageRepositoryParams, body DeprecatedPushToImageRepositoryJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedPushToImageRepositoryResponse, error)

	// DeprecatedUploadWithBodyWithResponse request with any body
	DeprecatedUploadWithBodyWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeprecatedUploadResponse, error)

	DeprecatedUploadWithResponse(ctx context.Context, deprecatedVersion string, params *DeprecatedUploadParams, body DeprecatedUploadJSONRequestBody, reqEditors ...RequestEditorFn) (*DeprecatedUploadResponse, error)

	// DeleteOpWithResponse request
	DeleteOpWithResponse(ctx context.Context, version string, params *DeleteOpParams, reqEditors ...RequestEditorFn) (*DeleteOpResponse, error)

	// PushToImageRepositoryOpWithBodyWithResponse request with any body
	PushToImageRepositoryOpWithBodyWithResponse(ctx context.Context, version string, params *PushToImageRepositoryOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PushToImageRepositoryOpResponse, error)

	PushToImageRepositoryOpWithResponse(ctx context.Context, version string, params *PushToImageRepositoryOpParams, body PushToImageRepositoryOpJSONRequestBody, reqEditors ...RequestEditorFn) (*PushToImageRepositoryOpResponse, error)

	// UploadOpWithBodyWithResponse request with any body
	UploadOpWithBodyWithResponse(ctx context.Context, version string, params *UploadOpParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UploadOpResponse, error)

	UploadOpWithResponse(ctx context.Context, version string, params *UploadOpParams, body UploadOpJSONRequestBody, reqEditors ...RequestEditorFn) (*UploadOpResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type CommonErrorResponse

type CommonErrorResponse struct {
	// Errors The error array containing any errors that occurred.
	Errors *[]ErrorMessage `json:"errors,omitempty"`
}

CommonErrorResponse The error response containing any errors that occurred.

type DeleteOpParams

type DeleteOpParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Your Shipper Number
	ShipperNumber string `json:"ShipperNumber"`

	// DocumentId DocumentId representing uploaded document to Forms History. Only one DocumentID will be accepted for delete request.
	DocumentId string `json:"DocumentId"`
}

DeleteOpParams defines parameters for DeleteOp.

type DeleteOpResponse

type DeleteOpResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTDeleteResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParseDeleteOpResponse

func ParseDeleteOpResponse(rsp *http.Response) (*DeleteOpResponse, error)

ParseDeleteOpResponse parses an HTTP response from a DeleteOpWithResponse call

func (DeleteOpResponse) Status

func (r DeleteOpResponse) Status() string

Status returns HTTPResponse.Status

func (DeleteOpResponse) StatusCode

func (r DeleteOpResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeleteResponse

type DeleteResponse struct {
	// Response Response container.
	Response DeleteResponseResponse `json:"Response"`
}

DeleteResponse Paperless Document API response container for delete request.

type DeleteResponseResponse

type DeleteResponseResponse struct {
	// Alert Alert Container.  There can be zero to many alert containers with code and description.
	//
	// **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
	Alert *[]ResponseAlert `json:"Alert,omitempty"`

	// ResponseStatus Response status container.
	ResponseStatus ResponseResponseStatus `json:"ResponseStatus"`

	// TransactionReference Transaction Reference Container.
	TransactionReference *ResponseTransactionReference `json:"TransactionReference,omitempty"`
}

DeleteResponseResponse Response container.

type DeprecatedDeleteParams

type DeprecatedDeleteParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Your Shipper Number
	ShipperNumber string `json:"ShipperNumber"`

	// DocumentId DocumentId representing uploaded document to Forms History. Only one DocumentID will be accepted for delete request.
	DocumentId string `json:"DocumentId"`
}

DeprecatedDeleteParams defines parameters for DeprecatedDelete.

type DeprecatedDeleteResponse

type DeprecatedDeleteResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTDeleteResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParseDeprecatedDeleteResponse

func ParseDeprecatedDeleteResponse(rsp *http.Response) (*DeprecatedDeleteResponse, error)

ParseDeprecatedDeleteResponse parses an HTTP response from a DeprecatedDeleteWithResponse call

func (DeprecatedDeleteResponse) Status

func (r DeprecatedDeleteResponse) Status() string

Status returns HTTPResponse.Status

func (DeprecatedDeleteResponse) StatusCode

func (r DeprecatedDeleteResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DeprecatedPushToImageRepositoryJSONRequestBody

type DeprecatedPushToImageRepositoryJSONRequestBody = PAPERLESSDOCUMENTRequestWrapper

DeprecatedPushToImageRepositoryJSONRequestBody defines body for DeprecatedPushToImageRepository for application/json ContentType.

type DeprecatedPushToImageRepositoryParams

type DeprecatedPushToImageRepositoryParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Shipper Number
	ShipperNumber string `json:"ShipperNumber"`
}

DeprecatedPushToImageRepositoryParams defines parameters for DeprecatedPushToImageRepository.

type DeprecatedPushToImageRepositoryResponse

type DeprecatedPushToImageRepositoryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParseDeprecatedPushToImageRepositoryResponse

func ParseDeprecatedPushToImageRepositoryResponse(rsp *http.Response) (*DeprecatedPushToImageRepositoryResponse, error)

ParseDeprecatedPushToImageRepositoryResponse parses an HTTP response from a DeprecatedPushToImageRepositoryWithResponse call

func (DeprecatedPushToImageRepositoryResponse) Status

Status returns HTTPResponse.Status

func (DeprecatedPushToImageRepositoryResponse) StatusCode

StatusCode returns HTTPResponse.StatusCode

type DeprecatedUploadJSONRequestBody

type DeprecatedUploadJSONRequestBody = PAPERLESSDOCUMENTUploadRequestWrapper

DeprecatedUploadJSONRequestBody defines body for DeprecatedUpload for application/json ContentType.

type DeprecatedUploadParams

type DeprecatedUploadParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Shipper Number
	ShipperNumber string `json:"ShipperNumber"`
}

DeprecatedUploadParams defines parameters for DeprecatedUpload.

type DeprecatedUploadResponse

type DeprecatedUploadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTUploadResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParseDeprecatedUploadResponse

func ParseDeprecatedUploadResponse(rsp *http.Response) (*DeprecatedUploadResponse, error)

ParseDeprecatedUploadResponse parses an HTTP response from a DeprecatedUploadWithResponse call

func (DeprecatedUploadResponse) Status

func (r DeprecatedUploadResponse) Status() string

Status returns HTTPResponse.Status

func (DeprecatedUploadResponse) StatusCode

func (r DeprecatedUploadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ErrorMessage

type ErrorMessage struct {
	// Code The error code.
	Code *string `json:"code,omitempty"`

	// Message The error message.
	Message *string `json:"message,omitempty"`
}

ErrorMessage The error response containing any errors that occurred.

type ErrorResponse

type ErrorResponse struct {
	// Response The error response containing any errors that occurred.
	Response *CommonErrorResponse `json:"response,omitempty"`
}

ErrorResponse defines model for ErrorResponse.

type HttpRequestDoer

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

Doer performs HTTP requests.

The standard http.Client implements this interface.

type PAPERLESSDOCUMENTDeleteResponseWrapper

type PAPERLESSDOCUMENTDeleteResponseWrapper struct {
	// DeleteResponse Paperless Document API response container for delete request.
	DeleteResponse DeleteResponse `json:"DeleteResponse"`
}

PAPERLESSDOCUMENTDeleteResponseWrapper N/A

type PAPERLESSDOCUMENTRequestWrapper

type PAPERLESSDOCUMENTRequestWrapper struct {
	// PushToImageRepositoryRequest Paperless Document API request container for push to Image Repository.
	PushToImageRepositoryRequest PushToImageRepositoryRequest `json:"PushToImageRepositoryRequest"`
}

PAPERLESSDOCUMENTRequestWrapper N/A

type PAPERLESSDOCUMENTResponseWrapper

type PAPERLESSDOCUMENTResponseWrapper struct {
	// PushToImageRepositoryResponse Paperless Document API response container for Push To Image Repository request.
	PushToImageRepositoryResponse PushToImageRepositoryResponse `json:"PushToImageRepositoryResponse"`
}

PAPERLESSDOCUMENTResponseWrapper N/A

type PAPERLESSDOCUMENTUploadRequestWrapper

type PAPERLESSDOCUMENTUploadRequestWrapper struct {
	// UploadRequest Paperless Document API Request container for uploading User Created Forms.
	UploadRequest UploadRequest `json:"UploadRequest"`
}

PAPERLESSDOCUMENTUploadRequestWrapper N/A

type PAPERLESSDOCUMENTUploadResponseWrapper

type PAPERLESSDOCUMENTUploadResponseWrapper struct {
	// UploadResponse Paperless Document API Response Container for upload request.
	UploadResponse UploadResponse `json:"UploadResponse"`
}

PAPERLESSDOCUMENTUploadResponseWrapper N/A

type PushToImageRepositoryOpJSONRequestBody

type PushToImageRepositoryOpJSONRequestBody = PAPERLESSDOCUMENTRequestWrapper

PushToImageRepositoryOpJSONRequestBody defines body for PushToImageRepositoryOp for application/json ContentType.

type PushToImageRepositoryOpParams

type PushToImageRepositoryOpParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Shipper Number
	ShipperNumber string `json:"ShipperNumber"`
}

PushToImageRepositoryOpParams defines parameters for PushToImageRepositoryOp.

type PushToImageRepositoryOpResponse

type PushToImageRepositoryOpResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParsePushToImageRepositoryOpResponse

func ParsePushToImageRepositoryOpResponse(rsp *http.Response) (*PushToImageRepositoryOpResponse, error)

ParsePushToImageRepositoryOpResponse parses an HTTP response from a PushToImageRepositoryOpWithResponse call

func (PushToImageRepositoryOpResponse) Status

Status returns HTTPResponse.Status

func (PushToImageRepositoryOpResponse) StatusCode

func (r PushToImageRepositoryOpResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type PushToImageRepositoryRequest

type PushToImageRepositoryRequest struct {
	// FormsGroupID FormsGroupID would be required in Push Request if user needs to update uploaded DocumentID(s) in Forms History.
	FormsGroupID *string `json:"FormsGroupID,omitempty"`

	// FormsHistoryDocumentID The container for DocumentID(s).
	FormsHistoryDocumentID PushToImageRepositoryRequestFormsHistoryDocumentID `json:"FormsHistoryDocumentID"`

	// PRQConfirmationNumber PRQ Confirmation being specified by client. Required for freight shipments.
	PRQConfirmationNumber *string `json:"PRQConfirmationNumber,omitempty"`

	// Request Contains Paperless Document API PushToImageRepository request criteria components.
	Request PushToImageRepositoryRequestRequest `json:"Request"`

	// ShipmentDateAndTime The date and time of the processed shipment. Required only for small package shipments. The valid format is yyyy-MM-dd-HH.mm.ss
	ShipmentDateAndTime *string `json:"ShipmentDateAndTime,omitempty"`

	// ShipmentIdentifier Shipment Identifier is required for this request.
	ShipmentIdentifier string `json:"ShipmentIdentifier"`

	// ShipmentType Valid values are: 1 = small package, 2 = freight.
	ShipmentType string `json:"ShipmentType"`

	// ShipperNumber The Shipper's UPS Account Number.  Your UPS Account Number must have 'Upload Forms Created Offline' enabled to use this webservice.
	ShipperNumber string `json:"ShipperNumber"`

	// TrackingNumber UPS Tracking Number associated with this shipment. Required only for small package shipment.
	TrackingNumber *[]string `json:"TrackingNumber,omitempty"`
}

PushToImageRepositoryRequest Paperless Document API request container for push to Image Repository.

type PushToImageRepositoryRequestFormsHistoryDocumentID

type PushToImageRepositoryRequestFormsHistoryDocumentID struct {
	// DocumentID DocumentID represents a document uploaded to Forms History.
	DocumentID []string `json:"DocumentID"`
}

PushToImageRepositoryRequestFormsHistoryDocumentID The container for DocumentID(s).

type PushToImageRepositoryRequestRequest

type PushToImageRepositoryRequestRequest struct {
	// RequestOption Enables the user to specify optional processing. Currently, there is no optional process in Paperless Document API.
	RequestOption *string `json:"RequestOption,omitempty"`

	// SubVersion Not Used.
	SubVersion *string `json:"SubVersion,omitempty"`

	// TransactionReference TransactionReference identifies transactions between client and server.
	TransactionReference *RequestTransactionReference `json:"TransactionReference,omitempty"`
}

PushToImageRepositoryRequestRequest Contains Paperless Document API PushToImageRepository request criteria components.

type PushToImageRepositoryResponse

type PushToImageRepositoryResponse struct {
	// FormsGroupID FormsGroupID is a consolidated ID representing one or multiple DocumentID(s).
	FormsGroupID *string `json:"FormsGroupID,omitempty"`

	// Response Response container.
	Response PushToImageRepositoryResponseResponse `json:"Response"`
}

PushToImageRepositoryResponse Paperless Document API response container for Push To Image Repository request.

type PushToImageRepositoryResponseResponse

type PushToImageRepositoryResponseResponse struct {
	// Alert Alert Container.  There can be zero to many alert containers with code and description.
	//
	// **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
	Alert *[]ResponseAlert `json:"Alert,omitempty"`

	// ResponseStatus Response status container.
	ResponseStatus ResponseResponseStatus `json:"ResponseStatus"`

	// TransactionReference Transaction Reference Container.
	TransactionReference *ResponseTransactionReference `json:"TransactionReference,omitempty"`
}

PushToImageRepositoryResponseResponse Response container.

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type RequestTransactionReference

type RequestTransactionReference struct {
	// CustomerContext The client uses CustomerContext to synchronize request/response pairs. The client establishes CustomerContext, which can contain any information you want; it is echoed back by the server.
	CustomerContext *string `json:"CustomerContext,omitempty"`
}

RequestTransactionReference TransactionReference identifies transactions between client and server.

type ResponseAlert

type ResponseAlert struct {
	// Code Warning code returned by the system.
	Code string `json:"Code"`

	// Description Warning messages returned by the system.
	Description string `json:"Description"`
}

ResponseAlert Alert Container. There can be zero to many alert containers with code and description.

type ResponseResponseStatus

type ResponseResponseStatus struct {
	// Code Identifies the success or failure of the transaction. Valid values are 0 = Failed and 1 = Successful.
	Code string `json:"Code"`

	// Description Describes Response Status Code.  Returns text of "Success" or "Failure".
	Description string `json:"Description"`
}

ResponseResponseStatus Response status container.

type ResponseTransactionReference

type ResponseTransactionReference struct {
	// CustomerContext The CustomerContext Information which will be echoed during response.
	CustomerContext *string `json:"CustomerContext,omitempty"`
}

ResponseTransactionReference Transaction Reference Container.

type UploadOpJSONRequestBody

type UploadOpJSONRequestBody = PAPERLESSDOCUMENTUploadRequestWrapper

UploadOpJSONRequestBody defines body for UploadOp for application/json ContentType.

type UploadOpParams

type UploadOpParams struct {
	// TransId An identifier unique to the request. Length 32
	TransId *string `json:"transId,omitempty"`

	// TransactionSrc An identifier of the client/source application that is making the request.Length 512
	TransactionSrc *string `json:"transactionSrc,omitempty"`

	// ShipperNumber Shipper Number
	ShipperNumber string `json:"ShipperNumber"`
}

UploadOpParams defines parameters for UploadOp.

type UploadOpResponse

type UploadOpResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	JSON200      *PAPERLESSDOCUMENTUploadResponseWrapper
	JSON400      *ErrorResponse
	JSON401      *ErrorResponse
	JSON403      *ErrorResponse
	JSON429      *ErrorResponse
}

func ParseUploadOpResponse

func ParseUploadOpResponse(rsp *http.Response) (*UploadOpResponse, error)

ParseUploadOpResponse parses an HTTP response from a UploadOpWithResponse call

func (UploadOpResponse) Status

func (r UploadOpResponse) Status() string

Status returns HTTPResponse.Status

func (UploadOpResponse) StatusCode

func (r UploadOpResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type UploadRequest

type UploadRequest struct {
	// Request Contains Paperless Document API upload request criteria components.
	Request UploadRequestRequest `json:"Request"`

	// ShipperNumber The Shipper's UPS Account Number.  Your UPS Account Number must have 'Upload Forms Created Offline' enabled to use this webservice.
	ShipperNumber   string                         `json:"ShipperNumber"`
	UserCreatedForm []UploadRequestUserCreatedForm `json:"UserCreatedForm"`
}

UploadRequest Paperless Document API Request container for uploading User Created Forms.

type UploadRequestRequest

type UploadRequestRequest struct {
	// RequestOption Enables the user to specify optional processing. Currently, there is no optional process in Paperless Document API.
	RequestOption *string `json:"RequestOption,omitempty"`

	// SubVersion Not Used.
	SubVersion *string `json:"SubVersion,omitempty"`

	// TransactionReference TransactionReference identifies transactions between client and server.
	TransactionReference *RequestTransactionReference `json:"TransactionReference,omitempty"`
}

UploadRequestRequest Contains Paperless Document API upload request criteria components.

type UploadRequestUserCreatedForm

type UploadRequestUserCreatedForm struct {
	// UserCreatedFormDocumentType The type of documents in UserCreatedForm file.  The allowed document types are 001 - Authorization Form, 002 - Commercial Invoice, 003 - Certificate of Origin, 004 - Export Accompanying Document, 005 - Export License, 006 - Import Permit, 007 - One Time NAFTA, 008 - Other Document, 009 - Power of Attorney, 010 - Packing List, 011 - SED Document, 012 - Shipper's Letter of Instruction, 013 - Declaration. The total number of documents allowed per file or per shipment is 13. Each document type needs to be three digits.
	UserCreatedFormDocumentType string `json:"UserCreatedFormDocumentType"`

	// UserCreatedFormFile The user created form file.  The maximum allowable size of each file is restricted to 10 MB. Should be a base64 encoded string.
	//
	// Note: The maximum allowable size of each file is restriced to 1MB in CIE (Customer Integration Environment).
	UserCreatedFormFile string `json:"UserCreatedFormFile"`

	// UserCreatedFormFileFormat The UserCreatedForm file format.  The allowed file formats are bmp, doc, gif, jpg, pdf, png, rtf, tif, txt and xls. The only exceptions for having file format of length 4 character are docx and xlsx. All other file formats needs to be of length 3.
	UserCreatedFormFileFormat string `json:"UserCreatedFormFileFormat"`

	// UserCreatedFormFileName The name of the file.
	UserCreatedFormFileName string `json:"UserCreatedFormFileName"`
}

UploadRequestUserCreatedForm The container for User Created Form. The container holds the file. Total number of allowed files per shipment is 13.

type UploadResponse

type UploadResponse struct {
	// FormsHistoryDocumentID The container for DocumentID(s).
	FormsHistoryDocumentID *UploadResponseFormsHistoryDocumentID `json:"FormsHistoryDocumentID,omitempty"`

	// Response Response container.
	Response UploadResponseResponse `json:"Response"`
}

UploadResponse Paperless Document API Response Container for upload request.

type UploadResponseFormsHistoryDocumentID

type UploadResponseFormsHistoryDocumentID struct {
	// DocumentID DocumentID represents a document uploaded to Forms History.
	//
	// **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
	DocumentID []string `json:"DocumentID"`
}

UploadResponseFormsHistoryDocumentID The container for DocumentID(s).

type UploadResponseResponse

type UploadResponseResponse struct {
	// Alert Alert Container.  There can be zero to many alert containers with code and description.
	//
	// **NOTE:** For versions >= v2, this element will always be returned as an array. For requests using version = v1, this element will be returned as an array if there is more than one object and a single object if there is only 1.
	Alert *[]ResponseAlert `json:"Alert,omitempty"`

	// ResponseStatus Response status container.
	ResponseStatus ResponseResponseStatus `json:"ResponseStatus"`

	// TransactionReference Transaction Reference Container.
	TransactionReference *ResponseTransactionReference `json:"TransactionReference,omitempty"`
}

UploadResponseResponse Response container.

Jump to

Keyboard shortcuts

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