Files
Paul NicolasandGitHub 1835b89c14 feat(pools): EN-488 add related accounts when fetching pool balances (#595)
* feat(pools): add related accounts when fetching pool balances

* feat(openapi): add related account when fetching pool balances

* feat(tests): add more tests

* feat(e2e): add tests for related accounts

* fix(openapi): fix missing related accounts for v1
2025-11-20 09:32:06 +00:00

47 lines
926 B
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/formancehq/payments/pkg/client/internal/utils"
"math/big"
)
type V3PoolBalance struct {
Asset string `json:"asset"`
Amount *big.Int `json:"amount"`
RelatedAccounts []string `json:"relatedAccounts,omitempty"`
}
func (v V3PoolBalance) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(v, "", false)
}
func (v *V3PoolBalance) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
return err
}
return nil
}
func (o *V3PoolBalance) GetAsset() string {
if o == nil {
return ""
}
return o.Asset
}
func (o *V3PoolBalance) GetAmount() *big.Int {
if o == nil {
return big.NewInt(0)
}
return o.Amount
}
func (o *V3PoolBalance) GetRelatedAccounts() []string {
if o == nil {
return nil
}
return o.RelatedAccounts
}