Documentation ¶
Index ¶
- type Client
- type ClientOption
- type ClientService
- type CreateTransactionBadRequest
- func (o *CreateTransactionBadRequest) Code() int
- func (o *CreateTransactionBadRequest) Error() string
- func (o *CreateTransactionBadRequest) GetPayload() *models.ErrorResponse
- func (o *CreateTransactionBadRequest) IsClientError() bool
- func (o *CreateTransactionBadRequest) IsCode(code int) bool
- func (o *CreateTransactionBadRequest) IsRedirect() bool
- func (o *CreateTransactionBadRequest) IsServerError() bool
- func (o *CreateTransactionBadRequest) IsSuccess() bool
- func (o *CreateTransactionBadRequest) String() string
- type CreateTransactionConflict
- func (o *CreateTransactionConflict) Code() int
- func (o *CreateTransactionConflict) Error() string
- func (o *CreateTransactionConflict) GetPayload() *models.ErrorResponse
- func (o *CreateTransactionConflict) IsClientError() bool
- func (o *CreateTransactionConflict) IsCode(code int) bool
- func (o *CreateTransactionConflict) IsRedirect() bool
- func (o *CreateTransactionConflict) IsServerError() bool
- func (o *CreateTransactionConflict) IsSuccess() bool
- func (o *CreateTransactionConflict) String() string
- type CreateTransactionCreated
- func (o *CreateTransactionCreated) Code() int
- func (o *CreateTransactionCreated) Error() string
- func (o *CreateTransactionCreated) GetPayload() *models.SaveTransactionsResponse
- func (o *CreateTransactionCreated) IsClientError() bool
- func (o *CreateTransactionCreated) IsCode(code int) bool
- func (o *CreateTransactionCreated) IsRedirect() bool
- func (o *CreateTransactionCreated) IsServerError() bool
- func (o *CreateTransactionCreated) IsSuccess() bool
- func (o *CreateTransactionCreated) String() string
- type CreateTransactionParams
- func NewCreateTransactionParams() *CreateTransactionParams
- func NewCreateTransactionParamsWithContext(ctx context.Context) *CreateTransactionParams
- func NewCreateTransactionParamsWithHTTPClient(client *http.Client) *CreateTransactionParams
- func NewCreateTransactionParamsWithTimeout(timeout time.Duration) *CreateTransactionParams
- func (o *CreateTransactionParams) SetBudgetID(budgetID string)
- func (o *CreateTransactionParams) SetContext(ctx context.Context)
- func (o *CreateTransactionParams) SetData(data *models.PostTransactionsWrapper)
- func (o *CreateTransactionParams) SetDefaults()
- func (o *CreateTransactionParams) SetHTTPClient(client *http.Client)
- func (o *CreateTransactionParams) SetTimeout(timeout time.Duration)
- func (o *CreateTransactionParams) WithBudgetID(budgetID string) *CreateTransactionParams
- func (o *CreateTransactionParams) WithContext(ctx context.Context) *CreateTransactionParams
- func (o *CreateTransactionParams) WithData(data *models.PostTransactionsWrapper) *CreateTransactionParams
- func (o *CreateTransactionParams) WithDefaults() *CreateTransactionParams
- func (o *CreateTransactionParams) WithHTTPClient(client *http.Client) *CreateTransactionParams
- func (o *CreateTransactionParams) WithTimeout(timeout time.Duration) *CreateTransactionParams
- func (o *CreateTransactionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateTransactionReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for transactions API
func (*Client) CreateTransaction ¶
func (a *Client) CreateTransaction(params *CreateTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTransactionCreated, error)
CreateTransaction creates a single transaction or multiple transactions
Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { CreateTransaction(params *CreateTransactionParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*CreateTransactionCreated, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new transactions API client.
type CreateTransactionBadRequest ¶
type CreateTransactionBadRequest struct {
Payload *models.ErrorResponse
}
CreateTransactionBadRequest describes a response with status code 400, with default header values.
The request could not be understood due to malformed syntax or validation error(s).
func NewCreateTransactionBadRequest ¶
func NewCreateTransactionBadRequest() *CreateTransactionBadRequest
NewCreateTransactionBadRequest creates a CreateTransactionBadRequest with default headers values
func (*CreateTransactionBadRequest) Code ¶
func (o *CreateTransactionBadRequest) Code() int
Code gets the status code for the create transaction bad request response
func (*CreateTransactionBadRequest) Error ¶
func (o *CreateTransactionBadRequest) Error() string
func (*CreateTransactionBadRequest) GetPayload ¶
func (o *CreateTransactionBadRequest) GetPayload() *models.ErrorResponse
func (*CreateTransactionBadRequest) IsClientError ¶
func (o *CreateTransactionBadRequest) IsClientError() bool
IsClientError returns true when this create transaction bad request response has a 4xx status code
func (*CreateTransactionBadRequest) IsCode ¶
func (o *CreateTransactionBadRequest) IsCode(code int) bool
IsCode returns true when this create transaction bad request response a status code equal to that given
func (*CreateTransactionBadRequest) IsRedirect ¶
func (o *CreateTransactionBadRequest) IsRedirect() bool
IsRedirect returns true when this create transaction bad request response has a 3xx status code
func (*CreateTransactionBadRequest) IsServerError ¶
func (o *CreateTransactionBadRequest) IsServerError() bool
IsServerError returns true when this create transaction bad request response has a 5xx status code
func (*CreateTransactionBadRequest) IsSuccess ¶
func (o *CreateTransactionBadRequest) IsSuccess() bool
IsSuccess returns true when this create transaction bad request response has a 2xx status code
func (*CreateTransactionBadRequest) String ¶
func (o *CreateTransactionBadRequest) String() string
type CreateTransactionConflict ¶
type CreateTransactionConflict struct {
Payload *models.ErrorResponse
}
CreateTransactionConflict describes a response with status code 409, with default header values.
A transaction on the same account with the same `import_id` already exists.
func NewCreateTransactionConflict ¶
func NewCreateTransactionConflict() *CreateTransactionConflict
NewCreateTransactionConflict creates a CreateTransactionConflict with default headers values
func (*CreateTransactionConflict) Code ¶
func (o *CreateTransactionConflict) Code() int
Code gets the status code for the create transaction conflict response
func (*CreateTransactionConflict) Error ¶
func (o *CreateTransactionConflict) Error() string
func (*CreateTransactionConflict) GetPayload ¶
func (o *CreateTransactionConflict) GetPayload() *models.ErrorResponse
func (*CreateTransactionConflict) IsClientError ¶
func (o *CreateTransactionConflict) IsClientError() bool
IsClientError returns true when this create transaction conflict response has a 4xx status code
func (*CreateTransactionConflict) IsCode ¶
func (o *CreateTransactionConflict) IsCode(code int) bool
IsCode returns true when this create transaction conflict response a status code equal to that given
func (*CreateTransactionConflict) IsRedirect ¶
func (o *CreateTransactionConflict) IsRedirect() bool
IsRedirect returns true when this create transaction conflict response has a 3xx status code
func (*CreateTransactionConflict) IsServerError ¶
func (o *CreateTransactionConflict) IsServerError() bool
IsServerError returns true when this create transaction conflict response has a 5xx status code
func (*CreateTransactionConflict) IsSuccess ¶
func (o *CreateTransactionConflict) IsSuccess() bool
IsSuccess returns true when this create transaction conflict response has a 2xx status code
func (*CreateTransactionConflict) String ¶
func (o *CreateTransactionConflict) String() string
type CreateTransactionCreated ¶
type CreateTransactionCreated struct {
Payload *models.SaveTransactionsResponse
}
CreateTransactionCreated describes a response with status code 201, with default header values.
The transaction or transactions were successfully created
func NewCreateTransactionCreated ¶
func NewCreateTransactionCreated() *CreateTransactionCreated
NewCreateTransactionCreated creates a CreateTransactionCreated with default headers values
func (*CreateTransactionCreated) Code ¶
func (o *CreateTransactionCreated) Code() int
Code gets the status code for the create transaction created response
func (*CreateTransactionCreated) Error ¶
func (o *CreateTransactionCreated) Error() string
func (*CreateTransactionCreated) GetPayload ¶
func (o *CreateTransactionCreated) GetPayload() *models.SaveTransactionsResponse
func (*CreateTransactionCreated) IsClientError ¶
func (o *CreateTransactionCreated) IsClientError() bool
IsClientError returns true when this create transaction created response has a 4xx status code
func (*CreateTransactionCreated) IsCode ¶
func (o *CreateTransactionCreated) IsCode(code int) bool
IsCode returns true when this create transaction created response a status code equal to that given
func (*CreateTransactionCreated) IsRedirect ¶
func (o *CreateTransactionCreated) IsRedirect() bool
IsRedirect returns true when this create transaction created response has a 3xx status code
func (*CreateTransactionCreated) IsServerError ¶
func (o *CreateTransactionCreated) IsServerError() bool
IsServerError returns true when this create transaction created response has a 5xx status code
func (*CreateTransactionCreated) IsSuccess ¶
func (o *CreateTransactionCreated) IsSuccess() bool
IsSuccess returns true when this create transaction created response has a 2xx status code
func (*CreateTransactionCreated) String ¶
func (o *CreateTransactionCreated) String() string
type CreateTransactionParams ¶
type CreateTransactionParams struct { /* BudgetID. The id of the budget. "last-used" can be used to specify the last used budget and "default" can be used if default budget selection is enabled (see: https://api.youneedabudget.com/#oauth-default-budget). */ BudgetID string /* Data. The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects. */ Data *models.PostTransactionsWrapper Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
CreateTransactionParams contains all the parameters to send to the API endpoint
for the create transaction operation. Typically these are written to a http.Request.
func NewCreateTransactionParams ¶
func NewCreateTransactionParams() *CreateTransactionParams
NewCreateTransactionParams creates a new CreateTransactionParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewCreateTransactionParamsWithContext ¶
func NewCreateTransactionParamsWithContext(ctx context.Context) *CreateTransactionParams
NewCreateTransactionParamsWithContext creates a new CreateTransactionParams object with the ability to set a context for a request.
func NewCreateTransactionParamsWithHTTPClient ¶
func NewCreateTransactionParamsWithHTTPClient(client *http.Client) *CreateTransactionParams
NewCreateTransactionParamsWithHTTPClient creates a new CreateTransactionParams object with the ability to set a custom HTTPClient for a request.
func NewCreateTransactionParamsWithTimeout ¶
func NewCreateTransactionParamsWithTimeout(timeout time.Duration) *CreateTransactionParams
NewCreateTransactionParamsWithTimeout creates a new CreateTransactionParams object with the ability to set a timeout on a request.
func (*CreateTransactionParams) SetBudgetID ¶
func (o *CreateTransactionParams) SetBudgetID(budgetID string)
SetBudgetID adds the budgetId to the create transaction params
func (*CreateTransactionParams) SetContext ¶
func (o *CreateTransactionParams) SetContext(ctx context.Context)
SetContext adds the context to the create transaction params
func (*CreateTransactionParams) SetData ¶
func (o *CreateTransactionParams) SetData(data *models.PostTransactionsWrapper)
SetData adds the data to the create transaction params
func (*CreateTransactionParams) SetDefaults ¶
func (o *CreateTransactionParams) SetDefaults()
SetDefaults hydrates default values in the create transaction params (not the query body).
All values with no default are reset to their zero value.
func (*CreateTransactionParams) SetHTTPClient ¶
func (o *CreateTransactionParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the create transaction params
func (*CreateTransactionParams) SetTimeout ¶
func (o *CreateTransactionParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the create transaction params
func (*CreateTransactionParams) WithBudgetID ¶
func (o *CreateTransactionParams) WithBudgetID(budgetID string) *CreateTransactionParams
WithBudgetID adds the budgetID to the create transaction params
func (*CreateTransactionParams) WithContext ¶
func (o *CreateTransactionParams) WithContext(ctx context.Context) *CreateTransactionParams
WithContext adds the context to the create transaction params
func (*CreateTransactionParams) WithData ¶
func (o *CreateTransactionParams) WithData(data *models.PostTransactionsWrapper) *CreateTransactionParams
WithData adds the data to the create transaction params
func (*CreateTransactionParams) WithDefaults ¶
func (o *CreateTransactionParams) WithDefaults() *CreateTransactionParams
WithDefaults hydrates default values in the create transaction params (not the query body).
All values with no default are reset to their zero value.
func (*CreateTransactionParams) WithHTTPClient ¶
func (o *CreateTransactionParams) WithHTTPClient(client *http.Client) *CreateTransactionParams
WithHTTPClient adds the HTTPClient to the create transaction params
func (*CreateTransactionParams) WithTimeout ¶
func (o *CreateTransactionParams) WithTimeout(timeout time.Duration) *CreateTransactionParams
WithTimeout adds the timeout to the create transaction params
func (*CreateTransactionParams) WriteToRequest ¶
func (o *CreateTransactionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type CreateTransactionReader ¶
type CreateTransactionReader struct {
// contains filtered or unexported fields
}
CreateTransactionReader is a Reader for the CreateTransaction structure.
func (*CreateTransactionReader) ReadResponse ¶
func (o *CreateTransactionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.