mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
73 lines
1.5 KiB
Go
73 lines
1.5 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package shared
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
|
|
"time"
|
|
)
|
|
|
|
type V2CreditWalletRequest struct {
|
|
Amount V2Monetary `json:"amount"`
|
|
// The balance to credit
|
|
Balance *string `json:"balance,omitempty"`
|
|
// Metadata associated with the wallet.
|
|
Metadata map[string]string `json:"metadata"`
|
|
Reference *string `json:"reference,omitempty"`
|
|
Sources []V2Subject `json:"sources"`
|
|
Timestamp *time.Time `json:"timestamp,omitempty"`
|
|
}
|
|
|
|
func (v V2CreditWalletRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(v, "", false)
|
|
}
|
|
|
|
func (v *V2CreditWalletRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetAmount() V2Monetary {
|
|
if o == nil {
|
|
return V2Monetary{}
|
|
}
|
|
return o.Amount
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetBalance() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Balance
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetMetadata() map[string]string {
|
|
if o == nil {
|
|
return map[string]string{}
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetReference() *string {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Reference
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetSources() []V2Subject {
|
|
if o == nil {
|
|
return []V2Subject{}
|
|
}
|
|
return o.Sources
|
|
}
|
|
|
|
func (o *V2CreditWalletRequest) GetTimestamp() *time.Time {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.Timestamp
|
|
}
|