Update to v2.0.14

This commit is contained in:
Illya Marchenko 2024-05-11 14:43:57 +03:00
parent cd8d766abb
commit 0b320a6637
Signed by: stuzer05
GPG Key ID: A6ABAAA9268F9F4F
482 changed files with 47912 additions and 10857 deletions

949
README.md

File diff suppressed because it is too large Load Diff

25953
api/swagger.yaml Normal file

File diff suppressed because it is too large Load Diff

@ -1,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type AboutApiService service type AboutApiService service
/* /*
AboutApiService System information end point. AboutApiService System information end point.
Returns general system information and versions of the (supporting) software. Returns general system information and versions of the (supporting) software.
@ -36,15 +36,15 @@ Returns general system information and versions of the (supporting) software.
*/ */
type AboutApiGetAboutOpts struct { type AboutApiGetAboutOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *AboutApiGetAboutOpts) (SystemInfo, *http.Response, error) { func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *AboutApiGetAboutOpts) (SystemInfo, *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 SystemInfo localVarReturnValue SystemInfo
) )
@ -93,7 +93,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
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,65 +101,64 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
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 SystemInfo var v SystemInfo
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
} }
/* /*
AboutApiService Cron job endpoint AboutApiService Cron job endpoint
Firefly III has one endpoint for its various cron related tasks. Send a GET to this endpoint to run the cron. The cron requires the CLI token to be present. The cron job will fire for all users. Firefly III has one endpoint for its various cron related tasks. Send a GET to this endpoint to run the cron. The cron requires the CLI token to be present. The cron job will fire for all users.
@ -173,17 +172,17 @@ Firefly III has one endpoint for its various cron related tasks. Send a GET to t
*/ */
type AboutApiGetCronOpts struct { type AboutApiGetCronOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Date optional.String Date optional.String
Force optional.Bool Force optional.Bool
} }
func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVarOptionals *AboutApiGetCronOpts) (CronResult, *http.Response, error) { func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVarOptionals *AboutApiGetCronOpts) (CronResult, *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 CronResult localVarReturnValue CronResult
) )
@ -239,7 +238,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, 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
} }
@ -247,65 +246,64 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, 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 == 200 { if localVarHttpResponse.StatusCode == 200 {
var v CronResult var v CronResult
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
} }
/* /*
AboutApiService Currently authenticated user endpoint. AboutApiService Currently authenticated user endpoint.
Returns the currently authenticated user. Returns the currently authenticated user.
@ -316,15 +314,15 @@ Returns the currently authenticated user.
*/ */
type AboutApiGetCurrentUserOpts struct { type AboutApiGetCurrentUserOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals *AboutApiGetCurrentUserOpts) (UserSingle, *http.Response, error) { func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals *AboutApiGetCurrentUserOpts) (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
) )
@ -345,7 +343,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -373,7 +371,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
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
} }
@ -381,58 +379,58 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
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
} }
return localVarReturnValue, localVarHttpResponse, newErr return localVarReturnValue, localVarHttpResponse, newErr
} }

File diff suppressed because it is too large Load Diff

@ -1,23 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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,7 +26,6 @@ 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.
@ -38,7 +37,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) {
@ -47,6 +46,7 @@ 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 \&quot;application/octet-stream\&quot; and content disposition \&quot;attachment; filename&#x3D;example.pdf\&quot;. 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 \&quot;application/octet-stream\&quot; and content disposition \&quot;attachment; filename&#x3D;example.pdf\&quot;.
@ -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,65 +221,64 @@ 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).
@ -291,15 +290,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
) )
@ -321,7 +320,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -349,7 +348,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
} }
@ -357,65 +356,64 @@ 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.
@ -428,17 +426,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
) )
@ -465,7 +463,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -493,7 +491,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
} }
@ -501,65 +499,64 @@ 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.
@ -571,15 +568,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
) )
@ -600,7 +597,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -630,7 +627,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
} }
@ -638,75 +635,74 @@ 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.
@ -719,15 +715,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
) )
@ -749,7 +745,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -779,7 +775,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
} }
@ -787,75 +783,74 @@ 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.
@ -868,8 +863,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) {
@ -878,6 +873,7 @@ 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
@ -911,7 +907,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)
@ -930,60 +926,61 @@ 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
} }

File diff suppressed because it is too large Load Diff

@ -1,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type AvailableBudgetsApiService service type AvailableBudgetsApiService service
/* /*
AvailableBudgetsApiService Get a single available budget. AvailableBudgetsApiService Get a single available budget.
Get a single available budget, by ID. Get a single available budget, by ID.
@ -37,15 +37,15 @@ Get a single available budget, by ID.
*/ */
type AvailableBudgetsApiGetAvailableBudgetOpts struct { type AvailableBudgetsApiGetAvailableBudgetOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id string, localVarOptionals *AvailableBudgetsApiGetAvailableBudgetOpts) (AvailableBudgetSingle, *http.Response, error) { func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id string, localVarOptionals *AvailableBudgetsApiGetAvailableBudgetOpts) (AvailableBudgetSingle, *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 AvailableBudgetSingle localVarReturnValue AvailableBudgetSingle
) )
@ -67,7 +67,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -95,7 +95,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(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
} }
@ -103,65 +103,64 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(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 == 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 AvailableBudgetSingle var v AvailableBudgetSingle
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
} }
/* /*
AvailableBudgetsApiService List all available budget amounts. AvailableBudgetsApiService List all available budget amounts.
Firefly III allows users to set the amount that is available to be budgeted in so-called \&quot;available budgets\&quot;. For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set. Firefly III allows users to set the amount that is available to be budgeted in so-called \&quot;available budgets\&quot;. For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
@ -176,19 +175,19 @@ Firefly III allows users to set the amount that is available to be budgeted in s
*/ */
type AvailableBudgetsApiListAvailableBudgetOpts struct { type AvailableBudgetsApiListAvailableBudgetOpts 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
} }
func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, localVarOptionals *AvailableBudgetsApiListAvailableBudgetOpts) (AvailableBudgetArray, *http.Response, error) { func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, localVarOptionals *AvailableBudgetsApiListAvailableBudgetOpts) (AvailableBudgetArray, *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 AvailableBudgetArray localVarReturnValue AvailableBudgetArray
) )
@ -221,7 +220,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -249,7 +248,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, 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
} }
@ -257,58 +256,58 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, 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 AvailableBudgetArray var v AvailableBudgetArray
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
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,22 +1,24 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +27,6 @@ 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.
@ -37,7 +38,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) {
@ -46,6 +47,7 @@ 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
@ -92,57 +94,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.
@ -156,17 +158,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
) )
@ -194,7 +196,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -222,7 +224,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
} }
@ -230,65 +232,64 @@ 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.
@ -302,17 +303,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
) )
@ -340,7 +341,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -368,7 +369,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
} }
@ -376,65 +377,64 @@ 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
) )
@ -484,7 +484,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -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,65 +520,64 @@ 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.
@ -595,20 +594,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
) )
@ -645,7 +644,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -673,7 +672,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
} }
@ -681,65 +680,64 @@ 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.
@ -751,15 +749,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
) )
@ -780,7 +778,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -810,7 +808,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
} }
@ -818,75 +816,74 @@ 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.
@ -899,15 +896,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
) )
@ -929,7 +926,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -959,7 +956,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
} }
@ -967,68 +964,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,21 +1,22 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 package swagger
import ( import (
"context" "context"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"github.com/antihax/optional"
) )
// Linger please // Linger please
@ -24,7 +25,6 @@ var (
) )
type ChartsApiService service type ChartsApiService service
/* /*
ChartsApiService Dashboard chart with asset account balance information. ChartsApiService Dashboard chart with asset account balance information.
This endpoint returns the data required to generate a chart with basic asset account balance information. This endpoint returns the data required to generate a chart with basic asset account balance information.
@ -37,15 +37,15 @@ This endpoint returns the data required to generate a chart with basic asset acc
*/ */
type ChartsApiGetChartAccountOverviewOpts struct { type ChartsApiGetChartAccountOverviewOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start string, end string, localVarOptionals *ChartsApiGetChartAccountOverviewOpts) ([]ChartDataSet, *http.Response, error) { func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start string, end string, localVarOptionals *ChartsApiGetChartAccountOverviewOpts) ([]ChartDataSet, *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 []ChartDataSet localVarReturnValue []ChartDataSet
) )
@ -96,7 +96,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
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,58 +104,58 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
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 []ChartDataSet var v []ChartDataSet
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,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ 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,65 +101,64 @@ 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
@ -171,15 +170,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
) )
@ -229,7 +228,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
} }
@ -237,65 +236,64 @@ 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.
@ -308,15 +306,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
) )
@ -349,6 +347,7 @@ 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
@ -367,7 +366,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
} }
@ -375,68 +374,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
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type ObjectGroupsApiService service type ObjectGroupsApiService service
/* /*
ObjectGroupsApiService Delete a object group. ObjectGroupsApiService Delete a object group.
Delete a object group. Delete a object group.
@ -37,7 +37,7 @@ Delete a object group.
*/ */
type ObjectGroupsApiDeleteObjectGroupOpts struct { type ObjectGroupsApiDeleteObjectGroupOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiDeleteObjectGroupOpts) (*http.Response, error) { func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiDeleteObjectGroupOpts) (*http.Response, error) {
@ -46,6 +46,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -92,57 +93,57 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
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
} }
/* /*
ObjectGroupsApiService Get a single object group. ObjectGroupsApiService Get a single object group.
Get a single object group. Get a single object group.
@ -154,15 +155,15 @@ Get a single object group.
*/ */
type ObjectGroupsApiGetObjectGroupOpts struct { type ObjectGroupsApiGetObjectGroupOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiGetObjectGroupOpts) (ObjectGroupSingle, *http.Response, error) { func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiGetObjectGroupOpts) (ObjectGroupSingle, *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 ObjectGroupSingle localVarReturnValue ObjectGroupSingle
) )
@ -184,7 +185,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, 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
} }
@ -220,65 +221,64 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, 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 ObjectGroupSingle var v ObjectGroupSingle
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
} }
/* /*
ObjectGroupsApiService List all bills with this object group. ObjectGroupsApiService List all bills with this object group.
List all bills with this object group. List all bills with this object group.
@ -292,17 +292,17 @@ List all bills with this object group.
*/ */
type ObjectGroupsApiListBillByObjectGroupOpts struct { type ObjectGroupsApiListBillByObjectGroupOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListBillByObjectGroupOpts) (BillArray, *http.Response, error) { func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListBillByObjectGroupOpts) (BillArray, *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 BillArray localVarReturnValue BillArray
) )
@ -330,7 +330,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -358,7 +358,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
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
} }
@ -366,65 +366,64 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
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 BillArray var v BillArray
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
} }
/* /*
ObjectGroupsApiService List all oject groups. ObjectGroupsApiService List all oject groups.
List all oject groups. List all oject groups.
@ -437,17 +436,17 @@ List all oject groups.
*/ */
type ObjectGroupsApiListObjectGroupsOpts struct { type ObjectGroupsApiListObjectGroupsOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarOptionals *ObjectGroupsApiListObjectGroupsOpts) (ObjectGroupArray, *http.Response, error) { func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarOptionals *ObjectGroupsApiListObjectGroupsOpts) (ObjectGroupArray, *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 ObjectGroupArray localVarReturnValue ObjectGroupArray
) )
@ -474,7 +473,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -502,7 +501,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
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
} }
@ -510,65 +509,64 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
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 ObjectGroupArray var v ObjectGroupArray
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
} }
/* /*
ObjectGroupsApiService List all piggy banks related to the object group. ObjectGroupsApiService List all piggy banks related to the object group.
This endpoint returns a list of all the piggy banks connected to the object group. This endpoint returns a list of all the piggy banks connected to the object group.
@ -582,17 +580,17 @@ This endpoint returns a list of all the piggy banks connected to the object grou
*/ */
type ObjectGroupsApiListPiggyBankByObjectGroupOpts struct { type ObjectGroupsApiListPiggyBankByObjectGroupOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListPiggyBankByObjectGroupOpts) (PiggyBankArray, *http.Response, error) { func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListPiggyBankByObjectGroupOpts) (PiggyBankArray, *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 PiggyBankArray localVarReturnValue PiggyBankArray
) )
@ -620,7 +618,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -648,7 +646,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
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
} }
@ -656,65 +654,64 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
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 PiggyBankArray var v PiggyBankArray
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
} }
/* /*
ObjectGroupsApiService Update existing object group. ObjectGroupsApiService Update existing object group.
Update existing object group. Update existing object group.
@ -727,15 +724,15 @@ Update existing object group.
*/ */
type ObjectGroupsApiUpdateObjectGroupOpts struct { type ObjectGroupsApiUpdateObjectGroupOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body ObjectGroupUpdate, id string, localVarOptionals *ObjectGroupsApiUpdateObjectGroupOpts) (ObjectGroupSingle, *http.Response, error) { func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body ObjectGroupUpdate, id string, localVarOptionals *ObjectGroupsApiUpdateObjectGroupOpts) (ObjectGroupSingle, *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 ObjectGroupSingle localVarReturnValue ObjectGroupSingle
) )
@ -757,7 +754,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -787,7 +784,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
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
} }
@ -795,68 +792,68 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
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 ObjectGroupSingle var v ObjectGroupSingle
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,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type PiggyBanksApiService service type PiggyBanksApiService service
/* /*
PiggyBanksApiService Delete a piggy bank. PiggyBanksApiService Delete a piggy bank.
Delete a piggy bank. Delete a piggy bank.
@ -37,7 +37,7 @@ Delete a piggy bank.
*/ */
type PiggyBanksApiDeletePiggyBankOpts struct { type PiggyBanksApiDeletePiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiDeletePiggyBankOpts) (*http.Response, error) { func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiDeletePiggyBankOpts) (*http.Response, error) {
@ -46,6 +46,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -92,57 +93,57 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
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
} }
/* /*
PiggyBanksApiService Get a single piggy bank. PiggyBanksApiService Get a single piggy bank.
Get a single piggy bank. Get a single piggy bank.
@ -154,15 +155,15 @@ Get a single piggy bank.
*/ */
type PiggyBanksApiGetPiggyBankOpts struct { type PiggyBanksApiGetPiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiGetPiggyBankOpts) (PiggyBankSingle, *http.Response, error) { func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiGetPiggyBankOpts) (PiggyBankSingle, *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 PiggyBankSingle localVarReturnValue PiggyBankSingle
) )
@ -184,7 +185,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
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
} }
@ -220,65 +221,64 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
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 PiggyBankSingle var v PiggyBankSingle
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
} }
/* /*
PiggyBanksApiService Lists all attachments. PiggyBanksApiService Lists all attachments.
Lists all attachments. Lists all attachments.
@ -292,17 +292,17 @@ Lists all attachments.
*/ */
type PiggyBanksApiListAttachmentByPiggyBankOpts struct { type PiggyBanksApiListAttachmentByPiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListAttachmentByPiggyBankOpts) (AttachmentArray, *http.Response, error) { func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListAttachmentByPiggyBankOpts) (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
) )
@ -330,7 +330,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -358,7 +358,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(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
} }
@ -366,65 +366,64 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(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
} }
/* /*
PiggyBanksApiService List all events linked to a piggy bank. PiggyBanksApiService List all events linked to a piggy bank.
List all events linked to a piggy bank (adding and removing money). List all events linked to a piggy bank (adding and removing money).
@ -438,17 +437,17 @@ List all events linked to a piggy bank (adding and removing money).
*/ */
type PiggyBanksApiListEventByPiggyBankOpts struct { type PiggyBanksApiListEventByPiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListEventByPiggyBankOpts) (PiggyBankEventArray, *http.Response, error) { func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListEventByPiggyBankOpts) (PiggyBankEventArray, *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 PiggyBankEventArray localVarReturnValue PiggyBankEventArray
) )
@ -476,7 +475,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -504,7 +503,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
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
} }
@ -512,65 +511,64 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
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 PiggyBankEventArray var v PiggyBankEventArray
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
} }
/* /*
PiggyBanksApiService List all piggy banks. PiggyBanksApiService List all piggy banks.
List all piggy banks. List all piggy banks.
@ -583,17 +581,17 @@ List all piggy banks.
*/ */
type PiggyBanksApiListPiggyBankOpts struct { type PiggyBanksApiListPiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOptionals *PiggyBanksApiListPiggyBankOpts) (PiggyBankArray, *http.Response, error) { func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOptionals *PiggyBanksApiListPiggyBankOpts) (PiggyBankArray, *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 PiggyBankArray localVarReturnValue PiggyBankArray
) )
@ -620,7 +618,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -648,7 +646,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, 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
} }
@ -656,65 +654,64 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, 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 PiggyBankArray var v PiggyBankArray
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
} }
/* /*
PiggyBanksApiService Store a new piggy bank PiggyBanksApiService Store a new piggy bank
Creates a new piggy bank. The data required can be submitted as a JSON body or as a list of parameters. Creates a new piggy bank. The data required can be submitted as a JSON body or as a list of parameters.
@ -726,15 +723,15 @@ Creates a new piggy bank. The data required can be submitted as a JSON body or a
*/ */
type PiggyBanksApiStorePiggyBankOpts struct { type PiggyBanksApiStorePiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBankStore, localVarOptionals *PiggyBanksApiStorePiggyBankOpts) (PiggyBankSingle, *http.Response, error) { func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBankStore, localVarOptionals *PiggyBanksApiStorePiggyBankOpts) (PiggyBankSingle, *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 PiggyBankSingle localVarReturnValue PiggyBankSingle
) )
@ -755,7 +752,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -785,7 +782,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
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
} }
@ -793,75 +790,74 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
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 PiggyBankSingle var v PiggyBankSingle
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
} }
/* /*
PiggyBanksApiService Update existing piggy bank. PiggyBanksApiService Update existing piggy bank.
Update existing piggy bank. Update existing piggy bank.
@ -874,15 +870,15 @@ Update existing piggy bank.
*/ */
type PiggyBanksApiUpdatePiggyBankOpts struct { type PiggyBanksApiUpdatePiggyBankOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBankUpdate, id string, localVarOptionals *PiggyBanksApiUpdatePiggyBankOpts) (PiggyBankSingle, *http.Response, error) { func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBankUpdate, id string, localVarOptionals *PiggyBanksApiUpdatePiggyBankOpts) (PiggyBankSingle, *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 PiggyBankSingle localVarReturnValue PiggyBankSingle
) )
@ -904,7 +900,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -934,7 +930,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
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
} }
@ -942,68 +938,68 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
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 PiggyBankSingle var v PiggyBankSingle
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,22 +1,24 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +27,6 @@ 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.
@ -37,15 +38,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
) )
@ -67,7 +68,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -95,7 +96,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
} }
@ -103,65 +104,64 @@ 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
) )
@ -211,7 +211,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -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,65 +247,64 @@ 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.
@ -317,15 +316,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
) )
@ -346,7 +345,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -376,7 +375,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
} }
@ -384,75 +383,74 @@ 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&#x27;s preference. Update a user&#x27;s preference.
@ -465,15 +463,15 @@ Update a user&#x27;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
) )
@ -495,7 +493,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -525,7 +523,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
} }
@ -533,68 +531,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
} }

