mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
Co-authored-by: Maxence Maireaux <[email protected]> Co-authored-by: David Ragot <[email protected]>
147 lines
3.4 KiB
Go
147 lines
3.4 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/pkg/models/shared"
|
|
"github.com/formancehq/formance-sdk-go/pkg/utils"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
type GetAccountBalancesRequest struct {
|
|
// The account ID.
|
|
AccountID string `pathParam:"style=simple,explode=false,name=accountId"`
|
|
// Filter balances by currency.
|
|
// If not specified, all account's balances will be returned.
|
|
//
|
|
Asset *string `queryParam:"style=form,explode=true,name=asset"`
|
|
// Parameter used in pagination requests. Maximum page size is set to 15.
|
|
// Set to the value of next for the next page of results.
|
|
// Set to the value of previous for the previous page of results.
|
|
// No other parameters can be set when this parameter is set.
|
|
//
|
|
Cursor *string `queryParam:"style=form,explode=true,name=cursor"`
|
|
// Filter balances by date.
|
|
// If not specified, all account's balances will be returned.
|
|
//
|
|
From *time.Time `queryParam:"style=form,explode=true,name=from"`
|
|
// The maximum number of results to return per page.
|
|
Limit *int64 `queryParam:"style=form,explode=true,name=limit"`
|
|
// The maximum number of results to return per page.
|
|
//
|
|
PageSize *int64 `default:"15" queryParam:"style=form,explode=true,name=pageSize"`
|
|
// Fields used to sort payments (default is date:desc).
|
|
Sort []string `queryParam:"style=form,explode=true,name=sort"`
|
|
// Filter balances by date.
|
|
// If not specified, default will be set to now.
|
|
//
|
|
To *time.Time `queryParam:"style=form,explode=true,name=to"`
|
|
}
|
|
|
|
func (g GetAccountBalancesRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(g, "", false)
|
|
}
|
|
|
|
func (g *GetAccountBalancesRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &g, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetAccountID() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.AccountID
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetAsset() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Asset
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetCursor() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Cursor
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetFrom() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.From
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetLimit() *int64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Limit
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetPageSize() *int64 {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.PageSize
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetSort() []string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Sort
|
|
}
|
|
|
|
func (o *GetAccountBalancesRequest) GetTo() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.To
|
|
}
|
|
|
|
type GetAccountBalancesResponse struct {
|
|
// OK
|
|
BalancesCursor *shared.BalancesCursor
|
|
// HTTP response content type for this operation
|
|
ContentType string
|
|
// HTTP response status code for this operation
|
|
StatusCode int
|
|
// Raw HTTP response; suitable for custom response parsing
|
|
RawResponse *http.Response
|
|
}
|
|
|
|
func (o *GetAccountBalancesResponse) GetBalancesCursor() *shared.BalancesCursor {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.BalancesCursor
|
|
}
|
|
|
|
func (o *GetAccountBalancesResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *GetAccountBalancesResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *GetAccountBalancesResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|