Files
stack/releases/sdks/go/pkg/models/shared/paymentrequest.go
2024-01-19 11:33:42 +00:00

104 lines
2.1 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 PaymentRequest struct {
Amount *big.Int `json:"amount"`
Asset string `json:"asset"`
ConnectorID string `json:"connectorID"`
CreatedAt time.Time `json:"createdAt"`
DestinationAccountID *string `json:"destinationAccountID,omitempty"`
Reference string `json:"reference"`
Scheme PaymentScheme `json:"scheme"`
SourceAccountID *string `json:"sourceAccountID,omitempty"`
Status PaymentStatus `json:"status"`
Type PaymentType `json:"type"`
}
func (p PaymentRequest) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(p, "", false)
}
func (p *PaymentRequest) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &p, "", false, false); err != nil {
return err
}
return nil
}
func (o *PaymentRequest) GetAmount() *big.Int {
if o == nil {
return big.NewInt(0)
}
return o.Amount
}
func (o *PaymentRequest) GetAsset() string {
if o == nil {
return ""
}
return o.Asset
}
func (o *PaymentRequest) GetConnectorID() string {
if o == nil {
return ""
}
return o.ConnectorID
}
func (o *PaymentRequest) GetCreatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.CreatedAt
}
func (o *PaymentRequest) GetDestinationAccountID() *string {
if o == nil {
return nil
}
return o.DestinationAccountID
}
func (o *PaymentRequest) GetReference() string {
if o == nil {
return ""
}
return o.Reference
}
func (o *PaymentRequest) GetScheme() PaymentScheme {
if o == nil {
return PaymentScheme("")
}
return o.Scheme
}
func (o *PaymentRequest) GetSourceAccountID() *string {
if o == nil {
return nil
}
return o.SourceAccountID
}
func (o *PaymentRequest) GetStatus() PaymentStatus {
if o == nil {
return PaymentStatus("")
}
return o.Status
}
func (o *PaymentRequest) GetType() PaymentType {
if o == nil {
return PaymentType("")
}
return o.Type
}