mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
41 lines
781 B
Go
41 lines
781 B
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package shared
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
|
|
"math/big"
|
|
)
|
|
|
|
type V2Monetary struct {
|
|
// The amount of the monetary value.
|
|
Amount *big.Int `json:"amount"`
|
|
// The asset of the monetary value.
|
|
Asset string `json:"asset"`
|
|
}
|
|
|
|
func (v V2Monetary) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(v, "", false)
|
|
}
|
|
|
|
func (v *V2Monetary) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V2Monetary) GetAmount() *big.Int {
|
|
if o == nil {
|
|
return big.NewInt(0)
|
|
}
|
|
return o.Amount
|
|
}
|
|
|
|
func (o *V2Monetary) GetAsset() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Asset
|
|
}
|