Bump version
This commit is contained in:
parent
250d72604e
commit
04e92891e3
638
api_accounts.go
638
api_accounts.go
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Firefly III API v2.0.14
|
* Firefly III API v2.0.14
|
||||||
*
|
*
|
||||||
@ -12,12 +11,13 @@ package swagger
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/antihax/optional"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"github.com/antihax/optional"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Linger please
|
// Linger please
|
||||||
@ -26,6 +26,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type AttachmentsApiService service
|
type AttachmentsApiService service
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Delete an attachment.
|
AttachmentsApiService Delete an attachment.
|
||||||
With this endpoint you delete an attachment, including any stored file data.
|
With this endpoint you delete an attachment, including any stored file data.
|
||||||
@ -37,7 +38,7 @@ With this endpoint you delete an attachment, including any stored file data.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiDeleteAttachmentOpts struct {
|
type AttachmentsApiDeleteAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDeleteAttachmentOpts) (*http.Response, error) {
|
func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDeleteAttachmentOpts) (*http.Response, error) {
|
||||||
@ -46,7 +47,6 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
|
|||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -93,57 +93,57 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
|
|||||||
return localVarHttpResponse, err
|
return localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarHttpResponse, nil
|
return localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Download a single attachment.
|
AttachmentsApiService Download a single attachment.
|
||||||
This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
|
This endpoint allows you to download the binary content of a transaction. It will be sent to you as a download, using the content type \"application/octet-stream\" and content disposition \"attachment; filename=example.pdf\".
|
||||||
@ -155,15 +155,15 @@ This endpoint allows you to download the binary content of a transaction. It wil
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiDownloadAttachmentOpts struct {
|
type AttachmentsApiDownloadAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDownloadAttachmentOpts) (*os.File, *http.Response, error) {
|
func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiDownloadAttachmentOpts) (*os.File, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue *os.File
|
localVarReturnValue *os.File
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -221,64 +221,65 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v *os.File
|
var v *os.File
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Get a single attachment.
|
AttachmentsApiService Get a single attachment.
|
||||||
Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
|
Get a single attachment. This endpoint only returns the available metadata for the attachment. Actual file data is handled in two other endpoints (see below).
|
||||||
@ -290,15 +291,15 @@ Get a single attachment. This endpoint only returns the available metadata for t
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiGetAttachmentOpts struct {
|
type AttachmentsApiGetAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiGetAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiGetAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue AttachmentSingle
|
localVarReturnValue AttachmentSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -348,7 +349,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -356,64 +357,65 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v AttachmentSingle
|
var v AttachmentSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService List all attachments.
|
AttachmentsApiService List all attachments.
|
||||||
This endpoint lists all attachments.
|
This endpoint lists all attachments.
|
||||||
@ -426,17 +428,17 @@ This endpoint lists all attachments.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiListAttachmentOpts struct {
|
type AttachmentsApiListAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOptionals *AttachmentsApiListAttachmentOpts) (AttachmentArray, *http.Response, error) {
|
func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOptionals *AttachmentsApiListAttachmentOpts) (AttachmentArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue AttachmentArray
|
localVarReturnValue AttachmentArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -491,7 +493,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -499,64 +501,65 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v AttachmentArray
|
var v AttachmentArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Store a new attachment.
|
AttachmentsApiService Store a new attachment.
|
||||||
Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
|
Creates a new attachment. The data required can be submitted as a JSON body or as a list of parameters. You cannot use this endpoint to upload the actual file data (see below). This endpoint only creates the attachment object.
|
||||||
@ -568,15 +571,15 @@ Creates a new attachment. The data required can be submitted as a JSON body or a
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiStoreAttachmentOpts struct {
|
type AttachmentsApiStoreAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body AttachmentStore, localVarOptionals *AttachmentsApiStoreAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body AttachmentStore, localVarOptionals *AttachmentsApiStoreAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue AttachmentSingle
|
localVarReturnValue AttachmentSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -627,7 +630,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -635,74 +638,75 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v AttachmentSingle
|
var v AttachmentSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Update existing attachment.
|
AttachmentsApiService Update existing attachment.
|
||||||
Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
|
Update the meta data for an existing attachment. This endpoint does not allow you to upload or download data. For that, see below.
|
||||||
@ -715,15 +719,15 @@ Update the meta data for an existing attachment. This endpoint does not allow yo
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiUpdateAttachmentOpts struct {
|
type AttachmentsApiUpdateAttachmentOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body AttachmentUpdate, id string, localVarOptionals *AttachmentsApiUpdateAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body AttachmentUpdate, id string, localVarOptionals *AttachmentsApiUpdateAttachmentOpts) (AttachmentSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue AttachmentSingle
|
localVarReturnValue AttachmentSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -775,7 +779,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -783,74 +787,75 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v AttachmentSingle
|
var v AttachmentSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
AttachmentsApiService Upload an attachment.
|
AttachmentsApiService Upload an attachment.
|
||||||
Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
|
Use this endpoint to upload (and possible overwrite) the file contents of an attachment. Simply put the entire file in the body as binary data.
|
||||||
@ -863,8 +868,8 @@ Use this endpoint to upload (and possible overwrite) the file contents of an att
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type AttachmentsApiUploadAttachmentOpts struct {
|
type AttachmentsApiUploadAttachmentOpts struct {
|
||||||
Body optional.Interface
|
Body optional.Interface
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiUploadAttachmentOpts) (*http.Response, error) {
|
func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string, localVarOptionals *AttachmentsApiUploadAttachmentOpts) (*http.Response, error) {
|
||||||
@ -873,7 +878,6 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
|
|||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -907,7 +911,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
|
|||||||
// body params
|
// body params
|
||||||
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
|
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
|
||||||
|
|
||||||
localVarOptionalBody:= localVarOptionals.Body.Value()
|
localVarOptionalBody := localVarOptionals.Body.Value()
|
||||||
localVarPostBody = &localVarOptionalBody
|
localVarPostBody = &localVarOptionalBody
|
||||||
}
|
}
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
@ -926,61 +930,60 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
|
|||||||
return localVarHttpResponse, err
|
return localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
632
api_bills.go
632
api_bills.go
File diff suppressed because it is too large
Load Diff
1100
api_budgets.go
1100
api_budgets.go
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Firefly III API v2.0.14
|
* Firefly III API v2.0.14
|
||||||
*
|
*
|
||||||
@ -12,13 +11,12 @@ package swagger
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/antihax/optional"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"github.com/antihax/optional"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Linger please
|
// Linger please
|
||||||
@ -27,6 +25,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type CategoriesApiService service
|
type CategoriesApiService service
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService Delete a category.
|
CategoriesApiService Delete a category.
|
||||||
Delete a category. Transactions will not be removed.
|
Delete a category. Transactions will not be removed.
|
||||||
@ -38,7 +37,7 @@ Delete a category. Transactions will not be removed.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiDeleteCategoryOpts struct {
|
type CategoriesApiDeleteCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiDeleteCategoryOpts) (*http.Response, error) {
|
func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiDeleteCategoryOpts) (*http.Response, error) {
|
||||||
@ -47,7 +46,6 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
|
|||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -94,57 +92,57 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
|
|||||||
return localVarHttpResponse, err
|
return localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarHttpResponse, nil
|
return localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService Get a single category.
|
CategoriesApiService Get a single category.
|
||||||
Get a single category.
|
Get a single category.
|
||||||
@ -158,17 +156,17 @@ Get a single category.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiGetCategoryOpts struct {
|
type CategoriesApiGetCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Start optional.String
|
Start optional.String
|
||||||
End optional.String
|
End optional.String
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiGetCategoryOpts) (CategorySingle, *http.Response, error) {
|
func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiGetCategoryOpts) (CategorySingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue CategorySingle
|
localVarReturnValue CategorySingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -224,7 +222,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -232,64 +230,65 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v CategorySingle
|
var v CategorySingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService Lists all attachments.
|
CategoriesApiService Lists all attachments.
|
||||||
Lists all attachments.
|
Lists all attachments.
|
||||||
@ -303,17 +302,17 @@ Lists all attachments.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiListAttachmentByCategoryOpts struct {
|
type CategoriesApiListAttachmentByCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListAttachmentByCategoryOpts) (AttachmentArray, *http.Response, error) {
|
func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListAttachmentByCategoryOpts) (AttachmentArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue AttachmentArray
|
localVarReturnValue AttachmentArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -369,7 +368,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -377,64 +376,65 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v AttachmentArray
|
var v AttachmentArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService List all categories.
|
CategoriesApiService List all categories.
|
||||||
List all categories.
|
List all categories.
|
||||||
@ -447,17 +447,17 @@ List all categories.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiListCategoryOpts struct {
|
type CategoriesApiListCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptionals *CategoriesApiListCategoryOpts) (CategoryArray, *http.Response, error) {
|
func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptionals *CategoriesApiListCategoryOpts) (CategoryArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue CategoryArray
|
localVarReturnValue CategoryArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -512,7 +512,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -520,64 +520,65 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v CategoryArray
|
var v CategoryArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService List all transactions in a category.
|
CategoriesApiService List all transactions in a category.
|
||||||
List all transactions in a category, optionally limited to the date ranges specified.
|
List all transactions in a category, optionally limited to the date ranges specified.
|
||||||
@ -594,20 +595,20 @@ List all transactions in a category, optionally limited to the date ranges speci
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiListTransactionByCategoryOpts struct {
|
type CategoriesApiListTransactionByCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
Start optional.String
|
Start optional.String
|
||||||
End optional.String
|
End optional.String
|
||||||
Type_ optional.Interface
|
Type_ optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListTransactionByCategoryOpts) (TransactionArray, *http.Response, error) {
|
func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id string, localVarOptionals *CategoriesApiListTransactionByCategoryOpts) (TransactionArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue TransactionArray
|
localVarReturnValue TransactionArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -672,7 +673,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -680,64 +681,65 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v TransactionArray
|
var v TransactionArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService Store a new category
|
CategoriesApiService Store a new category
|
||||||
Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
|
Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
|
||||||
@ -749,15 +751,15 @@ Creates a new category. The data required can be submitted as a JSON body or as
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiStoreCategoryOpts struct {
|
type CategoriesApiStoreCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category, localVarOptionals *CategoriesApiStoreCategoryOpts) (CategorySingle, *http.Response, error) {
|
func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category, localVarOptionals *CategoriesApiStoreCategoryOpts) (CategorySingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue CategorySingle
|
localVarReturnValue CategorySingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -808,7 +810,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -816,74 +818,75 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v CategorySingle
|
var v CategorySingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
CategoriesApiService Update existing category.
|
CategoriesApiService Update existing category.
|
||||||
Update existing category.
|
Update existing category.
|
||||||
@ -896,15 +899,15 @@ Update existing category.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type CategoriesApiUpdateCategoryOpts struct {
|
type CategoriesApiUpdateCategoryOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body CategoryUpdate, id string, localVarOptionals *CategoriesApiUpdateCategoryOpts) (CategorySingle, *http.Response, error) {
|
func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body CategoryUpdate, id string, localVarOptionals *CategoriesApiUpdateCategoryOpts) (CategorySingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue CategorySingle
|
localVarReturnValue CategorySingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -956,7 +959,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -964,68 +967,68 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v CategorySingle
|
var v CategorySingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Firefly III API v2.0.14
|
* Firefly III API v2.0.14
|
||||||
*
|
*
|
||||||
@ -12,12 +11,12 @@ package swagger
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/antihax/optional"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"github.com/antihax/optional"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Linger please
|
// Linger please
|
||||||
@ -26,6 +25,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type ConfigurationApiService service
|
type ConfigurationApiService service
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ConfigurationApiService Get Firefly III system configuration values.
|
ConfigurationApiService Get Firefly III system configuration values.
|
||||||
Returns all editable and not-editable configuration values for this Firefly III installation
|
Returns all editable and not-editable configuration values for this Firefly III installation
|
||||||
@ -36,15 +36,15 @@ Returns all editable and not-editable configuration values for this Firefly III
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type ConfigurationApiGetConfigurationOpts struct {
|
type ConfigurationApiGetConfigurationOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVarOptionals *ConfigurationApiGetConfigurationOpts) ([]Configuration, *http.Response, error) {
|
func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVarOptionals *ConfigurationApiGetConfigurationOpts) ([]Configuration, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue []Configuration
|
localVarReturnValue []Configuration
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -101,64 +101,65 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v []Configuration
|
var v []Configuration
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ConfigurationApiService Get a single Firefly III system configuration value
|
ConfigurationApiService Get a single Firefly III system configuration value
|
||||||
Returns one configuration variable for this Firefly III installation
|
Returns one configuration variable for this Firefly III installation
|
||||||
@ -170,15 +171,15 @@ Returns one configuration variable for this Firefly III installation
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type ConfigurationApiGetSingleConfigurationOpts struct {
|
type ConfigurationApiGetSingleConfigurationOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, name ConfigValueFilter, localVarOptionals *ConfigurationApiGetSingleConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
|
func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, name ConfigValueFilter, localVarOptionals *ConfigurationApiGetSingleConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue ConfigurationSingle
|
localVarReturnValue ConfigurationSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -228,7 +229,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -236,64 +237,65 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v ConfigurationSingle
|
var v ConfigurationSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ConfigurationApiService Update configuration value
|
ConfigurationApiService Update configuration value
|
||||||
Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small.
|
Set a single configuration value. Not all configuration values can be updated so the list of accepted configuration variables is small.
|
||||||
@ -306,15 +308,15 @@ Set a single configuration value. Not all configuration values can be updated so
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type ConfigurationApiSetConfigurationOpts struct {
|
type ConfigurationApiSetConfigurationOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value PolymorphicProperty, name ConfigValueUpdateFilter, localVarOptionals *ConfigurationApiSetConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
|
func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value PolymorphicProperty, name ConfigValueUpdateFilter, localVarOptionals *ConfigurationApiSetConfigurationOpts) (ConfigurationSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue ConfigurationSingle
|
localVarReturnValue ConfigurationSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -347,7 +349,6 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
|
|||||||
localVarHeaderParams["X-Trace-Id"] = parameterToString(localVarOptionals.XTraceId.Value(), "")
|
localVarHeaderParams["X-Trace-Id"] = parameterToString(localVarOptionals.XTraceId.Value(), "")
|
||||||
}
|
}
|
||||||
// body params
|
// body params
|
||||||
localVarPostBody = &body
|
|
||||||
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return localVarReturnValue, nil, err
|
return localVarReturnValue, nil, err
|
||||||
@ -366,7 +367,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -374,68 +375,68 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v ConfigurationSingle
|
var v ConfigurationSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
855
api_data.go
855
api_data.go
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Firefly III API v2.0.14
|
* Firefly III API v2.0.14
|
||||||
*
|
*
|
||||||
@ -12,13 +11,12 @@ package swagger
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/antihax/optional"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"github.com/antihax/optional"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Linger please
|
// Linger please
|
||||||
@ -27,6 +25,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type PreferencesApiService service
|
type PreferencesApiService service
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PreferencesApiService Return a single preference.
|
PreferencesApiService Return a single preference.
|
||||||
Return a single preference and the value.
|
Return a single preference and the value.
|
||||||
@ -38,15 +37,15 @@ Return a single preference and the value.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type PreferencesApiGetPreferenceOpts struct {
|
type PreferencesApiGetPreferenceOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *PreferencesApiService) GetPreference(ctx context.Context, name string, localVarOptionals *PreferencesApiGetPreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
func (a *PreferencesApiService) GetPreference(ctx context.Context, name string, localVarOptionals *PreferencesApiGetPreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue PreferenceSingle
|
localVarReturnValue PreferenceSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -96,7 +95,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -104,64 +103,65 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v PreferenceSingle
|
var v PreferenceSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PreferencesApiService List all users preferences.
|
PreferencesApiService List all users preferences.
|
||||||
List all of the preferences of the user.
|
List all of the preferences of the user.
|
||||||
@ -174,17 +174,17 @@ List all of the preferences of the user.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type PreferencesApiListPreferenceOpts struct {
|
type PreferencesApiListPreferenceOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOptionals *PreferencesApiListPreferenceOpts) (PreferenceArray, *http.Response, error) {
|
func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOptionals *PreferencesApiListPreferenceOpts) (PreferenceArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue PreferenceArray
|
localVarReturnValue PreferenceArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -247,64 +247,65 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v PreferenceArray
|
var v PreferenceArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PreferencesApiService Store a new preference for this user.
|
PreferencesApiService Store a new preference for this user.
|
||||||
This endpoint creates a new preference. The name and data are free-format, and entirely up to you. If the preference is not used in Firefly III itself it may not be configurable through the user interface, but you can use this endpoint to persist custom data for your own app.
|
This endpoint creates a new preference. The name and data are free-format, and entirely up to you. If the preference is not used in Firefly III itself it may not be configurable through the user interface, but you can use this endpoint to persist custom data for your own app.
|
||||||
@ -316,15 +317,15 @@ This endpoint creates a new preference. The name and data are free-format, and e
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type PreferencesApiStorePreferenceOpts struct {
|
type PreferencesApiStorePreferenceOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *PreferencesApiService) StorePreference(ctx context.Context, body Preference, localVarOptionals *PreferencesApiStorePreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
func (a *PreferencesApiService) StorePreference(ctx context.Context, body Preference, localVarOptionals *PreferencesApiStorePreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue PreferenceSingle
|
localVarReturnValue PreferenceSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -375,7 +376,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -383,74 +384,75 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v PreferenceSingle
|
var v PreferenceSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
PreferencesApiService Update preference
|
PreferencesApiService Update preference
|
||||||
Update a user's preference.
|
Update a user's preference.
|
||||||
@ -463,15 +465,15 @@ Update a user's preference.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type PreferencesApiUpdatePreferenceOpts struct {
|
type PreferencesApiUpdatePreferenceOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body PreferenceUpdate, name string, localVarOptionals *PreferencesApiUpdatePreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body PreferenceUpdate, name string, localVarOptionals *PreferencesApiUpdatePreferenceOpts) (PreferenceSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue PreferenceSingle
|
localVarReturnValue PreferenceSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -523,7 +525,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -531,68 +533,68 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v PreferenceSingle
|
var v PreferenceSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
389
api_users.go
389
api_users.go
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Firefly III API v2.0.14
|
* Firefly III API v2.0.14
|
||||||
*
|
*
|
||||||
@ -12,13 +11,12 @@ package swagger
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"fmt"
|
||||||
|
"github.com/antihax/optional"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
|
||||||
"github.com/antihax/optional"
|
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Linger please
|
// Linger please
|
||||||
@ -27,6 +25,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type UsersApiService service
|
type UsersApiService service
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UsersApiService Delete a user.
|
UsersApiService Delete a user.
|
||||||
Delete a user. You cannot delete the user you're authenticated with. This cannot be undone. Be careful!
|
Delete a user. You cannot delete the user you're authenticated with. This cannot be undone. Be careful!
|
||||||
@ -38,7 +37,7 @@ Delete a user. You cannot delete the user you're authenticated with. This c
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type UsersApiDeleteUserOpts struct {
|
type UsersApiDeleteUserOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOptionals *UsersApiDeleteUserOpts) (*http.Response, error) {
|
func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOptionals *UsersApiDeleteUserOpts) (*http.Response, error) {
|
||||||
@ -47,7 +46,6 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
|
|||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -94,57 +92,57 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
|
|||||||
return localVarHttpResponse, err
|
return localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarHttpResponse, newErr
|
return localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarHttpResponse, nil
|
return localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UsersApiService Get a single user.
|
UsersApiService Get a single user.
|
||||||
Gets all info of a single user.
|
Gets all info of a single user.
|
||||||
@ -156,15 +154,15 @@ Gets all info of a single user.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type UsersApiGetUserOpts struct {
|
type UsersApiGetUserOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOptionals *UsersApiGetUserOpts) (UserSingle, *http.Response, error) {
|
func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOptionals *UsersApiGetUserOpts) (UserSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue UserSingle
|
localVarReturnValue UserSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -214,7 +212,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -222,64 +220,65 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v UserSingle
|
var v UserSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UsersApiService List all users.
|
UsersApiService List all users.
|
||||||
List all the users in this instance of Firefly III.
|
List all the users in this instance of Firefly III.
|
||||||
@ -292,17 +291,17 @@ List all the users in this instance of Firefly III.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type UsersApiListUserOpts struct {
|
type UsersApiListUserOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
Limit optional.Int32
|
Limit optional.Int32
|
||||||
Page optional.Int32
|
Page optional.Int32
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *UsersApiListUserOpts) (UserArray, *http.Response, error) {
|
func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *UsersApiListUserOpts) (UserArray, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Get")
|
localVarHttpMethod = strings.ToUpper("Get")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue UserArray
|
localVarReturnValue UserArray
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -357,7 +356,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -365,64 +364,65 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v UserArray
|
var v UserArray
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UsersApiService Store a new user
|
UsersApiService Store a new user
|
||||||
Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the \"forgot password\" function.
|
Creates a new user. The data required can be submitted as a JSON body or as a list of parameters. The user will be given a random password, which they can reset using the \"forgot password\" function.
|
||||||
@ -434,15 +434,15 @@ Creates a new user. The data required can be submitted as a JSON body or as a li
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type UsersApiStoreUserOpts struct {
|
type UsersApiStoreUserOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOptionals *UsersApiStoreUserOpts) (UserSingle, *http.Response, error) {
|
func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOptionals *UsersApiStoreUserOpts) (UserSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Post")
|
localVarHttpMethod = strings.ToUpper("Post")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue UserSingle
|
localVarReturnValue UserSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -501,74 +501,75 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v UserSingle
|
var v UserSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
|
||||||
return localVarReturnValue, localVarHttpResponse, nil
|
return localVarReturnValue, localVarHttpResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
UsersApiService Update an existing user's information.
|
UsersApiService Update an existing user's information.
|
||||||
Update existing user.
|
Update existing user.
|
||||||
@ -581,15 +582,15 @@ Update existing user.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
type UsersApiUpdateUserOpts struct {
|
type UsersApiUpdateUserOpts struct {
|
||||||
XTraceId optional.Interface
|
XTraceId optional.Interface
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string, localVarOptionals *UsersApiUpdateUserOpts) (UserSingle, *http.Response, error) {
|
func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string, localVarOptionals *UsersApiUpdateUserOpts) (UserSingle, *http.Response, error) {
|
||||||
var (
|
var (
|
||||||
localVarHttpMethod = strings.ToUpper("Put")
|
localVarHttpMethod = strings.ToUpper("Put")
|
||||||
localVarPostBody interface{}
|
localVarPostBody interface{}
|
||||||
localVarFileName string
|
localVarFileName string
|
||||||
localVarFileBytes []byte
|
localVarFileBytes []byte
|
||||||
localVarReturnValue UserSingle
|
localVarReturnValue UserSingle
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -641,7 +642,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode < 300 {
|
if localVarHttpResponse.StatusCode < 300 {
|
||||||
// If we succeed, return the data, otherwise pass on to decode error.
|
// If we succeed, return the data, otherwise pass on to decode error.
|
||||||
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return localVarReturnValue, localVarHttpResponse, err
|
return localVarReturnValue, localVarHttpResponse, err
|
||||||
}
|
}
|
||||||
@ -649,68 +650,68 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
|
|||||||
|
|
||||||
if localVarHttpResponse.StatusCode >= 300 {
|
if localVarHttpResponse.StatusCode >= 300 {
|
||||||
newErr := GenericSwaggerError{
|
newErr := GenericSwaggerError{
|
||||||
body: localVarBody,
|
body: localVarBody,
|
||||||
error: localVarHttpResponse.Status,
|
error: localVarHttpResponse.Status,
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 200 {
|
if localVarHttpResponse.StatusCode == 200 {
|
||||||
var v UserSingle
|
var v UserSingle
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 422 {
|
if localVarHttpResponse.StatusCode == 422 {
|
||||||
var v ValidationErrorResponse
|
var v ValidationErrorResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 401 {
|
if localVarHttpResponse.StatusCode == 401 {
|
||||||
var v UnauthenticatedResponse
|
var v UnauthenticatedResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 404 {
|
if localVarHttpResponse.StatusCode == 404 {
|
||||||
var v NotFoundResponse
|
var v NotFoundResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 400 {
|
if localVarHttpResponse.StatusCode == 400 {
|
||||||
var v BadRequestResponse
|
var v BadRequestResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
if localVarHttpResponse.StatusCode == 500 {
|
if localVarHttpResponse.StatusCode == 500 {
|
||||||
var v InternalExceptionResponse
|
var v InternalExceptionResponse
|
||||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
newErr.error = err.Error()
|
newErr.error = err.Error()
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
|
||||||
}
|
|
||||||
newErr.model = v
|
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
|
}
|
||||||
|
newErr.model = v
|
||||||
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
return localVarReturnValue, localVarHttpResponse, newErr
|
return localVarReturnValue, localVarHttpResponse, newErr
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
*/
|
*/
|
||||||
package swagger
|
package swagger
|
||||||
|
|
||||||
type Configuration struct {
|
//type Configuration struct {
|
||||||
Title *ConfigValueFilter `json:"title"`
|
// Title *ConfigValueFilter `json:"title"`
|
||||||
Value *PolymorphicProperty `json:"value"`
|
// Value *PolymorphicProperty `json:"value"`
|
||||||
// If this config variable can be edited by the user
|
// // If this config variable can be edited by the user
|
||||||
Editable bool `json:"editable"`
|
// Editable bool `json:"editable"`
|
||||||
}
|
//}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user