Documentation ¶
Index ¶
- func ByteArrayToStruct[T any](b []byte) (*T, error)
- func UpdateStructWithByteArray[T any](b []byte, c *T) error
- type ApiError
- type Config
- type ERedeClient
- func (c *ERedeClient) AddHeader(key, value string)
- func (c *ERedeClient) CancelTransaction(tid string, transaction *models.Transaction) (*models.Refund, *Response)
- func (c *ERedeClient) CaptureTransaction(tid string, amount float64) (*models.TransactionResponse, *Response)
- func (c *ERedeClient) CreateTokenization(tokenization *models.CreateTokenization) (*models.CreateTokenizationResponse, *Response)
- func (c *ERedeClient) CreateTransaction(transaction *models.Transaction) (*models.TransactionResponse, *Response)
- func (c *ERedeClient) Delete(url string) *Response
- func (c *ERedeClient) Get(url string) *Response
- func (s *ERedeClient) GetCancellationByRefundId(tid string, refundId string) (*models.Refund, *Response)
- func (s *ERedeClient) GetCancellationsByTid(tid string) (*models.TransactionResponse, *Response)
- func (s *ERedeClient) GetCryptogramByTokenizationId(tokenizationId *uuid.UUID, subscription bool) (*models.QueryTokenizationCryptogramResponse, *Response)
- func (s *ERedeClient) GetTokenizationById(tokenizationId *uuid.UUID) (*models.QueryTokenizationResponse, *Response)
- func (s *ERedeClient) GetTransactionByReference(reference string) (*models.TransactionResponse, *Response)
- func (s *ERedeClient) GetTransactionByTid(tid string) (*models.TransactionResponse, *Response)
- func (c *ERedeClient) Header(key string) string
- func (c *ERedeClient) Post(url string, data any) *Response
- func (c *ERedeClient) Put(url string, data any) *Response
- func (c *ERedeClient) Send(method, url string, data any) *Response
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteArrayToStruct ¶
Types ¶
type Config ¶
type ERedeClient ¶
type ERedeClient struct { Config Config // contains filtered or unexported fields }
func NewClient ¶
func NewClient(config Config, log hclog.Logger) *ERedeClient
func (*ERedeClient) AddHeader ¶
func (c *ERedeClient) AddHeader(key, value string)
func (*ERedeClient) CancelTransaction ¶
func (c *ERedeClient) CancelTransaction(tid string, transaction *models.Transaction) (*models.Refund, *Response)
func (*ERedeClient) CaptureTransaction ¶
func (c *ERedeClient) CaptureTransaction(tid string, amount float64) (*models.TransactionResponse, *Response)
func (*ERedeClient) CreateTokenization ¶
func (c *ERedeClient) CreateTokenization(tokenization *models.CreateTokenization) (*models.CreateTokenizationResponse, *Response)
func (*ERedeClient) CreateTransaction ¶
func (c *ERedeClient) CreateTransaction(transaction *models.Transaction) (*models.TransactionResponse, *Response)
func (*ERedeClient) Delete ¶
func (c *ERedeClient) Delete(url string) *Response
func (*ERedeClient) Get ¶
func (c *ERedeClient) Get(url string) *Response
func (*ERedeClient) GetCancellationByRefundId ¶
func (*ERedeClient) GetCancellationsByTid ¶
func (s *ERedeClient) GetCancellationsByTid(tid string) (*models.TransactionResponse, *Response)
func (*ERedeClient) GetCryptogramByTokenizationId ¶
func (s *ERedeClient) GetCryptogramByTokenizationId(tokenizationId *uuid.UUID, subscription bool) (*models.QueryTokenizationCryptogramResponse, *Response)
func (*ERedeClient) GetTokenizationById ¶
func (s *ERedeClient) GetTokenizationById(tokenizationId *uuid.UUID) (*models.QueryTokenizationResponse, *Response)
func (*ERedeClient) GetTransactionByReference ¶
func (s *ERedeClient) GetTransactionByReference(reference string) (*models.TransactionResponse, *Response)
func (*ERedeClient) GetTransactionByTid ¶
func (s *ERedeClient) GetTransactionByTid(tid string) (*models.TransactionResponse, *Response)
func (*ERedeClient) Header ¶
func (c *ERedeClient) Header(key string) string
type Response ¶
type Response struct { Payload []byte `json:"payload"` Code int `json:"-"` Error error `json:"error"` Message string `json:"message"` ApiErrors []*ApiError `json:"ApiErrors"` }
func (*Response) ApiErrorsStr ¶
func (*Response) HasApiErrors ¶
func (*Response) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.