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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type AboutApiService service
/*
AboutApiService System information end point.
Returns general system information and versions of the (supporting) software.
@ -93,7 +93,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -106,7 +106,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -116,7 +116,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -126,7 +126,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -136,7 +136,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -146,7 +146,7 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -159,7 +159,6 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -239,7 +238,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -252,7 +251,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -262,7 +261,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -272,7 +271,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -282,7 +281,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -292,7 +291,7 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -305,7 +304,6 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AboutApiService Currently authenticated user endpoint.
Returns the currently authenticated user.
@ -345,7 +343,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -373,7 +371,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -386,7 +384,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -396,7 +394,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -406,7 +404,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -416,7 +414,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -426,7 +424,7 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type AccountsApiService service
/*
AccountsApiService Permanently delete account.
Will permanently delete an account. Any associated transactions and piggy banks are ALSO deleted. Cannot be recovered from.
@ -46,6 +47,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +94,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +102,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +112,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +122,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +132,7 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +145,6 @@ func (a *AccountsApiService) DeleteAccount(ctx context.Context, id string, local
return localVarHttpResponse, nil
}
/*
AccountsApiService Get single account.
Returns a single account by its ID.
@ -189,7 +191,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -217,7 +219,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -230,7 +232,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -240,7 +242,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -250,7 +252,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -260,7 +262,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -270,7 +272,7 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 200 {
var v AccountSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -283,7 +285,6 @@ func (a *AccountsApiService) GetAccount(ctx context.Context, id string, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService List all accounts.
This endpoint returns a list of all the accounts owned by the authenticated user.
@ -343,7 +344,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -371,7 +372,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -384,7 +385,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -394,7 +395,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -404,7 +405,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -414,7 +415,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -424,7 +425,7 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -437,7 +438,6 @@ func (a *AccountsApiService) ListAccount(ctx context.Context, localVarOptionals
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService Lists all attachments.
Lists all attachments.
@ -489,7 +489,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -517,7 +517,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -530,7 +530,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -540,7 +540,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -550,7 +550,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -560,7 +560,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -570,7 +570,7 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -583,7 +583,6 @@ func (a *AccountsApiService) ListAttachmentByAccount(ctx context.Context, id str
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService List all piggy banks related to the account.
This endpoint returns a list of all the piggy banks connected to the account.
@ -635,7 +634,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -663,7 +662,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -676,7 +675,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -686,7 +685,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -696,7 +695,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -706,7 +705,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -716,7 +715,7 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -729,7 +728,6 @@ func (a *AccountsApiService) ListPiggyBankByAccount(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService List all transactions related to the account.
This endpoint returns a list of all the transactions connected to the account.
@ -796,7 +794,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -824,7 +822,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -837,7 +835,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -847,7 +845,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -857,7 +855,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -867,7 +865,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -877,7 +875,7 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -890,7 +888,6 @@ func (a *AccountsApiService) ListTransactionByAccount(ctx context.Context, id st
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService 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&#x3D;value pairs, like a webform).
@ -931,7 +928,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -961,7 +958,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -974,7 +971,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -984,7 +981,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -994,7 +991,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1004,7 +1001,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1014,7 +1011,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1024,7 +1021,7 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
}
if localVarHttpResponse.StatusCode == 200 {
var v AccountSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1037,7 +1034,6 @@ func (a *AccountsApiService) StoreAccount(ctx context.Context, body AccountStore
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AccountsApiService 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.
@ -1080,7 +1076,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1110,7 +1106,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1123,7 +1119,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1133,7 +1129,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1143,7 +1139,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1153,7 +1149,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1163,7 +1159,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1173,7 +1169,7 @@ func (a *AccountsApiService) UpdateAccount(ctx context.Context, body AccountUpda
}
if localVarHttpResponse.StatusCode == 200 {
var v AccountSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr

@ -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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -26,7 +26,6 @@ var (
)
type AttachmentsApiService service
/*
AttachmentsApiService Delete an attachment.
With this endpoint you delete an attachment, including any stored file data.
@ -47,6 +46,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -93,6 +93,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -100,7 +101,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -110,7 +111,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -120,7 +121,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -130,7 +131,7 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -143,7 +144,6 @@ func (a *AttachmentsApiService) DeleteAttachment(ctx context.Context, id string,
return localVarHttpResponse, nil
}
/*
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;.
@ -213,7 +213,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -226,7 +226,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -236,7 +236,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -246,7 +246,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -256,7 +256,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -266,7 +266,7 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -279,7 +279,6 @@ func (a *AttachmentsApiService) DownloadAttachment(ctx context.Context, id strin
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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).
@ -321,7 +320,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -349,7 +348,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -362,7 +361,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -372,7 +371,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -382,7 +381,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -392,7 +391,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -402,7 +401,7 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -415,7 +414,6 @@ func (a *AttachmentsApiService) GetAttachment(ctx context.Context, id string, lo
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AttachmentsApiService List all attachments.
This endpoint lists all attachments.
@ -465,7 +463,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -493,7 +491,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -506,7 +504,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -516,7 +514,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -526,7 +524,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -536,7 +534,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -546,7 +544,7 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -559,7 +557,6 @@ func (a *AttachmentsApiService) ListAttachment(ctx context.Context, localVarOpti
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -600,7 +597,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -630,7 +627,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -643,7 +640,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -653,7 +650,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -663,7 +660,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -673,7 +670,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -683,7 +680,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -693,7 +690,7 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -706,7 +703,6 @@ func (a *AttachmentsApiService) StoreAttachment(ctx context.Context, body Attach
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -749,7 +745,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -779,7 +775,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -792,7 +788,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -802,7 +798,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -812,7 +808,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -822,7 +818,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -832,7 +828,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -842,7 +838,7 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -855,7 +851,6 @@ func (a *AttachmentsApiService) UpdateAttachment(ctx context.Context, body Attac
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -878,6 +873,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -911,7 +907,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
// body params
if localVarOptionals != nil && localVarOptionals.Body.IsSet() {
localVarOptionalBody := localVarOptionals.Body.Value()
localVarOptionalBody:= localVarOptionals.Body.Value()
localVarPostBody = &localVarOptionalBody
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
@ -930,6 +926,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -937,7 +934,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -947,7 +944,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -957,7 +954,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -967,7 +964,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -977,7 +974,7 @@ func (a *AttachmentsApiService) UploadAttachment(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return 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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/antihax/optional"
)
// Linger please
@ -24,7 +25,6 @@ var (
)
type AutocompleteApiService service
/*
AutocompleteApiService Returns all accounts of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -111,7 +111,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -124,7 +124,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -134,7 +134,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -144,7 +144,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -154,7 +154,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -164,7 +164,7 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteAccount
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -177,7 +177,6 @@ func (a *AutocompleteApiService) GetAccountsAC(ctx context.Context, localVarOpti
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all bills of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -254,7 +253,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -267,7 +266,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -277,7 +276,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -287,7 +286,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -297,7 +296,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -307,7 +306,7 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteBill
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -320,7 +319,6 @@ func (a *AutocompleteApiService) GetBillsAC(ctx context.Context, localVarOptiona
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all budgets of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -397,7 +395,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -410,7 +408,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -420,7 +418,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -430,7 +428,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -440,7 +438,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -450,7 +448,7 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteBudget
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -463,7 +461,6 @@ func (a *AutocompleteApiService) GetBudgetsAC(ctx context.Context, localVarOptio
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all categories of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -540,7 +537,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -553,7 +550,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -563,7 +560,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -573,7 +570,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -583,7 +580,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -593,7 +590,7 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteCategory
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -606,7 +603,6 @@ func (a *AutocompleteApiService) GetCategoriesAC(ctx context.Context, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all currencies of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -683,7 +679,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -696,7 +692,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -706,7 +702,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -716,7 +712,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -726,7 +722,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -736,7 +732,7 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteCurrency
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -749,7 +745,6 @@ func (a *AutocompleteApiService) GetCurrenciesAC(ctx context.Context, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService 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.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -826,7 +821,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -839,7 +834,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -849,7 +844,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -859,7 +854,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -869,7 +864,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -879,7 +874,7 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteCurrencyCode
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -892,7 +887,6 @@ func (a *AutocompleteApiService) GetCurrenciesCodeAC(ctx context.Context, localV
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all object groups of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -969,7 +963,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -982,7 +976,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -992,7 +986,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1002,7 +996,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1012,7 +1006,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1022,7 +1016,7 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteObjectGroup
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1035,7 +1029,6 @@ func (a *AutocompleteApiService) GetObjectGroupsAC(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all piggy banks of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1112,7 +1105,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1125,7 +1118,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1135,7 +1128,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1145,7 +1138,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1155,7 +1148,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1165,7 +1158,7 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompletePiggy
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1178,7 +1171,6 @@ func (a *AutocompleteApiService) GetPiggiesAC(ctx context.Context, localVarOptio
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all piggy banks of the user returned in a basic auto-complete array complemented with balance information.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1255,7 +1247,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1268,7 +1260,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1278,7 +1270,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1288,7 +1280,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1298,7 +1290,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1308,7 +1300,7 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompletePiggyBalance
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1321,7 +1313,6 @@ func (a *AutocompleteApiService) GetPiggiesBalanceAC(ctx context.Context, localV
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all recurring transactions of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1398,7 +1389,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1411,7 +1402,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1421,7 +1412,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1431,7 +1422,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1441,7 +1432,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1451,7 +1442,7 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteRecurrence
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1464,7 +1455,6 @@ func (a *AutocompleteApiService) GetRecurringAC(ctx context.Context, localVarOpt
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all rule groups of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1541,7 +1531,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1554,7 +1544,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1564,7 +1554,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1574,7 +1564,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1584,7 +1574,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1594,7 +1584,7 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteRuleGroup
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1607,7 +1597,6 @@ func (a *AutocompleteApiService) GetRuleGroupsAC(ctx context.Context, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all rules of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1684,7 +1673,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1697,7 +1686,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1707,7 +1696,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1717,7 +1706,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1727,7 +1716,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1737,7 +1726,7 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteRule
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1750,7 +1739,6 @@ func (a *AutocompleteApiService) GetRulesAC(ctx context.Context, localVarOptiona
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all tags of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1827,7 +1815,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1840,7 +1828,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1850,7 +1838,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1860,7 +1848,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1870,7 +1858,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1880,7 +1868,7 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteTag
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1893,7 +1881,6 @@ func (a *AutocompleteApiService) GetTagAC(ctx context.Context, localVarOptionals
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all transaction types returned in a basic auto-complete array. English only.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -1970,7 +1957,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1983,7 +1970,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1993,7 +1980,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2003,7 +1990,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2013,7 +2000,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2023,7 +2010,7 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteTransactionType
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2036,7 +2023,6 @@ func (a *AutocompleteApiService) GetTransactionTypesAC(ctx context.Context, loca
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService Returns all transaction descriptions of the user returned in a basic auto-complete array.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -2113,7 +2099,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -2126,7 +2112,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2136,7 +2122,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2146,7 +2132,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2156,7 +2142,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2166,7 +2152,7 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteTransaction
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2179,7 +2165,6 @@ func (a *AutocompleteApiService) GetTransactionsAC(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
AutocompleteApiService 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.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -2256,7 +2241,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -2269,7 +2254,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2279,7 +2264,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2289,7 +2274,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2299,7 +2284,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2309,7 +2294,7 @@ func (a *AutocompleteApiService) GetTransactionsIDAC(ctx context.Context, localV
}
if localVarHttpResponse.StatusCode == 200 {
var v []AutocompleteTransactionId
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type AvailableBudgetsApiService service
/*
AvailableBudgetsApiService Get a single available budget.
Get a single available budget, by ID.
@ -67,7 +67,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -95,7 +95,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -108,7 +108,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -118,7 +118,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -128,7 +128,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -138,7 +138,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -148,7 +148,7 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -161,7 +161,6 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -221,7 +220,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -249,7 +248,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -262,7 +261,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -272,7 +271,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -282,7 +281,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -292,7 +291,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -302,7 +301,7 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type BillsApiService service
/*
BillsApiService Delete a bill.
Delete a bill. This will not delete any associated rules. Will not remove associated transactions. WILL remove all associated attachments.
@ -46,6 +47,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +94,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +102,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +112,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +122,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +132,7 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +145,6 @@ func (a *BillsApiService) DeleteBill(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, nil
}
/*
BillsApiService Get a single bill.
Get a single bill.
@ -194,7 +196,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -222,7 +224,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -235,7 +237,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +247,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +257,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +267,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -275,7 +277,7 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 200 {
var v BillSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -288,7 +290,6 @@ func (a *BillsApiService) GetBill(ctx context.Context, id string, localVarOption
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService List all attachments uploaded to the bill.
This endpoint will list all attachments linked to the bill.
@ -340,7 +341,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -368,7 +369,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -381,7 +382,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -391,7 +392,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -401,7 +402,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -411,7 +412,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -421,7 +422,7 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -434,7 +435,6 @@ func (a *BillsApiService) ListAttachmentByBill(ctx context.Context, id string, l
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService List all bills.
This endpoint will list all the user&#x27;s bills.
@ -494,7 +494,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -522,7 +522,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -535,7 +535,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -545,7 +545,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -555,7 +555,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -565,7 +565,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -575,7 +575,7 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -588,7 +588,6 @@ func (a *BillsApiService) ListBill(ctx context.Context, localVarOptionals *Bills
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService List all rules associated with the bill.
This endpoint will list all rules that have an action to set the bill to this bill.
@ -630,7 +629,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -658,7 +657,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -671,7 +670,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -681,7 +680,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -691,7 +690,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -701,7 +700,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -711,7 +710,7 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -724,7 +723,6 @@ func (a *BillsApiService) ListRuleByBill(ctx context.Context, id string, localVa
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService List all transactions associated with the bill.
This endpoint will list all transactions linked to this bill.
@ -781,7 +779,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -809,7 +807,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -822,7 +820,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -832,7 +830,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -842,7 +840,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -852,7 +850,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -862,7 +860,7 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -875,7 +873,6 @@ func (a *BillsApiService) ListTransactionByBill(ctx context.Context, id string,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService Store a new bill
Creates a new bill. The data required can be submitted as a JSON body or as a list of parameters.
@ -916,7 +913,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -946,7 +943,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -959,7 +956,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -969,7 +966,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -979,7 +976,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -989,7 +986,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -999,7 +996,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 200 {
var v BillSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1009,7 +1006,7 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1022,7 +1019,6 @@ func (a *BillsApiService) StoreBill(ctx context.Context, body BillStore, localVa
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BillsApiService Update existing bill.
Update existing bill.
@ -1065,7 +1061,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1095,7 +1091,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1108,7 +1104,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1118,7 +1114,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1128,7 +1124,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1138,7 +1134,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1148,7 +1144,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 200 {
var v BillSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1158,7 +1154,7 @@ func (a *BillsApiService) UpdateBill(ctx context.Context, body BillUpdate, id st
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type BudgetsApiService service
/*
BudgetsApiService Delete a budget.
Delete a budget. Transactions will not be deleted.
@ -46,6 +47,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +94,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +102,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +112,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +122,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +132,7 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +145,6 @@ func (a *BudgetsApiService) DeleteBudget(ctx context.Context, id string, localVa
return localVarHttpResponse, nil
}
/*
BudgetsApiService Delete a budget limit.
Delete a budget limit.
@ -164,6 +166,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -211,6 +214,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -218,7 +222,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -228,7 +232,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -238,7 +242,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -248,7 +252,7 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -261,7 +265,6 @@ func (a *BudgetsApiService) DeleteBudgetLimit(ctx context.Context, id string, li
return localVarHttpResponse, nil
}
/*
BudgetsApiService Get a single budget.
Get a single budget. If the start date and end date are submitted as well, the \&quot;spent\&quot; array will be updated accordingly.
@ -313,7 +316,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -341,7 +344,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -354,7 +357,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -364,7 +367,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -374,7 +377,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -384,7 +387,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -394,7 +397,7 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -407,7 +410,6 @@ func (a *BudgetsApiService) GetBudget(ctx context.Context, id string, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Get single budget limit.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@ -453,7 +455,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -481,7 +483,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -494,7 +496,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetLimitSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -504,7 +506,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -514,7 +516,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -524,7 +526,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -534,7 +536,7 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -547,7 +549,6 @@ func (a *BudgetsApiService) GetBudgetLimit(ctx context.Context, id string, limit
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Lists all attachments of a budget.
Lists all attachments.
@ -599,7 +600,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -627,7 +628,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -640,7 +641,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -650,7 +651,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -660,7 +661,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -670,7 +671,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -680,7 +681,7 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -693,7 +694,6 @@ func (a *BudgetsApiService) ListAttachmentByBudget(ctx context.Context, id strin
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService List all budgets.
List all the budgets the user has made. If the start date and end date are submitted as well, the \&quot;spent\&quot; array will be updated accordingly.
@ -753,7 +753,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -781,7 +781,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -794,7 +794,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -804,7 +804,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -814,7 +814,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -824,7 +824,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -834,7 +834,7 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -847,7 +847,6 @@ func (a *BudgetsApiService) ListBudget(ctx context.Context, localVarOptionals *B
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Get list of budget limits by date
Get all budget limits for for this date range.
@ -891,7 +890,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -919,7 +918,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -932,7 +931,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetLimitArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -942,7 +941,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -952,7 +951,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -962,7 +961,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -972,7 +971,7 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -985,7 +984,6 @@ func (a *BudgetsApiService) ListBudgetLimit(ctx context.Context, start string, e
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService 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 \&quot;spent\&quot; 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.
@ -1037,7 +1035,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1065,7 +1063,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1078,7 +1076,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetLimitArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1088,7 +1086,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1098,7 +1096,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1108,7 +1106,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1118,7 +1116,7 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1131,7 +1129,6 @@ func (a *BudgetsApiService) ListBudgetLimitByBudget(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService All transactions to a budget.
Get all transactions linked to a budget, possibly limited by start and end
@ -1198,7 +1195,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1226,7 +1223,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1239,7 +1236,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1249,7 +1246,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1259,7 +1256,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1269,7 +1266,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1279,7 +1276,7 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1292,7 +1289,6 @@ func (a *BudgetsApiService) ListTransactionByBudget(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService 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.
@ -1351,7 +1347,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1379,7 +1375,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1392,7 +1388,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1402,7 +1398,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1412,7 +1408,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1422,7 +1418,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1432,7 +1428,7 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1445,7 +1441,6 @@ func (a *BudgetsApiService) ListTransactionByBudgetLimit(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Store a new budget
Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
@ -1486,7 +1481,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1516,7 +1511,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1529,7 +1524,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1539,7 +1534,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1549,7 +1544,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1559,7 +1554,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1569,7 +1564,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1579,7 +1574,7 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1592,7 +1587,6 @@ func (a *BudgetsApiService) StoreBudget(ctx context.Context, body BudgetStore, l
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Store new budget limit.
Store a new budget limit under this budget.
@ -1635,7 +1629,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1665,7 +1659,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1678,7 +1672,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetLimitSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1688,7 +1682,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1698,7 +1692,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1708,7 +1702,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1718,7 +1712,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1728,7 +1722,7 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1741,7 +1735,6 @@ func (a *BudgetsApiService) StoreBudgetLimit(ctx context.Context, body BudgetLim
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Update existing budget.
Update existing budget. This endpoint cannot be used to set budget amount limits.
@ -1784,7 +1777,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1814,7 +1807,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1827,7 +1820,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1837,7 +1830,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1847,7 +1840,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1857,7 +1850,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1867,7 +1860,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1877,7 +1870,7 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1890,7 +1883,6 @@ func (a *BudgetsApiService) UpdateBudget(ctx context.Context, body BudgetUpdate,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
BudgetsApiService Update existing budget limit.
Update existing budget limit.
@ -1935,7 +1927,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1965,7 +1957,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1978,7 +1970,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 200 {
var v BudgetLimitSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1988,7 +1980,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1998,7 +1990,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2008,7 +2000,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2018,7 +2010,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -2028,7 +2020,7 @@ func (a *BudgetsApiService) UpdateBudgetLimit(ctx context.Context, body BudgetLi
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type CategoriesApiService service
/*
CategoriesApiService Delete a category.
Delete a category. Transactions will not be removed.
@ -46,6 +47,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +94,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +102,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +112,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +122,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +132,7 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +145,6 @@ func (a *CategoriesApiService) DeleteCategory(ctx context.Context, id string, lo
return localVarHttpResponse, nil
}
/*
CategoriesApiService Get a single category.
Get a single category.
@ -194,7 +196,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -222,7 +224,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -235,7 +237,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +247,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +257,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +267,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -275,7 +277,7 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -288,7 +290,6 @@ func (a *CategoriesApiService) GetCategory(ctx context.Context, id string, local
return localVarReturnValue, localVarHttpResponse, nil
}
/*
CategoriesApiService Lists all attachments.
Lists all attachments.
@ -340,7 +341,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -368,7 +369,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -381,7 +382,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -391,7 +392,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -401,7 +402,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -411,7 +412,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -421,7 +422,7 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -434,7 +435,6 @@ func (a *CategoriesApiService) ListAttachmentByCategory(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
CategoriesApiService List all categories.
List all categories.
@ -484,7 +484,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -512,7 +512,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -525,7 +525,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -535,7 +535,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -545,7 +545,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -555,7 +555,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -565,7 +565,7 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -578,7 +578,6 @@ func (a *CategoriesApiService) ListCategory(ctx context.Context, localVarOptiona
return localVarReturnValue, localVarHttpResponse, nil
}
/*
CategoriesApiService List all transactions in a category.
List all transactions in a category, optionally limited to the date ranges specified.
@ -645,7 +644,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -673,7 +672,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -686,7 +685,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -696,7 +695,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -706,7 +705,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -716,7 +715,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -726,7 +725,7 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -739,7 +738,6 @@ func (a *CategoriesApiService) ListTransactionByCategory(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -780,7 +778,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -810,7 +808,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -823,7 +821,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -833,7 +831,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -843,7 +841,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -853,7 +851,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -863,7 +861,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -873,7 +871,7 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -886,7 +884,6 @@ func (a *CategoriesApiService) StoreCategory(ctx context.Context, body Category,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
CategoriesApiService Update existing category.
Update existing category.
@ -929,7 +926,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -959,7 +956,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -972,7 +969,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -982,7 +979,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -992,7 +989,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1002,7 +999,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1012,7 +1009,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1022,7 +1019,7 @@ func (a *CategoriesApiService) UpdateCategory(ctx context.Context, body Category
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/antihax/optional"
)
// Linger please
@ -24,7 +25,6 @@ var (
)
type ChartsApiService service
/*
ChartsApiService Dashboard chart with asset account balance information.
This endpoint returns the data required to generate a chart with basic asset account balance information.
@ -96,7 +96,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -109,7 +109,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -119,7 +119,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -129,7 +129,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -139,7 +139,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -149,7 +149,7 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type ConfigurationApiService service
/*
ConfigurationApiService Get Firefly III system configuration values.
Returns all editable and not-editable configuration values for this Firefly III installation
@ -93,7 +93,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -106,7 +106,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -116,7 +116,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -126,7 +126,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -136,7 +136,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -146,7 +146,7 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -159,7 +159,6 @@ func (a *ConfigurationApiService) GetConfiguration(ctx context.Context, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
ConfigurationApiService Get a single Firefly III system configuration value
Returns one configuration variable for this Firefly III installation
@ -229,7 +228,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -242,7 +241,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -252,7 +251,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -262,7 +261,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -272,7 +271,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -282,7 +281,7 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -295,7 +294,6 @@ func (a *ConfigurationApiService) GetSingleConfiguration(ctx context.Context, na
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -349,6 +347,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
localVarHeaderParams["X-Trace-Id"] = parameterToString(localVarOptionals.XTraceId.Value(), "")
}
// body params
localVarPostBody = &body
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
@ -367,7 +366,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -380,7 +379,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -390,7 +389,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -400,7 +399,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -410,7 +409,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -420,7 +419,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -430,7 +429,7 @@ func (a *ConfigurationApiService) SetConfiguration(ctx context.Context, value Po
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr

File diff suppressed because it is too large Load Diff

@ -1,22 +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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"os"
"strings"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +25,6 @@ var (
)
type DataApiService service
/*
DataApiService Bulk update transaction properties. For more information, see https://docs.firefly-iii.org/references/firefly-iii/api/specials/
Allows you to update transactions in bulk.
@ -39,6 +38,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -82,6 +82,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -89,7 +90,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -99,7 +100,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +110,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +120,7 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -132,7 +133,6 @@ func (a *DataApiService) BulkUpdateTransactions(ctx context.Context, query strin
return localVarHttpResponse, nil
}
/*
DataApiService Endpoint to destroy user data
A call to this endpoint deletes the requested data type. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
@ -153,6 +153,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -199,6 +200,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -206,7 +208,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -216,7 +218,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -226,7 +228,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -236,7 +238,7 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -249,7 +251,6 @@ func (a *DataApiService) DestroyData(ctx context.Context, objects DataDestroyObj
return localVarHttpResponse, nil
}
/*
DataApiService Export account data from Firefly III
This endpoint allows you to export your accounts from Firefly III into a file. Currently supports CSV exports only.
@ -322,7 +323,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -335,7 +336,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -345,7 +346,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -355,7 +356,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -365,7 +366,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -375,7 +376,7 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -388,7 +389,6 @@ func (a *DataApiService) ExportAccounts(ctx context.Context, localVarOptionals *
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export bills from Firefly III
This endpoint allows you to export your bills from Firefly III into a file. Currently supports CSV exports only.
@ -461,7 +461,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -474,7 +474,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -484,7 +484,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -494,7 +494,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -504,7 +504,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -514,7 +514,7 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -527,7 +527,6 @@ func (a *DataApiService) ExportBills(ctx context.Context, localVarOptionals *Dat
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export budgets and budget amount data from Firefly III
This endpoint allows you to export your budgets and associated budget data from Firefly III into a file. Currently supports CSV exports only.
@ -600,7 +599,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -613,7 +612,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -623,7 +622,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -633,7 +632,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -643,7 +642,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -653,7 +652,7 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -666,7 +665,6 @@ func (a *DataApiService) ExportBudgets(ctx context.Context, localVarOptionals *D
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export category data from Firefly III
This endpoint allows you to export your categories from Firefly III into a file. Currently supports CSV exports only.
@ -739,7 +737,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -752,7 +750,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -762,7 +760,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -772,7 +770,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -782,7 +780,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -792,7 +790,7 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -805,7 +803,6 @@ func (a *DataApiService) ExportCategories(ctx context.Context, localVarOptionals
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export piggy banks from Firefly III
This endpoint allows you to export your piggy banks from Firefly III into a file. Currently supports CSV exports only.
@ -878,7 +875,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -891,7 +888,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -901,7 +898,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -911,7 +908,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -921,7 +918,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -931,7 +928,7 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -944,7 +941,6 @@ func (a *DataApiService) ExportPiggies(ctx context.Context, localVarOptionals *D
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export recurring transaction data from Firefly III
This endpoint allows you to export your recurring transactions from Firefly III into a file. Currently supports CSV exports only.
@ -1017,7 +1013,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1030,7 +1026,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1040,7 +1036,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1050,7 +1046,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1060,7 +1056,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1070,7 +1066,7 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1083,7 +1079,6 @@ func (a *DataApiService) ExportRecurring(ctx context.Context, localVarOptionals
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export rule groups and rule data from Firefly III
This endpoint allows you to export your rules and rule groups from Firefly III into a file. Currently supports CSV exports only.
@ -1156,7 +1151,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1169,7 +1164,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1179,7 +1174,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1189,7 +1184,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1199,7 +1194,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1209,7 +1204,7 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1222,7 +1217,6 @@ func (a *DataApiService) ExportRules(ctx context.Context, localVarOptionals *Dat
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export tag data from Firefly III
This endpoint allows you to export your tags from Firefly III into a file. Currently supports CSV exports only.
@ -1295,7 +1289,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1308,7 +1302,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1318,7 +1312,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1328,7 +1322,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1338,7 +1332,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1348,7 +1342,7 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1361,7 +1355,6 @@ func (a *DataApiService) ExportTags(ctx context.Context, localVarOptionals *Data
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Export transaction data from Firefly III
This endpoint allows you to export transactions from Firefly III into a file. Currently supports CSV exports only.
@ -1443,7 +1436,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1456,7 +1449,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1466,7 +1459,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1476,7 +1469,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1486,7 +1479,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1496,7 +1489,7 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1509,7 +1502,6 @@ func (a *DataApiService) ExportTransactions(ctx context.Context, start string, e
return localVarReturnValue, localVarHttpResponse, nil
}
/*
DataApiService Endpoint to purge user data
A call to this endpoint purges all previously deleted data. Use it with care and always with user permission. The demo user is incapable of using this endpoint.
@ -1529,6 +1521,7 @@ func (a *DataApiService) PurgeData(ctx context.Context, localVarOptionals *DataA
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -1574,6 +1567,7 @@ func (a *DataApiService) PurgeData(ctx context.Context, localVarOptionals *DataA
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -1581,7 +1575,7 @@ func (a *DataApiService) PurgeData(ctx context.Context, localVarOptionals *DataA
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -1591,7 +1585,7 @@ func (a *DataApiService) PurgeData(ctx context.Context, localVarOptionals *DataA
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -1601,7 +1595,7 @@ func (a *DataApiService) PurgeData(ctx context.Context, localVarOptionals *DataA
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type LinksApiService service
/*
LinksApiService Permanently delete link type.
Will permanently delete a link type. The links between transactions will be removed. The transactions themselves remain. You cannot delete some of the system provided link types, indicated by the editable&#x3D;false flag when you list it.
@ -46,6 +46,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *LinksApiService) DeleteLinkType(ctx context.Context, id string, localVa
return localVarHttpResponse, nil
}
/*
LinksApiService Permanently delete link between transactions.
Will permanently delete link. Transactions remain.
@ -163,6 +164,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -209,6 +211,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -216,7 +219,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -226,7 +229,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -236,7 +239,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -246,7 +249,7 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -259,7 +262,6 @@ func (a *LinksApiService) DeleteTransactionLink(ctx context.Context, id string,
return localVarHttpResponse, nil
}
/*
LinksApiService Get single a link type.
Returns a single link type by its ID.
@ -301,7 +303,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -329,7 +331,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -342,7 +344,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
var v LinkTypeSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -352,7 +354,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -362,7 +364,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -372,7 +374,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -382,7 +384,7 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -395,7 +397,6 @@ func (a *LinksApiService) GetLinkType(ctx context.Context, id string, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService Get a single link.
Returns a single link by its ID.
@ -437,7 +438,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -465,7 +466,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -478,7 +479,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionLinkSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -488,7 +489,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -498,7 +499,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -508,7 +509,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -518,7 +519,7 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -531,7 +532,6 @@ func (a *LinksApiService) GetTransactionLink(ctx context.Context, id string, loc
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService List all types of links.
List all the link types the system has. These include the default ones as well as any new ones.
@ -581,7 +581,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -609,7 +609,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -622,7 +622,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
if localVarHttpResponse.StatusCode == 200 {
var v LinkTypeArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -632,7 +632,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -642,7 +642,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -652,7 +652,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -662,7 +662,7 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -675,7 +675,6 @@ func (a *LinksApiService) ListLinkType(ctx context.Context, localVarOptionals *L
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService List all transactions under this link type.
List all transactions under this link type, both the inward and outward transactions.
@ -770,7 +769,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -783,7 +782,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -793,7 +792,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -803,7 +802,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -813,7 +812,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -823,7 +822,7 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -836,7 +835,6 @@ func (a *LinksApiService) ListTransactionByLinkType(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService List all transaction links.
List all the transaction links.
@ -886,7 +884,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -914,7 +912,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -927,7 +925,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionLinkArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -937,7 +935,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -947,7 +945,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -957,7 +955,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -967,7 +965,7 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -980,7 +978,6 @@ func (a *LinksApiService) ListTransactionLink(ctx context.Context, localVarOptio
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService Create a new link type
Creates a new link type. The data required can be submitted as a JSON body or as a list of parameters (in key&#x3D;value pairs, like a webform).
@ -1021,7 +1018,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1051,7 +1048,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1064,7 +1061,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 200 {
var v LinkTypeSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1074,7 +1071,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1084,7 +1081,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1094,7 +1091,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1104,7 +1101,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1114,7 +1111,7 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1127,7 +1124,6 @@ func (a *LinksApiService) StoreLinkType(ctx context.Context, body LinkType, loca
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService Create a new link between transactions
Store a new link between two transactions. For this end point you need the journal_id from a transaction.
@ -1168,7 +1164,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1198,7 +1194,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1211,7 +1207,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionLinkSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1221,7 +1217,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1231,7 +1227,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1241,7 +1237,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1251,7 +1247,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1261,7 +1257,7 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1274,7 +1270,6 @@ func (a *LinksApiService) StoreTransactionLink(ctx context.Context, body Transac
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService Update existing link type.
Used to update a single link type. All fields that are not submitted will be cleared (set to NULL). The model will tell you which fields are mandatory. You cannot update some of the system provided link types, indicated by the editable&#x3D;false flag when you list it.
@ -1317,7 +1312,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1347,7 +1342,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1360,7 +1355,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 200 {
var v LinkTypeSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1370,7 +1365,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1380,7 +1375,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1390,7 +1385,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1400,7 +1395,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1410,7 +1405,7 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1423,7 +1418,6 @@ func (a *LinksApiService) UpdateLinkType(ctx context.Context, body LinkTypeUpdat
return localVarReturnValue, localVarHttpResponse, nil
}
/*
LinksApiService Update an existing link between transactions.
Used to update a single existing link.
@ -1466,7 +1460,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1496,7 +1490,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1509,7 +1503,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionLinkSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1519,7 +1513,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1529,7 +1523,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1539,7 +1533,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1549,7 +1543,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1559,7 +1553,7 @@ func (a *LinksApiService) UpdateTransactionLink(ctx context.Context, body Transa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type ObjectGroupsApiService service
/*
ObjectGroupsApiService Delete a object group.
Delete a object group.
@ -46,6 +46,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
return localVarHttpResponse, nil
}
/*
ObjectGroupsApiService Get a single object group.
Get a single object group.
@ -184,7 +185,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -225,7 +226,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -235,7 +236,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +246,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +256,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +266,7 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -278,7 +279,6 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
ObjectGroupsApiService List all bills with this object group.
List all bills with this object group.
@ -330,7 +330,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -358,7 +358,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -371,7 +371,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -381,7 +381,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -391,7 +391,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -401,7 +401,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -411,7 +411,7 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -424,7 +424,6 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
return localVarReturnValue, localVarHttpResponse, nil
}
/*
ObjectGroupsApiService List all oject groups.
List all oject groups.
@ -474,7 +473,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -502,7 +501,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -515,7 +514,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -525,7 +524,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -535,7 +534,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -545,7 +544,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -555,7 +554,7 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -568,7 +567,6 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -620,7 +618,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -648,7 +646,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -661,7 +659,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -671,7 +669,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -681,7 +679,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -691,7 +689,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -701,7 +699,7 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -714,7 +712,6 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
ObjectGroupsApiService Update existing object group.
Update existing object group.
@ -757,7 +754,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -787,7 +784,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -800,7 +797,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -810,7 +807,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -820,7 +817,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -830,7 +827,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -840,7 +837,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -850,7 +847,7 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type PiggyBanksApiService service
/*
PiggyBanksApiService Delete a piggy bank.
Delete a piggy bank.
@ -46,6 +46,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
return localVarHttpResponse, nil
}
/*
PiggyBanksApiService Get a single piggy bank.
Get a single piggy bank.
@ -184,7 +185,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -225,7 +226,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -235,7 +236,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +246,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +256,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +266,7 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -278,7 +279,6 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PiggyBanksApiService Lists all attachments.
Lists all attachments.
@ -330,7 +330,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -358,7 +358,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -371,7 +371,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -381,7 +381,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -391,7 +391,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -401,7 +401,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -411,7 +411,7 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -424,7 +424,6 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PiggyBanksApiService List all events linked to a piggy bank.
List all events linked to a piggy bank (adding and removing money).
@ -476,7 +475,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -504,7 +503,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -517,7 +516,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -527,7 +526,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -537,7 +536,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -547,7 +546,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -557,7 +556,7 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -570,7 +569,6 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PiggyBanksApiService List all piggy banks.
List all piggy banks.
@ -620,7 +618,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -648,7 +646,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -661,7 +659,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -671,7 +669,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -681,7 +679,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -691,7 +689,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -701,7 +699,7 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -714,7 +712,6 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -755,7 +752,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -785,7 +782,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -798,7 +795,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -808,7 +805,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -818,7 +815,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -828,7 +825,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -838,7 +835,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -848,7 +845,7 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -861,7 +858,6 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PiggyBanksApiService Update existing piggy bank.
Update existing piggy bank.
@ -904,7 +900,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -934,7 +930,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -947,7 +943,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -957,7 +953,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -967,7 +963,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -977,7 +973,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -987,7 +983,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -997,7 +993,7 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type PreferencesApiService service
/*
PreferencesApiService Return a single preference.
Return a single preference and the value.
@ -67,7 +68,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -95,7 +96,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -108,7 +109,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -118,7 +119,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -128,7 +129,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -138,7 +139,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -148,7 +149,7 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -161,7 +162,6 @@ func (a *PreferencesApiService) GetPreference(ctx context.Context, name string,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PreferencesApiService List all users preferences.
List all of the preferences of the user.
@ -211,7 +211,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -239,7 +239,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -252,7 +252,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -262,7 +262,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -272,7 +272,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -282,7 +282,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -292,7 +292,7 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -305,7 +305,6 @@ func (a *PreferencesApiService) ListPreference(ctx context.Context, localVarOpti
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -346,7 +345,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -376,7 +375,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -389,7 +388,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -399,7 +398,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -409,7 +408,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -419,7 +418,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -429,7 +428,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -439,7 +438,7 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -452,7 +451,6 @@ func (a *PreferencesApiService) StorePreference(ctx context.Context, body Prefer
return localVarReturnValue, localVarHttpResponse, nil
}
/*
PreferencesApiService Update preference
Update a user&#x27;s preference.
@ -495,7 +493,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -525,7 +523,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -538,7 +536,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -548,7 +546,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -558,7 +556,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -568,7 +566,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -578,7 +576,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -588,7 +586,7 @@ func (a *PreferencesApiService) UpdatePreference(ctx context.Context, body Prefe
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type RecurrencesApiService service
/*
RecurrencesApiService Delete a recurring transaction.
Delete a recurring transaction. Transactions created by the recurring transaction will not be deleted.
@ -46,6 +46,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
return localVarHttpResponse, nil
}
/*
RecurrencesApiService Get a single recurring transaction.
Get a single recurring transaction.
@ -184,7 +185,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +213,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -225,7 +226,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -235,7 +236,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +246,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +256,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +266,7 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -278,7 +279,6 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RecurrencesApiService List all recurring transactions.
List all recurring transactions.
@ -328,7 +328,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -356,7 +356,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -369,7 +369,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -379,7 +379,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -389,7 +389,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -399,7 +399,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -409,7 +409,7 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -422,7 +422,6 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RecurrencesApiService List all transactions created by a recurring transaction.
List all transactions created by a recurring transaction, optionally limited to the date ranges specified.
@ -489,7 +488,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -517,7 +516,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -530,7 +529,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -540,7 +539,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -550,7 +549,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -560,7 +559,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -570,7 +569,7 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -583,7 +582,6 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -624,7 +622,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -654,7 +652,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -667,7 +665,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -677,7 +675,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -687,7 +685,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -697,7 +695,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -707,7 +705,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -717,7 +715,7 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -730,7 +728,6 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RecurrencesApiService Update existing recurring transaction.
Update existing recurring transaction.
@ -773,7 +770,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -803,7 +800,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -816,7 +813,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -826,7 +823,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -836,7 +833,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -846,7 +843,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -856,7 +853,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -866,7 +863,7 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type RuleGroupsApiService service
/*
RuleGroupsApiService Delete a rule group.
Delete a rule group.
@ -46,6 +46,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *RuleGroupsApiService) DeleteRuleGroup(ctx context.Context, id string, l
return localVarHttpResponse, nil
}
/*
RuleGroupsApiService Fire the rule group on your transactions.
Fire the rule group on your transactions. Changes will be made by the rules in the rule group! Limit the result if you want to.
@ -169,6 +170,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -224,6 +226,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -231,7 +234,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -241,7 +244,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -251,7 +254,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -261,7 +264,7 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -274,7 +277,6 @@ func (a *RuleGroupsApiService) FireRuleGroup(ctx context.Context, id string, loc
return localVarHttpResponse, nil
}
/*
RuleGroupsApiService Get a single rule group.
Get a single rule group. This does not include the rules. For that, see below.
@ -316,7 +318,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -344,7 +346,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -357,7 +359,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 200 {
var v RuleGroupSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -367,7 +369,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -377,7 +379,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -387,7 +389,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -397,7 +399,7 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -410,7 +412,6 @@ func (a *RuleGroupsApiService) GetRuleGroup(ctx context.Context, id string, loca
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RuleGroupsApiService List rules in this rule group.
List rules in this rule group.
@ -462,7 +463,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -490,7 +491,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -503,7 +504,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -513,7 +514,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -523,7 +524,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -533,7 +534,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -543,7 +544,7 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -556,7 +557,6 @@ func (a *RuleGroupsApiService) ListRuleByGroup(ctx context.Context, id string, l
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RuleGroupsApiService List all rule groups.
List all rule groups.
@ -606,7 +606,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -634,7 +634,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -647,7 +647,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 200 {
var v RuleGroupArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -657,7 +657,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -667,7 +667,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -677,7 +677,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -687,7 +687,7 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -700,7 +700,6 @@ func (a *RuleGroupsApiService) ListRuleGroup(ctx context.Context, localVarOption
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RuleGroupsApiService Store a new rule group.
Creates a new rule group. The data required can be submitted as a JSON body or as a list of parameters.
@ -741,7 +740,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -771,7 +770,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -784,7 +783,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 200 {
var v RuleGroupSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -794,7 +793,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -804,7 +803,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -814,7 +813,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -824,7 +823,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -834,7 +833,7 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -847,7 +846,6 @@ func (a *RuleGroupsApiService) StoreRuleGroup(ctx context.Context, body RuleGrou
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RuleGroupsApiService Test which transactions would be hit by the rule group. No changes will be made.
Test which transactions would be hit by the rule group. No changes will be made. Limit the result if you want to.
@ -924,7 +922,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -952,7 +950,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -965,7 +963,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -975,7 +973,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -985,7 +983,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -995,7 +993,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1005,7 +1003,7 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1018,7 +1016,6 @@ func (a *RuleGroupsApiService) TestRuleGroup(ctx context.Context, id string, loc
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RuleGroupsApiService Update existing rule group.
Update existing rule group.
@ -1061,7 +1058,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1091,7 +1088,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1104,7 +1101,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 200 {
var v RuleGroupSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1114,7 +1111,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1124,7 +1121,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1134,7 +1131,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1144,7 +1141,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1154,7 +1151,7 @@ func (a *RuleGroupsApiService) UpdateRuleGroup(ctx context.Context, body RuleGro
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type RulesApiService service
/*
RulesApiService Delete an rule.
Delete an rule.
@ -46,6 +46,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, nil
}
/*
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.
@ -169,6 +170,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -224,6 +226,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -231,7 +234,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -241,7 +244,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -251,7 +254,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -261,7 +264,7 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -274,7 +277,6 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
return localVarHttpResponse, nil
}
/*
RulesApiService Get a single rule.
Get a single rule.
@ -316,7 +318,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -344,7 +346,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -357,7 +359,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -367,7 +369,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -377,7 +379,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -387,7 +389,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -397,7 +399,7 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -410,7 +412,6 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RulesApiService List all rules.
List all rules.
@ -460,7 +461,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -488,7 +489,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -501,7 +502,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -511,7 +512,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -521,7 +522,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -531,7 +532,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -541,7 +542,7 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -554,7 +555,6 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -595,7 +595,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -625,7 +625,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -638,7 +638,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -648,7 +648,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -658,7 +658,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -668,7 +668,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -678,7 +678,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -688,7 +688,7 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -701,7 +701,6 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -758,7 +757,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -786,7 +785,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -799,7 +798,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -809,7 +808,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -819,7 +818,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -829,7 +828,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -839,7 +838,7 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -852,7 +851,6 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
return localVarReturnValue, localVarHttpResponse, nil
}
/*
RulesApiService Update existing rule.
Update existing rule.
@ -895,7 +893,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -925,7 +923,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -938,7 +936,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -948,7 +946,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -958,7 +956,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -968,7 +966,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -978,7 +976,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -988,7 +986,7 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/antihax/optional"
)
// Linger please
@ -24,7 +25,6 @@ var (
)
type SearchApiService service
/*
SearchApiService Search for accounts
Search for accounts
@ -83,7 +83,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -111,7 +111,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -124,7 +124,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -134,7 +134,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -144,7 +144,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -154,7 +154,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -164,7 +164,7 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -177,7 +177,6 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
return localVarReturnValue, localVarHttpResponse, nil
}
/*
SearchApiService Search for transactions
Searches through the users transactions.
@ -229,7 +228,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -257,7 +256,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -270,7 +269,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -280,7 +279,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -290,7 +289,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -300,7 +299,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -310,7 +309,7 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"github.com/antihax/optional"
)
// Linger please
@ -24,7 +25,6 @@ var (
)
type SummaryApiService service
/*
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.
@ -73,7 +73,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -101,7 +101,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -114,7 +114,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -124,7 +124,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -134,7 +134,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -144,7 +144,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -154,7 +154,7 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type TagsApiService service
/*
TagsApiService Delete an tag.
Delete an tag.
@ -46,6 +46,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
return localVarHttpResponse, nil
}
/*
TagsApiService Get a single tag.
Get a single tag.
@ -194,7 +195,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -222,7 +223,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -235,7 +236,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +246,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +256,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +266,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -275,7 +276,7 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -288,7 +289,6 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TagsApiService Lists all attachments.
Lists all attachments.
@ -340,7 +340,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -368,7 +368,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -381,7 +381,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -391,7 +391,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -401,7 +401,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -411,7 +411,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -421,7 +421,7 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -434,7 +434,6 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TagsApiService List all tags.
List all of the user&#x27;s tags.
@ -484,7 +483,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -512,7 +511,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -525,7 +524,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -535,7 +534,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -545,7 +544,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -555,7 +554,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -565,7 +564,7 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -578,7 +577,6 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TagsApiService List all transactions with this tag.
List all transactions with this tag.
@ -645,7 +643,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -673,7 +671,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -686,7 +684,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -696,7 +694,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -706,7 +704,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -716,7 +714,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -726,7 +724,7 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -739,7 +737,6 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -780,7 +777,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -810,7 +807,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -823,7 +820,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -833,7 +830,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -843,7 +840,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -853,7 +850,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -863,7 +860,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -873,7 +870,7 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -886,7 +883,6 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TagsApiService Update existing tag.
Update existing tag.
@ -929,7 +925,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -959,7 +955,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -972,7 +968,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -982,7 +978,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -992,7 +988,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1002,7 +998,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1012,7 +1008,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1022,7 +1018,7 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type TransactionsApiService service
/*
TransactionsApiService Delete a transaction.
Delete a transaction.
@ -46,6 +46,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *TransactionsApiService) DeleteTransaction(ctx context.Context, id strin
return localVarHttpResponse, nil
}
/*
TransactionsApiService Delete split from transaction
Delete an individual journal (split) from a transaction.
@ -163,6 +164,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -209,6 +211,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -216,7 +219,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -226,7 +229,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -236,7 +239,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -246,7 +249,7 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -259,7 +262,6 @@ func (a *TransactionsApiService) DeleteTransactionJournal(ctx context.Context, i
return localVarHttpResponse, nil
}
/*
TransactionsApiService Get a single transaction.
Get a single transaction.
@ -301,7 +303,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -329,7 +331,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -342,7 +344,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -352,7 +354,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -362,7 +364,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -372,7 +374,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -382,7 +384,7 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -395,7 +397,6 @@ func (a *TransactionsApiService) GetTransaction(ctx context.Context, id string,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Get a single transaction, based on one of the underlying transaction journals (transaction splits).
Get a single transaction by underlying journal (split).
@ -437,7 +438,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -465,7 +466,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -478,7 +479,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -488,7 +489,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -498,7 +499,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -508,7 +509,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -518,7 +519,7 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -531,7 +532,6 @@ func (a *TransactionsApiService) GetTransactionByJournal(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Lists all attachments.
Lists all attachments.
@ -583,7 +583,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -611,7 +611,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -624,7 +624,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -634,7 +634,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -644,7 +644,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -654,7 +654,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -664,7 +664,7 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -677,7 +677,6 @@ func (a *TransactionsApiService) ListAttachmentByTransaction(ctx context.Context
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Lists all piggy bank events.
Lists all piggy bank events.
@ -729,7 +728,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -757,7 +756,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -770,7 +769,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -780,7 +779,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -790,7 +789,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -800,7 +799,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -810,7 +809,7 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -823,7 +822,6 @@ func (a *TransactionsApiService) ListEventByTransaction(ctx context.Context, id
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Lists all the transaction links for an individual journal (individual split).
Lists all the transaction links for an individual journal (a split). Don&#x27;t use the group ID, you need the actual underlying journal (the split).
@ -875,7 +873,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -903,7 +901,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -916,7 +914,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionLinkArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -926,7 +924,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -936,7 +934,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -946,7 +944,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -956,7 +954,7 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -969,7 +967,6 @@ func (a *TransactionsApiService) ListLinksByJournal(ctx context.Context, id stri
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService List all the user&#x27;s transactions.
List all the user&#x27;s transactions.
@ -1034,7 +1031,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1062,7 +1059,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1075,7 +1072,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1085,7 +1082,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1095,7 +1092,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1105,7 +1102,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1115,7 +1112,7 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1128,7 +1125,6 @@ func (a *TransactionsApiService) ListTransaction(ctx context.Context, localVarOp
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Store a new transaction
Creates a new transaction. The data required can be submitted as a JSON body or as a list of parameters.
@ -1169,7 +1165,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1199,7 +1195,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1212,7 +1208,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1222,7 +1218,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1232,7 +1228,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1242,7 +1238,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1252,7 +1248,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1262,7 +1258,7 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1275,7 +1271,6 @@ func (a *TransactionsApiService) StoreTransaction(ctx context.Context, body Tran
return localVarReturnValue, localVarHttpResponse, nil
}
/*
TransactionsApiService Update existing transaction. For more information, see https://docs.firefly-iii.org/references/firefly-iii/api/specials/
Update an existing transaction.
@ -1318,7 +1313,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1348,7 +1343,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1361,7 +1356,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 200 {
var v TransactionSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1371,7 +1366,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1381,7 +1376,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1391,7 +1386,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1401,7 +1396,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1411,7 +1406,7 @@ func (a *TransactionsApiService) UpdateTransaction(ctx context.Context, body Tra
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
"time"
)
// Linger please
@ -25,7 +27,6 @@ var (
)
type UsersApiService service
/*
UsersApiService Delete a user.
Delete a user. You cannot delete the user you&#x27;re authenticated with. This cannot be undone. Be careful!
@ -46,6 +47,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +94,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +102,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +112,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +122,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +132,7 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +145,6 @@ func (a *UsersApiService) DeleteUser(ctx context.Context, id string, localVarOpt
return localVarHttpResponse, nil
}
/*
UsersApiService Get a single user.
Gets all info of a single user.
@ -184,7 +186,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -212,7 +214,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -225,7 +227,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -235,7 +237,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -245,7 +247,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -255,7 +257,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -265,7 +267,7 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -278,7 +280,6 @@ func (a *UsersApiService) GetUser(ctx context.Context, id string, localVarOption
return localVarReturnValue, localVarHttpResponse, nil
}
/*
UsersApiService List all users.
List all the users in this instance of Firefly III.
@ -328,7 +329,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -356,7 +357,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -369,7 +370,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -379,7 +380,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -389,7 +390,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -399,7 +400,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -409,7 +410,7 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -422,7 +423,6 @@ func (a *UsersApiService) ListUser(ctx context.Context, localVarOptionals *Users
return localVarReturnValue, localVarHttpResponse, nil
}
/*
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.
@ -463,7 +463,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.firefly3+json"}
localVarHttpHeaderAccepts := []string{"application/json", "application/vnd.api+json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -493,7 +493,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -506,7 +506,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -516,7 +516,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -526,7 +526,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -536,7 +536,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -546,7 +546,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -556,7 +556,7 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -569,7 +569,6 @@ func (a *UsersApiService) StoreUser(ctx context.Context, body User, localVarOpti
return localVarReturnValue, localVarHttpResponse, nil
}
/*
UsersApiService Update an existing user&#x27;s information.
Update existing user.
@ -612,7 +611,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -642,7 +641,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -655,7 +654,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 200 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -665,7 +664,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -675,7 +674,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -685,7 +684,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -695,7 +694,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -705,7 +704,7 @@ func (a *UsersApiService) UpdateUser(ctx context.Context, body User, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"context"
"fmt"
"github.com/antihax/optional"
"io/ioutil"
"net/http"
"net/url"
"strings"
"fmt"
"github.com/antihax/optional"
)
// Linger please
@ -25,7 +26,6 @@ var (
)
type WebhooksApiService service
/*
WebhooksApiService Delete a webhook.
Delete a webhook.
@ -46,6 +46,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -92,6 +93,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -99,7 +101,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -109,7 +111,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -119,7 +121,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -129,7 +131,7 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -142,7 +144,6 @@ func (a *WebhooksApiService) DeleteWebhook(ctx context.Context, id string, local
return localVarHttpResponse, nil
}
/*
WebhooksApiService Delete a webhook message.
Delete a webhook message. Any time a webhook is triggered the message is stored before it&#x27;s sent. You can delete them before or after sending.
@ -164,6 +165,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -211,6 +213,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -218,7 +221,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -228,7 +231,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -238,7 +241,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -248,7 +251,7 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -261,7 +264,6 @@ func (a *WebhooksApiService) DeleteWebhookMessage(ctx context.Context, id string
return localVarHttpResponse, nil
}
/*
WebhooksApiService Delete a webhook attempt.
Delete a webhook message attempt. If you delete all attempts for a webhook message, Firefly III will (once again) assume all is well with the webhook message and will try to send it again.
@ -284,6 +286,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -332,6 +335,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -339,7 +343,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -349,7 +353,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -359,7 +363,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -369,7 +373,7 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarHttpResponse, newErr
@ -382,7 +386,6 @@ func (a *WebhooksApiService) DeleteWebhookMessageAttempt(ctx context.Context, id
return localVarHttpResponse, nil
}
/*
WebhooksApiService Get a single message from a webhook.
When a webhook is triggered it will store the actual content of the webhook in a webhook message. You can view and analyse a single one using this endpoint.
@ -426,7 +429,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -454,7 +457,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -467,7 +470,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookMessageSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -477,7 +480,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -487,7 +490,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -497,7 +500,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -507,7 +510,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -520,7 +523,6 @@ func (a *WebhooksApiService) GetSingleWebhookMessage(ctx context.Context, id str
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Get a single failed attempt from a single webhook message.
When a webhook message fails to send it will store the failure in an \&quot;attempt\&quot;. You can view and analyse these. Webhooks messages that receive too many attempts (failures) will not be fired. You must first clear out old attempts and try again. This endpoint shows you the details of a single attempt. The ID of the attempt must match the corresponding webhook and webhook message.
@ -566,7 +568,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -594,7 +596,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -607,7 +609,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookAttemptSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -617,7 +619,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -627,7 +629,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -637,7 +639,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -647,7 +649,7 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -660,7 +662,6 @@ func (a *WebhooksApiService) GetSingleWebhookMessageAttempt(ctx context.Context,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Get a single webhook.
Gets all info of a single webhook.
@ -702,7 +703,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -730,7 +731,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -743,7 +744,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -753,7 +754,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -763,7 +764,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -773,7 +774,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -783,7 +784,7 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -796,7 +797,6 @@ func (a *WebhooksApiService) GetWebhook(ctx context.Context, id string, localVar
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Get all the failed attempts of a single webhook message.
When a webhook message fails to send it will store the failure in an \&quot;attempt\&quot;. You can view and analyse these. Webhook messages that receive too many attempts (failures) will not be sent again. You must first clear out old attempts before the message can go out again.
@ -850,7 +850,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -878,7 +878,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -891,7 +891,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookAttemptArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -901,7 +901,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -911,7 +911,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -921,7 +921,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -931,7 +931,7 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -944,7 +944,6 @@ func (a *WebhooksApiService) GetWebhookMessageAttempts(ctx context.Context, id s
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Get all the messages of a single webhook.
When a webhook is triggered the actual message that will be send is stored in a \&quot;message\&quot;. You can view and analyse these messages.
@ -986,7 +985,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1014,7 +1013,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1027,7 +1026,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookMessageArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1037,7 +1036,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1047,7 +1046,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1057,7 +1056,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1067,7 +1066,7 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1080,7 +1079,6 @@ func (a *WebhooksApiService) GetWebhookMessages(ctx context.Context, id string,
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService List all webhooks.
List all the user&#x27;s webhooks.
@ -1130,7 +1128,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1158,7 +1156,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1171,7 +1169,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookArray
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1181,7 +1179,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1191,7 +1189,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1201,7 +1199,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1211,7 +1209,7 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1224,7 +1222,6 @@ func (a *WebhooksApiService) ListWebhook(ctx context.Context, localVarOptionals
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Store a new webhook
Creates a new webhook. The data required can be submitted as a JSON body or as a list of parameters. The webhook will be given a random secret.
@ -1265,7 +1262,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1295,7 +1292,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1308,7 +1305,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1318,7 +1315,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1328,7 +1325,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1338,7 +1335,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1348,7 +1345,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1358,7 +1355,7 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1371,7 +1368,6 @@ func (a *WebhooksApiService) StoreWebhook(ctx context.Context, body WebhookStore
return localVarReturnValue, localVarHttpResponse, nil
}
/*
WebhooksApiService Submit messages for a webhook.
This endpoint will submit any open messages for this webhook. This is an asynchronous operation, so you can&#x27;t see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
@ -1392,6 +1388,7 @@ func (a *WebhooksApiService) SubmitWebook(ctx context.Context, id string, localV
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -1438,6 +1435,7 @@ func (a *WebhooksApiService) SubmitWebook(ctx context.Context, id string, localV
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -1448,7 +1446,6 @@ func (a *WebhooksApiService) SubmitWebook(ctx context.Context, id string, localV
return localVarHttpResponse, nil
}
/*
WebhooksApiService Trigger webhook for a given transaction.
This endpoint will execute this webhook for a given transaction ID. This is an asynchronous operation, so you can&#x27;t see the result. Refresh the webhook message and/or the webhook message attempts to see the results. This may take some time if the webhook receiver is slow.
@ -1470,6 +1467,7 @@ func (a *WebhooksApiService) TriggerTransactionWebhook(ctx context.Context, id s
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
)
// create path and map variables
@ -1517,6 +1515,7 @@ func (a *WebhooksApiService) TriggerTransactionWebhook(ctx context.Context, id s
return localVarHttpResponse, err
}
if localVarHttpResponse.StatusCode >= 300 {
newErr := GenericSwaggerError{
body: localVarBody,
@ -1527,7 +1526,6 @@ func (a *WebhooksApiService) TriggerTransactionWebhook(ctx context.Context, id s
return localVarHttpResponse, nil
}
/*
WebhooksApiService Update existing webhook.
Update an existing webhook&#x27;s information. If you wish to reset the secret, submit any value as the \&quot;secret\&quot;. Firefly III will take this as a hint and reset the secret of the webhook.
@ -1570,7 +1568,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
// to determine the Accept header
localVarHttpHeaderAccepts := []string{"application/vnd.firefly3+json", "application/json"}
localVarHttpHeaderAccepts := []string{"application/vnd.api+json", "application/json"}
// set Accept header
localVarHttpHeaderAccept := selectHeaderAccept(localVarHttpHeaderAccepts)
@ -1600,7 +1598,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
if localVarHttpResponse.StatusCode < 300 {
// 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 {
return localVarReturnValue, localVarHttpResponse, err
}
@ -1613,7 +1611,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 200 {
var v WebhookSingle
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1623,7 +1621,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 422 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1633,7 +1631,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 401 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1643,7 +1641,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 404 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1653,7 +1651,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 400 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
@ -1663,7 +1661,7 @@ func (a *WebhooksApiService) UpdateWebhook(ctx context.Context, body WebhookUpda
}
if localVarHttpResponse.StatusCode == 500 {
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 {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr

@ -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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"bytes"
@ -37,7 +37,7 @@ var (
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.
type APIClient struct {
cfg *Configuration
@ -390,7 +390,7 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
return err
}
return nil
} else if strings.Contains(contentType, "application/json") || strings.Contains(contentType, "application/vnd.api+json") {
} else if strings.Contains(contentType, "application/json") {
if err = json.Unmarshal(b, v); err != nil {
return err
}

@ -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
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
*/
package firefly3
package swagger
import (
"net/http"
@ -60,7 +60,7 @@ type Configuration struct {
func NewConfiguration() *Configuration {
cfg := &Configuration{
BasePath: "https://demo.firefly-iii.org/firefly3",
BasePath: "https://demo.firefly-iii.org/api",
DefaultHeader: make(map[string]string),
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