mirror of https://github.com/vernonkeenan/lib
487 lines
16 KiB
Go
487 lines
16 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
|
// All rights reserved worldwide.
|
|
// Proprietary product; unlicensed use is not allowed
|
|
|
|
package payment_methods
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
|
)
|
|
|
|
// GetPaymentMethodsReader is a Reader for the GetPaymentMethods structure.
|
|
type GetPaymentMethodsReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetPaymentMethodsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetPaymentMethodsOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetPaymentMethodsUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetPaymentMethodsForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetPaymentMethodsNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 422:
|
|
result := NewGetPaymentMethodsUnprocessableEntity()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetPaymentMethodsInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetPaymentMethodsOK creates a GetPaymentMethodsOK with default headers values
|
|
func NewGetPaymentMethodsOK() *GetPaymentMethodsOK {
|
|
return &GetPaymentMethodsOK{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsOK describes a response with status code 200, with default header values.
|
|
|
|
PaymentMethod Response Object
|
|
*/
|
|
type GetPaymentMethodsOK struct {
|
|
Payload *members_models.PaymentMethodResponse
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods o k response has a 2xx status code
|
|
func (o *GetPaymentMethodsOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods o k response has a 3xx status code
|
|
func (o *GetPaymentMethodsOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods o k response has a 4xx status code
|
|
func (o *GetPaymentMethodsOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods o k response has a 5xx status code
|
|
func (o *GetPaymentMethodsOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods o k response a status code equal to that given
|
|
func (o *GetPaymentMethodsOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods o k response
|
|
func (o *GetPaymentMethodsOK) Code() int {
|
|
return 200
|
|
}
|
|
|
|
func (o *GetPaymentMethodsOK) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsOK) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsOK) GetPayload() *members_models.PaymentMethodResponse {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.PaymentMethodResponse)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPaymentMethodsUnauthorized creates a GetPaymentMethodsUnauthorized with default headers values
|
|
func NewGetPaymentMethodsUnauthorized() *GetPaymentMethodsUnauthorized {
|
|
return &GetPaymentMethodsUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
Access Unauthorized, invalid API-KEY was used
|
|
*/
|
|
type GetPaymentMethodsUnauthorized struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods unauthorized response has a 2xx status code
|
|
func (o *GetPaymentMethodsUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods unauthorized response has a 3xx status code
|
|
func (o *GetPaymentMethodsUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods unauthorized response has a 4xx status code
|
|
func (o *GetPaymentMethodsUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods unauthorized response has a 5xx status code
|
|
func (o *GetPaymentMethodsUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods unauthorized response a status code equal to that given
|
|
func (o *GetPaymentMethodsUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods unauthorized response
|
|
func (o *GetPaymentMethodsUnauthorized) Code() int {
|
|
return 401
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnauthorized) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPaymentMethodsForbidden creates a GetPaymentMethodsForbidden with default headers values
|
|
func NewGetPaymentMethodsForbidden() *GetPaymentMethodsForbidden {
|
|
return &GetPaymentMethodsForbidden{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsForbidden describes a response with status code 403, with default header values.
|
|
|
|
Access forbidden, account lacks access
|
|
*/
|
|
type GetPaymentMethodsForbidden struct {
|
|
AccessControlAllowOrigin string
|
|
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods forbidden response has a 2xx status code
|
|
func (o *GetPaymentMethodsForbidden) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods forbidden response has a 3xx status code
|
|
func (o *GetPaymentMethodsForbidden) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods forbidden response has a 4xx status code
|
|
func (o *GetPaymentMethodsForbidden) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods forbidden response has a 5xx status code
|
|
func (o *GetPaymentMethodsForbidden) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods forbidden response a status code equal to that given
|
|
func (o *GetPaymentMethodsForbidden) IsCode(code int) bool {
|
|
return code == 403
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods forbidden response
|
|
func (o *GetPaymentMethodsForbidden) Code() int {
|
|
return 403
|
|
}
|
|
|
|
func (o *GetPaymentMethodsForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsForbidden) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsForbidden %+v", 403, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsForbidden) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// hydrates response header Access-Control-Allow-Origin
|
|
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
|
|
|
if hdrAccessControlAllowOrigin != "" {
|
|
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
|
}
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPaymentMethodsNotFound creates a GetPaymentMethodsNotFound with default headers values
|
|
func NewGetPaymentMethodsNotFound() *GetPaymentMethodsNotFound {
|
|
return &GetPaymentMethodsNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsNotFound describes a response with status code 404, with default header values.
|
|
|
|
Resource was not found
|
|
*/
|
|
type GetPaymentMethodsNotFound struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods not found response has a 2xx status code
|
|
func (o *GetPaymentMethodsNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods not found response has a 3xx status code
|
|
func (o *GetPaymentMethodsNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods not found response has a 4xx status code
|
|
func (o *GetPaymentMethodsNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods not found response has a 5xx status code
|
|
func (o *GetPaymentMethodsNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods not found response a status code equal to that given
|
|
func (o *GetPaymentMethodsNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods not found response
|
|
func (o *GetPaymentMethodsNotFound) Code() int {
|
|
return 404
|
|
}
|
|
|
|
func (o *GetPaymentMethodsNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsNotFound) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsNotFound) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPaymentMethodsUnprocessableEntity creates a GetPaymentMethodsUnprocessableEntity with default headers values
|
|
func NewGetPaymentMethodsUnprocessableEntity() *GetPaymentMethodsUnprocessableEntity {
|
|
return &GetPaymentMethodsUnprocessableEntity{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsUnprocessableEntity describes a response with status code 422, with default header values.
|
|
|
|
Unprocessable Entity, likely a bad parameter
|
|
*/
|
|
type GetPaymentMethodsUnprocessableEntity struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods unprocessable entity response has a 2xx status code
|
|
func (o *GetPaymentMethodsUnprocessableEntity) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods unprocessable entity response has a 3xx status code
|
|
func (o *GetPaymentMethodsUnprocessableEntity) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods unprocessable entity response has a 4xx status code
|
|
func (o *GetPaymentMethodsUnprocessableEntity) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods unprocessable entity response has a 5xx status code
|
|
func (o *GetPaymentMethodsUnprocessableEntity) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods unprocessable entity response a status code equal to that given
|
|
func (o *GetPaymentMethodsUnprocessableEntity) IsCode(code int) bool {
|
|
return code == 422
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods unprocessable entity response
|
|
func (o *GetPaymentMethodsUnprocessableEntity) Code() int {
|
|
return 422
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnprocessableEntity) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnprocessableEntity) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsUnprocessableEntity %+v", 422, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnprocessableEntity) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetPaymentMethodsInternalServerError creates a GetPaymentMethodsInternalServerError with default headers values
|
|
func NewGetPaymentMethodsInternalServerError() *GetPaymentMethodsInternalServerError {
|
|
return &GetPaymentMethodsInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetPaymentMethodsInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
Server Internal Error
|
|
*/
|
|
type GetPaymentMethodsInternalServerError struct {
|
|
Payload *members_models.Error
|
|
}
|
|
|
|
// IsSuccess returns true when this get payment methods internal server error response has a 2xx status code
|
|
func (o *GetPaymentMethodsInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get payment methods internal server error response has a 3xx status code
|
|
func (o *GetPaymentMethodsInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get payment methods internal server error response has a 4xx status code
|
|
func (o *GetPaymentMethodsInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get payment methods internal server error response has a 5xx status code
|
|
func (o *GetPaymentMethodsInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get payment methods internal server error response a status code equal to that given
|
|
func (o *GetPaymentMethodsInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
// Code gets the status code for the get payment methods internal server error response
|
|
func (o *GetPaymentMethodsInternalServerError) Code() int {
|
|
return 500
|
|
}
|
|
|
|
func (o *GetPaymentMethodsInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /paymentmethods][%d] getPaymentMethodsInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetPaymentMethodsInternalServerError) GetPayload() *members_models.Error {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetPaymentMethodsInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(members_models.Error)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|