mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
55 lines
973 B
Go
55 lines
973 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 Posting struct {
|
|
Amount *big.Int `json:"amount"`
|
|
Asset string `json:"asset"`
|
|
Destination string `json:"destination"`
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
func (p Posting) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(p, "", false)
|
|
}
|
|
|
|
func (p *Posting) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *Posting) GetAmount() *big.Int {
|
|
if o == nil {
|
|
return big.NewInt(0)
|
|
}
|
|
return o.Amount
|
|
}
|
|
|
|
func (o *Posting) GetAsset() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Asset
|
|
}
|
|
|
|
func (o *Posting) GetDestination() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Destination
|
|
}
|
|
|
|
func (o *Posting) GetSource() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Source
|
|
}
|