@ -1,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type RecurrencesApiService service type RecurrencesApiService service
/* /*
RecurrencesApiService Delete a recurring transaction. RecurrencesApiService Delete a recurring transaction.
Delete a recurring transaction. Transactions created by the recurring transaction will not be deleted. Delete a recurring transaction. Transactions created by the recurring transaction will not be deleted.
@ -37,7 +37,7 @@ Delete a recurring transaction. Transactions created by the recurring transactio
*/ */
type RecurrencesApiDeleteRecurrenceOpts struct { type RecurrencesApiDeleteRecurrenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiDeleteRecurrenceOpts) (*http.Response, error) { func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiDeleteRecurrenceOpts) (*http.Response, error) {
@ -46,6 +46,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(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
@ -92,57 +93,57 @@ func (a *RecurrencesApiService) DeleteRecurrence(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
} }
/* /*
RecurrencesApiService Get a single recurring transaction. RecurrencesApiService Get a single recurring transaction.
Get a single recurring transaction. Get a single recurring transaction.
@ -154,15 +155,15 @@ Get a single recurring transaction.
*/ */
type RecurrencesApiGetRecurrenceOpts struct { type RecurrencesApiGetRecurrenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiGetRecurrenceOpts) (RecurrenceSingle, *http.Response, error) { func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiGetRecurrenceOpts) (RecurrenceSingle, *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 RecurrenceSingle localVarReturnValue RecurrenceSingle
) )
@ -184,7 +185,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *RecurrencesApiService) GetRecurrence(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
} }
@ -220,65 +221,64 @@ func (a *RecurrencesApiService) GetRecurrence(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 == 200 { if localVarHttpResponse.StatusCode == 200 {
var v RecurrenceSingle var v RecurrenceSingle
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
} }
/* /*
RecurrencesApiService List all recurring transactions. RecurrencesApiService List all recurring transactions.
List all recurring transactions. List all recurring transactions.
@ -291,17 +291,17 @@ List all recurring transactions.
*/ */
type RecurrencesApiListRecurrenceOpts struct { type RecurrencesApiListRecurrenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOptionals *RecurrencesApiListRecurrenceOpts) (RecurrenceArray, *http.Response, error) { func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOptionals *RecurrencesApiListRecurrenceOpts) (RecurrenceArray, *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 RecurrenceArray localVarReturnValue RecurrenceArray
) )
@ -328,7 +328,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -356,7 +356,7 @@ func (a *RecurrencesApiService) ListRecurrence(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
} }
@ -364,65 +364,64 @@ func (a *RecurrencesApiService) ListRecurrence(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 RecurrenceArray var v RecurrenceArray
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
} }
/* /*
RecurrencesApiService List all transactions created by a recurring transaction. RecurrencesApiService List all transactions created by a recurring transaction.
List all transactions created by a recurring transaction, optionally limited to the date ranges specified. List all transactions created by a recurring transaction, optionally limited to the date ranges specified.
@ -439,20 +438,20 @@ List all transactions created by a recurring transaction, optionally limited to
*/ */
type RecurrencesApiListTransactionByRecurrenceOpts struct { type RecurrencesApiListTransactionByRecurrenceOpts 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 *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiListTransactionByRecurrenceOpts) (TransactionArray, *http.Response, error) { func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiListTransactionByRecurrenceOpts) (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
) )
@ -489,7 +488,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -517,7 +516,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
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
} }
@ -525,65 +524,64 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
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
} }
/* /*
RecurrencesApiService Store a new recurring transaction RecurrencesApiService Store a new recurring transaction
Creates a new recurring transaction. The data required can be submitted as a JSON body or as a list of parameters. Creates a new recurring transaction. The data required can be submitted as a JSON body or as a list of parameters.
@ -595,15 +593,15 @@ Creates a new recurring transaction. The data required can be submitted as a JSO
*/ */
type RecurrencesApiStoreRecurrenceOpts struct { type RecurrencesApiStoreRecurrenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body RecurrenceStore, localVarOptionals *RecurrencesApiStoreRecurrenceOpts) (RecurrenceSingle, *http.Response, error) { func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body RecurrenceStore, localVarOptionals *RecurrencesApiStoreRecurrenceOpts) (RecurrenceSingle, *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 RecurrenceSingle localVarReturnValue RecurrenceSingle
) )
@ -624,7 +622,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -654,7 +652,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
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
} }
@ -662,75 +660,74 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
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 RecurrenceSingle var v RecurrenceSingle
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
} }
/* /*
RecurrencesApiService Update existing recurring transaction. RecurrencesApiService Update existing recurring transaction.
Update existing recurring transaction. Update existing recurring transaction.
@ -743,15 +740,15 @@ Update existing recurring transaction.
*/ */
type RecurrencesApiUpdateRecurrenceOpts struct { type RecurrencesApiUpdateRecurrenceOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body RecurrenceUpdate, id string, localVarOptionals *RecurrencesApiUpdateRecurrenceOpts) (RecurrenceSingle, *http.Response, error) { func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body RecurrenceUpdate, id string, localVarOptionals *RecurrencesApiUpdateRecurrenceOpts) (RecurrenceSingle, *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 RecurrenceSingle localVarReturnValue RecurrenceSingle
) )
@ -773,7 +770,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -803,7 +800,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
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
} }
@ -811,68 +808,68 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
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 RecurrenceSingle var v RecurrenceSingle
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
} }

File diff suppressed because it is too large Load Diff

