payment_request

package
v0.0.0-...-c486877 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for payment request API

func (*Client) CreatePaymentRequest

func (a *Client) CreatePaymentRequest(params *CreatePaymentRequestParams, opts ...ClientOption) (*CreatePaymentRequestCreated, error)
CreatePaymentRequest creates payment request

Creates a new instance of a paymentRequest and is assigned the status `PENDING`.

A move task order can have multiple payment requests, and a final payment request can be marked using boolean `isFinal`.

If a `PENDING` payment request is recalculated, a new payment request is created and the original request is marked with the status `DEPRECATED`.

**NOTE**: In order to create a payment request for most service items, the shipment *must* be updated with the `PrimeActualWeight` value via [updateMTOShipment](#operation/updateMTOShipment).

**FSC - Fuel Surcharge** service items require `ActualPickupDate` to be updated on the shipment.

A service item can be on several payment requests in the case of partial payment requests and payments.

In the request, if no params are necessary, then just the `serviceItem` `id` is required. For example: ```json

{
  "isFinal": false,
  "moveTaskOrderID": "uuid",
  "serviceItems": [
    {
      "id": "uuid",
    },
    {
      "id": "uuid",
      "params": [
        {
          "key": "Service Item Parameter Name",
          "value": "Service Item Parameter Value"
        }
      ]
    }
  ],
  "pointOfContact": "string"
}

```

SIT Service Items & Accepted Payment Request Parameters: --- If `WeightBilled` is not provided then the full shipment weight (`PrimeActualWeight`) will be considered in the calculation.

**NOTE**: Diversions have a unique calcuation for payment requests without a `WeightBilled` parameter.

If you created a payment request for a diversion and `WeightBilled` is not provided, then the following will be used in the calculation: - The lowest shipment weight (`PrimeActualWeight`) found in the diverted shipment chain. - The lowest reweigh weight found in the diverted shipment chain.

The diverted shipment chain is created by referencing the `diversion` boolean, `divertedFromShipmentId` UUID, and matching destination to pickup addresses. If the chain cannot be established it will fall back to the `PrimeActualWeight` of the current shipment. This is utilized because diverted shipments are all one single shipment, but going to different locations. The lowest weight found is the true shipment weight, and thus we search the chain of shipments for the lowest weight found.

**DOFSIT - Domestic origin 1st day SIT** ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

```

**DOASIT - Domestic origin add'l SIT** *(SITPaymentRequestStart & SITPaymentRequestEnd are **REQUIRED**)* *To create a paymentRequest for this service item, the `SITPaymentRequestStart` and `SITPaymentRequestEnd` dates must not overlap previously requested SIT dates.* ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  },
  {
    "key": "SITPaymentRequestStart",
    "value": "date"
  },
  {
    "key": "SITPaymentRequestEnd",
    "value": "date"
  }
]

```

**DOPSIT - Domestic origin SIT pickup** ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

```

**DOSHUT - Domestic origin shuttle service** ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

```

**DDFSIT - Domestic destination 1st day SIT** ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

```

**DDASIT - Domestic destination add'l SIT** *(SITPaymentRequestStart & SITPaymentRequestEnd are **REQUIRED**)* *To create a paymentRequest for this service item, the `SITPaymentRequestStart` and `SITPaymentRequestEnd` dates must not overlap previously requested SIT dates.* ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  },
  {
    "key": "SITPaymentRequestStart",
    "value": "date"
  },
  {
    "key": "SITPaymentRequestEnd",
    "value": "date"
  }
]

```

**DDDSIT - Domestic destination SIT delivery** *To create a paymentRequest for this service item, it must first have a final address set via [updateMTOServiceItem](#operation/updateMTOServiceItem).* ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

```

**DDSHUT - Domestic destination shuttle service** ```json

"params": [
  {
    "key": "WeightBilled",
    "value": "integer"
  }
]

``` ---

func (*Client) CreateUpload

func (a *Client) CreateUpload(params *CreateUploadParams, opts ...ClientOption) (*CreateUploadCreated, error)
CreateUpload creates upload

### Functionality

This endpoint **uploads** a Proof of Service document for a PaymentRequest.

The PaymentRequest should already exist.

Optional key of **isWeightTicket** indicates if the document is a weight ticket or not. This will be used for partial and full deliveries and makes it easier for the Task Invoicing Officers to locate and review service item documents. If left empty, it will assume it is NOT a weight ticket.

The formdata in the body of the POST request that is sent should look like this if it IS a weight ticket being attached to an existing payment request:

```json
{
  "file": "filePath",
  "isWeightTicket": true
}
```
If the proof of service doc is NOT a weight ticket, it will look like this - or you can leave it empty:
```json
{
  "file": "filePath",
  "isWeightTicket": false
}
```
```json
{
  "file": "filePath",
}
```

PaymentRequests are created with the [createPaymentRequest](#operation/createPaymentRequest) endpoint.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CreatePaymentRequest(params *CreatePaymentRequestParams, opts ...ClientOption) (*CreatePaymentRequestCreated, error)

	CreateUpload(params *CreateUploadParams, opts ...ClientOption) (*CreateUploadCreated, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new payment request API client.

type CreatePaymentRequestBadRequest

type CreatePaymentRequestBadRequest struct {
	Payload *primemessages.ClientError
}

CreatePaymentRequestBadRequest describes a response with status code 400, with default header values.

Request payload is invalid.

func NewCreatePaymentRequestBadRequest

func NewCreatePaymentRequestBadRequest() *CreatePaymentRequestBadRequest

NewCreatePaymentRequestBadRequest creates a CreatePaymentRequestBadRequest with default headers values

func (*CreatePaymentRequestBadRequest) Code

Code gets the status code for the create payment request bad request response

func (*CreatePaymentRequestBadRequest) Error

func (*CreatePaymentRequestBadRequest) GetPayload

func (*CreatePaymentRequestBadRequest) IsClientError

func (o *CreatePaymentRequestBadRequest) IsClientError() bool

IsClientError returns true when this create payment request bad request response has a 4xx status code

func (*CreatePaymentRequestBadRequest) IsCode

func (o *CreatePaymentRequestBadRequest) IsCode(code int) bool

IsCode returns true when this create payment request bad request response a status code equal to that given

func (*CreatePaymentRequestBadRequest) IsRedirect

func (o *CreatePaymentRequestBadRequest) IsRedirect() bool

IsRedirect returns true when this create payment request bad request response has a 3xx status code

func (*CreatePaymentRequestBadRequest) IsServerError

func (o *CreatePaymentRequestBadRequest) IsServerError() bool

IsServerError returns true when this create payment request bad request response has a 5xx status code

func (*CreatePaymentRequestBadRequest) IsSuccess

func (o *CreatePaymentRequestBadRequest) IsSuccess() bool

IsSuccess returns true when this create payment request bad request response has a 2xx status code

func (*CreatePaymentRequestBadRequest) String

type CreatePaymentRequestConflict

type CreatePaymentRequestConflict struct {
	Payload *primemessages.ClientError
}

CreatePaymentRequestConflict describes a response with status code 409, with default header values.

The request could not be processed because of conflict in the current state of the resource.

func NewCreatePaymentRequestConflict

func NewCreatePaymentRequestConflict() *CreatePaymentRequestConflict

NewCreatePaymentRequestConflict creates a CreatePaymentRequestConflict with default headers values

func (*CreatePaymentRequestConflict) Code

Code gets the status code for the create payment request conflict response

func (*CreatePaymentRequestConflict) Error

func (*CreatePaymentRequestConflict) GetPayload

func (*CreatePaymentRequestConflict) IsClientError

func (o *CreatePaymentRequestConflict) IsClientError() bool

IsClientError returns true when this create payment request conflict response has a 4xx status code

func (*CreatePaymentRequestConflict) IsCode

func (o *CreatePaymentRequestConflict) IsCode(code int) bool

IsCode returns true when this create payment request conflict response a status code equal to that given

func (*CreatePaymentRequestConflict) IsRedirect

func (o *CreatePaymentRequestConflict) IsRedirect() bool

IsRedirect returns true when this create payment request conflict response has a 3xx status code

func (*CreatePaymentRequestConflict) IsServerError

func (o *CreatePaymentRequestConflict) IsServerError() bool

IsServerError returns true when this create payment request conflict response has a 5xx status code

func (*CreatePaymentRequestConflict) IsSuccess

func (o *CreatePaymentRequestConflict) IsSuccess() bool

IsSuccess returns true when this create payment request conflict response has a 2xx status code

func (*CreatePaymentRequestConflict) String

type CreatePaymentRequestCreated

type CreatePaymentRequestCreated struct {
	Payload *primemessages.PaymentRequest
}

CreatePaymentRequestCreated describes a response with status code 201, with default header values.

Successfully created a paymentRequest object.

func NewCreatePaymentRequestCreated

func NewCreatePaymentRequestCreated() *CreatePaymentRequestCreated

NewCreatePaymentRequestCreated creates a CreatePaymentRequestCreated with default headers values

func (*CreatePaymentRequestCreated) Code

func (o *CreatePaymentRequestCreated) Code() int

Code gets the status code for the create payment request created response

func (*CreatePaymentRequestCreated) Error

func (*CreatePaymentRequestCreated) GetPayload

func (*CreatePaymentRequestCreated) IsClientError

func (o *CreatePaymentRequestCreated) IsClientError() bool

IsClientError returns true when this create payment request created response has a 4xx status code

func (*CreatePaymentRequestCreated) IsCode

func (o *CreatePaymentRequestCreated) IsCode(code int) bool

IsCode returns true when this create payment request created response a status code equal to that given

func (*CreatePaymentRequestCreated) IsRedirect

func (o *CreatePaymentRequestCreated) IsRedirect() bool

IsRedirect returns true when this create payment request created response has a 3xx status code

func (*CreatePaymentRequestCreated) IsServerError

func (o *CreatePaymentRequestCreated) IsServerError() bool

IsServerError returns true when this create payment request created response has a 5xx status code

func (*CreatePaymentRequestCreated) IsSuccess

func (o *CreatePaymentRequestCreated) IsSuccess() bool

IsSuccess returns true when this create payment request created response has a 2xx status code

func (*CreatePaymentRequestCreated) String

func (o *CreatePaymentRequestCreated) String() string

type CreatePaymentRequestForbidden

type CreatePaymentRequestForbidden struct {
	Payload *primemessages.ClientError
}

CreatePaymentRequestForbidden describes a response with status code 403, with default header values.

The request was denied.

func NewCreatePaymentRequestForbidden

func NewCreatePaymentRequestForbidden() *CreatePaymentRequestForbidden

NewCreatePaymentRequestForbidden creates a CreatePaymentRequestForbidden with default headers values

func (*CreatePaymentRequestForbidden) Code

Code gets the status code for the create payment request forbidden response

func (*CreatePaymentRequestForbidden) Error

func (*CreatePaymentRequestForbidden) GetPayload

func (*CreatePaymentRequestForbidden) IsClientError

func (o *CreatePaymentRequestForbidden) IsClientError() bool

IsClientError returns true when this create payment request forbidden response has a 4xx status code

func (*CreatePaymentRequestForbidden) IsCode

func (o *CreatePaymentRequestForbidden) IsCode(code int) bool

IsCode returns true when this create payment request forbidden response a status code equal to that given

func (*CreatePaymentRequestForbidden) IsRedirect

func (o *CreatePaymentRequestForbidden) IsRedirect() bool

IsRedirect returns true when this create payment request forbidden response has a 3xx status code

func (*CreatePaymentRequestForbidden) IsServerError

func (o *CreatePaymentRequestForbidden) IsServerError() bool

IsServerError returns true when this create payment request forbidden response has a 5xx status code

func (*CreatePaymentRequestForbidden) IsSuccess

func (o *CreatePaymentRequestForbidden) IsSuccess() bool

IsSuccess returns true when this create payment request forbidden response has a 2xx status code

func (*CreatePaymentRequestForbidden) String

type CreatePaymentRequestInternalServerError

type CreatePaymentRequestInternalServerError struct {
	Payload *primemessages.Error
}

CreatePaymentRequestInternalServerError describes a response with status code 500, with default header values.

A server error occurred.

func NewCreatePaymentRequestInternalServerError

func NewCreatePaymentRequestInternalServerError() *CreatePaymentRequestInternalServerError

NewCreatePaymentRequestInternalServerError creates a CreatePaymentRequestInternalServerError with default headers values

func (*CreatePaymentRequestInternalServerError) Code

Code gets the status code for the create payment request internal server error response

func (*CreatePaymentRequestInternalServerError) Error

func (*CreatePaymentRequestInternalServerError) GetPayload

func (*CreatePaymentRequestInternalServerError) IsClientError

func (o *CreatePaymentRequestInternalServerError) IsClientError() bool

IsClientError returns true when this create payment request internal server error response has a 4xx status code

func (*CreatePaymentRequestInternalServerError) IsCode

IsCode returns true when this create payment request internal server error response a status code equal to that given

func (*CreatePaymentRequestInternalServerError) IsRedirect

IsRedirect returns true when this create payment request internal server error response has a 3xx status code

func (*CreatePaymentRequestInternalServerError) IsServerError

func (o *CreatePaymentRequestInternalServerError) IsServerError() bool

IsServerError returns true when this create payment request internal server error response has a 5xx status code

func (*CreatePaymentRequestInternalServerError) IsSuccess

IsSuccess returns true when this create payment request internal server error response has a 2xx status code

func (*CreatePaymentRequestInternalServerError) String

type CreatePaymentRequestNotFound

type CreatePaymentRequestNotFound struct {
	Payload *primemessages.ClientError
}

CreatePaymentRequestNotFound describes a response with status code 404, with default header values.

The requested resource wasn't found.

func NewCreatePaymentRequestNotFound

func NewCreatePaymentRequestNotFound() *CreatePaymentRequestNotFound

NewCreatePaymentRequestNotFound creates a CreatePaymentRequestNotFound with default headers values

func (*CreatePaymentRequestNotFound) Code

Code gets the status code for the create payment request not found response

func (*CreatePaymentRequestNotFound) Error

func (*CreatePaymentRequestNotFound) GetPayload

func (*CreatePaymentRequestNotFound) IsClientError

func (o *CreatePaymentRequestNotFound) IsClientError() bool

IsClientError returns true when this create payment request not found response has a 4xx status code

func (*CreatePaymentRequestNotFound) IsCode

func (o *CreatePaymentRequestNotFound) IsCode(code int) bool

IsCode returns true when this create payment request not found response a status code equal to that given

func (*CreatePaymentRequestNotFound) IsRedirect

func (o *CreatePaymentRequestNotFound) IsRedirect() bool

IsRedirect returns true when this create payment request not found response has a 3xx status code

func (*CreatePaymentRequestNotFound) IsServerError

func (o *CreatePaymentRequestNotFound) IsServerError() bool

IsServerError returns true when this create payment request not found response has a 5xx status code

func (*CreatePaymentRequestNotFound) IsSuccess

func (o *CreatePaymentRequestNotFound) IsSuccess() bool

IsSuccess returns true when this create payment request not found response has a 2xx status code

func (*CreatePaymentRequestNotFound) String

type CreatePaymentRequestParams

type CreatePaymentRequestParams struct {

	// Body.
	Body *primemessages.CreatePaymentRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreatePaymentRequestParams contains all the parameters to send to the API endpoint

for the create payment request operation.

Typically these are written to a http.Request.

func NewCreatePaymentRequestParams

func NewCreatePaymentRequestParams() *CreatePaymentRequestParams

NewCreatePaymentRequestParams creates a new CreatePaymentRequestParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCreatePaymentRequestParamsWithContext

func NewCreatePaymentRequestParamsWithContext(ctx context.Context) *CreatePaymentRequestParams

NewCreatePaymentRequestParamsWithContext creates a new CreatePaymentRequestParams object with the ability to set a context for a request.

func NewCreatePaymentRequestParamsWithHTTPClient

func NewCreatePaymentRequestParamsWithHTTPClient(client *http.Client) *CreatePaymentRequestParams

NewCreatePaymentRequestParamsWithHTTPClient creates a new CreatePaymentRequestParams object with the ability to set a custom HTTPClient for a request.

func NewCreatePaymentRequestParamsWithTimeout

func NewCreatePaymentRequestParamsWithTimeout(timeout time.Duration) *CreatePaymentRequestParams

NewCreatePaymentRequestParamsWithTimeout creates a new CreatePaymentRequestParams object with the ability to set a timeout on a request.

func (*CreatePaymentRequestParams) SetBody

SetBody adds the body to the create payment request params

func (*CreatePaymentRequestParams) SetContext

func (o *CreatePaymentRequestParams) SetContext(ctx context.Context)

SetContext adds the context to the create payment request params

func (*CreatePaymentRequestParams) SetDefaults

func (o *CreatePaymentRequestParams) SetDefaults()

SetDefaults hydrates default values in the create payment request params (not the query body).

All values with no default are reset to their zero value.

func (*CreatePaymentRequestParams) SetHTTPClient

func (o *CreatePaymentRequestParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create payment request params

func (*CreatePaymentRequestParams) SetTimeout

func (o *CreatePaymentRequestParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create payment request params

func (*CreatePaymentRequestParams) WithBody

WithBody adds the body to the create payment request params

func (*CreatePaymentRequestParams) WithContext

WithContext adds the context to the create payment request params

func (*CreatePaymentRequestParams) WithDefaults

WithDefaults hydrates default values in the create payment request params (not the query body).

All values with no default are reset to their zero value.

func (*CreatePaymentRequestParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the create payment request params

func (*CreatePaymentRequestParams) WithTimeout

WithTimeout adds the timeout to the create payment request params

func (*CreatePaymentRequestParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type CreatePaymentRequestReader

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

CreatePaymentRequestReader is a Reader for the CreatePaymentRequest structure.

func (*CreatePaymentRequestReader) ReadResponse

func (o *CreatePaymentRequestReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type CreatePaymentRequestUnauthorized

type CreatePaymentRequestUnauthorized struct {
	Payload *primemessages.ClientError
}

CreatePaymentRequestUnauthorized describes a response with status code 401, with default header values.

The request was denied.

func NewCreatePaymentRequestUnauthorized

func NewCreatePaymentRequestUnauthorized() *CreatePaymentRequestUnauthorized

NewCreatePaymentRequestUnauthorized creates a CreatePaymentRequestUnauthorized with default headers values

func (*CreatePaymentRequestUnauthorized) Code

Code gets the status code for the create payment request unauthorized response

func (*CreatePaymentRequestUnauthorized) Error

func (*CreatePaymentRequestUnauthorized) GetPayload

func (*CreatePaymentRequestUnauthorized) IsClientError

func (o *CreatePaymentRequestUnauthorized) IsClientError() bool

IsClientError returns true when this create payment request unauthorized response has a 4xx status code

func (*CreatePaymentRequestUnauthorized) IsCode

func (o *CreatePaymentRequestUnauthorized) IsCode(code int) bool

IsCode returns true when this create payment request unauthorized response a status code equal to that given

func (*CreatePaymentRequestUnauthorized) IsRedirect

func (o *CreatePaymentRequestUnauthorized) IsRedirect() bool

IsRedirect returns true when this create payment request unauthorized response has a 3xx status code

func (*CreatePaymentRequestUnauthorized) IsServerError

func (o *CreatePaymentRequestUnauthorized) IsServerError() bool

IsServerError returns true when this create payment request unauthorized response has a 5xx status code

func (*CreatePaymentRequestUnauthorized) IsSuccess

func (o *CreatePaymentRequestUnauthorized) IsSuccess() bool

IsSuccess returns true when this create payment request unauthorized response has a 2xx status code

func (*CreatePaymentRequestUnauthorized) String

type CreatePaymentRequestUnprocessableEntity

type CreatePaymentRequestUnprocessableEntity struct {
	Payload *primemessages.ValidationError
}

CreatePaymentRequestUnprocessableEntity describes a response with status code 422, with default header values.

The request was unprocessable, likely due to bad input from the requester.

func NewCreatePaymentRequestUnprocessableEntity

func NewCreatePaymentRequestUnprocessableEntity() *CreatePaymentRequestUnprocessableEntity

NewCreatePaymentRequestUnprocessableEntity creates a CreatePaymentRequestUnprocessableEntity with default headers values

func (*CreatePaymentRequestUnprocessableEntity) Code

Code gets the status code for the create payment request unprocessable entity response

func (*CreatePaymentRequestUnprocessableEntity) Error

func (*CreatePaymentRequestUnprocessableEntity) GetPayload

func (*CreatePaymentRequestUnprocessableEntity) IsClientError

func (o *CreatePaymentRequestUnprocessableEntity) IsClientError() bool

IsClientError returns true when this create payment request unprocessable entity response has a 4xx status code

func (*CreatePaymentRequestUnprocessableEntity) IsCode

IsCode returns true when this create payment request unprocessable entity response a status code equal to that given

func (*CreatePaymentRequestUnprocessableEntity) IsRedirect

IsRedirect returns true when this create payment request unprocessable entity response has a 3xx status code

func (*CreatePaymentRequestUnprocessableEntity) IsServerError

func (o *CreatePaymentRequestUnprocessableEntity) IsServerError() bool

IsServerError returns true when this create payment request unprocessable entity response has a 5xx status code

func (*CreatePaymentRequestUnprocessableEntity) IsSuccess

IsSuccess returns true when this create payment request unprocessable entity response has a 2xx status code

func (*CreatePaymentRequestUnprocessableEntity) String

type CreateUploadBadRequest

type CreateUploadBadRequest struct {
	Payload *primemessages.ClientError
}

CreateUploadBadRequest describes a response with status code 400, with default header values.

The request payload is invalid.

func NewCreateUploadBadRequest

func NewCreateUploadBadRequest() *CreateUploadBadRequest

NewCreateUploadBadRequest creates a CreateUploadBadRequest with default headers values

func (*CreateUploadBadRequest) Code

func (o *CreateUploadBadRequest) Code() int

Code gets the status code for the create upload bad request response

func (*CreateUploadBadRequest) Error

func (o *CreateUploadBadRequest) Error() string

func (*CreateUploadBadRequest) GetPayload

func (*CreateUploadBadRequest) IsClientError

func (o *CreateUploadBadRequest) IsClientError() bool

IsClientError returns true when this create upload bad request response has a 4xx status code

func (*CreateUploadBadRequest) IsCode

func (o *CreateUploadBadRequest) IsCode(code int) bool

IsCode returns true when this create upload bad request response a status code equal to that given

func (*CreateUploadBadRequest) IsRedirect

func (o *CreateUploadBadRequest) IsRedirect() bool

IsRedirect returns true when this create upload bad request response has a 3xx status code

func (*CreateUploadBadRequest) IsServerError

func (o *CreateUploadBadRequest) IsServerError() bool

IsServerError returns true when this create upload bad request response has a 5xx status code

func (*CreateUploadBadRequest) IsSuccess

func (o *CreateUploadBadRequest) IsSuccess() bool

IsSuccess returns true when this create upload bad request response has a 2xx status code

func (*CreateUploadBadRequest) String

func (o *CreateUploadBadRequest) String() string

type CreateUploadCreated

type CreateUploadCreated struct {
	Payload *primemessages.UploadWithOmissions
}

CreateUploadCreated describes a response with status code 201, with default header values.

Successfully created upload of digital file.

func NewCreateUploadCreated

func NewCreateUploadCreated() *CreateUploadCreated

NewCreateUploadCreated creates a CreateUploadCreated with default headers values

func (*CreateUploadCreated) Code

func (o *CreateUploadCreated) Code() int

Code gets the status code for the create upload created response

func (*CreateUploadCreated) Error

func (o *CreateUploadCreated) Error() string

func (*CreateUploadCreated) GetPayload

func (*CreateUploadCreated) IsClientError

func (o *CreateUploadCreated) IsClientError() bool

IsClientError returns true when this create upload created response has a 4xx status code

func (*CreateUploadCreated) IsCode

func (o *CreateUploadCreated) IsCode(code int) bool

IsCode returns true when this create upload created response a status code equal to that given

func (*CreateUploadCreated) IsRedirect

func (o *CreateUploadCreated) IsRedirect() bool

IsRedirect returns true when this create upload created response has a 3xx status code

func (*CreateUploadCreated) IsServerError

func (o *CreateUploadCreated) IsServerError() bool

IsServerError returns true when this create upload created response has a 5xx status code

func (*CreateUploadCreated) IsSuccess

func (o *CreateUploadCreated) IsSuccess() bool

IsSuccess returns true when this create upload created response has a 2xx status code

func (*CreateUploadCreated) String

func (o *CreateUploadCreated) String() string

type CreateUploadForbidden

type CreateUploadForbidden struct {
	Payload *primemessages.ClientError
}

CreateUploadForbidden describes a response with status code 403, with default header values.

The request was denied.

func NewCreateUploadForbidden

func NewCreateUploadForbidden() *CreateUploadForbidden

NewCreateUploadForbidden creates a CreateUploadForbidden with default headers values

func (*CreateUploadForbidden) Code

func (o *CreateUploadForbidden) Code() int

Code gets the status code for the create upload forbidden response

func (*CreateUploadForbidden) Error

func (o *CreateUploadForbidden) Error() string

func (*CreateUploadForbidden) GetPayload

func (*CreateUploadForbidden) IsClientError

func (o *CreateUploadForbidden) IsClientError() bool

IsClientError returns true when this create upload forbidden response has a 4xx status code

func (*CreateUploadForbidden) IsCode

func (o *CreateUploadForbidden) IsCode(code int) bool

IsCode returns true when this create upload forbidden response a status code equal to that given

func (*CreateUploadForbidden) IsRedirect

func (o *CreateUploadForbidden) IsRedirect() bool

IsRedirect returns true when this create upload forbidden response has a 3xx status code

func (*CreateUploadForbidden) IsServerError

func (o *CreateUploadForbidden) IsServerError() bool

IsServerError returns true when this create upload forbidden response has a 5xx status code

func (*CreateUploadForbidden) IsSuccess

func (o *CreateUploadForbidden) IsSuccess() bool

IsSuccess returns true when this create upload forbidden response has a 2xx status code

func (*CreateUploadForbidden) String

func (o *CreateUploadForbidden) String() string

type CreateUploadInternalServerError

type CreateUploadInternalServerError struct {
	Payload *primemessages.Error
}

CreateUploadInternalServerError describes a response with status code 500, with default header values.

A server error occurred.

func NewCreateUploadInternalServerError

func NewCreateUploadInternalServerError() *CreateUploadInternalServerError

NewCreateUploadInternalServerError creates a CreateUploadInternalServerError with default headers values

func (*CreateUploadInternalServerError) Code

Code gets the status code for the create upload internal server error response

func (*CreateUploadInternalServerError) Error

func (*CreateUploadInternalServerError) GetPayload

func (*CreateUploadInternalServerError) IsClientError

func (o *CreateUploadInternalServerError) IsClientError() bool

IsClientError returns true when this create upload internal server error response has a 4xx status code

func (*CreateUploadInternalServerError) IsCode

func (o *CreateUploadInternalServerError) IsCode(code int) bool

IsCode returns true when this create upload internal server error response a status code equal to that given

func (*CreateUploadInternalServerError) IsRedirect

func (o *CreateUploadInternalServerError) IsRedirect() bool

IsRedirect returns true when this create upload internal server error response has a 3xx status code

func (*CreateUploadInternalServerError) IsServerError

func (o *CreateUploadInternalServerError) IsServerError() bool

IsServerError returns true when this create upload internal server error response has a 5xx status code

func (*CreateUploadInternalServerError) IsSuccess

func (o *CreateUploadInternalServerError) IsSuccess() bool

IsSuccess returns true when this create upload internal server error response has a 2xx status code

func (*CreateUploadInternalServerError) String

type CreateUploadNotFound

type CreateUploadNotFound struct {
	Payload *primemessages.ClientError
}

CreateUploadNotFound describes a response with status code 404, with default header values.

The requested resource wasn't found.

func NewCreateUploadNotFound

func NewCreateUploadNotFound() *CreateUploadNotFound

NewCreateUploadNotFound creates a CreateUploadNotFound with default headers values

func (*CreateUploadNotFound) Code

func (o *CreateUploadNotFound) Code() int

Code gets the status code for the create upload not found response

func (*CreateUploadNotFound) Error

func (o *CreateUploadNotFound) Error() string

func (*CreateUploadNotFound) GetPayload

func (*CreateUploadNotFound) IsClientError

func (o *CreateUploadNotFound) IsClientError() bool

IsClientError returns true when this create upload not found response has a 4xx status code

func (*CreateUploadNotFound) IsCode

func (o *CreateUploadNotFound) IsCode(code int) bool

IsCode returns true when this create upload not found response a status code equal to that given

func (*CreateUploadNotFound) IsRedirect

func (o *CreateUploadNotFound) IsRedirect() bool

IsRedirect returns true when this create upload not found response has a 3xx status code

func (*CreateUploadNotFound) IsServerError

func (o *CreateUploadNotFound) IsServerError() bool

IsServerError returns true when this create upload not found response has a 5xx status code

func (*CreateUploadNotFound) IsSuccess

func (o *CreateUploadNotFound) IsSuccess() bool

IsSuccess returns true when this create upload not found response has a 2xx status code

func (*CreateUploadNotFound) String

func (o *CreateUploadNotFound) String() string

type CreateUploadParams

type CreateUploadParams struct {

	/* File.

	   The file to upload.
	*/
	File runtime.NamedReadCloser

	/* IsWeightTicket.

	   Indicates whether the file is a weight ticket.
	*/
	IsWeightTicket *bool

	/* PaymentRequestID.

	   UUID of payment request to use.
	*/
	PaymentRequestID string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateUploadParams contains all the parameters to send to the API endpoint

for the create upload operation.

Typically these are written to a http.Request.

func NewCreateUploadParams

func NewCreateUploadParams() *CreateUploadParams

NewCreateUploadParams creates a new CreateUploadParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCreateUploadParamsWithContext

func NewCreateUploadParamsWithContext(ctx context.Context) *CreateUploadParams

NewCreateUploadParamsWithContext creates a new CreateUploadParams object with the ability to set a context for a request.

func NewCreateUploadParamsWithHTTPClient

func NewCreateUploadParamsWithHTTPClient(client *http.Client) *CreateUploadParams

NewCreateUploadParamsWithHTTPClient creates a new CreateUploadParams object with the ability to set a custom HTTPClient for a request.

func NewCreateUploadParamsWithTimeout

func NewCreateUploadParamsWithTimeout(timeout time.Duration) *CreateUploadParams

NewCreateUploadParamsWithTimeout creates a new CreateUploadParams object with the ability to set a timeout on a request.

func (*CreateUploadParams) SetContext

func (o *CreateUploadParams) SetContext(ctx context.Context)

SetContext adds the context to the create upload params

func (*CreateUploadParams) SetDefaults

func (o *CreateUploadParams) SetDefaults()

SetDefaults hydrates default values in the create upload params (not the query body).

All values with no default are reset to their zero value.

func (*CreateUploadParams) SetFile

func (o *CreateUploadParams) SetFile(file runtime.NamedReadCloser)

SetFile adds the file to the create upload params

func (*CreateUploadParams) SetHTTPClient

func (o *CreateUploadParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create upload params

func (*CreateUploadParams) SetIsWeightTicket

func (o *CreateUploadParams) SetIsWeightTicket(isWeightTicket *bool)

SetIsWeightTicket adds the isWeightTicket to the create upload params

func (*CreateUploadParams) SetPaymentRequestID

func (o *CreateUploadParams) SetPaymentRequestID(paymentRequestID string)

SetPaymentRequestID adds the paymentRequestId to the create upload params

func (*CreateUploadParams) SetTimeout

func (o *CreateUploadParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create upload params

func (*CreateUploadParams) WithContext

WithContext adds the context to the create upload params

func (*CreateUploadParams) WithDefaults

func (o *CreateUploadParams) WithDefaults() *CreateUploadParams

WithDefaults hydrates default values in the create upload params (not the query body).

All values with no default are reset to their zero value.

func (*CreateUploadParams) WithFile

WithFile adds the file to the create upload params

func (*CreateUploadParams) WithHTTPClient

func (o *CreateUploadParams) WithHTTPClient(client *http.Client) *CreateUploadParams

WithHTTPClient adds the HTTPClient to the create upload params

func (*CreateUploadParams) WithIsWeightTicket

func (o *CreateUploadParams) WithIsWeightTicket(isWeightTicket *bool) *CreateUploadParams

WithIsWeightTicket adds the isWeightTicket to the create upload params

func (*CreateUploadParams) WithPaymentRequestID

func (o *CreateUploadParams) WithPaymentRequestID(paymentRequestID string) *CreateUploadParams

WithPaymentRequestID adds the paymentRequestID to the create upload params

func (*CreateUploadParams) WithTimeout

func (o *CreateUploadParams) WithTimeout(timeout time.Duration) *CreateUploadParams

WithTimeout adds the timeout to the create upload params

func (*CreateUploadParams) WriteToRequest

func (o *CreateUploadParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type CreateUploadReader

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

CreateUploadReader is a Reader for the CreateUpload structure.

func (*CreateUploadReader) ReadResponse

func (o *CreateUploadReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type CreateUploadUnauthorized

type CreateUploadUnauthorized struct {
	Payload *primemessages.ClientError
}

CreateUploadUnauthorized describes a response with status code 401, with default header values.

The request was denied.

func NewCreateUploadUnauthorized

func NewCreateUploadUnauthorized() *CreateUploadUnauthorized

NewCreateUploadUnauthorized creates a CreateUploadUnauthorized with default headers values

func (*CreateUploadUnauthorized) Code

func (o *CreateUploadUnauthorized) Code() int

Code gets the status code for the create upload unauthorized response

func (*CreateUploadUnauthorized) Error

func (o *CreateUploadUnauthorized) Error() string

func (*CreateUploadUnauthorized) GetPayload

func (*CreateUploadUnauthorized) IsClientError

func (o *CreateUploadUnauthorized) IsClientError() bool

IsClientError returns true when this create upload unauthorized response has a 4xx status code

func (*CreateUploadUnauthorized) IsCode

func (o *CreateUploadUnauthorized) IsCode(code int) bool

IsCode returns true when this create upload unauthorized response a status code equal to that given

func (*CreateUploadUnauthorized) IsRedirect

func (o *CreateUploadUnauthorized) IsRedirect() bool

IsRedirect returns true when this create upload unauthorized response has a 3xx status code

func (*CreateUploadUnauthorized) IsServerError

func (o *CreateUploadUnauthorized) IsServerError() bool

IsServerError returns true when this create upload unauthorized response has a 5xx status code

func (*CreateUploadUnauthorized) IsSuccess

func (o *CreateUploadUnauthorized) IsSuccess() bool

IsSuccess returns true when this create upload unauthorized response has a 2xx status code

func (*CreateUploadUnauthorized) String

func (o *CreateUploadUnauthorized) String() string

type CreateUploadUnprocessableEntity

type CreateUploadUnprocessableEntity struct {
	Payload *primemessages.ValidationError
}

CreateUploadUnprocessableEntity describes a response with status code 422, with default header values.

The request was unprocessable, likely due to bad input from the requester.

func NewCreateUploadUnprocessableEntity

func NewCreateUploadUnprocessableEntity() *CreateUploadUnprocessableEntity

NewCreateUploadUnprocessableEntity creates a CreateUploadUnprocessableEntity with default headers values

func (*CreateUploadUnprocessableEntity) Code

Code gets the status code for the create upload unprocessable entity response

func (*CreateUploadUnprocessableEntity) Error

func (*CreateUploadUnprocessableEntity) GetPayload

func (*CreateUploadUnprocessableEntity) IsClientError

func (o *CreateUploadUnprocessableEntity) IsClientError() bool

IsClientError returns true when this create upload unprocessable entity response has a 4xx status code

func (*CreateUploadUnprocessableEntity) IsCode

func (o *CreateUploadUnprocessableEntity) IsCode(code int) bool

IsCode returns true when this create upload unprocessable entity response a status code equal to that given

func (*CreateUploadUnprocessableEntity) IsRedirect

func (o *CreateUploadUnprocessableEntity) IsRedirect() bool

IsRedirect returns true when this create upload unprocessable entity response has a 3xx status code

func (*CreateUploadUnprocessableEntity) IsServerError

func (o *CreateUploadUnprocessableEntity) IsServerError() bool

IsServerError returns true when this create upload unprocessable entity response has a 5xx status code

func (*CreateUploadUnprocessableEntity) IsSuccess

func (o *CreateUploadUnprocessableEntity) IsSuccess() bool

IsSuccess returns true when this create upload unprocessable entity response has a 2xx status code

func (*CreateUploadUnprocessableEntity) String

Jump to

Keyboard shortcuts

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