mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
67 lines
1.3 KiB
Go
67 lines
1.3 KiB
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"
|
|
"time"
|
|
)
|
|
|
|
type V2PaymentAdjustmentRaw struct {
|
|
}
|
|
|
|
type V2PaymentAdjustment struct {
|
|
Absolute bool `json:"absolute"`
|
|
Amount *big.Int `json:"amount"`
|
|
Date time.Time `json:"date"`
|
|
Raw V2PaymentAdjustmentRaw `json:"raw"`
|
|
Status V2PaymentStatus `json:"status"`
|
|
}
|
|
|
|
func (v V2PaymentAdjustment) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(v, "", false)
|
|
}
|
|
|
|
func (v *V2PaymentAdjustment) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &v, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V2PaymentAdjustment) GetAbsolute() bool {
|
|
if o == nil {
|
|
return false
|
|
}
|
|
return o.Absolute
|
|
}
|
|
|
|
func (o *V2PaymentAdjustment) GetAmount() *big.Int {
|
|
if o == nil {
|
|
return big.NewInt(0)
|
|
}
|
|
return o.Amount
|
|
}
|
|
|
|
func (o *V2PaymentAdjustment) GetDate() time.Time {
|
|
if o == nil {
|
|
return time.Time{}
|
|
}
|
|
return o.Date
|
|
}
|
|
|
|
func (o *V2PaymentAdjustment) GetRaw() V2PaymentAdjustmentRaw {
|
|
if o == nil {
|
|
return V2PaymentAdjustmentRaw{}
|
|
}
|
|
return o.Raw
|
|
}
|
|
|
|
func (o *V2PaymentAdjustment) GetStatus() V2PaymentStatus {
|
|
if o == nil {
|
|
return V2PaymentStatus("")
|
|
}
|
|
return o.Status
|
|
}
|