mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* 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
47 lines
914 B
Go
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
|
|
}
|