mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
81 lines
1.8 KiB
Go
81 lines
1.8 KiB
Go
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"github.com/formancehq/formance-sdk-go/v2/pkg/utils"
|
|
"math/big"
|
|
"net/http"
|
|
)
|
|
|
|
type AddMetadataOnTransactionRequest struct {
|
|
// metadata
|
|
RequestBody map[string]any `request:"mediaType=application/json"`
|
|
// Name of the ledger.
|
|
Ledger string `pathParam:"style=simple,explode=false,name=ledger"`
|
|
// Transaction ID.
|
|
Txid *big.Int `pathParam:"style=simple,explode=false,name=txid"`
|
|
}
|
|
|
|
func (a AddMetadataOnTransactionRequest) MarshalJSON() ([]byte, error) {
|
|
return utils.MarshalJSON(a, "", false)
|
|
}
|
|
|
|
func (a *AddMetadataOnTransactionRequest) UnmarshalJSON(data []byte) error {
|
|
if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionRequest) GetRequestBody() map[string]any {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RequestBody
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionRequest) GetLedger() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.Ledger
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionRequest) GetTxid() *big.Int {
|
|
if o == nil {
|
|
return big.NewInt(0)
|
|
}
|
|
return o.Txid
|
|
}
|
|
|
|
type AddMetadataOnTransactionResponse struct {
|
|
// HTTP response content type for this operation
|
|
ContentType string
|
|
// HTTP response status code for this operation
|
|
StatusCode int
|
|
// Raw HTTP response; suitable for custom response parsing
|
|
RawResponse *http.Response
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionResponse) GetContentType() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ContentType
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionResponse) GetStatusCode() int {
|
|
if o == nil {
|
|
return 0
|
|
}
|
|
return o.StatusCode
|
|
}
|
|
|
|
func (o *AddMetadataOnTransactionResponse) GetRawResponse() *http.Response {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.RawResponse
|
|
}
|