mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* feat: commit * feat: Update connectors * chore: review code * fix: align Coinbase Prime client with actual API contract - Remove query string from HMAC signature (match official SDK) - Use raw API secret bytes instead of base64-decoding - Change TransferFrom/TransferTo from string to *TransferEndpoint struct - Map all 35 transaction types to correct payment types (PAYIN/PAYOUT/TRANSFER/OTHER) - Fix status mapping: TRANSACTION_DONE (not fictional TRANSACTION_COMPLETED) - Add CANCELLED/REJECTED/EXPIRED to failed statuses - Use transfer_from/transfer_to endpoints with walletID fallback for account refs * fix(e2e): use polling outbox check in setupV3PoolAccounts to fix race condition MustOutbox performs a single instant check which is flaky when plugin initialization adds latency. Switch to MustEventuallyOutbox (5s polling) to match setupV2PoolAccounts behavior. * fix(coinbase): fix HMAC signing, pagination, symbol normalization and observability - Base64-decode API secret before HMAC computation (was using raw string) - Include query params in signed message via RequestURI() - Loop through all pages in GetBalancesForSymbol instead of single page - Normalize currency symbols to uppercase before lookup - Add otelhttp transport for OpenTelemetry tracing - Include ErrorResponse.Message in API error strings - Use req.PageSize instead of hardcoded PAGE_SIZE in balances - Capture time.Now() once before balance loop - Add base64 validation on APISecret config field - Add format:password and align pageSize default in OpenAPI schema - Reclassify INTERNAL_DEPOSIT/INTERNAL_WITHDRAWAL as TRANSFER - Make fetch_balances periodic in workflow * fix(tests): stabilize outbox assertions and make metrics registry thread-safe * fix(coinbase): address review feedback for balances and test stability * fix(testserver): make outbox polling window robust for e2e timing * fix(coinbase): address PR review feedback on metadata, status mapping, and DefaultAsset Remove redundant metadata from payments (already in Raw), refine transaction status mapping to use CANCELLED/EXPIRED/OTHER, remove symbol from account metadata, and derive wallet symbol from DefaultAsset instead of metadata/raw fallback in balances. * fix(coinbase): enumerate all pending statuses and use UNKNOWN as default Explicitly list all Coinbase pending transaction statuses, map OTHER_TRANSACTION_STATUS to OTHER, and default to UNKNOWN for unrecognized statuses (including TRANSACTION_RETRIED). * feat: Update * feat: Switch name to Coinbase Prime
181 lines
5.1 KiB
Go
181 lines
5.1 KiB
Go
// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
|
|
package operations
|
|
|
|
import (
|
|
"github.com/formancehq/payments/pkg/client/models/components"
|
|
)
|
|
|
|
type V3UpdateConnectorConfigRequest struct {
|
|
// The connector ID
|
|
ConnectorID string `pathParam:"style=simple,explode=false,name=connectorID"`
|
|
V3UpdateConnectorRequest *components.V3UpdateConnectorRequest `request:"mediaType=application/json"`
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetConnectorID() string {
|
|
if o == nil {
|
|
return ""
|
|
}
|
|
return o.ConnectorID
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequest() *components.V3UpdateConnectorRequest {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.V3UpdateConnectorRequest
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestAdyen() *components.V3AdyenConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3AdyenConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestAtlar() *components.V3AtlarConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3AtlarConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestBankingcircle() *components.V3BankingcircleConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3BankingcircleConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestCoinbaseprime() *components.V3CoinbaseprimeConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3CoinbaseprimeConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestColumn() *components.V3ColumnConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3ColumnConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestCurrencycloud() *components.V3CurrencycloudConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3CurrencycloudConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestDummypay() *components.V3DummypayConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3DummypayConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestFireblocks() *components.V3FireblocksConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3FireblocksConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestGeneric() *components.V3GenericConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3GenericConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestIncrease() *components.V3IncreaseConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3IncreaseConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestMangopay() *components.V3MangopayConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3MangopayConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestModulr() *components.V3ModulrConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3ModulrConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestMoneycorp() *components.V3MoneycorpConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3MoneycorpConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestPlaid() *components.V3PlaidConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3PlaidConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestPowens() *components.V3PowensConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3PowensConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestQonto() *components.V3QontoConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3QontoConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestStripe() *components.V3StripeConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3StripeConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestTink() *components.V3TinkConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3TinkConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigRequest) GetV3UpdateConnectorRequestWise() *components.V3WiseConfig {
|
|
if v := o.GetV3UpdateConnectorRequest(); v != nil {
|
|
return v.V3WiseConfig
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type V3UpdateConnectorConfigResponse struct {
|
|
HTTPMeta components.HTTPMetadata `json:"-"`
|
|
// Error
|
|
PaymentsErrorResponse *components.PaymentsErrorResponse
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigResponse) GetHTTPMeta() components.HTTPMetadata {
|
|
if o == nil {
|
|
return components.HTTPMetadata{}
|
|
}
|
|
return o.HTTPMeta
|
|
}
|
|
|
|
func (o *V3UpdateConnectorConfigResponse) GetPaymentsErrorResponse() *components.PaymentsErrorResponse {
|
|
if o == nil {
|
|
return nil
|
|
}
|
|
return o.PaymentsErrorResponse
|
|
}
|