@ -1,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type RulesApiService service type RulesApiService service
/* /*
RulesApiService Delete an rule. RulesApiService Delete an rule.
Delete an rule. Delete an rule.
@ -37,7 +37,7 @@ Delete an rule.
*/ */
type RulesApiDeleteRuleOpts struct { type RulesApiDeleteRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOptionals *RulesApiDeleteRuleOpts) (*http.Response, error) { func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOptionals *RulesApiDeleteRuleOpts) (*http.Response, error) {
@ -46,6 +46,7 @@ func (a *RulesApiService) DeleteRule(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
@ -92,57 +93,57 @@ func (a *RulesApiService) DeleteRule(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
} }
/* /*
RulesApiService Fire the rule on your transactions. RulesApiService Fire the rule on your transactions.
Fire the rule group on your transactions. Changes will be made by the rules in the group! Limit the result if you want to. Fire the rule group on your transactions. Changes will be made by the rules in the group! Limit the result if you want to.
@ -157,10 +158,10 @@ Fire the rule group on your transactions. Changes will be made by the rules in t
*/ */
type RulesApiFireRuleOpts struct { type RulesApiFireRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Start optional.String Start optional.String
End optional.String End optional.String
Accounts optional.Interface Accounts optional.Interface
} }
func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptionals *RulesApiFireRuleOpts) (*http.Response, error) { func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptionals *RulesApiFireRuleOpts) (*http.Response, error) {
@ -169,6 +170,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -224,57 +226,57 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
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
} }
/* /*
RulesApiService Get a single rule. RulesApiService Get a single rule.
Get a single rule. Get a single rule.
@ -286,15 +288,15 @@ Get a single rule.
*/ */
type RulesApiGetRuleOpts struct { type RulesApiGetRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOptionals *RulesApiGetRuleOpts) (RuleSingle, *http.Response, error) { func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOptionals *RulesApiGetRuleOpts) (RuleSingle, *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 RuleSingle localVarReturnValue RuleSingle
) )
@ -316,7 +318,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -344,7 +346,7 @@ func (a *RulesApiService) GetRule(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
} }
@ -352,65 +354,64 @@ func (a *RulesApiService) GetRule(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 RuleSingle var v RuleSingle
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
} }
/* /*
RulesApiService List all rules. RulesApiService List all rules.
List all rules. List all rules.
@ -423,17 +424,17 @@ List all rules.
*/ */
type RulesApiListRuleOpts struct { type RulesApiListRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *RulesApiListRuleOpts) (RuleArray, *http.Response, error) { func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *RulesApiListRuleOpts) (RuleArray, *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 RuleArray localVarReturnValue RuleArray
) )
@ -460,7 +461,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -488,7 +489,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
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
} }
@ -496,65 +497,64 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
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 RuleArray var v RuleArray
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
} }
/* /*
RulesApiService Store a new rule RulesApiService Store a new rule
Creates a new rule. The data required can be submitted as a JSON body or as a list of parameters. Creates a new rule. The data required can be submitted as a JSON body or as a list of parameters.
@ -566,15 +566,15 @@ Creates a new rule. The data required can be submitted as a JSON body or as a li
*/ */
type RulesApiStoreRuleOpts struct { type RulesApiStoreRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVarOptionals *RulesApiStoreRuleOpts) (RuleSingle, *http.Response, error) { func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVarOptionals *RulesApiStoreRuleOpts) (RuleSingle, *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 RuleSingle localVarReturnValue RuleSingle
) )
@ -595,7 +595,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -625,7 +625,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
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
} }
@ -633,75 +633,74 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
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 RuleSingle var v RuleSingle
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
} }
/* /*
RulesApiService Test which transactions would be hit by the rule. No changes will be made. RulesApiService Test which transactions would be hit by the rule. No changes will be made.
Test which transactions would be hit by the rule. No changes will be made. Limit the result if you want to. Test which transactions would be hit by the rule. No changes will be made. Limit the result if you want to.
@ -716,18 +715,18 @@ Test which transactions would be hit by the rule. No changes will be made. Limit
*/ */
type RulesApiTestRuleOpts struct { type RulesApiTestRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Start optional.String Start optional.String
End optional.String End optional.String
Accounts optional.Interface Accounts optional.Interface
} }
func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptionals *RulesApiTestRuleOpts) (TransactionArray, *http.Response, error) { func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptionals *RulesApiTestRuleOpts) (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
) )
@ -758,7 +757,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -786,7 +785,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
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
} }
@ -794,65 +793,64 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
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
} }
/* /*
RulesApiService Update existing rule. RulesApiService Update existing rule.
Update existing rule. Update existing rule.
@ -865,15 +863,15 @@ Update existing rule.
*/ */
type RulesApiUpdateRuleOpts struct { type RulesApiUpdateRuleOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id string, localVarOptionals *RulesApiUpdateRuleOpts) (RuleSingle, *http.Response, error) { func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id string, localVarOptionals *RulesApiUpdateRuleOpts) (RuleSingle, *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 RuleSingle localVarReturnValue RuleSingle
) )
@ -895,7 +893,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -925,7 +923,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
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
} }
@ -933,68 +931,68 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
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 RuleSingle var v RuleSingle
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,21 +1,22 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 package swagger
import ( import (
"context" "context"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"github.com/antihax/optional"
) )
// Linger please // Linger please
@ -24,7 +25,6 @@ var (
) )
type SearchApiService service type SearchApiService service
/* /*
SearchApiService Search for accounts SearchApiService Search for accounts
Search for accounts Search for accounts
@ -40,18 +40,18 @@ Search for accounts
*/ */
type SearchApiSearchAccountsOpts struct { type SearchApiSearchAccountsOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
Type_ optional.Interface Type_ optional.Interface
} }
func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, field AccountSearchFieldFilter, localVarOptionals *SearchApiSearchAccountsOpts) (AccountArray, *http.Response, error) { func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, field AccountSearchFieldFilter, localVarOptionals *SearchApiSearchAccountsOpts) (AccountArray, *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 AccountArray localVarReturnValue AccountArray
) )
@ -83,7 +83,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -111,7 +111,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
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
} }
@ -119,65 +119,64 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
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 AccountArray var v AccountArray
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
} }
/* /*
SearchApiService Search for transactions SearchApiService Search for transactions
Searches through the users transactions. Searches through the users transactions.
@ -191,17 +190,17 @@ Searches through the users transactions.
*/ */
type SearchApiSearchTransactionsOpts struct { type SearchApiSearchTransactionsOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *SearchApiService) SearchTransactions(ctx context.Context, query string, localVarOptionals *SearchApiSearchTransactionsOpts) (TransactionArray, *http.Response, error) { func (a *SearchApiService) SearchTransactions(ctx context.Context, query string, localVarOptionals *SearchApiSearchTransactionsOpts) (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
) )
@ -229,7 +228,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -257,7 +256,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query 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
} }
@ -265,58 +264,58 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query 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 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
} }

@ -1,21 +1,22 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 package swagger
import ( import (
"context" "context"
"github.com/antihax/optional"
"io/ioutil" "io/ioutil"
"net/http" "net/http"
"net/url" "net/url"
"strings" "strings"
"github.com/antihax/optional"
) )
// Linger please // Linger please
@ -24,7 +25,6 @@ var (
) )
type SummaryApiService service type SummaryApiService service
/* /*
SummaryApiService Returns basic sums of the users data. SummaryApiService Returns basic sums of the users data.
Returns basic sums of the users data, like the net worth, spent and earned amounts. It is multi-currency, and is used in Firefly III to populate the dashboard. Returns basic sums of the users data, like the net worth, spent and earned amounts. It is multi-currency, and is used in Firefly III to populate the dashboard.
@ -38,16 +38,16 @@ Returns basic sums of the users data, like the net worth, spent and earned amoun
*/ */
type SummaryApiGetBasicSummaryOpts struct { type SummaryApiGetBasicSummaryOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
CurrencyCode optional.String CurrencyCode optional.String
} }
func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, end string, localVarOptionals *SummaryApiGetBasicSummaryOpts) (map[string]BasicSummaryEntry, *http.Response, error) { func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, end string, localVarOptionals *SummaryApiGetBasicSummaryOpts) (map[string]BasicSummaryEntry, *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 map[string]BasicSummaryEntry localVarReturnValue map[string]BasicSummaryEntry
) )
@ -73,7 +73,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -101,7 +101,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
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
} }
@ -109,58 +109,58 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
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 map[string]BasicSummaryEntry var v map[string]BasicSummaryEntry
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,22 +1,23 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +26,6 @@ var (
) )
type TagsApiService service type TagsApiService service
/* /*
TagsApiService Delete an tag. TagsApiService Delete an tag.
Delete an tag. Delete an tag.
@ -37,7 +37,7 @@ Delete an tag.
*/ */
type TagsApiDeleteTagOpts struct { type TagsApiDeleteTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOptionals *TagsApiDeleteTagOpts) (*http.Response, error) { func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOptionals *TagsApiDeleteTagOpts) (*http.Response, error) {
@ -46,6 +46,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
localVarPostBody interface{} localVarPostBody interface{}
localVarFileName string localVarFileName string
localVarFileBytes []byte localVarFileBytes []byte
) )
// create path and map variables // create path and map variables
@ -92,57 +93,57 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
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
} }
/* /*
TagsApiService Get a single tag. TagsApiService Get a single tag.
Get a single tag. Get a single tag.
@ -156,17 +157,17 @@ Get a single tag.
*/ */
type TagsApiGetTagOpts struct { type TagsApiGetTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptionals *TagsApiGetTagOpts) (TagSingle, *http.Response, error) { func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptionals *TagsApiGetTagOpts) (TagSingle, *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 TagSingle localVarReturnValue TagSingle
) )
@ -194,7 +195,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -222,7 +223,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, 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
} }
@ -230,65 +231,64 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, 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 TagSingle var v TagSingle
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
} }
/* /*
TagsApiService Lists all attachments. TagsApiService Lists all attachments.
Lists all attachments. Lists all attachments.
@ -302,17 +302,17 @@ Lists all attachments.
*/ */
type TagsApiListAttachmentByTagOpts struct { type TagsApiListAttachmentByTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListAttachmentByTagOpts) (AttachmentArray, *http.Response, error) { func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListAttachmentByTagOpts) (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
) )
@ -340,7 +340,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -368,7 +368,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag 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
} }
@ -376,65 +376,64 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag 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 == 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
} }
/* /*
TagsApiService List all tags. TagsApiService List all tags.
List all of the user&#x27;s tags. List all of the user&#x27;s tags.
@ -447,17 +446,17 @@ List all of the user&#x27;s tags.
*/ */
type TagsApiListTagOpts struct { type TagsApiListTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
Limit optional.Int32 Limit optional.Int32
Page optional.Int32 Page optional.Int32
} }
func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApiListTagOpts) (TagArray, *http.Response, error) { func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApiListTagOpts) (TagArray, *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 TagArray localVarReturnValue TagArray
) )
@ -484,7 +483,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -512,7 +511,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
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,65 +519,64 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
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 TagArray var v TagArray
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
} }
/* /*
TagsApiService List all transactions with this tag. TagsApiService List all transactions with this tag.
List all transactions with this tag. List all transactions with this tag.
@ -595,20 +593,20 @@ List all transactions with this tag.
*/ */
type TagsApiListTransactionByTagOpts struct { type TagsApiListTransactionByTagOpts 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 *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListTransactionByTagOpts) (TransactionArray, *http.Response, error) { func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListTransactionByTagOpts) (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
) )
@ -645,7 +643,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -673,7 +671,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
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
} }
@ -681,65 +679,64 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
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
} }
/* /*
TagsApiService Store a new tag TagsApiService Store a new tag
Creates a new tag. The data required can be submitted as a JSON body or as a list of parameters. Creates a new tag. The data required can be submitted as a JSON body or as a list of parameters.
@ -751,15 +748,15 @@ Creates a new tag. The data required can be submitted as a JSON body or as a lis
*/ */
type TagsApiStoreTagOpts struct { type TagsApiStoreTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, localVarOptionals *TagsApiStoreTagOpts) (TagSingle, *http.Response, error) { func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, localVarOptionals *TagsApiStoreTagOpts) (TagSingle, *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 TagSingle localVarReturnValue TagSingle
) )
@ -780,7 +777,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -810,7 +807,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, 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
} }
@ -818,75 +815,74 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, 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 TagSingle var v TagSingle
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
} }
/* /*
TagsApiService Update existing tag. TagsApiService Update existing tag.
Update existing tag. Update existing tag.
@ -899,15 +895,15 @@ Update existing tag.
*/ */
type TagsApiUpdateTagOpts struct { type TagsApiUpdateTagOpts struct {
XTraceId optional.Interface XTraceId optional.Interface
} }
func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag string, localVarOptionals *TagsApiUpdateTagOpts) (TagSingle, *http.Response, error) { func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag string, localVarOptionals *TagsApiUpdateTagOpts) (TagSingle, *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 TagSingle localVarReturnValue TagSingle
) )
@ -929,7 +925,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -959,7 +955,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
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
} }
@ -967,68 +963,68 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
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 TagSingle var v TagSingle
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
} }

File diff suppressed because it is too large Load Diff

