mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
142 lines
3.8 KiB
Go
142 lines
3.8 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
// Metadata - Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below.
|
|
type Metadata struct {
|
|
}
|
|
|
|
type CountTransactionsRequest struct {
|
|
// Filter transactions with postings involving given account, either as source or destination (regular expression placed between ^ and $).
|
|
Account *string `queryParam:"style=form,explode=true,name=account"`
|
|
// Filter transactions with postings involving given account at destination (regular expression placed between ^ and $).
|
|
Destination *string `queryParam:"style=form,explode=true,name=destination"`
|
|
// Filter transactions that occurred before this timestamp.
|
|
// The format is RFC3339 and is exclusive (for example, "2023-01-02T15:04:01Z" excludes the first second of 4th minute).
|
|
//
|
|
EndTime *time.Time `queryParam:"style=form,explode=true,name=endTime"`
|
|
// Name of the ledger.
|
|
Ledger string `pathParam:"style=simple,explode=false,name=ledger"`
|
|
// Filter transactions by metadata key value pairs. Nested objects can be used as seen in the example below.
|
|
Metadata *Metadata `queryParam:"style=deepObject,explode=true,name=metadata"`
|
|
// Filter transactions by reference field.
|
|
Reference *string `queryParam:"style=form,explode=true,name=reference"`
|
|
// Filter transactions with postings involving given account at source (regular expression placed between ^ and $).
|
|
Source *string `queryParam:"style=form,explode=true,name=source"`
|
|
// Filter transactions that occurred after this timestamp.
|
|
// The format is RFC3339 and is inclusive (for example, "2023-01-02T15:04:01Z" includes the first second of 4th minute).
|
|
//
|
|
StartTime *time.Time `queryParam:"style=form,explode=true,name=startTime"`
|
|
}
|
|
|
|
func (c CountTransactionsRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(c, "", false)
|
|
}
|
|
|
|
func (c *CountTransactionsRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &c, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetAccount() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Account
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetDestination() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Destination
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetEndTime() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.EndTime
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetLedger() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Ledger
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetMetadata() *Metadata {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetReference() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Reference
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetSource() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Source
|
|
}
|
|
|
|
func (o *CountTransactionsRequest) GetStartTime() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.StartTime
|
|
}
|
|
|
|
type CountTransactionsResponse struct {
|
|
// HTTP response content type for this operation
|
|
ContentType string
|
|
Headers map[string][]string
|
|
// HTTP response status code for this operation
|
|
StatusCode int
|
|
// Raw HTTP response; suitable for custom response parsing
|
|
RawResponse *http.Response
|
|
}
|
|
|
|
func (o *CountTransactionsResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *CountTransactionsResponse) GetHeaders() map[string][]string {
|
|
if o == nil {
|
|
return map[string][]string{}
|
|
}
|
|
return o.Headers
|
|
}
|
|
|
|
func (o *CountTransactionsResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *CountTransactionsResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|