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
914 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 PoolBalance struct {
Amount *big.Int `json:"amount"`
Asset string `json:"asset"`
RelatedAccounts []string `json:"relatedAccounts,omitempty"`
}
func (p PoolBalance) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PoolBalance) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PoolBalance) GetAmount() *big.Int {
if o == nil {
return big.NewInt(0)
}
return o.Amount
}
func (o *PoolBalance) GetAsset() string {
if o == nil {
return ""
}
return o.Asset
}
func (o *PoolBalance) GetRelatedAccounts() []string {
if o == nil {
return nil
}
return o.RelatedAccounts
}