mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
55 lines
1.1 KiB
Go
55 lines
1.1 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package shared
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
|
|
"time"
|
|
)
|
|
|
|
type TransactionData struct {
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
Postings []Posting `json:"postings"`
|
|
Reference *string `json:"reference,omitempty"`
|
|
Timestamp *time.Time `json:"timestamp,omitempty"`
|
|
}
|
|
|
|
func (t TransactionData) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(t, "", false)
|
|
}
|
|
|
|
func (t *TransactionData) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &t, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *TransactionData) GetMetadata() map[string]interface{} {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
func (o *TransactionData) GetPostings() []Posting {
|
|
if o == nil {
|
|
return []Posting{}
|
|
}
|
|
return o.Postings
|
|
}
|
|
|
|
func (o *TransactionData) GetReference() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Reference
|
|
}
|
|
|
|
func (o *TransactionData) GetTimestamp() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Timestamp
|
|
}
|