@ -1,22 +1,24 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 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
@ -25,7 +27,6 @@ var (
) )
type UsersApiService service type UsersApiService service
/* /*
UsersApiService Delete a user. UsersApiService Delete a user.
Delete a user. You cannot delete the user you&#x27;re authenticated with. This cannot be undone. Be careful! Delete a user. You cannot delete the user you&#x27;re authenticated with. This cannot be undone. Be careful!
@ -37,7 +38,7 @@ Delete a user. You cannot delete the user you&#x27;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) {
@ -46,6 +47,7 @@ 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
@ -92,57 +94,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.
@ -154,15 +156,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
) )
@ -184,7 +186,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +214,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
} }
@ -220,65 +222,64 @@ 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.
@ -291,17 +292,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
) )
@ -328,7 +329,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -356,7 +357,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
} }
@ -364,65 +365,64 @@ 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 \&quot;forgot password\&quot; 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 \&quot;forgot password\&quot; 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
) )
@ -463,7 +463,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"} localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -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,75 +501,74 @@ 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&#x27;s information. UsersApiService Update an existing user&#x27;s information.
Update existing user. Update existing user.
@ -582,15 +581,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
) )
@ -612,7 +611,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
} }
// to determine the Accept header // to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"} localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header // set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts) localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -642,7 +641,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
} }
@ -650,68 +649,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
} }

File diff suppressed because it is too large Load Diff

@ -1,13 +1,13 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 package swagger
import ( import (
"bytes" "bytes"
@ -37,7 +37,7 @@ var (
xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)") xmlCheck = regexp.MustCompile("(?i:[application|text]/xml)")
) )
// APIClient manages communication with the Firefly III API v2.0.12 API v2.0.12 // APIClient manages communication with the Firefly III API v2.0.14 API v2.0.14
// In most cases there should be only one, shared, APIClient. // In most cases there should be only one, shared, APIClient.
type APIClient struct { type APIClient struct {
cfg *Configuration cfg *Configuration
@ -385,17 +385,17 @@ func (c *APIClient) prepareRequest(
} }
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
if strings.Contains(contentType, "application/xml") { if strings.Contains(contentType, "application/xml") {
if err = xml.Unmarshal(b, v); err != nil { if err = xml.Unmarshal(b, v); err != nil {
return err return err
}
return nil
} else if strings.Contains(contentType, "application/json") {
if err = json.Unmarshal(b, v); err != nil {
return err
}
return nil
} }
return nil
} else if strings.Contains(contentType, "application/json") || strings.Contains(contentType, "application/vnd.api+json") {
if err = json.Unmarshal(b, v); err != nil {
return err
}
return nil
}
return errors.New("undefined response type") return errors.New("undefined response type")
} }

@ -1,13 +1,13 @@
/* /*
* Firefly III API v2.0.12 * Firefly III API v2.0.14
* *
* This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-03-16T05:34:43+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that. * This is the documentation of the Firefly III API. You can find accompanying documentation on the website of Firefly III itself (see below). Please report any bugs or issues. You may use the \"Authorize\" button to try the API below. This file was last generated on 2024-04-20T05:28:29+00:00 Please keep in mind that the demo site does not accept requests from curl, colly, wget, etc. You must use a browser or a tool like Postman to make requests. Too many script kiddies out there, sorry about that.
* *
* API version: 2.0.12 * API version: 2.0.14
* Contact: james@firefly-iii.org * Contact: james@firefly-iii.org
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/ */
package firefly3 package swagger
import ( import (
"net/http" "net/http"
@ -60,7 +60,7 @@ type Configuration struct {
func NewConfiguration() *Configuration { func NewConfiguration() *Configuration {
cfg := &Configuration{ cfg := &Configuration{
BasePath: "https://demo.firefly-iii.org/firefly3", BasePath: "https://demo.firefly-iii.org/api",
DefaultHeader: make(map[string]string), DefaultHeader: make(map[string]string),
UserAgent: "Swagger-Codegen/1.0.0/go", UserAgent: "Swagger-Codegen/1.0.0/go",
} }

116
docs/AboutApi.md Normal file

@ -0,0 +1,116 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetAbout**](AboutApi.md#GetAbout) | **Get** /v1/about | System information end point.
[**GetCron**](AboutApi.md#GetCron) | **Get** /v1/cron/{cliToken} | Cron job endpoint
[**GetCurrentUser**](AboutApi.md#GetCurrentUser) | **Get** /v1/about/user | Currently authenticated user endpoint.
# **GetAbout**
> SystemInfo GetAbout(ctx, optional)
System information end point.
Returns general system information and versions of the (supporting) software.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AboutApiGetAboutOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AboutApiGetAboutOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**SystemInfo**](SystemInfo.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCron**
> CronResult GetCron(ctx, cliToken, optional)
Cron job endpoint
Firefly III has one endpoint for its various cron related tasks. Send a GET to this endpoint to run the cron. The cron requires the CLI token to be present. The cron job will fire for all users.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**cliToken** | **string**| The CLI token of any user in Firefly III, required to run the cron job. |
**optional** | ***AboutApiGetCronOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AboutApiGetCronOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**date** | **optional.String**| A date formatted YYYY-MM-DD. This can be used to make the cron job pretend it&#x27;s running on another day. |
**force** | **optional.Bool**| Forces the cron job to fire, regardless of whether it has fired before. This may result in double transactions or weird budgets, so be careful. |
### Return type
[**CronResult**](CronResult.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCurrentUser**
> UserSingle GetCurrentUser(ctx, optional)
Currently authenticated user endpoint.
Returns the currently authenticated user.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AboutApiGetCurrentUserOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AboutApiGetCurrentUserOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**UserSingle**](UserSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

39
docs/Account.md Normal file

@ -0,0 +1,39 @@
# Account
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**Active** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**Order** | **int32** | Order of the account. Is NULL if account is not asset or liability. | [optional] [default to null]
**Name** | **string** | | [default to null]
**Type_** | [***ShortAccountTypeProperty**](ShortAccountTypeProperty.md) | | [default to null]
**AccountRole** | [***AccountRoleProperty**](AccountRoleProperty.md) | | [optional] [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**CurrentBalance** | **string** | | [optional] [default to null]
**CurrentBalanceDate** | [**time.Time**](time.Time.md) | The timestamp for this date is always 23:59:59, to indicate it&#x27;s the balance at the very END of that particular day. | [optional] [default to null]
**Iban** | **string** | | [optional] [default to null]
**Bic** | **string** | | [optional] [default to null]
**AccountNumber** | **string** | | [optional] [default to null]
**OpeningBalance** | **string** | Represents the opening balance, the initial amount this account holds. | [optional] [default to null]
**CurrentDebt** | **string** | Represents the current debt for liabilities. | [optional] [default to null]
**OpeningBalanceDate** | [**time.Time**](time.Time.md) | Represents the date of the opening balance. | [optional] [default to null]
**VirtualBalance** | **string** | | [optional] [default to null]
**IncludeNetWorth** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**CreditCardType** | [***CreditCardTypeProperty**](CreditCardTypeProperty.md) | | [optional] [default to null]
**MonthlyPaymentDate** | [**time.Time**](time.Time.md) | Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank. | [optional] [default to null]
**LiabilityType** | [***LiabilityTypeProperty**](LiabilityTypeProperty.md) | | [optional] [default to null]
**LiabilityDirection** | [***LiabilityDirectionProperty**](LiabilityDirectionProperty.md) | | [optional] [default to null]
**Interest** | **string** | Mandatory when type is liability. Interest percentage. | [optional] [default to null]
**InterestPeriod** | [***InterestPeriodProperty**](InterestPeriodProperty.md) | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**Latitude** | **float64** | Latitude of the accounts&#x27;s location, if applicable. Can be used to draw a map. | [optional] [default to null]
**Longitude** | **float64** | Latitude of the accounts&#x27;s location, if applicable. Can be used to draw a map. | [optional] [default to null]
**ZoomLevel** | **int32** | Zoom level for the map, if drawn. This to set the box right. Unfortunately this is a proprietary value because each map provider has different zoom levels. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/AccountArray.md Normal file

@ -0,0 +1,10 @@
# AccountArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]AccountRead**](AccountRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/AccountRead.md Normal file

@ -0,0 +1,11 @@
# AccountRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***Account**](Account.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,8 @@
# AccountRoleProperty
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,8 @@
# AccountSearchFieldFilter
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

9
docs/AccountSingle.md Normal file

@ -0,0 +1,9 @@
# AccountSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***AccountRead**](AccountRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

32
docs/AccountStore.md Normal file

@ -0,0 +1,32 @@
# AccountStore
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [default to null]
**Type_** | [***ShortAccountTypeProperty**](ShortAccountTypeProperty.md) | | [default to null]
**Iban** | **string** | | [optional] [default to null]
**Bic** | **string** | | [optional] [default to null]
**AccountNumber** | **string** | | [optional] [default to null]
**OpeningBalance** | **string** | Represents the opening balance, the initial amount this account holds. | [optional] [default to null]
**OpeningBalanceDate** | [**time.Time**](time.Time.md) | Represents the date of the opening balance. | [optional] [default to null]
**VirtualBalance** | **string** | | [optional] [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**Active** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**Order** | **int32** | Order of the account | [optional] [default to null]
**IncludeNetWorth** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**AccountRole** | [***AccountRoleProperty**](AccountRoleProperty.md) | | [optional] [default to null]
**CreditCardType** | [***CreditCardTypeProperty**](CreditCardTypeProperty.md) | | [optional] [default to null]
**MonthlyPaymentDate** | [**time.Time**](time.Time.md) | Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank. | [optional] [default to null]
**LiabilityType** | [***LiabilityTypeProperty**](LiabilityTypeProperty.md) | | [optional] [default to null]
**LiabilityDirection** | [***LiabilityDirectionProperty**](LiabilityDirectionProperty.md) | | [optional] [default to null]
**Interest** | **string** | Mandatory when type is liability. Interest percentage. | [optional] [default to 0]
**InterestPeriod** | [***InterestPeriodProperty**](InterestPeriodProperty.md) | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**Latitude** | **float64** | Latitude of the accounts&#x27;s location, if applicable. Can be used to draw a map. | [optional] [default to null]
**Longitude** | **float64** | Latitude of the accounts&#x27;s location, if applicable. Can be used to draw a map. | [optional] [default to null]
**ZoomLevel** | **int32** | Zoom level for the map, if drawn. This to set the box right. Unfortunately this is a proprietary value because each map provider has different zoom levels. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,8 @@
# AccountTypeFilter
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,8 @@
# AccountTypeProperty
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

30
docs/AccountUpdate.md Normal file

@ -0,0 +1,30 @@
# AccountUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [default to null]
**Iban** | **string** | | [optional] [default to null]
**Bic** | **string** | | [optional] [default to null]
**AccountNumber** | **string** | | [optional] [default to null]
**OpeningBalance** | **string** | | [optional] [default to null]
**OpeningBalanceDate** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**VirtualBalance** | **string** | | [optional] [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**Active** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**Order** | **int32** | Order of the account | [optional] [default to null]
**IncludeNetWorth** | **bool** | If omitted, defaults to true. | [optional] [default to true]
**AccountRole** | [***AccountRoleProperty**](AccountRoleProperty.md) | | [optional] [default to null]
**CreditCardType** | [***CreditCardTypeProperty**](CreditCardTypeProperty.md) | | [optional] [default to null]
**MonthlyPaymentDate** | [**time.Time**](time.Time.md) | Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank. | [optional] [default to null]
**LiabilityType** | [***LiabilityTypeProperty**](LiabilityTypeProperty.md) | | [optional] [default to null]
**Interest** | **string** | Mandatory when type is liability. Interest percentage. | [optional] [default to null]
**InterestPeriod** | [***InterestPeriodProperty**](InterestPeriodProperty.md) | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**Latitude** | **float64** | Latitude of the account&#x27;s location, if applicable. Can be used to draw a map. If omitted, the existing location will be kept. If submitted as NULL, the current location will be removed. | [optional] [default to null]
**Longitude** | **float64** | Latitude of the account&#x27;s location, if applicable. Can be used to draw a map. If omitted, the existing location will be kept. If submitted as NULL, the current location will be removed. | [optional] [default to null]
**ZoomLevel** | **int32** | Zoom level for the map, if drawn. This to set the box right. Unfortunately this is a proprietary value because each map provider has different zoom levels. If omitted, the existing location will be kept. If submitted as NULL, the current location will be removed. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

409
docs/AccountsApi.md Normal file

@ -0,0 +1,409 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteAccount**](AccountsApi.md#DeleteAccount) | **Delete** /v1/accounts/{id} | Permanently delete account.
[**GetAccount**](AccountsApi.md#GetAccount) | **Get** /v1/accounts/{id} | Get single account.
[**ListAccount**](AccountsApi.md#ListAccount) | **Get** /v1/accounts | List all accounts.
[**ListAttachmentByAccount**](AccountsApi.md#ListAttachmentByAccount) | **Get** /v1/accounts/{id}/attachments | Lists all attachments.
[**ListPiggyBankByAccount**](AccountsApi.md#ListPiggyBankByAccount) | **Get** /v1/accounts/{id}/piggy-banks | List all piggy banks related to the account.
[**ListTransactionByAccount**](AccountsApi.md#ListTransactionByAccount) | **Get** /v1/accounts/{id}/transactions | List all transactions related to the account.
[**StoreAccount**](AccountsApi.md#StoreAccount) | **Post** /v1/accounts | Create new account.
[**UpdateAccount**](AccountsApi.md#UpdateAccount) | **Put** /v1/accounts/{id} | Update existing account.
# **DeleteAccount**
> DeleteAccount(ctx, id, optional)
Permanently delete account.
Will permanently delete an account. Any associated transactions and piggy banks are ALSO deleted. Cannot be recovered from.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiDeleteAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiDeleteAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetAccount**
> AccountSingle GetAccount(ctx, id, optional)
Get single account.
Returns a single account by its ID.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiGetAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiGetAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**date** | **optional.String**| A date formatted YYYY-MM-DD. When added to the request, Firefly III will show the account&#x27;s balance on that day. |
### Return type
[**AccountSingle**](AccountSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAccount**
> AccountArray ListAccount(ctx, optional)
List all accounts.
This endpoint returns a list of all the accounts owned by the authenticated user.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AccountsApiListAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiListAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**date** | **optional.String**| A date formatted YYYY-MM-DD. When added to the request, Firefly III will show the account&#x27;s balance on that day. |
**type_** | [**optional.Interface of AccountTypeFilter**](.md)| Optional filter on the account type(s) returned |
### Return type
[**AccountArray**](AccountArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAttachmentByAccount**
> AttachmentArray ListAttachmentByAccount(ctx, id, optional)
Lists all attachments.
Lists all attachments.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiListAttachmentByAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiListAttachmentByAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**AttachmentArray**](AttachmentArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListPiggyBankByAccount**
> PiggyBankArray ListPiggyBankByAccount(ctx, id, optional)
List all piggy banks related to the account.
This endpoint returns a list of all the piggy banks connected to the account.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiListPiggyBankByAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiListPiggyBankByAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**PiggyBankArray**](PiggyBankArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListTransactionByAccount**
> TransactionArray ListTransactionByAccount(ctx, id, optional)
List all transactions related to the account.
This endpoint returns a list of all the transactions connected to the account.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiListTransactionByAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiListTransactionByAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. |
**type_** | [**optional.Interface of TransactionTypeFilter**](.md)| Optional filter on the transaction type(s) returned. |
### Return type
[**TransactionArray**](TransactionArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreAccount**
> AccountSingle StoreAccount(ctx, body, name, type_, iban, bic, accountNumber, openingBalance, openingBalanceDate, virtualBalance, currencyId, currencyCode, active, order, includeNetWorth, accountRole, creditCardType, monthlyPaymentDate, liabilityType, liabilityDirection, interest, interestPeriod, notes, latitude, longitude, zoomLevel, optional)
Create new account.
Creates a new account. The data required can be submitted as a JSON body or as a list of parameters (in key=value pairs, like a webform).
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**AccountStore**](AccountStore.md)| JSON array with the necessary account information or key&#x3D;value pairs. See the model for the exact specifications. |
**name** | **string**| |
**type_** | [**ShortAccountTypeProperty**](.md)| |
**iban** | **string**| |
**bic** | **string**| |
**accountNumber** | **string**| |
**openingBalance** | **string**| |
**openingBalanceDate** | **time.Time**| |
**virtualBalance** | **string**| |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**active** | **bool**| |
**order** | **int32**| |
**includeNetWorth** | **bool**| |
**accountRole** | [**AccountRoleProperty**](.md)| |
**creditCardType** | [**CreditCardTypeProperty**](.md)| |
**monthlyPaymentDate** | **time.Time**| |
**liabilityType** | [**LiabilityTypeProperty**](.md)| |
**liabilityDirection** | [**LiabilityDirectionProperty**](.md)| |
**interest** | **string**| |
**interestPeriod** | [**InterestPeriodProperty**](.md)| |
**notes** | **string**| |
**latitude** | **float64**| |
**longitude** | **float64**| |
**zoomLevel** | **int32**| |
**optional** | ***AccountsApiStoreAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiStoreAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AccountSingle**](AccountSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateAccount**
> AccountSingle UpdateAccount(ctx, body, name, iban, bic, accountNumber, openingBalance, openingBalanceDate, virtualBalance, currencyId, currencyCode, active, order, includeNetWorth, accountRole, creditCardType, monthlyPaymentDate, liabilityType, interest, interestPeriod, notes, latitude, longitude, zoomLevel, id, optional)
Update existing account.
Used to update a single account. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**AccountUpdate**](AccountUpdate.md)| JSON array or formdata with updated account information. See the model for the exact specifications. |
**name** | **string**| |
**iban** | **string**| |
**bic** | **string**| |
**accountNumber** | **string**| |
**openingBalance** | **string**| |
**openingBalanceDate** | **time.Time**| |
**virtualBalance** | **string**| |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**active** | **bool**| |
**order** | **int32**| |
**includeNetWorth** | **bool**| |
**accountRole** | [**AccountRoleProperty**](.md)| |
**creditCardType** | [**CreditCardTypeProperty**](.md)| |
**monthlyPaymentDate** | **time.Time**| |
**liabilityType** | [**LiabilityTypeProperty**](.md)| |
**interest** | **string**| |
**interestPeriod** | [**InterestPeriodProperty**](.md)| |
**notes** | **string**| |
**latitude** | **float64**| |
**longitude** | **float64**| |
**zoomLevel** | **int32**| |
**id** | **string**| The ID of the account. |
**optional** | ***AccountsApiUpdateAccountOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AccountsApiUpdateAccountOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AccountSingle**](AccountSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

8
docs/AttachableType.md Normal file

@ -0,0 +1,8 @@
# AttachableType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

20
docs/Attachment.md Normal file

@ -0,0 +1,20 @@
# Attachment
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**AttachableType** | [***AttachableType**](AttachableType.md) | | [default to null]
**AttachableId** | **string** | ID of the model this attachment is linked to. | [default to null]
**Md5** | **string** | MD5 hash of the file for basic duplicate detection. | [optional] [default to null]
**Filename** | **string** | | [default to null]
**DownloadUrl** | **string** | | [optional] [default to null]
**UploadUrl** | **string** | | [optional] [default to null]
**Title** | **string** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**Mime** | **string** | | [optional] [default to null]
**Size** | **int32** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/AttachmentArray.md Normal file

@ -0,0 +1,10 @@
# AttachmentArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]AttachmentRead**](AttachmentRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

12
docs/AttachmentRead.md Normal file

@ -0,0 +1,12 @@
# AttachmentRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***Attachment**](Attachment.md) | | [default to null]
**Links** | [***ObjectLink**](ObjectLink.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

9
docs/AttachmentSingle.md Normal file

@ -0,0 +1,9 @@
# AttachmentSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***AttachmentRead**](AttachmentRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

13
docs/AttachmentStore.md Normal file

@ -0,0 +1,13 @@
# AttachmentStore
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Filename** | **string** | | [default to null]
**AttachableType** | [***AttachableType**](AttachableType.md) | | [default to null]
**AttachableId** | **string** | ID of the model this attachment is linked to. | [default to null]
**Title** | **string** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/AttachmentUpdate.md Normal file

@ -0,0 +1,11 @@
# AttachmentUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Filename** | **string** | | [optional] [default to null]
**Title** | **string** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

285
docs/AttachmentsApi.md Normal file

@ -0,0 +1,285 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteAttachment**](AttachmentsApi.md#DeleteAttachment) | **Delete** /v1/attachments/{id} | Delete an attachment.
[**DownloadAttachment**](AttachmentsApi.md#DownloadAttachment) | **Get** /v1/attachments/{id}/download | Download a single attachment.
[**GetAttachment**](AttachmentsApi.md#GetAttachment) | **Get** /v1/attachments/{id} | Get a single attachment.
[**ListAttachment**](AttachmentsApi.md#ListAttachment) | **Get** /v1/attachments | List all attachments.
[**StoreAttachment**](AttachmentsApi.md#StoreAttachment) | **Post** /v1/attachments | Store a new attachment.
[**UpdateAttachment**](AttachmentsApi.md#UpdateAttachment) | **Put** /v1/attachments/{id} | Update existing attachment.
[**UploadAttachment**](AttachmentsApi.md#UploadAttachment) | **Post** /v1/attachments/{id}/upload | Upload an attachment.
# **DeleteAttachment**
> DeleteAttachment(ctx, id, optional)
Delete an attachment.
With this endpoint you delete an attachment, including any stored file data.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the single attachment. |
**optional** | ***AttachmentsApiDeleteAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiDeleteAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **DownloadAttachment**
> *os.File DownloadAttachment(ctx, id, optional)
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\".
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the attachment. |
**optional** | ***AttachmentsApiDownloadAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiDownloadAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[***os.File**](*os.File.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/octet-stream, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetAttachment**
> AttachmentSingle GetAttachment(ctx, id, optional)
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).
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the attachment. |
**optional** | ***AttachmentsApiGetAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiGetAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AttachmentSingle**](AttachmentSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAttachment**
> AttachmentArray ListAttachment(ctx, optional)
List all attachments.
This endpoint lists all attachments.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AttachmentsApiListAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiListAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**AttachmentArray**](AttachmentArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreAttachment**
> AttachmentSingle StoreAttachment(ctx, body, filename, attachableType, attachableId, title, notes, optional)
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.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**AttachmentStore**](AttachmentStore.md)| JSON array or key&#x3D;value pairs with the necessary attachment information. See the model for the exact specifications. |
**filename** | **string**| |
**attachableType** | [**AttachableType**](.md)| |
**attachableId** | **string**| |
**title** | **string**| |
**notes** | **string**| |
**optional** | ***AttachmentsApiStoreAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiStoreAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AttachmentSingle**](AttachmentSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateAttachment**
> AttachmentSingle UpdateAttachment(ctx, body, filename, title, notes, id, optional)
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.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**AttachmentUpdate**](AttachmentUpdate.md)| JSON array with updated attachment information. See the model for the exact specifications. |
**filename** | **string**| |
**title** | **string**| |
**notes** | **string**| |
**id** | **string**| The ID of the attachment. |
**optional** | ***AttachmentsApiUpdateAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiUpdateAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AttachmentSingle**](AttachmentSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UploadAttachment**
> UploadAttachment(ctx, id, optional)
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.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the attachment. |
**optional** | ***AttachmentsApiUploadAttachmentOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AttachmentsApiUploadAttachmentOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**optional.Interface of Object**](Object.md)| |
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/octet-stream
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

8
docs/AutoBudgetPeriod.md Normal file

@ -0,0 +1,8 @@
# AutoBudgetPeriod
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

8
docs/AutoBudgetType.md Normal file

@ -0,0 +1,8 @@
# AutoBudgetType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,17 @@
# AutocompleteAccount
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the account found by an auto-complete search. | [default to null]
**NameWithBalance** | **string** | Asset accounts and liabilities have a second field with the given date&#x27;s account balance. | [default to null]
**Type_** | **string** | Account type of the account found by the auto-complete search. | [default to null]
**CurrencyId** | **string** | ID for the currency used by this account. | [default to null]
**CurrencyName** | **string** | Currency name for the currency used by this account. | [default to null]
**CurrencyCode** | **string** | Currency code for the currency used by this account. | [default to null]
**CurrencySymbol** | **string** | Currency symbol for the currency used by this account. | [default to null]
**CurrencyDecimalPlaces** | **int32** | Number of decimal places for the currency used by this account. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

569
docs/AutocompleteApi.md Normal file

@ -0,0 +1,569 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetAccountsAC**](AutocompleteApi.md#GetAccountsAC) | **Get** /v1/autocomplete/accounts | Returns all accounts of the user returned in a basic auto-complete array.
[**GetBillsAC**](AutocompleteApi.md#GetBillsAC) | **Get** /v1/autocomplete/bills | Returns all bills of the user returned in a basic auto-complete array.
[**GetBudgetsAC**](AutocompleteApi.md#GetBudgetsAC) | **Get** /v1/autocomplete/budgets | Returns all budgets of the user returned in a basic auto-complete array.
[**GetCategoriesAC**](AutocompleteApi.md#GetCategoriesAC) | **Get** /v1/autocomplete/categories | Returns all categories of the user returned in a basic auto-complete array.
[**GetCurrenciesAC**](AutocompleteApi.md#GetCurrenciesAC) | **Get** /v1/autocomplete/currencies | Returns all currencies of the user returned in a basic auto-complete array.
[**GetCurrenciesCodeAC**](AutocompleteApi.md#GetCurrenciesCodeAC) | **Get** /v1/autocomplete/currencies-with-code | Returns all currencies of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
[**GetObjectGroupsAC**](AutocompleteApi.md#GetObjectGroupsAC) | **Get** /v1/autocomplete/object-groups | Returns all object groups of the user returned in a basic auto-complete array.
[**GetPiggiesAC**](AutocompleteApi.md#GetPiggiesAC) | **Get** /v1/autocomplete/piggy-banks | Returns all piggy banks of the user returned in a basic auto-complete array.
[**GetPiggiesBalanceAC**](AutocompleteApi.md#GetPiggiesBalanceAC) | **Get** /v1/autocomplete/piggy-banks-with-balance | Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
[**GetRecurringAC**](AutocompleteApi.md#GetRecurringAC) | **Get** /v1/autocomplete/recurring | Returns all recurring transactions of the user returned in a basic auto-complete array.
[**GetRuleGroupsAC**](AutocompleteApi.md#GetRuleGroupsAC) | **Get** /v1/autocomplete/rule-groups | Returns all rule groups of the user returned in a basic auto-complete array.
[**GetRulesAC**](AutocompleteApi.md#GetRulesAC) | **Get** /v1/autocomplete/rules | Returns all rules of the user returned in a basic auto-complete array.
[**GetTagAC**](AutocompleteApi.md#GetTagAC) | **Get** /v1/autocomplete/tags | Returns all tags of the user returned in a basic auto-complete array.
[**GetTransactionTypesAC**](AutocompleteApi.md#GetTransactionTypesAC) | **Get** /v1/autocomplete/transaction-types | Returns all transaction types returned in a basic auto-complete array. English only.
[**GetTransactionsAC**](AutocompleteApi.md#GetTransactionsAC) | **Get** /v1/autocomplete/transactions | Returns all transaction descriptions of the user returned in a basic auto-complete array.
[**GetTransactionsIDAC**](AutocompleteApi.md#GetTransactionsIDAC) | **Get** /v1/autocomplete/transactions-with-id | Returns all transactions, complemented with their ID, of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
# **GetAccountsAC**
> []AutocompleteAccount GetAccountsAC(ctx, optional)
Returns all accounts of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetAccountsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetAccountsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
**date** | **optional.String**| If the account is an asset account or a liability, the autocomplete will also return the balance of the account on this date. |
**types** | [**optional.Interface of []AccountTypeFilter**](AccountTypeFilter.md)| Optional filter on the account type(s) used in the autocomplete. |
### Return type
[**[]AutocompleteAccount**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetBillsAC**
> []AutocompleteBill GetBillsAC(ctx, optional)
Returns all bills of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetBillsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetBillsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteBill**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetBudgetsAC**
> []AutocompleteBudget GetBudgetsAC(ctx, optional)
Returns all budgets of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetBudgetsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetBudgetsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteBudget**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCategoriesAC**
> []AutocompleteCategory GetCategoriesAC(ctx, optional)
Returns all categories of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetCategoriesACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetCategoriesACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteCategory**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCurrenciesAC**
> []AutocompleteCurrency GetCurrenciesAC(ctx, optional)
Returns all currencies of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetCurrenciesACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetCurrenciesACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteCurrency**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCurrenciesCodeAC**
> []AutocompleteCurrencyCode GetCurrenciesCodeAC(ctx, optional)
Returns all currencies of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetCurrenciesCodeACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetCurrenciesCodeACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteCurrencyCode**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetObjectGroupsAC**
> []AutocompleteObjectGroup GetObjectGroupsAC(ctx, optional)
Returns all object groups of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetObjectGroupsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetObjectGroupsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteObjectGroup**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetPiggiesAC**
> []AutocompletePiggy GetPiggiesAC(ctx, optional)
Returns all piggy banks of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetPiggiesACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetPiggiesACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompletePiggy**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetPiggiesBalanceAC**
> []AutocompletePiggyBalance GetPiggiesBalanceAC(ctx, optional)
Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetPiggiesBalanceACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetPiggiesBalanceACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompletePiggyBalance**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetRecurringAC**
> []AutocompleteRecurrence GetRecurringAC(ctx, optional)
Returns all recurring transactions of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetRecurringACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetRecurringACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteRecurrence**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetRuleGroupsAC**
> []AutocompleteRuleGroup GetRuleGroupsAC(ctx, optional)
Returns all rule groups of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetRuleGroupsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetRuleGroupsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteRuleGroup**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetRulesAC**
> []AutocompleteRule GetRulesAC(ctx, optional)
Returns all rules of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetRulesACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetRulesACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteRule**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetTagAC**
> []AutocompleteTag GetTagAC(ctx, optional)
Returns all tags of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetTagACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetTagACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteTag**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetTransactionTypesAC**
> []AutocompleteTransactionType GetTransactionTypesAC(ctx, optional)
Returns all transaction types returned in a basic auto-complete array. English only.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetTransactionTypesACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetTransactionTypesACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteTransactionType**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetTransactionsAC**
> []AutocompleteTransaction GetTransactionsAC(ctx, optional)
Returns all transaction descriptions of the user returned in a basic auto-complete array.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetTransactionsACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetTransactionsACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteTransaction**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetTransactionsIDAC**
> []AutocompleteTransactionId GetTransactionsIDAC(ctx, optional)
Returns all transactions, complemented with their ID, of the user returned in a basic auto-complete array. This endpoint is DEPRECATED and I suggest you DO NOT use it.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AutocompleteApiGetTransactionsIDACOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AutocompleteApiGetTransactionsIDACOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**query** | **optional.String**| The autocomplete search query. |
**limit** | **optional.Int32**| The number of items returned. |
### Return type
[**[]AutocompleteTransactionId**](array.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

11
docs/AutocompleteBill.md Normal file

@ -0,0 +1,11 @@
# AutocompleteBill
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the bill found by an auto-complete search. | [default to null]
**Active** | **bool** | Is the bill active or not? | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,10 @@
# AutocompleteBudget
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the budget found by an auto-complete search. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,10 @@
# AutocompleteCategory
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the category found by an auto-complete search. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,13 @@
# AutocompleteCurrency
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Currency name. | [default to null]
**Code** | **string** | Currency code. | [default to null]
**Symbol** | **string** | | [default to null]
**DecimalPlaces** | **int32** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,13 @@
# AutocompleteCurrencyCode
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Currency name with the code between brackets. | [default to null]
**Code** | **string** | Currency code. | [default to null]
**Symbol** | **string** | | [default to null]
**DecimalPlaces** | **int32** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,11 @@
# AutocompleteObjectGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Title** | **string** | Title of the object group found by an auto-complete search. | [default to null]
**Name** | **string** | Title of the object group found by an auto-complete search. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

17
docs/AutocompletePiggy.md Normal file

@ -0,0 +1,17 @@
# AutocompletePiggy
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the piggy bank found by an auto-complete search. | [default to null]
**CurrencyId** | **string** | Currency ID for this piggy bank. | [optional] [default to null]
**CurrencyCode** | **string** | Currency code for this piggy bank. | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyName** | **string** | Currency name for the currency used by this account. | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**ObjectGroupId** | **string** | The group ID of the group this object is part of. NULL if no group. | [optional] [default to null]
**ObjectGroupTitle** | **string** | The name of the group. NULL if no group. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,17 @@
# AutocompletePiggyBalance
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the piggy bank found by an auto-complete search. | [default to null]
**NameWithBalance** | **string** | Name of the piggy bank found by an auto-complete search with the current balance formatted nicely. | [optional] [default to null]
**CurrencyId** | **string** | Currency ID for this piggy bank. | [optional] [default to null]
**CurrencyCode** | **string** | Currency code for this piggy bank. | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**ObjectGroupId** | **string** | The group ID of the group this object is part of. NULL if no group. | [optional] [default to null]
**ObjectGroupTitle** | **string** | The name of the group. NULL if no group. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,11 @@
# AutocompleteRecurrence
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the recurrence found by an auto-complete search. | [default to null]
**Description** | **string** | Description of the recurrence found by auto-complete. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/AutocompleteRule.md Normal file

@ -0,0 +1,11 @@
# AutocompleteRule
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the rule found by an auto-complete search. | [default to null]
**Description** | **string** | Description of the rule found by auto-complete. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,11 @@
# AutocompleteRuleGroup
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the rule group found by an auto-complete search. | [default to null]
**Description** | **string** | Description of the rule group found by auto-complete. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/AutocompleteTag.md Normal file

@ -0,0 +1,11 @@
# AutocompleteTag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Name of the tag found by an auto-complete search. | [default to null]
**Tag** | **string** | Name of the tag found by an auto-complete search. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,12 @@
# AutocompleteTransaction
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | The ID of a transaction journal (basically a single split). | [default to null]
**TransactionGroupId** | **string** | The ID of the underlying transaction group. | [optional] [default to null]
**Name** | **string** | Transaction description | [default to null]
**Description** | **string** | Transaction description | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,12 @@
# AutocompleteTransactionId
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | The ID of a transaction journal (basically a single split). | [default to null]
**TransactionGroupId** | **string** | The ID of the underlying transaction group. | [optional] [default to null]
**Name** | **string** | Transaction description with ID in the name. | [default to null]
**Description** | **string** | Transaction description with ID in the name. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,11 @@
# AutocompleteTransactionType
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | | [default to null]
**Name** | **string** | Type of the object found by an auto-complete search. | [default to null]
**Type_** | **string** | Name of the object found by an auto-complete search. | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

19
docs/AvailableBudget.md Normal file

@ -0,0 +1,19 @@
# AvailableBudget
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**Amount** | **string** | | [default to null]
**Start** | [**time.Time**](time.Time.md) | Start date of the available budget. | [default to null]
**End** | [**time.Time**](time.Time.md) | End date of the available budget. | [default to null]
**SpentInBudgets** | [**[]BudgetSpent**](BudgetSpent.md) | | [optional] [default to null]
**SpentOutsideBudget** | [**[]BudgetSpent**](BudgetSpent.md) | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,10 @@
# AvailableBudgetArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]AvailableBudgetRead**](AvailableBudgetRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,11 @@
# AvailableBudgetRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***AvailableBudget**](AvailableBudget.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,9 @@
# AvailableBudgetSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***AvailableBudgetRead**](AvailableBudgetRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,83 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetAvailableBudget**](AvailableBudgetsApi.md#GetAvailableBudget) | **Get** /v1/available-budgets/{id} | Get a single available budget.
[**ListAvailableBudget**](AvailableBudgetsApi.md#ListAvailableBudget) | **Get** /v1/available-budgets | List all available budget amounts.
# **GetAvailableBudget**
> AvailableBudgetSingle GetAvailableBudget(ctx, id, optional)
Get a single available budget.
Get a single available budget, by ID.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the available budget. |
**optional** | ***AvailableBudgetsApiGetAvailableBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AvailableBudgetsApiGetAvailableBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**AvailableBudgetSingle**](AvailableBudgetSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAvailableBudget**
> AvailableBudgetArray ListAvailableBudget(ctx, optional)
List all available budget amounts.
Firefly III allows users to set the amount that is available to be budgeted in so-called \"available budgets\". For example, the user could have 1200,- available to be divided during the coming month. This amount is used on the /budgets page. This endpoint returns all of these amounts and the periods for which they are set.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***AvailableBudgetsApiListAvailableBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a AvailableBudgetsApiListAvailableBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. |
### Return type
[**AvailableBudgetArray**](AvailableBudgetArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

@ -0,0 +1,10 @@
# BadRequestResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Message** | **string** | | [optional] [default to null]
**Exception** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

18
docs/BasicSummaryEntry.md Normal file

@ -0,0 +1,18 @@
# BasicSummaryEntry
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Key** | **string** | This is a reference to the type of info shared, not influenced by translations or user preferences. The EUR value is a reference to the currency code. Possibilities are: balance-in-ABC, spent-in-ABC, earned-in-ABC, bills-paid-in-ABC, bills-unpaid-in-ABC, left-to-spend-in-ABC and net-worth-in-ABC. | [optional] [default to null]
**Title** | **string** | A translated title for the information shared. | [optional] [default to null]
**MonetaryValue** | **float64** | The amount as a float. | [optional] [default to null]
**CurrencyId** | **string** | The currency ID of the associated currency. | [optional] [default to null]
**CurrencyCode** | **string** | | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | Number of decimals for the associated currency. | [optional] [default to null]
**ValueParsed** | **string** | The amount formatted according to the users locale | [optional] [default to null]
**LocalIcon** | **string** | Reference to a font-awesome icon without the fa- part. | [optional] [default to null]
**SubTitle** | **string** | A short explanation of the amounts origin. Already formatted according to the locale of the user or translated, if relevant. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

32
docs/Bill.md Normal file

@ -0,0 +1,32 @@
# Bill
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**Name** | **string** | | [default to null]
**AmountMin** | **string** | | [default to null]
**AmountMax** | **string** | | [default to null]
**Date** | [**time.Time**](time.Time.md) | | [default to null]
**EndDate** | [**time.Time**](time.Time.md) | The date after which this bill is no longer valid or applicable | [optional] [default to null]
**ExtensionDate** | [**time.Time**](time.Time.md) | The date before which the bill must be renewed (or cancelled) | [optional] [default to null]
**RepeatFreq** | [***BillRepeatFrequency**](BillRepeatFrequency.md) | | [default to null]
**Skip** | **int32** | How often the bill must be skipped. 1 means a bi-monthly bill. | [optional] [default to null]
**Active** | **bool** | If the bill is active. | [optional] [default to null]
**Order** | **int32** | Order of the bill. | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**NextExpectedMatch** | [**time.Time**](time.Time.md) | When the bill is expected to be due. | [optional] [default to null]
**NextExpectedMatchDiff** | **string** | Formatted (locally) when the bill is due. | [optional] [default to null]
**ObjectGroupId** | **string** | The group ID of the group this object is part of. NULL if no group. | [optional] [default to null]
**ObjectGroupOrder** | **int32** | The order of the group. At least 1, for the highest sorting. | [optional] [default to null]
**ObjectGroupTitle** | **string** | The name of the group. NULL if no group. | [optional] [default to null]
**PayDates** | [**[]time.Time**](time.Time.md) | Array of future dates when the bill is expected to be paid. Autogenerated. | [optional] [default to null]
**PaidDates** | [**[]BillPaidDates**](Bill_paid_dates.md) | Array of past transactions when the bill was paid. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/BillArray.md Normal file

@ -0,0 +1,10 @@
# BillArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]BillRead**](BillRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/BillPaidDates.md Normal file

@ -0,0 +1,11 @@
# BillPaidDates
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TransactionGroupId** | **string** | Transaction group ID of the paid bill. | [optional] [default to null]
**TransactionJournalId** | **string** | Transaction journal ID of the paid bill. | [optional] [default to null]
**Date** | [**time.Time**](time.Time.md) | Date the bill was paid. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/BillRead.md Normal file

@ -0,0 +1,11 @@
# BillRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***Bill**](Bill.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,8 @@
# BillRepeatFrequency
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

9
docs/BillSingle.md Normal file

@ -0,0 +1,9 @@
# BillSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***BillRead**](BillRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

22
docs/BillStore.md Normal file

@ -0,0 +1,22 @@
# BillStore
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CurrencyId** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**Name** | **string** | | [default to null]
**AmountMin** | **string** | | [default to null]
**AmountMax** | **string** | | [default to null]
**Date** | [**time.Time**](time.Time.md) | | [default to null]
**EndDate** | [**time.Time**](time.Time.md) | The date after which this bill is no longer valid or applicable | [optional] [default to null]
**ExtensionDate** | [**time.Time**](time.Time.md) | The date before which the bill must be renewed (or cancelled) | [optional] [default to null]
**RepeatFreq** | [***BillRepeatFrequency**](BillRepeatFrequency.md) | | [default to null]
**Skip** | **int32** | How often the bill must be skipped. 1 means a bi-monthly bill. | [optional] [default to null]
**Active** | **bool** | If the bill is active. | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**ObjectGroupId** | **string** | The group ID of the group this object is part of. NULL if no group. | [optional] [default to null]
**ObjectGroupTitle** | **string** | The name of the group. NULL if no group. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

22
docs/BillUpdate.md Normal file

@ -0,0 +1,22 @@
# BillUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CurrencyId** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code | [optional] [default to null]
**Name** | **string** | | [default to null]
**AmountMin** | **string** | | [optional] [default to null]
**AmountMax** | **string** | | [optional] [default to null]
**Date** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**EndDate** | [**time.Time**](time.Time.md) | The date after which this bill is no longer valid or applicable | [optional] [default to null]
**ExtensionDate** | [**time.Time**](time.Time.md) | The date before which the bill must be renewed (or cancelled) | [optional] [default to null]
**RepeatFreq** | [***BillRepeatFrequency**](BillRepeatFrequency.md) | | [optional] [default to null]
**Skip** | **int32** | How often the bill must be skipped. 1 means a bi-monthly bill. | [optional] [default to null]
**Active** | **bool** | If the bill is active. | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**ObjectGroupId** | **string** | The group ID of the group this object is part of. NULL if no group. | [optional] [default to null]
**ObjectGroupTitle** | **string** | The name of the group. NULL if no group. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

370
docs/BillsApi.md Normal file

@ -0,0 +1,370 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteBill**](BillsApi.md#DeleteBill) | **Delete** /v1/bills/{id} | Delete a bill.
[**GetBill**](BillsApi.md#GetBill) | **Get** /v1/bills/{id} | Get a single bill.
[**ListAttachmentByBill**](BillsApi.md#ListAttachmentByBill) | **Get** /v1/bills/{id}/attachments | List all attachments uploaded to the bill.
[**ListBill**](BillsApi.md#ListBill) | **Get** /v1/bills | List all bills.
[**ListRuleByBill**](BillsApi.md#ListRuleByBill) | **Get** /v1/bills/{id}/rules | List all rules associated with the bill.
[**ListTransactionByBill**](BillsApi.md#ListTransactionByBill) | **Get** /v1/bills/{id}/transactions | List all transactions associated with the bill.
[**StoreBill**](BillsApi.md#StoreBill) | **Post** /v1/bills | Store a new bill
[**UpdateBill**](BillsApi.md#UpdateBill) | **Put** /v1/bills/{id} | Update existing bill.
# **DeleteBill**
> DeleteBill(ctx, id, optional)
Delete a bill.
Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiDeleteBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiDeleteBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetBill**
> BillSingle GetBill(ctx, id, optional)
Get a single bill.
Get a single bill.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiGetBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiGetBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates. |
### Return type
[**BillSingle**](BillSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAttachmentByBill**
> AttachmentArray ListAttachmentByBill(ctx, id, optional)
List all attachments uploaded to the bill.
This endpoint will list all attachments linked to the bill.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiListAttachmentByBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiListAttachmentByBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**AttachmentArray**](AttachmentArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListBill**
> BillArray ListBill(ctx, optional)
List all bills.
This endpoint will list all the user's bills.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***BillsApiListBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiListBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. If it is are added to the request, Firefly III will calculate the appropriate payment and paid dates. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. If it is added to the request, Firefly III will calculate the appropriate payment and paid dates. |
### Return type
[**BillArray**](BillArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListRuleByBill**
> RuleArray ListRuleByBill(ctx, id, optional)
List all rules associated with the bill.
This endpoint will list all rules that have an action to set the bill to this bill.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiListRuleByBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiListRuleByBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**RuleArray**](RuleArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListTransactionByBill**
> TransactionArray ListTransactionByBill(ctx, id, optional)
List all transactions associated with the bill.
This endpoint will list all transactions linked to this bill.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiListTransactionByBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiListTransactionByBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. |
**type_** | [**optional.Interface of TransactionTypeFilter**](.md)| Optional filter on the transaction type(s) returned |
### Return type
[**TransactionArray**](TransactionArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreBill**
> BillSingle StoreBill(ctx, body, currencyId, currencyCode, name, amountMin, amountMax, date, endDate, extensionDate, repeatFreq, skip, active, notes, objectGroupId, objectGroupTitle, optional)
Store a new bill
Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BillStore**](BillStore.md)| JSON array or key&#x3D;value pairs with the necessary bill information. See the model for the exact specifications. |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**name** | **string**| |
**amountMin** | **string**| |
**amountMax** | **string**| |
**date** | **time.Time**| |
**endDate** | **time.Time**| |
**extensionDate** | **time.Time**| |
**repeatFreq** | [**BillRepeatFrequency**](.md)| |
**skip** | **int32**| |
**active** | **bool**| |
**notes** | **string**| |
**objectGroupId** | **string**| |
**objectGroupTitle** | **string**| |
**optional** | ***BillsApiStoreBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiStoreBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BillSingle**](BillSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateBill**
> BillSingle UpdateBill(ctx, body, currencyId, currencyCode, name, amountMin, amountMax, date, endDate, extensionDate, repeatFreq, skip, active, notes, objectGroupId, objectGroupTitle, id, optional)
Update existing bill.
Update existing bill.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BillUpdate**](BillUpdate.md)| JSON array or key&#x3D;value pairs with updated bill information. See the model for the exact specifications. |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**name** | **string**| |
**amountMin** | **string**| |
**amountMax** | **string**| |
**date** | **time.Time**| |
**endDate** | **time.Time**| |
**extensionDate** | **time.Time**| |
**repeatFreq** | [**BillRepeatFrequency**](.md)| |
**skip** | **int32**| |
**active** | **bool**| |
**notes** | **string**| |
**objectGroupId** | **string**| |
**objectGroupTitle** | **string**| |
**id** | **string**| The ID of the bill. |
**optional** | ***BillsApiUpdateBillOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BillsApiUpdateBillOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BillSingle**](BillSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/json, application/vnd.api+json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

20
docs/Budget.md Normal file

@ -0,0 +1,20 @@
# Budget
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**Name** | **string** | | [default to null]
**Active** | **bool** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**Order** | **int32** | | [optional] [default to null]
**AutoBudgetType** | [***AutoBudgetType**](AutoBudgetType.md) | | [optional] [default to null]
**AutoBudgetCurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetCurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetAmount** | **string** | | [optional] [default to null]
**AutoBudgetPeriod** | [***AutoBudgetPeriod**](AutoBudgetPeriod.md) | | [optional] [default to null]
**Spent** | [**[]BudgetSpent**](BudgetSpent.md) | Information on how much was spent in this budget. Is only filled in when the start and end date are submitted. | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/BudgetArray.md Normal file

@ -0,0 +1,10 @@
# BudgetArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]BudgetRead**](BudgetRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

21
docs/BudgetLimit.md Normal file

@ -0,0 +1,21 @@
# BudgetLimit
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**Start** | [**time.Time**](time.Time.md) | Start date of the budget limit. | [default to null]
**End** | [**time.Time**](time.Time.md) | End date of the budget limit. | [default to null]
**CurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyName** | **string** | | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | | [optional] [default to null]
**BudgetId** | **string** | The budget ID of the associated budget. | [default to null]
**Period** | **string** | Period of the budget limit. Only used when auto-generated by auto-budget. | [optional] [default to null]
**Amount** | **string** | | [default to null]
**Spent** | **string** | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

10
docs/BudgetLimitArray.md Normal file

@ -0,0 +1,10 @@
# BudgetLimitArray
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]BudgetLimitRead**](BudgetLimitRead.md) | | [default to null]
**Meta** | [***Meta**](Meta.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/BudgetLimitRead.md Normal file

@ -0,0 +1,11 @@
# BudgetLimitRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***BudgetLimit**](BudgetLimit.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

@ -0,0 +1,9 @@
# BudgetLimitSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***BudgetLimitRead**](BudgetLimitRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

15
docs/BudgetLimitStore.md Normal file

@ -0,0 +1,15 @@
# BudgetLimitStore
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**CurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**BudgetId** | **string** | The budget ID of the associated budget. | [default to null]
**Start** | **string** | Start date of the budget limit. | [default to null]
**Period** | **string** | Period of the budget limit. Only used when auto-generated by auto-budget. | [optional] [default to null]
**End** | **string** | End date of the budget limit. | [default to null]
**Amount** | **string** | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

11
docs/BudgetRead.md Normal file

@ -0,0 +1,11 @@
# BudgetRead
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Type_** | **string** | Immutable value | [default to null]
**Id** | **string** | | [default to null]
**Attributes** | [***Budget**](Budget.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

9
docs/BudgetSingle.md Normal file

@ -0,0 +1,9 @@
# BudgetSingle
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [***BudgetRead**](BudgetRead.md) | | [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

13
docs/BudgetSpent.md Normal file

@ -0,0 +1,13 @@
# BudgetSpent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Sum** | **string** | The amount spent. | [optional] [default to null]
**CurrencyId** | **string** | | [optional] [default to null]
**CurrencyCode** | **string** | | [optional] [default to null]
**CurrencySymbol** | **string** | | [optional] [default to null]
**CurrencyDecimalPlaces** | **int32** | Number of decimals supported by the currency | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

17
docs/BudgetStore.md Normal file

@ -0,0 +1,17 @@
# BudgetStore
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [default to null]
**Active** | **bool** | | [optional] [default to null]
**Order** | **int32** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**AutoBudgetType** | [***AutoBudgetType**](AutoBudgetType.md) | | [optional] [default to null]
**AutoBudgetCurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetCurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetAmount** | **string** | | [optional] [default to null]
**AutoBudgetPeriod** | [***AutoBudgetPeriod**](AutoBudgetPeriod.md) | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

17
docs/BudgetUpdate.md Normal file

@ -0,0 +1,17 @@
# BudgetUpdate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | | [default to null]
**Active** | **bool** | | [optional] [default to null]
**Order** | **int32** | | [optional] [default to null]
**Notes** | **string** | | [optional] [default to null]
**AutoBudgetType** | [***AutoBudgetType**](AutoBudgetType.md) | | [optional] [default to null]
**AutoBudgetCurrencyId** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetCurrencyCode** | **string** | Use either currency_id or currency_code. Defaults to the user&#x27;s default currency. | [optional] [default to null]
**AutoBudgetAmount** | **string** | | [optional] [default to null]
**AutoBudgetPeriod** | [***AutoBudgetPeriod**](AutoBudgetPeriod.md) | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

631
docs/BudgetsApi.md Normal file

@ -0,0 +1,631 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteBudget**](BudgetsApi.md#DeleteBudget) | **Delete** /v1/budgets/{id} | Delete a budget.
[**DeleteBudgetLimit**](BudgetsApi.md#DeleteBudgetLimit) | **Delete** /v1/budgets/{id}/limits/{limitId} | Delete a budget limit.
[**GetBudget**](BudgetsApi.md#GetBudget) | **Get** /v1/budgets/{id} | Get a single budget.
[**GetBudgetLimit**](BudgetsApi.md#GetBudgetLimit) | **Get** /v1/budgets/{id}/limits/{limitId} | Get single budget limit.
[**ListAttachmentByBudget**](BudgetsApi.md#ListAttachmentByBudget) | **Get** /v1/budgets/{id}/attachments | Lists all attachments of a budget.
[**ListBudget**](BudgetsApi.md#ListBudget) | **Get** /v1/budgets | List all budgets.
[**ListBudgetLimit**](BudgetsApi.md#ListBudgetLimit) | **Get** /v1/budget-limits | Get list of budget limits by date
[**ListBudgetLimitByBudget**](BudgetsApi.md#ListBudgetLimitByBudget) | **Get** /v1/budgets/{id}/limits | Get all limits for a budget.
[**ListTransactionByBudget**](BudgetsApi.md#ListTransactionByBudget) | **Get** /v1/budgets/{id}/transactions | All transactions to a budget.
[**ListTransactionByBudgetLimit**](BudgetsApi.md#ListTransactionByBudgetLimit) | **Get** /v1/budgets/{id}/limits/{limitId}/transactions | List all transactions by a budget limit ID.
[**StoreBudget**](BudgetsApi.md#StoreBudget) | **Post** /v1/budgets | Store a new budget
[**StoreBudgetLimit**](BudgetsApi.md#StoreBudgetLimit) | **Post** /v1/budgets/{id}/limits | Store new budget limit.
[**UpdateBudget**](BudgetsApi.md#UpdateBudget) | **Put** /v1/budgets/{id} | Update existing budget.
[**UpdateBudgetLimit**](BudgetsApi.md#UpdateBudgetLimit) | **Put** /v1/budgets/{id}/limits/{limitId} | Update existing budget limit.
# **DeleteBudget**
> DeleteBudget(ctx, id, optional)
Delete a budget.
Delete a budget. Transactions will not be deleted.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. |
**optional** | ***BudgetsApiDeleteBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiDeleteBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **DeleteBudgetLimit**
> DeleteBudgetLimit(ctx, id, limitId, optional)
Delete a budget limit.
Delete a budget limit.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. The budget limit MUST be associated to the budget ID. |
**limitId** | **string**| The ID of the budget limit. The budget limit MUST be associated to the budget ID. |
**optional** | ***BudgetsApiDeleteBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiDeleteBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetBudget**
> BudgetSingle GetBudget(ctx, id, optional)
Get a single budget.
Get a single budget. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the requested budget. |
**optional** | ***BudgetsApiGetBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiGetBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**start** | **optional.String**| A date formatted YYYY-MM-DD, to get info on how much the user has spent. |
**end** | **optional.String**| A date formatted YYYY-MM-DD, to get info on how much the user has spent. |
### Return type
[**BudgetSingle**](BudgetSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetBudgetLimit**
> BudgetLimitSingle GetBudgetLimit(ctx, id, limitId, optional)
Get single budget limit.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. The budget limit MUST be associated to the budget ID. |
**limitId** | **int32**| The ID of the budget limit. The budget limit MUST be associated to the budget ID. |
**optional** | ***BudgetsApiGetBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiGetBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetLimitSingle**](BudgetLimitSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAttachmentByBudget**
> AttachmentArray ListAttachmentByBudget(ctx, id, optional)
Lists all attachments of a budget.
Lists all attachments.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. |
**optional** | ***BudgetsApiListAttachmentByBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListAttachmentByBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**AttachmentArray**](AttachmentArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListBudget**
> BudgetArray ListBudget(ctx, optional)
List all budgets.
List all the budgets the user has made. If the start date and end date are submitted as well, the \"spent\" array will be updated accordingly.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***BudgetsApiListBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end. |
**end** | **optional.String**| A date formatted YYYY-MM-DD, to get info on how much the user has spent. You must submit both start and end. |
### Return type
[**BudgetArray**](BudgetArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListBudgetLimit**
> BudgetLimitArray ListBudgetLimit(ctx, start, end, optional)
Get list of budget limits by date
Get all budget limits for for this date range.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**start** | **string**| A date formatted YYYY-MM-DD. |
**end** | **string**| A date formatted YYYY-MM-DD. |
**optional** | ***BudgetsApiListBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetLimitArray**](BudgetLimitArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListBudgetLimitByBudget**
> BudgetLimitArray ListBudgetLimitByBudget(ctx, id, optional)
Get all limits for a budget.
Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The \"spent\" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the requested budget. |
**optional** | ***BudgetsApiListBudgetLimitByBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListBudgetLimitByBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. |
### Return type
[**BudgetLimitArray**](BudgetLimitArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListTransactionByBudget**
> TransactionArray ListTransactionByBudget(ctx, id, optional)
All transactions to a budget.
Get all transactions linked to a budget, possibly limited by start and end
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. |
**optional** | ***BudgetsApiListTransactionByBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListTransactionByBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD. |
**end** | **optional.String**| A date formatted YYYY-MM-DD. |
**type_** | [**optional.Interface of TransactionTypeFilter**](.md)| Optional filter on the transaction type(s) returned |
### Return type
[**TransactionArray**](TransactionArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListTransactionByBudgetLimit**
> TransactionArray ListTransactionByBudgetLimit(ctx, id, limitId, optional)
List all transactions by a budget limit ID.
List all the transactions within one budget limit. The start and end date are dictated by the budget limit.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the budget. The budget limit MUST be associated to the budget ID. |
**limitId** | **string**| The ID of the budget limit. The budget limit MUST be associated to the budget ID. |
**optional** | ***BudgetsApiListTransactionByBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiListTransactionByBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**type_** | [**optional.Interface of TransactionTypeFilter**](.md)| Optional filter on the transaction type(s) returned |
### Return type
[**TransactionArray**](TransactionArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreBudget**
> BudgetSingle StoreBudget(ctx, body, name, active, order, notes, autoBudgetType, autoBudgetCurrencyId, autoBudgetCurrencyCode, autoBudgetAmount, autoBudgetPeriod, optional)
Store a new budget
Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BudgetStore**](BudgetStore.md)| JSON array or key&#x3D;value pairs with the necessary budget information. See the model for the exact specifications. |
**name** | **string**| |
**active** | **bool**| |
**order** | **int32**| |
**notes** | **string**| |
**autoBudgetType** | [**AutoBudgetType**](.md)| |
**autoBudgetCurrencyId** | **string**| |
**autoBudgetCurrencyCode** | **string**| |
**autoBudgetAmount** | **string**| |
**autoBudgetPeriod** | [**AutoBudgetPeriod**](.md)| |
**optional** | ***BudgetsApiStoreBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiStoreBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetSingle**](BudgetSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreBudgetLimit**
> BudgetLimitSingle StoreBudgetLimit(ctx, body, currencyId, currencyCode, budgetId, start, period, end, amount, id, optional)
Store new budget limit.
Store a new budget limit under this budget.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BudgetLimitStore**](BudgetLimitStore.md)| JSON array or key&#x3D;value pairs with the necessary budget information. See the model for the exact specifications. |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**budgetId** | **string**| |
**start** | **string**| |
**period** | **string**| |
**end** | **string**| |
**amount** | **string**| |
**id** | **string**| The ID of the budget. |
**optional** | ***BudgetsApiStoreBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiStoreBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetLimitSingle**](BudgetLimitSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateBudget**
> BudgetSingle UpdateBudget(ctx, body, name, active, order, notes, autoBudgetType, autoBudgetCurrencyId, autoBudgetCurrencyCode, autoBudgetAmount, autoBudgetPeriod, id, optional)
Update existing budget.
Update existing budget. This endpoint cannot be used to set budget amount limits.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BudgetUpdate**](BudgetUpdate.md)| JSON array with updated budget information. See the model for the exact specifications. |
**name** | **string**| |
**active** | **bool**| |
**order** | **int32**| |
**notes** | **string**| |
**autoBudgetType** | [**AutoBudgetType**](.md)| |
**autoBudgetCurrencyId** | **string**| |
**autoBudgetCurrencyCode** | **string**| |
**autoBudgetAmount** | **string**| |
**autoBudgetPeriod** | [**AutoBudgetPeriod**](.md)| |
**id** | **string**| The ID of the budget. |
**optional** | ***BudgetsApiUpdateBudgetOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiUpdateBudgetOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetSingle**](BudgetSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateBudgetLimit**
> BudgetLimitSingle UpdateBudgetLimit(ctx, body, createdAt, updatedAt, start, end, currencyId, currencyCode, currencyName, currencySymbol, currencyDecimalPlaces, budgetId, period, amount, spent, id, limitId, optional)
Update existing budget limit.
Update existing budget limit.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**BudgetLimit**](BudgetLimit.md)| JSON array with updated budget limit information. See the model for the exact specifications. |
**createdAt** | **time.Time**| |
**updatedAt** | **time.Time**| |
**start** | **time.Time**| |
**end** | **time.Time**| |
**currencyId** | **string**| |
**currencyCode** | **string**| |
**currencyName** | **string**| |
**currencySymbol** | **string**| |
**currencyDecimalPlaces** | **int32**| |
**budgetId** | **string**| |
**period** | **string**| |
**amount** | **string**| |
**spent** | **string**| |
**id** | **string**| The ID of the budget. The budget limit MUST be associated to the budget ID. |
**limitId** | **string**| The ID of the budget limit. The budget limit MUST be associated to the budget ID. |
**optional** | ***BudgetsApiUpdateBudgetLimitOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a BudgetsApiUpdateBudgetLimitOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**BudgetLimitSingle**](BudgetLimitSingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

293
docs/CategoriesApi.md Normal file

@ -0,0 +1,293 @@
# {{classname}}
All URIs are relative to *https://demo.firefly-iii.org/api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**DeleteCategory**](CategoriesApi.md#DeleteCategory) | **Delete** /v1/categories/{id} | Delete a category.
[**GetCategory**](CategoriesApi.md#GetCategory) | **Get** /v1/categories/{id} | Get a single category.
[**ListAttachmentByCategory**](CategoriesApi.md#ListAttachmentByCategory) | **Get** /v1/categories/{id}/attachments | Lists all attachments.
[**ListCategory**](CategoriesApi.md#ListCategory) | **Get** /v1/categories | List all categories.
[**ListTransactionByCategory**](CategoriesApi.md#ListTransactionByCategory) | **Get** /v1/categories/{id}/transactions | List all transactions in a category.
[**StoreCategory**](CategoriesApi.md#StoreCategory) | **Post** /v1/categories | Store a new category
[**UpdateCategory**](CategoriesApi.md#UpdateCategory) | **Put** /v1/categories/{id} | Update existing category.
# **DeleteCategory**
> DeleteCategory(ctx, id, optional)
Delete a category.
Delete a category. Transactions will not be removed.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the category. |
**optional** | ***CategoriesApiDeleteCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiDeleteCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
(empty response body)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **GetCategory**
> CategorySingle GetCategory(ctx, id, optional)
Get a single category.
Get a single category.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the category. |
**optional** | ***CategoriesApiGetCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiGetCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**start** | **optional.String**| A date formatted YYYY-MM-DD, to show spent and earned info. |
**end** | **optional.String**| A date formatted YYYY-MM-DD, to show spent and earned info. |
### Return type
[**CategorySingle**](CategorySingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListAttachmentByCategory**
> AttachmentArray ListAttachmentByCategory(ctx, id, optional)
Lists all attachments.
Lists all attachments.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the category. |
**optional** | ***CategoriesApiListAttachmentByCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiListAttachmentByCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**AttachmentArray**](AttachmentArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListCategory**
> CategoryArray ListCategory(ctx, optional)
List all categories.
List all categories.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**optional** | ***CategoriesApiListCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiListCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
### Return type
[**CategoryArray**](CategoryArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **ListTransactionByCategory**
> TransactionArray ListTransactionByCategory(ctx, id, optional)
List all transactions in a category.
List all transactions in a category, optionally limited to the date ranges specified.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**id** | **string**| The ID of the category. |
**optional** | ***CategoriesApiListTransactionByCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiListTransactionByCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
**limit** | **optional.Int32**| Number of items per page. The default pagination is per 50 items. |
**page** | **optional.Int32**| Page number. The default pagination is per 50 items. |
**start** | **optional.String**| A date formatted YYYY-MM-DD, to limit the result list. |
**end** | **optional.String**| A date formatted YYYY-MM-DD, to limit the result list. |
**type_** | [**optional.Interface of TransactionTypeFilter**](.md)| Optional filter on the transaction type(s) returned |
### Return type
[**TransactionArray**](TransactionArray.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **StoreCategory**
> CategorySingle StoreCategory(ctx, body, createdAt, updatedAt, name, notes, spent, earned, optional)
Store a new category
Creates a new category. The data required can be submitted as a JSON body or as a list of parameters.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**Category**](Category.md)| JSON array or key&#x3D;value pairs with the necessary category information. See the model for the exact specifications. |
**createdAt** | **time.Time**| |
**updatedAt** | **time.Time**| |
**name** | **string**| |
**notes** | **string**| |
**spent** | [**[]CategorySpent**](CategorySpent.md)| |
**earned** | [**[]CategoryEarned**](CategoryEarned.md)| |
**optional** | ***CategoriesApiStoreCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiStoreCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**CategorySingle**](CategorySingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **UpdateCategory**
> CategorySingle UpdateCategory(ctx, body, name, notes, id, optional)
Update existing category.
Update existing category.
### Required Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**body** | [**CategoryUpdate**](CategoryUpdate.md)| JSON array with updated category information. See the model for the exact specifications. |
**name** | **string**| |
**notes** | **string**| |
**id** | **string**| The ID of the category. |
**optional** | ***CategoriesApiUpdateCategoryOpts** | optional parameters | nil if no parameters
### Optional Parameters
Optional parameters are passed through a pointer to a CategoriesApiUpdateCategoryOpts struct
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xTraceId** | [**optional.Interface of string**](.md)| Unique identifier associated with this request. |
### Return type
[**CategorySingle**](CategorySingle.md)
### Authorization
[firefly_iii_auth](../README.md#firefly_iii_auth), [local_bearer_auth](../README.md#local_bearer_auth)
### HTTP request headers
- **Content-Type**: application/json, application/x-www-form-urlencoded
- **Accept**: application/vnd.api+json, application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

14
docs/Category.md Normal file

@ -0,0 +1,14 @@
# Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**CreatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**UpdatedAt** | [**time.Time**](time.Time.md) | | [optional] [default to null]
**Name** | **string** | | [default to null]
**Notes** | **string** | | [optional] [default to null]
**Spent** | [**[]CategorySpent**](CategorySpent.md) | | [optional] [default to null]
**Earned** | [**[]CategoryEarned**](CategoryEarned.md) | | [optional] [default to null]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Some files were not shown because too many files have changed in this diff Show More