Bump version
This commit is contained in:
parent
04e92891e3
commit
21371e5c22
236
api_about.go
236
api_about.go
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type AboutApiService service
|
||||
|
||||
/*
|
||||
AboutApiService System information end point.
|
||||
Returns general system information and versions of the (supporting) software.
|
||||
@ -36,15 +36,15 @@ Returns general system information and versions of the (supporting) software.
|
||||
*/
|
||||
|
||||
type AboutApiGetAboutOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *AboutApiGetAboutOpts) (SystemInfo, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue SystemInfo
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -101,64 +101,65 @@ func (a *AboutApiService) GetAbout(ctx context.Context, localVarOptionals *About
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v SystemInfo
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -172,17 +173,17 @@ Firefly III has one endpoint for its various cron related tasks. Send a GET to t
|
||||
*/
|
||||
|
||||
type AboutApiGetCronOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Date optional.String
|
||||
Force optional.Bool
|
||||
XTraceId optional.Interface
|
||||
Date optional.String
|
||||
Force optional.Bool
|
||||
}
|
||||
|
||||
func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVarOptionals *AboutApiGetCronOpts) (CronResult, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue CronResult
|
||||
)
|
||||
|
||||
@ -238,7 +239,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
|
||||
}
|
||||
@ -246,64 +247,65 @@ func (a *AboutApiService) GetCron(ctx context.Context, cliToken string, localVar
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v CronResult
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
AboutApiService Currently authenticated user endpoint.
|
||||
Returns the currently authenticated user.
|
||||
@ -314,15 +316,15 @@ Returns the currently authenticated user.
|
||||
*/
|
||||
|
||||
type AboutApiGetCurrentUserOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals *AboutApiGetCurrentUserOpts) (UserSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue UserSingle
|
||||
)
|
||||
|
||||
@ -371,7 +373,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
|
||||
}
|
||||
@ -379,58 +381,58 @@ func (a *AboutApiService) GetCurrentUser(ctx context.Context, localVarOptionals
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v UserSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
1273
api_autocomplete.go
1273
api_autocomplete.go
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type AvailableBudgetsApiService service
|
||||
|
||||
/*
|
||||
AvailableBudgetsApiService Get a single available budget.
|
||||
Get a single available budget, by ID.
|
||||
@ -37,15 +37,15 @@ Get a single available budget, by ID.
|
||||
*/
|
||||
|
||||
type AvailableBudgetsApiGetAvailableBudgetOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id string, localVarOptionals *AvailableBudgetsApiGetAvailableBudgetOpts) (AvailableBudgetSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue AvailableBudgetSingle
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -103,64 +103,65 @@ func (a *AvailableBudgetsApiService) GetAvailableBudget(ctx context.Context, id
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v AvailableBudgetSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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 \"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.
|
||||
@ -175,19 +176,19 @@ Firefly III allows users to set the amount that is available to be budgeted in s
|
||||
*/
|
||||
|
||||
type AvailableBudgetsApiListAvailableBudgetOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
}
|
||||
|
||||
func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, localVarOptionals *AvailableBudgetsApiListAvailableBudgetOpts) (AvailableBudgetArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue AvailableBudgetArray
|
||||
)
|
||||
|
||||
@ -248,7 +249,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
|
||||
}
|
||||
@ -256,58 +257,58 @@ func (a *AvailableBudgetsApiService) ListAvailableBudget(ctx context.Context, lo
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v AvailableBudgetArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,15 +7,15 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -25,6 +24,7 @@ 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.
|
||||
@ -37,15 +37,15 @@ This endpoint returns the data required to generate a chart with basic asset acc
|
||||
*/
|
||||
|
||||
type ChartsApiGetChartAccountOverviewOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start string, end string, localVarOptionals *ChartsApiGetChartAccountOverviewOpts) ([]ChartDataSet, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue []ChartDataSet
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -104,58 +104,58 @@ func (a *ChartsApiService) GetChartAccountOverview(ctx context.Context, start st
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v []ChartDataSet
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
1257
api_currencies.go
1257
api_currencies.go
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
1869
api_insight.go
1869
api_insight.go
File diff suppressed because it is too large
Load Diff
858
api_links.go
858
api_links.go
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type ObjectGroupsApiService service
|
||||
|
||||
/*
|
||||
ObjectGroupsApiService Delete a object group.
|
||||
Delete a object group.
|
||||
@ -37,7 +37,7 @@ Delete a object group.
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiDeleteObjectGroupOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiDeleteObjectGroupOpts) (*http.Response, error) {
|
||||
@ -46,7 +46,6 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -93,57 +92,57 @@ func (a *ObjectGroupsApiService) DeleteObjectGroup(ctx context.Context, id strin
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
ObjectGroupsApiService Get a single object group.
|
||||
Get a single object group.
|
||||
@ -155,15 +154,15 @@ Get a single object group.
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiGetObjectGroupOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiGetObjectGroupOpts) (ObjectGroupSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue ObjectGroupSingle
|
||||
)
|
||||
|
||||
@ -213,7 +212,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
|
||||
}
|
||||
@ -221,64 +220,65 @@ func (a *ObjectGroupsApiService) GetObjectGroup(ctx context.Context, id string,
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v ObjectGroupSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
ObjectGroupsApiService List all bills with this object group.
|
||||
List all bills with this object group.
|
||||
@ -292,17 +292,17 @@ List all bills with this object group.
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiListBillByObjectGroupOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListBillByObjectGroupOpts) (BillArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue BillArray
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -366,64 +366,65 @@ func (a *ObjectGroupsApiService) ListBillByObjectGroup(ctx context.Context, id s
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v BillArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
ObjectGroupsApiService List all oject groups.
|
||||
List all oject groups.
|
||||
@ -436,17 +437,17 @@ List all oject groups.
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiListObjectGroupsOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarOptionals *ObjectGroupsApiListObjectGroupsOpts) (ObjectGroupArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue ObjectGroupArray
|
||||
)
|
||||
|
||||
@ -501,7 +502,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
|
||||
}
|
||||
@ -509,64 +510,65 @@ func (a *ObjectGroupsApiService) ListObjectGroups(ctx context.Context, localVarO
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v ObjectGroupArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -580,17 +582,17 @@ This endpoint returns a list of all the piggy banks connected to the object grou
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiListPiggyBankByObjectGroupOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context, id string, localVarOptionals *ObjectGroupsApiListPiggyBankByObjectGroupOpts) (PiggyBankArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankArray
|
||||
)
|
||||
|
||||
@ -646,7 +648,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
|
||||
}
|
||||
@ -654,64 +656,65 @@ func (a *ObjectGroupsApiService) ListPiggyBankByObjectGroup(ctx context.Context,
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
ObjectGroupsApiService Update existing object group.
|
||||
Update existing object group.
|
||||
@ -724,15 +727,15 @@ Update existing object group.
|
||||
*/
|
||||
|
||||
type ObjectGroupsApiUpdateObjectGroupOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body ObjectGroupUpdate, id string, localVarOptionals *ObjectGroupsApiUpdateObjectGroupOpts) (ObjectGroupSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue ObjectGroupSingle
|
||||
)
|
||||
|
||||
@ -784,7 +787,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
|
||||
}
|
||||
@ -792,68 +795,68 @@ func (a *ObjectGroupsApiService) UpdateObjectGroup(ctx context.Context, body Obj
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v ObjectGroupSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type PiggyBanksApiService service
|
||||
|
||||
/*
|
||||
PiggyBanksApiService Delete a piggy bank.
|
||||
Delete a piggy bank.
|
||||
@ -37,7 +37,7 @@ Delete a piggy bank.
|
||||
*/
|
||||
|
||||
type PiggyBanksApiDeletePiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiDeletePiggyBankOpts) (*http.Response, error) {
|
||||
@ -46,7 +46,6 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -93,57 +92,57 @@ func (a *PiggyBanksApiService) DeletePiggyBank(ctx context.Context, id string, l
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
PiggyBanksApiService Get a single piggy bank.
|
||||
Get a single piggy bank.
|
||||
@ -155,15 +154,15 @@ Get a single piggy bank.
|
||||
*/
|
||||
|
||||
type PiggyBanksApiGetPiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiGetPiggyBankOpts) (PiggyBankSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankSingle
|
||||
)
|
||||
|
||||
@ -213,7 +212,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
|
||||
}
|
||||
@ -221,64 +220,65 @@ func (a *PiggyBanksApiService) GetPiggyBank(ctx context.Context, id string, loca
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
PiggyBanksApiService Lists all attachments.
|
||||
Lists all attachments.
|
||||
@ -292,17 +292,17 @@ Lists all attachments.
|
||||
*/
|
||||
|
||||
type PiggyBanksApiListAttachmentByPiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListAttachmentByPiggyBankOpts) (AttachmentArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue AttachmentArray
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -366,64 +366,65 @@ func (a *PiggyBanksApiService) ListAttachmentByPiggyBank(ctx context.Context, id
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v AttachmentArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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).
|
||||
@ -437,17 +438,17 @@ List all events linked to a piggy bank (adding and removing money).
|
||||
*/
|
||||
|
||||
type PiggyBanksApiListEventByPiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id string, localVarOptionals *PiggyBanksApiListEventByPiggyBankOpts) (PiggyBankEventArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankEventArray
|
||||
)
|
||||
|
||||
@ -503,7 +504,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
|
||||
}
|
||||
@ -511,64 +512,65 @@ func (a *PiggyBanksApiService) ListEventByPiggyBank(ctx context.Context, id stri
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankEventArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
PiggyBanksApiService List all piggy banks.
|
||||
List all piggy banks.
|
||||
@ -581,17 +583,17 @@ List all piggy banks.
|
||||
*/
|
||||
|
||||
type PiggyBanksApiListPiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOptionals *PiggyBanksApiListPiggyBankOpts) (PiggyBankArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankArray
|
||||
)
|
||||
|
||||
@ -646,7 +648,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
|
||||
}
|
||||
@ -654,64 +656,65 @@ func (a *PiggyBanksApiService) ListPiggyBank(ctx context.Context, localVarOption
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -723,15 +726,15 @@ Creates a new piggy bank. The data required can be submitted as a JSON body or a
|
||||
*/
|
||||
|
||||
type PiggyBanksApiStorePiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBankStore, localVarOptionals *PiggyBanksApiStorePiggyBankOpts) (PiggyBankSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankSingle
|
||||
)
|
||||
|
||||
@ -782,7 +785,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
|
||||
}
|
||||
@ -790,74 +793,75 @@ func (a *PiggyBanksApiService) StorePiggyBank(ctx context.Context, body PiggyBan
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
PiggyBanksApiService Update existing piggy bank.
|
||||
Update existing piggy bank.
|
||||
@ -870,15 +874,15 @@ Update existing piggy bank.
|
||||
*/
|
||||
|
||||
type PiggyBanksApiUpdatePiggyBankOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBankUpdate, id string, localVarOptionals *PiggyBanksApiUpdatePiggyBankOpts) (PiggyBankSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue PiggyBankSingle
|
||||
)
|
||||
|
||||
@ -930,7 +934,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
|
||||
}
|
||||
@ -938,68 +942,68 @@ func (a *PiggyBanksApiService) UpdatePiggyBank(ctx context.Context, body PiggyBa
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v PiggyBankSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type RecurrencesApiService service
|
||||
|
||||
/*
|
||||
RecurrencesApiService Delete a recurring transaction.
|
||||
Delete a recurring transaction. Transactions created by the recurring transaction will not be deleted.
|
||||
@ -37,7 +37,7 @@ Delete a recurring transaction. Transactions created by the recurring transactio
|
||||
*/
|
||||
|
||||
type RecurrencesApiDeleteRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiDeleteRecurrenceOpts) (*http.Response, error) {
|
||||
@ -46,7 +46,6 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -93,57 +92,57 @@ func (a *RecurrencesApiService) DeleteRecurrence(ctx context.Context, id string,
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RecurrencesApiService Get a single recurring transaction.
|
||||
Get a single recurring transaction.
|
||||
@ -155,15 +154,15 @@ Get a single recurring transaction.
|
||||
*/
|
||||
|
||||
type RecurrencesApiGetRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiGetRecurrenceOpts) (RecurrenceSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RecurrenceSingle
|
||||
)
|
||||
|
||||
@ -213,7 +212,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
|
||||
}
|
||||
@ -221,64 +220,65 @@ func (a *RecurrencesApiService) GetRecurrence(ctx context.Context, id string, lo
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RecurrenceSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RecurrencesApiService List all recurring transactions.
|
||||
List all recurring transactions.
|
||||
@ -291,17 +291,17 @@ List all recurring transactions.
|
||||
*/
|
||||
|
||||
type RecurrencesApiListRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOptionals *RecurrencesApiListRecurrenceOpts) (RecurrenceArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RecurrenceArray
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -364,64 +364,65 @@ func (a *RecurrencesApiService) ListRecurrence(ctx context.Context, localVarOpti
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RecurrenceArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -438,20 +439,20 @@ List all transactions created by a recurring transaction, optionally limited to
|
||||
*/
|
||||
|
||||
type RecurrencesApiListTransactionByRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Type_ optional.Interface
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Type_ optional.Interface
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context, id string, localVarOptionals *RecurrencesApiListTransactionByRecurrenceOpts) (TransactionArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TransactionArray
|
||||
)
|
||||
|
||||
@ -516,7 +517,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
|
||||
}
|
||||
@ -524,64 +525,65 @@ func (a *RecurrencesApiService) ListTransactionByRecurrence(ctx context.Context,
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TransactionArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -593,15 +595,15 @@ Creates a new recurring transaction. The data required can be submitted as a JSO
|
||||
*/
|
||||
|
||||
type RecurrencesApiStoreRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body RecurrenceStore, localVarOptionals *RecurrencesApiStoreRecurrenceOpts) (RecurrenceSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RecurrenceSingle
|
||||
)
|
||||
|
||||
@ -652,7 +654,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
|
||||
}
|
||||
@ -660,74 +662,75 @@ func (a *RecurrencesApiService) StoreRecurrence(ctx context.Context, body Recurr
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RecurrenceSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RecurrencesApiService Update existing recurring transaction.
|
||||
Update existing recurring transaction.
|
||||
@ -740,15 +743,15 @@ Update existing recurring transaction.
|
||||
*/
|
||||
|
||||
type RecurrencesApiUpdateRecurrenceOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body RecurrenceUpdate, id string, localVarOptionals *RecurrencesApiUpdateRecurrenceOpts) (RecurrenceSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RecurrenceSingle
|
||||
)
|
||||
|
||||
@ -800,7 +803,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
|
||||
}
|
||||
@ -808,68 +811,68 @@ func (a *RecurrencesApiService) UpdateRecurrence(ctx context.Context, body Recur
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RecurrenceSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
532
api_rules.go
532
api_rules.go
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type RulesApiService service
|
||||
|
||||
/*
|
||||
RulesApiService Delete an rule.
|
||||
Delete an rule.
|
||||
@ -37,7 +37,7 @@ Delete an rule.
|
||||
*/
|
||||
|
||||
type RulesApiDeleteRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOptionals *RulesApiDeleteRuleOpts) (*http.Response, error) {
|
||||
@ -46,7 +46,6 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -93,57 +92,57 @@ func (a *RulesApiService) DeleteRule(ctx context.Context, id string, localVarOpt
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -158,10 +157,10 @@ Fire the rule group on your transactions. Changes will be made by the rules in t
|
||||
*/
|
||||
|
||||
type RulesApiFireRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Accounts optional.Interface
|
||||
XTraceId optional.Interface
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Accounts optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptionals *RulesApiFireRuleOpts) (*http.Response, error) {
|
||||
@ -170,7 +169,6 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -226,57 +224,57 @@ func (a *RulesApiService) FireRule(ctx context.Context, id string, localVarOptio
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RulesApiService Get a single rule.
|
||||
Get a single rule.
|
||||
@ -288,15 +286,15 @@ Get a single rule.
|
||||
*/
|
||||
|
||||
type RulesApiGetRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOptionals *RulesApiGetRuleOpts) (RuleSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RuleSingle
|
||||
)
|
||||
|
||||
@ -346,7 +344,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
|
||||
}
|
||||
@ -354,64 +352,65 @@ func (a *RulesApiService) GetRule(ctx context.Context, id string, localVarOption
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RuleSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RulesApiService List all rules.
|
||||
List all rules.
|
||||
@ -424,17 +423,17 @@ List all rules.
|
||||
*/
|
||||
|
||||
type RulesApiListRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *RulesApiListRuleOpts) (RuleArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RuleArray
|
||||
)
|
||||
|
||||
@ -489,7 +488,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
|
||||
}
|
||||
@ -497,64 +496,65 @@ func (a *RulesApiService) ListRule(ctx context.Context, localVarOptionals *Rules
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RuleArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -566,15 +566,15 @@ Creates a new rule. The data required can be submitted as a JSON body or as a li
|
||||
*/
|
||||
|
||||
type RulesApiStoreRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVarOptionals *RulesApiStoreRuleOpts) (RuleSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RuleSingle
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -633,74 +633,75 @@ func (a *RulesApiService) StoreRule(ctx context.Context, body RuleStore, localVa
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RuleSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -715,18 +716,18 @@ Test which transactions would be hit by the rule. No changes will be made. Limit
|
||||
*/
|
||||
|
||||
type RulesApiTestRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Accounts optional.Interface
|
||||
XTraceId optional.Interface
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Accounts optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptionals *RulesApiTestRuleOpts) (TransactionArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TransactionArray
|
||||
)
|
||||
|
||||
@ -785,7 +786,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
|
||||
}
|
||||
@ -793,64 +794,65 @@ func (a *RulesApiService) TestRule(ctx context.Context, id string, localVarOptio
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TransactionArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
RulesApiService Update existing rule.
|
||||
Update existing rule.
|
||||
@ -863,15 +865,15 @@ Update existing rule.
|
||||
*/
|
||||
|
||||
type RulesApiUpdateRuleOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id string, localVarOptionals *RulesApiUpdateRuleOpts) (RuleSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue RuleSingle
|
||||
)
|
||||
|
||||
@ -923,7 +925,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
|
||||
}
|
||||
@ -931,68 +933,68 @@ func (a *RulesApiService) UpdateRule(ctx context.Context, body RuleUpdate, id st
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v RuleSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
165
api_search.go
165
api_search.go
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,15 +7,15 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -25,6 +24,7 @@ var (
|
||||
)
|
||||
|
||||
type SearchApiService service
|
||||
|
||||
/*
|
||||
SearchApiService Search for accounts
|
||||
Search for accounts
|
||||
@ -40,18 +40,18 @@ Search for accounts
|
||||
*/
|
||||
|
||||
type SearchApiSearchAccountsOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Type_ optional.Interface
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Type_ optional.Interface
|
||||
}
|
||||
|
||||
func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, field AccountSearchFieldFilter, localVarOptionals *SearchApiSearchAccountsOpts) (AccountArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue AccountArray
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -119,64 +119,65 @@ func (a *SearchApiService) SearchAccounts(ctx context.Context, query string, fie
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v AccountArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
SearchApiService Search for transactions
|
||||
Searches through the users transactions.
|
||||
@ -190,17 +191,17 @@ Searches through the users transactions.
|
||||
*/
|
||||
|
||||
type SearchApiSearchTransactionsOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *SearchApiService) SearchTransactions(ctx context.Context, query string, localVarOptionals *SearchApiSearchTransactionsOpts) (TransactionArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TransactionArray
|
||||
)
|
||||
|
||||
@ -256,7 +257,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
|
||||
}
|
||||
@ -264,58 +265,58 @@ func (a *SearchApiService) SearchTransactions(ctx context.Context, query string,
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TransactionArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,15 +7,15 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -25,6 +24,7 @@ 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.
|
||||
@ -38,16 +38,16 @@ Returns basic sums of the users data, like the net worth, spent and earned amoun
|
||||
*/
|
||||
|
||||
type SummaryApiGetBasicSummaryOpts struct {
|
||||
XTraceId optional.Interface
|
||||
CurrencyCode optional.String
|
||||
XTraceId optional.Interface
|
||||
CurrencyCode optional.String
|
||||
}
|
||||
|
||||
func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, end string, localVarOptionals *SummaryApiGetBasicSummaryOpts) (map[string]BasicSummaryEntry, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue map[string]BasicSummaryEntry
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -109,58 +109,58 @@ func (a *SummaryApiService) GetBasicSummary(ctx context.Context, start string, e
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v map[string]BasicSummaryEntry
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
558
api_tags.go
558
api_tags.go
@ -1,4 +1,3 @@
|
||||
|
||||
/*
|
||||
* Firefly III API v2.0.14
|
||||
*
|
||||
@ -8,16 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"fmt"
|
||||
"github.com/antihax/optional"
|
||||
)
|
||||
|
||||
// Linger please
|
||||
@ -26,6 +25,7 @@ var (
|
||||
)
|
||||
|
||||
type TagsApiService service
|
||||
|
||||
/*
|
||||
TagsApiService Delete an tag.
|
||||
Delete an tag.
|
||||
@ -37,7 +37,7 @@ Delete an tag.
|
||||
*/
|
||||
|
||||
type TagsApiDeleteTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOptionals *TagsApiDeleteTagOpts) (*http.Response, error) {
|
||||
@ -46,7 +46,6 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
|
||||
)
|
||||
|
||||
// create path and map variables
|
||||
@ -93,57 +92,57 @@ func (a *TagsApiService) DeleteTag(ctx context.Context, tag string, localVarOpti
|
||||
return localVarHttpResponse, err
|
||||
}
|
||||
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
TagsApiService Get a single tag.
|
||||
Get a single tag.
|
||||
@ -157,17 +156,17 @@ Get a single tag.
|
||||
*/
|
||||
|
||||
type TagsApiGetTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptionals *TagsApiGetTagOpts) (TagSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TagSingle
|
||||
)
|
||||
|
||||
@ -223,7 +222,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
|
||||
}
|
||||
@ -231,64 +230,65 @@ func (a *TagsApiService) GetTag(ctx context.Context, tag string, localVarOptiona
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TagSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
TagsApiService Lists all attachments.
|
||||
Lists all attachments.
|
||||
@ -302,17 +302,17 @@ Lists all attachments.
|
||||
*/
|
||||
|
||||
type TagsApiListAttachmentByTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListAttachmentByTagOpts) (AttachmentArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue AttachmentArray
|
||||
)
|
||||
|
||||
@ -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
|
||||
}
|
||||
@ -376,64 +376,65 @@ func (a *TagsApiService) ListAttachmentByTag(ctx context.Context, tag string, lo
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v AttachmentArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
TagsApiService List all tags.
|
||||
List all of the user's tags.
|
||||
@ -446,17 +447,17 @@ List all of the user's tags.
|
||||
*/
|
||||
|
||||
type TagsApiListTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
}
|
||||
|
||||
func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApiListTagOpts) (TagArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TagArray
|
||||
)
|
||||
|
||||
@ -511,7 +512,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
|
||||
}
|
||||
@ -519,64 +520,65 @@ func (a *TagsApiService) ListTag(ctx context.Context, localVarOptionals *TagsApi
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TagArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
TagsApiService List all transactions with this tag.
|
||||
List all transactions with this tag.
|
||||
@ -593,20 +595,20 @@ List all transactions with this tag.
|
||||
*/
|
||||
|
||||
type TagsApiListTransactionByTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Type_ optional.Interface
|
||||
XTraceId optional.Interface
|
||||
Limit optional.Int32
|
||||
Page optional.Int32
|
||||
Start optional.String
|
||||
End optional.String
|
||||
Type_ optional.Interface
|
||||
}
|
||||
|
||||
func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, localVarOptionals *TagsApiListTransactionByTagOpts) (TransactionArray, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Get")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TransactionArray
|
||||
)
|
||||
|
||||
@ -671,7 +673,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
|
||||
}
|
||||
@ -679,64 +681,65 @@ func (a *TagsApiService) ListTransactionByTag(ctx context.Context, tag string, l
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TransactionArray
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
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.
|
||||
@ -748,15 +751,15 @@ Creates a new tag. The data required can be submitted as a JSON body or as a lis
|
||||
*/
|
||||
|
||||
type TagsApiStoreTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, localVarOptionals *TagsApiStoreTagOpts) (TagSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Post")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TagSingle
|
||||
)
|
||||
|
||||
@ -807,7 +810,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
|
||||
}
|
||||
@ -815,74 +818,75 @@ func (a *TagsApiService) StoreTag(ctx context.Context, body TagModelStore, local
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TagSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
||||
return localVarReturnValue, localVarHttpResponse, nil
|
||||
}
|
||||
|
||||
/*
|
||||
TagsApiService Update existing tag.
|
||||
Update existing tag.
|
||||
@ -895,15 +899,15 @@ Update existing tag.
|
||||
*/
|
||||
|
||||
type TagsApiUpdateTagOpts struct {
|
||||
XTraceId optional.Interface
|
||||
XTraceId optional.Interface
|
||||
}
|
||||
|
||||
func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag string, localVarOptionals *TagsApiUpdateTagOpts) (TagSingle, *http.Response, error) {
|
||||
var (
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarHttpMethod = strings.ToUpper("Put")
|
||||
localVarPostBody interface{}
|
||||
localVarFileName string
|
||||
localVarFileBytes []byte
|
||||
localVarReturnValue TagSingle
|
||||
)
|
||||
|
||||
@ -955,7 +959,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
|
||||
}
|
||||
@ -963,68 +967,68 @@ func (a *TagsApiService) UpdateTag(ctx context.Context, body TagModelUpdate, tag
|
||||
|
||||
if localVarHttpResponse.StatusCode >= 300 {
|
||||
newErr := GenericSwaggerError{
|
||||
body: localVarBody,
|
||||
body: localVarBody,
|
||||
error: localVarHttpResponse.Status,
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 200 {
|
||||
var v TagSingle
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 422 {
|
||||
var v ValidationErrorResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 401 {
|
||||
var v UnauthenticatedResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 404 {
|
||||
var v NotFoundResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 400 {
|
||||
var v BadRequestResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
if localVarHttpResponse.StatusCode == 500 {
|
||||
var v InternalExceptionResponse
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"));
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
|
||||
if err != nil {
|
||||
newErr.error = err.Error()
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
newErr.model = v
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
return localVarReturnValue, localVarHttpResponse, newErr
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
818
api_webhooks.go
818
api_webhooks.go
File diff suppressed because it is too large
Load Diff
22
client.go
22
client.go
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@ -385,17 +385,17 @@ func (c *APIClient) prepareRequest(
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if strings.Contains(contentType, "application/xml") {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
} else if strings.Contains(contentType, "application/json") {
|
||||
if err = json.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
if strings.Contains(contentType, "application/xml") {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
} else if strings.Contains(contentType, "application/json") {
|
||||
if err = json.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return errors.New("undefined response type")
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -18,40 +19,40 @@ type Account struct {
|
||||
// If omitted, defaults to true.
|
||||
Active bool `json:"active,omitempty"`
|
||||
// Order of the account. Is NULL if account is not asset or liability.
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Type_ *ShortAccountTypeProperty `json:"type"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Type_ *ShortAccountTypeProperty `json:"type"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
CurrentBalance string `json:"current_balance,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
CurrentBalance string `json:"current_balance,omitempty"`
|
||||
// The timestamp for this date is always 23:59:59, to indicate it's the balance at the very END of that particular day.
|
||||
CurrentBalanceDate time.Time `json:"current_balance_date,omitempty"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
// Represents the opening balance, the initial amount this account holds.
|
||||
OpeningBalance string `json:"opening_balance,omitempty"`
|
||||
// Represents the current debt for liabilities.
|
||||
CurrentDebt string `json:"current_debt,omitempty"`
|
||||
// Represents the date of the opening balance.
|
||||
OpeningBalanceDate time.Time `json:"opening_balance_date,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
// If omitted, defaults to true.
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
// Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank.
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
LiabilityDirection *LiabilityDirectionProperty `json:"liability_direction,omitempty"`
|
||||
// Mandatory when type is liability. Interest percentage.
|
||||
Interest string `json:"interest,omitempty"`
|
||||
Interest string `json:"interest,omitempty"`
|
||||
InterestPeriod *InterestPeriodProperty `json:"interest_period,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// Latitude of the accounts's location, if applicable. Can be used to draw a map.
|
||||
Latitude float64 `json:"latitude,omitempty"`
|
||||
// Latitude of the accounts's location, if applicable. Can be used to draw a map.
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountArray struct {
|
||||
Data []AccountRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Account `json:"attributes"`
|
||||
}
|
||||
|
@ -7,16 +7,17 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// AccountRoleProperty : Is only mandatory when the type is asset.
|
||||
type AccountRoleProperty string
|
||||
|
||||
// List of AccountRoleProperty
|
||||
const (
|
||||
DEFAULT_ASSET_AccountRoleProperty AccountRoleProperty = "defaultAsset"
|
||||
SHARED_ASSET_AccountRoleProperty AccountRoleProperty = "sharedAsset"
|
||||
SAVING_ASSET_AccountRoleProperty AccountRoleProperty = "savingAsset"
|
||||
CC_ASSET_AccountRoleProperty AccountRoleProperty = "ccAsset"
|
||||
DEFAULT_ASSET_AccountRoleProperty AccountRoleProperty = "defaultAsset"
|
||||
SHARED_ASSET_AccountRoleProperty AccountRoleProperty = "sharedAsset"
|
||||
SAVING_ASSET_AccountRoleProperty AccountRoleProperty = "savingAsset"
|
||||
CC_ASSET_AccountRoleProperty AccountRoleProperty = "ccAsset"
|
||||
CASH_WALLET_ASSET_AccountRoleProperty AccountRoleProperty = "cashWalletAsset"
|
||||
NULL_AccountRoleProperty AccountRoleProperty = ""
|
||||
NULL_AccountRoleProperty AccountRoleProperty = ""
|
||||
)
|
||||
|
@ -7,15 +7,15 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountSearchFieldFilter string
|
||||
|
||||
// List of AccountSearchFieldFilter
|
||||
const (
|
||||
ALL_AccountSearchFieldFilter AccountSearchFieldFilter = "all"
|
||||
IBAN_AccountSearchFieldFilter AccountSearchFieldFilter = "iban"
|
||||
NAME_AccountSearchFieldFilter AccountSearchFieldFilter = "name"
|
||||
ALL_AccountSearchFieldFilter AccountSearchFieldFilter = "all"
|
||||
IBAN_AccountSearchFieldFilter AccountSearchFieldFilter = "iban"
|
||||
NAME_AccountSearchFieldFilter AccountSearchFieldFilter = "name"
|
||||
NUMBER_AccountSearchFieldFilter AccountSearchFieldFilter = "number"
|
||||
ID_AccountSearchFieldFilter AccountSearchFieldFilter = "id"
|
||||
ID_AccountSearchFieldFilter AccountSearchFieldFilter = "id"
|
||||
)
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountSingle struct {
|
||||
Data *AccountRead `json:"data"`
|
||||
|
@ -7,22 +7,23 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type AccountStore struct {
|
||||
Name string `json:"name"`
|
||||
Type_ *ShortAccountTypeProperty `json:"type"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Type_ *ShortAccountTypeProperty `json:"type"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
// Represents the opening balance, the initial amount this account holds.
|
||||
OpeningBalance string `json:"opening_balance,omitempty"`
|
||||
// Represents the date of the opening balance.
|
||||
OpeningBalanceDate time.Time `json:"opening_balance_date,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
@ -32,17 +33,17 @@ type AccountStore struct {
|
||||
// Order of the account
|
||||
Order int32 `json:"order,omitempty"`
|
||||
// If omitted, defaults to true.
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
// Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank.
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
LiabilityDirection *LiabilityDirectionProperty `json:"liability_direction,omitempty"`
|
||||
// Mandatory when type is liability. Interest percentage.
|
||||
Interest string `json:"interest,omitempty"`
|
||||
Interest string `json:"interest,omitempty"`
|
||||
InterestPeriod *InterestPeriodProperty `json:"interest_period,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// Latitude of the accounts's location, if applicable. Can be used to draw a map.
|
||||
Latitude float64 `json:"latitude,omitempty"`
|
||||
// Latitude of the accounts's location, if applicable. Can be used to draw a map.
|
||||
|
@ -7,31 +7,31 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountTypeFilter string
|
||||
|
||||
// List of AccountTypeFilter
|
||||
const (
|
||||
ALL_AccountTypeFilter AccountTypeFilter = "all"
|
||||
ASSET_AccountTypeFilter AccountTypeFilter = "asset"
|
||||
CASH_AccountTypeFilter AccountTypeFilter = "cash"
|
||||
EXPENSE_AccountTypeFilter AccountTypeFilter = "expense"
|
||||
REVENUE_AccountTypeFilter AccountTypeFilter = "revenue"
|
||||
SPECIAL_AccountTypeFilter AccountTypeFilter = "special"
|
||||
HIDDEN_AccountTypeFilter AccountTypeFilter = "hidden"
|
||||
LIABILITY_AccountTypeFilter AccountTypeFilter = "liability"
|
||||
LIABILITIES_AccountTypeFilter AccountTypeFilter = "liabilities"
|
||||
DEFAULT_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Default account"
|
||||
CASH_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Cash account"
|
||||
ASSET_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Asset account"
|
||||
EXPENSE_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Expense account"
|
||||
REVENUE_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Revenue account"
|
||||
ALL_AccountTypeFilter AccountTypeFilter = "all"
|
||||
ASSET_AccountTypeFilter AccountTypeFilter = "asset"
|
||||
CASH_AccountTypeFilter AccountTypeFilter = "cash"
|
||||
EXPENSE_AccountTypeFilter AccountTypeFilter = "expense"
|
||||
REVENUE_AccountTypeFilter AccountTypeFilter = "revenue"
|
||||
SPECIAL_AccountTypeFilter AccountTypeFilter = "special"
|
||||
HIDDEN_AccountTypeFilter AccountTypeFilter = "hidden"
|
||||
LIABILITY_AccountTypeFilter AccountTypeFilter = "liability"
|
||||
LIABILITIES_AccountTypeFilter AccountTypeFilter = "liabilities"
|
||||
DEFAULT_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Default account"
|
||||
CASH_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Cash account"
|
||||
ASSET_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Asset account"
|
||||
EXPENSE_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Expense account"
|
||||
REVENUE_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Revenue account"
|
||||
INITIAL_BALANCE_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Initial balance account"
|
||||
BENEFICIARY_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Beneficiary account"
|
||||
IMPORT_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Import account"
|
||||
RECONCILIATION_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Reconciliation account"
|
||||
LOAN_AccountTypeFilter AccountTypeFilter = "Loan"
|
||||
DEBT_AccountTypeFilter AccountTypeFilter = "Debt"
|
||||
MORTGAGE_AccountTypeFilter AccountTypeFilter = "Mortgage"
|
||||
BENEFICIARY_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Beneficiary account"
|
||||
IMPORT_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Import account"
|
||||
RECONCILIATION_ACCOUNT_AccountTypeFilter AccountTypeFilter = "Reconciliation account"
|
||||
LOAN_AccountTypeFilter AccountTypeFilter = "Loan"
|
||||
DEBT_AccountTypeFilter AccountTypeFilter = "Debt"
|
||||
MORTGAGE_AccountTypeFilter AccountTypeFilter = "Mortgage"
|
||||
)
|
||||
|
@ -7,22 +7,22 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AccountTypeProperty string
|
||||
|
||||
// List of AccountTypeProperty
|
||||
const (
|
||||
DEFAULT_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Default account"
|
||||
CASH_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Cash account"
|
||||
ASSET_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Asset account"
|
||||
EXPENSE_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Expense account"
|
||||
REVENUE_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Revenue account"
|
||||
DEFAULT_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Default account"
|
||||
CASH_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Cash account"
|
||||
ASSET_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Asset account"
|
||||
EXPENSE_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Expense account"
|
||||
REVENUE_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Revenue account"
|
||||
INITIAL_BALANCE_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Initial balance account"
|
||||
BENEFICIARY_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Beneficiary account"
|
||||
IMPORT_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Import account"
|
||||
RECONCILIATION_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Reconciliation account"
|
||||
LOAN_AccountTypeProperty AccountTypeProperty = "Loan"
|
||||
DEBT_AccountTypeProperty AccountTypeProperty = "Debt"
|
||||
MORTGAGE_AccountTypeProperty AccountTypeProperty = "Mortgage"
|
||||
BENEFICIARY_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Beneficiary account"
|
||||
IMPORT_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Import account"
|
||||
RECONCILIATION_ACCOUNT_AccountTypeProperty AccountTypeProperty = "Reconciliation account"
|
||||
LOAN_AccountTypeProperty AccountTypeProperty = "Loan"
|
||||
DEBT_AccountTypeProperty AccountTypeProperty = "Debt"
|
||||
MORTGAGE_AccountTypeProperty AccountTypeProperty = "Mortgage"
|
||||
)
|
||||
|
@ -7,19 +7,20 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type AccountUpdate struct {
|
||||
Name string `json:"name"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
OpeningBalance string `json:"opening_balance,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Iban string `json:"iban,omitempty"`
|
||||
Bic string `json:"bic,omitempty"`
|
||||
AccountNumber string `json:"account_number,omitempty"`
|
||||
OpeningBalance string `json:"opening_balance,omitempty"`
|
||||
OpeningBalanceDate time.Time `json:"opening_balance_date,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
VirtualBalance string `json:"virtual_balance,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
@ -29,16 +30,16 @@ type AccountUpdate struct {
|
||||
// Order of the account
|
||||
Order int32 `json:"order,omitempty"`
|
||||
// If omitted, defaults to true.
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
IncludeNetWorth bool `json:"include_net_worth,omitempty"`
|
||||
AccountRole *AccountRoleProperty `json:"account_role,omitempty"`
|
||||
CreditCardType *CreditCardTypeProperty `json:"credit_card_type,omitempty"`
|
||||
// Mandatory when the account_role is ccAsset. Moment at which CC payment installments are asked for by the bank.
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
MonthlyPaymentDate time.Time `json:"monthly_payment_date,omitempty"`
|
||||
LiabilityType *LiabilityTypeProperty `json:"liability_type,omitempty"`
|
||||
// Mandatory when type is liability. Interest percentage.
|
||||
Interest string `json:"interest,omitempty"`
|
||||
Interest string `json:"interest,omitempty"`
|
||||
InterestPeriod *InterestPeriodProperty `json:"interest_period,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// Latitude of the account'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.
|
||||
Latitude float64 `json:"latitude,omitempty"`
|
||||
// Latitude of the account'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.
|
||||
|
@ -7,16 +7,17 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// AttachableType : The object class to which the attachment must be linked.
|
||||
type AttachableType string
|
||||
|
||||
// List of AttachableType
|
||||
const (
|
||||
ACCOUNT_AttachableType AttachableType = "Account"
|
||||
BUDGET_AttachableType AttachableType = "Budget"
|
||||
BILL_AttachableType AttachableType = "Bill"
|
||||
ACCOUNT_AttachableType AttachableType = "Account"
|
||||
BUDGET_AttachableType AttachableType = "Budget"
|
||||
BILL_AttachableType AttachableType = "Bill"
|
||||
TRANSACTION_JOURNAL_AttachableType AttachableType = "TransactionJournal"
|
||||
PIGGY_BANK_AttachableType AttachableType = "PiggyBank"
|
||||
TAG_AttachableType AttachableType = "Tag"
|
||||
PIGGY_BANK_AttachableType AttachableType = "PiggyBank"
|
||||
TAG_AttachableType AttachableType = "Tag"
|
||||
)
|
||||
|
@ -7,24 +7,25 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Attachment struct {
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
AttachableType *AttachableType `json:"attachable_type"`
|
||||
// ID of the model this attachment is linked to.
|
||||
AttachableId string `json:"attachable_id"`
|
||||
// MD5 hash of the file for basic duplicate detection.
|
||||
Md5 string `json:"md5,omitempty"`
|
||||
Filename string `json:"filename"`
|
||||
Md5 string `json:"md5,omitempty"`
|
||||
Filename string `json:"filename"`
|
||||
DownloadUrl string `json:"download_url,omitempty"`
|
||||
UploadUrl string `json:"upload_url,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Mime string `json:"mime,omitempty"`
|
||||
Size int32 `json:"size,omitempty"`
|
||||
UploadUrl string `json:"upload_url,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Mime string `json:"mime,omitempty"`
|
||||
Size int32 `json:"size,omitempty"`
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AttachmentArray struct {
|
||||
Data []AttachmentRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,12 +7,12 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AttachmentRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Attachment `json:"attributes"`
|
||||
Links *ObjectLink `json:"links"`
|
||||
Links *ObjectLink `json:"links"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AttachmentSingle struct {
|
||||
Data *AttachmentRead `json:"data"`
|
||||
|
@ -7,13 +7,13 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AttachmentStore struct {
|
||||
Filename string `json:"filename"`
|
||||
Filename string `json:"filename"`
|
||||
AttachableType *AttachableType `json:"attachable_type"`
|
||||
// ID of the model this attachment is linked to.
|
||||
AttachableId string `json:"attachable_id"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
@ -7,10 +7,10 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AttachmentUpdate struct {
|
||||
Filename string `json:"filename,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Title string `json:"title,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
@ -7,17 +7,18 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// AutoBudgetPeriod : Period for the auto budget
|
||||
type AutoBudgetPeriod string
|
||||
|
||||
// List of AutoBudgetPeriod
|
||||
const (
|
||||
DAILY_AutoBudgetPeriod AutoBudgetPeriod = "daily"
|
||||
WEEKLY_AutoBudgetPeriod AutoBudgetPeriod = "weekly"
|
||||
MONTHLY_AutoBudgetPeriod AutoBudgetPeriod = "monthly"
|
||||
DAILY_AutoBudgetPeriod AutoBudgetPeriod = "daily"
|
||||
WEEKLY_AutoBudgetPeriod AutoBudgetPeriod = "weekly"
|
||||
MONTHLY_AutoBudgetPeriod AutoBudgetPeriod = "monthly"
|
||||
QUARTERLY_AutoBudgetPeriod AutoBudgetPeriod = "quarterly"
|
||||
HALF_YEAR_AutoBudgetPeriod AutoBudgetPeriod = "half-year"
|
||||
YEARLY_AutoBudgetPeriod AutoBudgetPeriod = "yearly"
|
||||
NULL_AutoBudgetPeriod AutoBudgetPeriod = ""
|
||||
YEARLY_AutoBudgetPeriod AutoBudgetPeriod = "yearly"
|
||||
NULL_AutoBudgetPeriod AutoBudgetPeriod = ""
|
||||
)
|
||||
|
@ -7,14 +7,15 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// AutoBudgetType : The type of auto-budget that Firefly III must create.
|
||||
type AutoBudgetType string
|
||||
|
||||
// List of AutoBudgetType
|
||||
const (
|
||||
RESET_AutoBudgetType AutoBudgetType = "reset"
|
||||
RESET_AutoBudgetType AutoBudgetType = "reset"
|
||||
ROLLOVER_AutoBudgetType AutoBudgetType = "rollover"
|
||||
NONE_AutoBudgetType AutoBudgetType = "none"
|
||||
NULL_AutoBudgetType AutoBudgetType = ""
|
||||
NONE_AutoBudgetType AutoBudgetType = "none"
|
||||
NULL_AutoBudgetType AutoBudgetType = ""
|
||||
)
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteAccount struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteBill struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteBudget struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteCategory struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,14 +7,14 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteCurrency struct {
|
||||
Id string `json:"id"`
|
||||
// Currency name.
|
||||
Name string `json:"name"`
|
||||
// Currency code.
|
||||
Code string `json:"code"`
|
||||
Symbol string `json:"symbol"`
|
||||
DecimalPlaces int32 `json:"decimal_places"`
|
||||
Code string `json:"code"`
|
||||
Symbol string `json:"symbol"`
|
||||
DecimalPlaces int32 `json:"decimal_places"`
|
||||
}
|
||||
|
@ -7,14 +7,14 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteCurrencyCode struct {
|
||||
Id string `json:"id"`
|
||||
// Currency name with the code between brackets.
|
||||
Name string `json:"name"`
|
||||
// Currency code.
|
||||
Code string `json:"code"`
|
||||
Symbol string `json:"symbol"`
|
||||
DecimalPlaces int32 `json:"decimal_places"`
|
||||
Code string `json:"code"`
|
||||
Symbol string `json:"symbol"`
|
||||
DecimalPlaces int32 `json:"decimal_places"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteObjectGroup struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompletePiggy struct {
|
||||
Id string `json:"id"`
|
||||
@ -16,11 +16,11 @@ type AutocompletePiggy struct {
|
||||
// Currency ID for this piggy bank.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Currency code for this piggy bank.
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Currency name for the currency used by this account.
|
||||
CurrencyName string `json:"currency_name,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
CurrencyName string `json:"currency_name,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
// The group ID of the group this object is part of. NULL if no group.
|
||||
ObjectGroupId string `json:"object_group_id,omitempty"`
|
||||
// The name of the group. NULL if no group.
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompletePiggyBalance struct {
|
||||
Id string `json:"id"`
|
||||
@ -18,9 +18,9 @@ type AutocompletePiggyBalance struct {
|
||||
// Currency ID for this piggy bank.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Currency code for this piggy bank.
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
// The group ID of the group this object is part of. NULL if no group.
|
||||
ObjectGroupId string `json:"object_group_id,omitempty"`
|
||||
// The name of the group. NULL if no group.
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteRecurrence struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteRule struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteRuleGroup struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteTag struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteTransaction struct {
|
||||
// The ID of a transaction journal (basically a single split).
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteTransactionId struct {
|
||||
// The ID of a transaction journal (basically a single split).
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AutocompleteTransactionType struct {
|
||||
Id string `json:"id"`
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -18,14 +19,14 @@ type AvailableBudget struct {
|
||||
// Use either currency_id or currency_code.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code.
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
Amount string `json:"amount"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
Amount string `json:"amount"`
|
||||
// Start date of the available budget.
|
||||
Start time.Time `json:"start"`
|
||||
// End date of the available budget.
|
||||
End time.Time `json:"end"`
|
||||
SpentInBudgets []BudgetSpent `json:"spent_in_budgets,omitempty"`
|
||||
End time.Time `json:"end"`
|
||||
SpentInBudgets []BudgetSpent `json:"spent_in_budgets,omitempty"`
|
||||
SpentOutsideBudget []BudgetSpent `json:"spent_outside_budget,omitempty"`
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AvailableBudgetArray struct {
|
||||
Data []AvailableBudgetRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AvailableBudgetRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *AvailableBudget `json:"attributes"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type AvailableBudgetSingle struct {
|
||||
Data *AvailableBudgetRead `json:"data"`
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BadRequestResponse struct {
|
||||
Message string `json:"message,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Exception string `json:"exception,omitempty"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BasicSummaryEntry struct {
|
||||
// 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.
|
||||
@ -17,8 +17,8 @@ type BasicSummaryEntry struct {
|
||||
// The amount as a float.
|
||||
MonetaryValue float64 `json:"monetary_value,omitempty"`
|
||||
// The currency ID of the associated currency.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Number of decimals for the associated currency.
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -18,24 +19,24 @@ type Bill struct {
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min"`
|
||||
AmountMax string `json:"amount_max"`
|
||||
Date time.Time `json:"date"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min"`
|
||||
AmountMax string `json:"amount_max"`
|
||||
Date time.Time `json:"date"`
|
||||
// The date after which this bill is no longer valid or applicable
|
||||
EndDate time.Time `json:"end_date,omitempty"`
|
||||
// The date before which the bill must be renewed (or cancelled)
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq"`
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq"`
|
||||
// How often the bill must be skipped. 1 means a bi-monthly bill.
|
||||
Skip int32 `json:"skip,omitempty"`
|
||||
// If the bill is active.
|
||||
Active bool `json:"active,omitempty"`
|
||||
// Order of the bill.
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// When the bill is expected to be due.
|
||||
NextExpectedMatch time.Time `json:"next_expected_match,omitempty"`
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BillArray struct {
|
||||
Data []BillRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BillRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Bill `json:"attributes"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Bill `json:"attributes"`
|
||||
}
|
||||
|
@ -7,15 +7,16 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// BillRepeatFrequency : How often the bill must be paid.
|
||||
type BillRepeatFrequency string
|
||||
|
||||
// List of BillRepeatFrequency
|
||||
const (
|
||||
WEEKLY_BillRepeatFrequency BillRepeatFrequency = "weekly"
|
||||
MONTHLY_BillRepeatFrequency BillRepeatFrequency = "monthly"
|
||||
WEEKLY_BillRepeatFrequency BillRepeatFrequency = "weekly"
|
||||
MONTHLY_BillRepeatFrequency BillRepeatFrequency = "monthly"
|
||||
QUARTERLY_BillRepeatFrequency BillRepeatFrequency = "quarterly"
|
||||
HALF_YEAR_BillRepeatFrequency BillRepeatFrequency = "half-year"
|
||||
YEARLY_BillRepeatFrequency BillRepeatFrequency = "yearly"
|
||||
YEARLY_BillRepeatFrequency BillRepeatFrequency = "yearly"
|
||||
)
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BillSingle struct {
|
||||
Data *BillRead `json:"data"`
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -16,21 +17,21 @@ type BillStore struct {
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min"`
|
||||
AmountMax string `json:"amount_max"`
|
||||
Date time.Time `json:"date"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min"`
|
||||
AmountMax string `json:"amount_max"`
|
||||
Date time.Time `json:"date"`
|
||||
// The date after which this bill is no longer valid or applicable
|
||||
EndDate time.Time `json:"end_date,omitempty"`
|
||||
// The date before which the bill must be renewed (or cancelled)
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq"`
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq"`
|
||||
// How often the bill must be skipped. 1 means a bi-monthly bill.
|
||||
Skip int32 `json:"skip,omitempty"`
|
||||
// If the bill is active.
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// The group ID of the group this object is part of. NULL if no group.
|
||||
ObjectGroupId string `json:"object_group_id,omitempty"`
|
||||
// The name of the group. NULL if no group.
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -16,21 +17,21 @@ type BillUpdate struct {
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min,omitempty"`
|
||||
AmountMax string `json:"amount_max,omitempty"`
|
||||
Date time.Time `json:"date,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
Name string `json:"name"`
|
||||
AmountMin string `json:"amount_min,omitempty"`
|
||||
AmountMax string `json:"amount_max,omitempty"`
|
||||
Date time.Time `json:"date,omitempty"`
|
||||
// The date after which this bill is no longer valid or applicable
|
||||
EndDate time.Time `json:"end_date,omitempty"`
|
||||
// The date before which the bill must be renewed (or cancelled)
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq,omitempty"`
|
||||
ExtensionDate time.Time `json:"extension_date,omitempty"`
|
||||
RepeatFreq *BillRepeatFrequency `json:"repeat_freq,omitempty"`
|
||||
// How often the bill must be skipped. 1 means a bi-monthly bill.
|
||||
Skip int32 `json:"skip,omitempty"`
|
||||
// If the bill is active.
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
// The group ID of the group this object is part of. NULL if no group.
|
||||
ObjectGroupId string `json:"object_group_id,omitempty"`
|
||||
// The name of the group. NULL if no group.
|
||||
|
@ -7,25 +7,26 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Budget struct {
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
AutoBudgetType *AutoBudgetType `json:"auto_budget_type,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyId string `json:"auto_budget_currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
// Information on how much was spent in this budget. Is only filled in when the start and end date are submitted.
|
||||
Spent []BudgetSpent `json:"spent,omitempty"`
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetArray struct {
|
||||
Data []BudgetRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -22,14 +23,14 @@ type BudgetLimit struct {
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyName string `json:"currency_name,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyName string `json:"currency_name,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
// The budget ID of the associated budget.
|
||||
BudgetId string `json:"budget_id"`
|
||||
// Period of the budget limit. Only used when auto-generated by auto-budget.
|
||||
Period string `json:"period,omitempty"`
|
||||
Amount string `json:"amount"`
|
||||
Spent string `json:"spent,omitempty"`
|
||||
Spent string `json:"spent,omitempty"`
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetLimitArray struct {
|
||||
Data []BudgetLimitRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetLimitRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *BudgetLimit `json:"attributes"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetLimitSingle struct {
|
||||
Data *BudgetLimitRead `json:"data"`
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetLimitStore struct {
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
@ -21,6 +21,6 @@ type BudgetLimitStore struct {
|
||||
// Period of the budget limit. Only used when auto-generated by auto-budget.
|
||||
Period string `json:"period,omitempty"`
|
||||
// End date of the budget limit.
|
||||
End string `json:"end"`
|
||||
End string `json:"end"`
|
||||
Amount string `json:"amount"`
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Budget `json:"attributes"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetSingle struct {
|
||||
Data *BudgetRead `json:"data"`
|
||||
|
@ -7,13 +7,13 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetSpent struct {
|
||||
// The amount spent.
|
||||
Sum string `json:"sum,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
Sum string `json:"sum,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Number of decimals supported by the currency
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
|
@ -7,18 +7,18 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetStore struct {
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
AutoBudgetType *AutoBudgetType `json:"auto_budget_type,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyId string `json:"auto_budget_currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
}
|
||||
|
@ -7,18 +7,18 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type BudgetUpdate struct {
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Active bool `json:"active,omitempty"`
|
||||
Order int32 `json:"order,omitempty"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
AutoBudgetType *AutoBudgetType `json:"auto_budget_type,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyId string `json:"auto_budget_currency_id,omitempty"`
|
||||
// Use either currency_id or currency_code. Defaults to the user's default currency.
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
AutoBudgetCurrencyCode string `json:"auto_budget_currency_code,omitempty"`
|
||||
AutoBudgetAmount string `json:"auto_budget_amount,omitempty"`
|
||||
AutoBudgetPeriod *AutoBudgetPeriod `json:"auto_budget_period,omitempty"`
|
||||
}
|
||||
|
@ -7,16 +7,17 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type Category struct {
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Spent []CategorySpent `json:"spent,omitempty"`
|
||||
Earned []CategoryEarned `json:"earned,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
Spent []CategorySpent `json:"spent,omitempty"`
|
||||
Earned []CategoryEarned `json:"earned,omitempty"`
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategoryArray struct {
|
||||
Data []CategoryRead `json:"data"`
|
||||
Meta *Meta `json:"meta"`
|
||||
Meta *Meta `json:"meta"`
|
||||
}
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategoryEarned struct {
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Number of decimals supported by the currency
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategoryRead struct {
|
||||
// Immutable value
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Type_ string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
Attributes *Category `json:"attributes"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategorySingle struct {
|
||||
Data *CategoryRead `json:"data"`
|
||||
|
@ -7,11 +7,11 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategorySpent struct {
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Number of decimals supported by the currency
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
|
@ -7,9 +7,9 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type CategoryUpdate struct {
|
||||
Name string `json:"name"`
|
||||
Name string `json:"name"`
|
||||
Notes string `json:"notes,omitempty"`
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type ChartDataPoint struct {
|
||||
// The key is the label of the value, so for example: '2018-01-01' => 13 or 'Groceries' => -123.
|
||||
|
@ -7,7 +7,8 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
@ -16,13 +17,13 @@ type ChartDataSet struct {
|
||||
// This is the title of the current set. It can refer to an account, a budget or another object (by name).
|
||||
Label string `json:"label,omitempty"`
|
||||
// The currency ID of the currency associated to the data in the entries.
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencyId string `json:"currency_id,omitempty"`
|
||||
CurrencyCode string `json:"currency_code,omitempty"`
|
||||
CurrencySymbol string `json:"currency_symbol,omitempty"`
|
||||
// Number of decimals for the currency associated to the data in the entries.
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
StartDate time.Time `json:"start_date,omitempty"`
|
||||
EndDate time.Time `json:"end_date,omitempty"`
|
||||
CurrencyDecimalPlaces int32 `json:"currency_decimal_places,omitempty"`
|
||||
StartDate time.Time `json:"start_date,omitempty"`
|
||||
EndDate time.Time `json:"end_date,omitempty"`
|
||||
// Indicated the type of chart that is expected to be rendered. You can safely ignore this if you want.
|
||||
Type_ string `json:"type,omitempty"`
|
||||
// Used to indicate the Y axis for this data set. Is usually between 0 and 1 (left and right side of the chart).
|
||||
|
@ -7,29 +7,30 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
// ConfigValueFilter : Title of the configuration value.
|
||||
type ConfigValueFilter string
|
||||
|
||||
// List of ConfigValueFilter
|
||||
const (
|
||||
CONFIGURATIONIS_DEMO_SITE_ConfigValueFilter ConfigValueFilter = "configuration.is_demo_site"
|
||||
CONFIGURATIONIS_DEMO_SITE_ConfigValueFilter ConfigValueFilter = "configuration.is_demo_site"
|
||||
CONFIGURATIONPERMISSION_UPDATE_CHECK_ConfigValueFilter ConfigValueFilter = "configuration.permission_update_check"
|
||||
CONFIGURATIONLAST_UPDATE_CHECK_ConfigValueFilter ConfigValueFilter = "configuration.last_update_check"
|
||||
CONFIGURATIONSINGLE_USER_MODE_ConfigValueFilter ConfigValueFilter = "configuration.single_user_mode"
|
||||
FIREFLYVERSION_ConfigValueFilter ConfigValueFilter = "firefly.version"
|
||||
FIREFLYAPI_VERSION_ConfigValueFilter ConfigValueFilter = "firefly.api_version"
|
||||
FIREFLYDEFAULT_LOCATION_ConfigValueFilter ConfigValueFilter = "firefly.default_location"
|
||||
FIREFLYACCOUNT_TO_TRANSACTION_ConfigValueFilter ConfigValueFilter = "firefly.account_to_transaction"
|
||||
FIREFLYALLOWED_OPPOSING_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.allowed_opposing_types"
|
||||
FIREFLYACCOUNT_ROLES_ConfigValueFilter ConfigValueFilter = "firefly.accountRoles"
|
||||
FIREFLYVALID_LIABILITIES_ConfigValueFilter ConfigValueFilter = "firefly.valid_liabilities"
|
||||
FIREFLYINTEREST_PERIODS_ConfigValueFilter ConfigValueFilter = "firefly.interest_periods"
|
||||
FIREFLYENABLE_EXTERNAL_MAP_ConfigValueFilter ConfigValueFilter = "firefly.enable_external_map"
|
||||
FIREFLYEXPECTED_SOURCE_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.expected_source_types"
|
||||
APPTIMEZONE_ConfigValueFilter ConfigValueFilter = "app.timezone"
|
||||
FIREFLYBILL_PERIODS_ConfigValueFilter ConfigValueFilter = "firefly.bill_periods"
|
||||
FIREFLYCREDIT_CARD_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.credit_card_types"
|
||||
FIREFLYLANGUAGES_ConfigValueFilter ConfigValueFilter = "firefly.languages"
|
||||
FIREFLYVALID_VIEW_RANGES_ConfigValueFilter ConfigValueFilter = "firefly.valid_view_ranges"
|
||||
CONFIGURATIONLAST_UPDATE_CHECK_ConfigValueFilter ConfigValueFilter = "configuration.last_update_check"
|
||||
CONFIGURATIONSINGLE_USER_MODE_ConfigValueFilter ConfigValueFilter = "configuration.single_user_mode"
|
||||
FIREFLYVERSION_ConfigValueFilter ConfigValueFilter = "firefly.version"
|
||||
FIREFLYAPI_VERSION_ConfigValueFilter ConfigValueFilter = "firefly.api_version"
|
||||
FIREFLYDEFAULT_LOCATION_ConfigValueFilter ConfigValueFilter = "firefly.default_location"
|
||||
FIREFLYACCOUNT_TO_TRANSACTION_ConfigValueFilter ConfigValueFilter = "firefly.account_to_transaction"
|
||||
FIREFLYALLOWED_OPPOSING_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.allowed_opposing_types"
|
||||
FIREFLYACCOUNT_ROLES_ConfigValueFilter ConfigValueFilter = "firefly.accountRoles"
|
||||
FIREFLYVALID_LIABILITIES_ConfigValueFilter ConfigValueFilter = "firefly.valid_liabilities"
|
||||
FIREFLYINTEREST_PERIODS_ConfigValueFilter ConfigValueFilter = "firefly.interest_periods"
|
||||
FIREFLYENABLE_EXTERNAL_MAP_ConfigValueFilter ConfigValueFilter = "firefly.enable_external_map"
|
||||
FIREFLYEXPECTED_SOURCE_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.expected_source_types"
|
||||
APPTIMEZONE_ConfigValueFilter ConfigValueFilter = "app.timezone"
|
||||
FIREFLYBILL_PERIODS_ConfigValueFilter ConfigValueFilter = "firefly.bill_periods"
|
||||
FIREFLYCREDIT_CARD_TYPES_ConfigValueFilter ConfigValueFilter = "firefly.credit_card_types"
|
||||
FIREFLYLANGUAGES_ConfigValueFilter ConfigValueFilter = "firefly.languages"
|
||||
FIREFLYVALID_VIEW_RANGES_ConfigValueFilter ConfigValueFilter = "firefly.valid_view_ranges"
|
||||
)
|
||||
|
@ -7,14 +7,14 @@
|
||||
* Contact: james@firefly-iii.org
|
||||
* Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
|
||||
*/
|
||||
package swagger
|
||||
package firefly3
|
||||
|
||||
type ConfigValueUpdateFilter string
|
||||
|
||||
// List of ConfigValueUpdateFilter
|
||||
const (
|
||||
IS_DEMO_SITE_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.is_demo_site"
|
||||
IS_DEMO_SITE_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.is_demo_site"
|
||||
PERMISSION_UPDATE_CHECK_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.permission_update_check"
|
||||
LAST_UPDATE_CHECK_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.last_update_check"
|
||||
SINGLE_USER_MODE_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.single_user_mode"
|
||||
LAST_UPDATE_CHECK_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.last_update_check"
|
||||
SINGLE_USER_MODE_ConfigValueUpdateFilter ConfigValueUpdateFilter = "configuration.single_user_mode"
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user