Files
stack/releases/sdks/go/pkg/models/shared/v2walletwithbalances.go

84 lines
1.6 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 Balances struct {
Main V2AssetHolder `json:"main"`
}
func (o *Balances) GetMain() V2AssetHolder {
if o == nil {
return V2AssetHolder{}
}
return o.Main
}
type V2WalletWithBalances struct {
Balances Balances `json:"balances"`
CreatedAt time.Time `json:"createdAt"`
// The unique ID of the wallet.
ID string `json:"id"`
Ledger string `json:"ledger"`
// Metadata associated with the wallet.
Metadata map[string]string `json:"metadata"`
Name string `json:"name"`
}
func (v V2WalletWithBalances) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(v, "", false)
}
func (v *V2WalletWithBalances) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
return err
}
return nil
}
func (o *V2WalletWithBalances) GetBalances() Balances {
if o == nil {
return Balances{}
}
return o.Balances
}
func (o *V2WalletWithBalances) GetCreatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.CreatedAt
}
func (o *V2WalletWithBalances) GetID() string {
if o == nil {
return ""
}
return o.ID
}
func (o *V2WalletWithBalances) GetLedger() string {
if o == nil {
return ""
}
return o.Ledger
}
func (o *V2WalletWithBalances) GetMetadata() map[string]string {
if o == nil {
return map[string]string{}
}
return o.Metadata
}
func (o *V2WalletWithBalances) GetName() string {
if o == nil {
return ""
}
return o.Name
}