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
926 B
Go
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
|
|
}
|