Documentation ¶
Index ¶
- Variables
- type AccountCreated
- type AccountDeleted
- type AccountUpdated
- type BalanceUpdated
- type BankAccountCreated
- type BankAccountDeleted
- type BankAccountUpdated
- type CapabilityRequested
- type CapabilityUpdated
- type CardAutoUpdated
- type DisputeCreated
- type DisputeUpdated
- type Event
- func (e Event) AccountCreated() (*AccountCreated, error)
- func (e Event) AccountDeleted() (*AccountDeleted, error)
- func (e Event) AccountUpdated() (*AccountUpdated, error)
- func (e Event) BalanceUpdated() (*BalanceUpdated, error)
- func (e Event) BankAccountCreated() (*BankAccountCreated, error)
- func (e Event) BankAccountDeleted() (*BankAccountDeleted, error)
- func (e Event) BankAccountUpdated() (*BankAccountUpdated, error)
- func (e Event) CapabilityRequested() (*CapabilityRequested, error)
- func (e Event) CapabilityUpdated() (*CapabilityUpdated, error)
- func (e Event) CardAutoUpdated() (*CardAutoUpdated, error)
- func (e Event) DisputeCreated() (*DisputeCreated, error)
- func (e Event) DisputeUpdated() (*DisputeUpdated, error)
- func (e Event) NetworkIDUpdated() (*NetworkIDUpdated, error)
- func (e Event) PaymentMethodDisabled() (*PaymentMethodDisabled, error)
- func (e Event) PaymentMethodEnabled() (*PaymentMethodEnabled, error)
- func (e Event) RefundCreated() (*RefundCreated, error)
- func (e Event) RefundUpdated() (*RefundUpdated, error)
- func (e Event) RepresentativeCreated() (*RepresentativeCreated, error)
- func (e Event) RepresentativeDeleted() (*RepresentativeDeleted, error)
- func (e Event) RepresentativeUpdated() (*RepresentativeUpdated, error)
- func (e Event) TestPing() (*TestPing, error)
- func (e Event) TransferCreated() (*TransferCreated, error)
- func (e Event) TransferUpdated() (*TransferUpdated, error)
- func (e Event) WalletTransactionUpdated() (*WalletTransactionUpdated, error)
- type EventType
- type NetworkIDUpdated
- type PaymentMethodDisabled
- type PaymentMethodEnabled
- type PaymentMethodPartial
- type RefundCreated
- type RefundUpdated
- type RepresentativeCreated
- type RepresentativeDeleted
- type RepresentativeUpdated
- type TestPing
- type TransferCreated
- type TransferUpdated
- type TransferUpdatedStatus
- type WalletTransactionUpdated
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidSignature = errors.New("calculated signature does not match X-Signature header")
Functions ¶
This section is empty.
Types ¶
type AccountCreated ¶
type AccountCreated struct { // ID of the account AccountID string `json:"accountID"` }
type AccountDeleted ¶
type AccountDeleted struct { // ID of the account AccountID string `json:"accountID"` }
type AccountUpdated ¶
type AccountUpdated struct { // ID of the account AccountID string `json:"accountID"` }
type BalanceUpdated ¶
type BankAccountCreated ¶
type BankAccountDeleted ¶
type BankAccountUpdated ¶
type BankAccountUpdated struct { // ID of the bank account BankAccountID string `json:"bankAccountID"` // ID of the account where the bank account was updated AccountID string `json:"accountID"` // Status of the bank account Status moov.BankAccountStatus `json:"status"` StatusReason moov.BankAccountStatusReason `json:"statusReason"` ExceptionDetails *moov.ExceptionDetails `json:"exceptionDetails,omitempty"` }
type CapabilityRequested ¶
type CapabilityRequested struct { Capability moov.CapabilityName `json:"capabilityID"` // ID of the account requesting the capability AccountID string `json:"accountID"` }
type CapabilityUpdated ¶
type CapabilityUpdated struct { Capability moov.CapabilityName `json:"capabilityID"` // ID of the account requesting the capability AccountID string `json:"accountID"` // Status of the capability Status moov.CapabilityStatus `json:"status"` }
type CardAutoUpdated ¶
type CardAutoUpdated struct { // ID of the merchant's Account associated with the updated Card AccountID string `json:"accountID"` // ID of the Card that was updated CardID string `json:"cardID"` UpdateType moov.CardUpdateType `json:"updateType"` }
type DisputeCreated ¶
type DisputeCreated struct { // ID of the merchant's Account associated with the disputed transaction. AccountID string `json:"accountID"` // ID of the disputed transfer. TransferID string `json:"transferID"` // ID of the disputed transaction. TransactionID string `json:"transactionID"` // ID of the dispute. DisputeID string `json:"disputeID"` Status moov.Dispute `json:"status"` Phase moov.Dispute `json:"phase"` }
type DisputeUpdated ¶
type DisputeUpdated struct { // ID of the merchant's Account associated with the disputed transaction. AccountID string `json:"accountID"` // ID of the disputed transfer. TransferID string `json:"transferID"` // ID of the disputed transaction. TransactionID string `json:"transactionID"` // ID of the dispute. DisputeID string `json:"disputeID"` Status moov.DisputeStatus `json:"status"` Phase moov.DisputePhase `json:"phase"` }
type Event ¶
type Event struct { EventID string `json:"eventID"` EventType EventType `json:"type"` CreatedOn time.Time `json:"createdOn"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
func ParseEvent ¶
ParseEvent returns a webhook event with the hydrated payload.
Access the event payload by calling the corresponding getter method. For example, if the event.EventType=account.created, call event.AccountCreated().
The webhook signature is verified using the provided signing secret.
func (Event) AccountCreated ¶
func (e Event) AccountCreated() (*AccountCreated, error)
func (Event) AccountDeleted ¶
func (e Event) AccountDeleted() (*AccountDeleted, error)
func (Event) AccountUpdated ¶
func (e Event) AccountUpdated() (*AccountUpdated, error)
func (Event) BalanceUpdated ¶
func (e Event) BalanceUpdated() (*BalanceUpdated, error)
func (Event) BankAccountCreated ¶
func (e Event) BankAccountCreated() (*BankAccountCreated, error)
func (Event) BankAccountDeleted ¶
func (e Event) BankAccountDeleted() (*BankAccountDeleted, error)
func (Event) BankAccountUpdated ¶
func (e Event) BankAccountUpdated() (*BankAccountUpdated, error)
func (Event) CapabilityRequested ¶
func (e Event) CapabilityRequested() (*CapabilityRequested, error)
func (Event) CapabilityUpdated ¶
func (e Event) CapabilityUpdated() (*CapabilityUpdated, error)
func (Event) CardAutoUpdated ¶
func (e Event) CardAutoUpdated() (*CardAutoUpdated, error)
func (Event) DisputeCreated ¶
func (e Event) DisputeCreated() (*DisputeCreated, error)
func (Event) DisputeUpdated ¶
func (e Event) DisputeUpdated() (*DisputeUpdated, error)
func (Event) NetworkIDUpdated ¶
func (e Event) NetworkIDUpdated() (*NetworkIDUpdated, error)
func (Event) PaymentMethodDisabled ¶
func (e Event) PaymentMethodDisabled() (*PaymentMethodDisabled, error)
func (Event) PaymentMethodEnabled ¶
func (e Event) PaymentMethodEnabled() (*PaymentMethodEnabled, error)
func (Event) RefundCreated ¶
func (e Event) RefundCreated() (*RefundCreated, error)
func (Event) RefundUpdated ¶
func (e Event) RefundUpdated() (*RefundUpdated, error)
func (Event) RepresentativeCreated ¶
func (e Event) RepresentativeCreated() (*RepresentativeCreated, error)
func (Event) RepresentativeDeleted ¶
func (e Event) RepresentativeDeleted() (*RepresentativeDeleted, error)
func (Event) RepresentativeUpdated ¶
func (e Event) RepresentativeUpdated() (*RepresentativeUpdated, error)
func (Event) TransferCreated ¶
func (e Event) TransferCreated() (*TransferCreated, error)
func (Event) TransferUpdated ¶
func (e Event) TransferUpdated() (*TransferUpdated, error)
func (Event) WalletTransactionUpdated ¶
func (e Event) WalletTransactionUpdated() (*WalletTransactionUpdated, error)
type EventType ¶
type EventType string
const ( EventTypeAccountCreated EventType = "account.created" EventTypeAccountDeleted EventType = "account.deleted" EventTypeAccountUpdated EventType = "account.updated" EventTypeBalanceUpdated EventType = "balance.updated" EventTypeBankAccountCreated EventType = "bankAccount.created" EventTypeBankAccountDeleted EventType = "bankAccount.deleted" EventTypeBankAccountUpdated EventType = "bankAccount.updated" EventTypeCardAutoUpdated EventType = "card.autoUpdated" EventTypeCapabilityRequested EventType = "capability.requested" EventTypeCapabilityUpdated EventType = "capability.updated" EventTypeDisputeCreated EventType = "dispute.created" EventTypeDisputeUpdated EventType = "dispute.updated" EventTypeNetworkIDUpdated EventType = "networkID.updated" EventTypePaymentMethodDisabled EventType = "paymentMethod.disabled" EventTypePaymentMethodEnabled EventType = "paymentMethod.enabled" EventTypeRefundCreated EventType = "refund.created" EventTypeRefundUpdated EventType = "refund.updated" EventTypeRepresentativeCreated EventType = "representative.created" EventTypeRepresentativeDeleted EventType = "representative.deleted" EventTypeRepresentativeUpdated EventType = "representative.updated" EventTypeTestPing EventType = "event.test" EventTypeTransferCreated EventType = "transfer.created" EventTypeTransferUpdated EventType = "transfer.updated" EventTypeWalletTransactionUpdated EventType = "walletTransaction.updated" )
type NetworkIDUpdated ¶
type NetworkIDUpdated struct { // ID of account. AccountID string `json:"accountID"` VisaMid *string `json:"visaMid,omitempty"` MastercardMid *string `json:"mastercardMid,omitempty"` DiscoverMid *string `json:"discoverMid,omitempty"` AmexMid *string `json:"amexMid,omitempty"` UpdatedOn *time.Time `json:"updatedOn,omitempty"` }
type PaymentMethodDisabled ¶
type PaymentMethodEnabled ¶
type PaymentMethodPartial ¶
type RefundCreated ¶
type RefundUpdated ¶
type RefundUpdated struct { // ID of the merchant's Account associated with the refund transfer AccountID string `json:"accountID"` // ID of the original transfer TransferID string `json:"transferID"` // ID of the refund transfer RefundID string `json:"refundID"` // Status of the refund transfer Status moov.RefundStatus `json:"status"` }
type RepresentativeCreated ¶
type RepresentativeDeleted ¶
type RepresentativeUpdated ¶
type TransferCreated ¶
type TransferCreated struct { // ID of the facilitator account AccountID string `json:"accountID"` // ID of the transfer TransferID string `json:"transferID"` // Status of the transfer Status moov.TransferStatus `json:"status"` }
type TransferUpdated ¶
type TransferUpdated struct { // ID of the facilitator account AccountID string `json:"accountID"` // ID of the transfer TransferID string `json:"transferID"` // Status of the transfer Status TransferUpdatedStatus `json:"status"` Source PaymentMethodPartial `json:"source"` Destination PaymentMethodPartial `json:"destination"` }
type TransferUpdatedStatus ¶
type TransferUpdatedStatus string
const ( TransferUpdatedStatus_Pending TransferUpdatedStatus = "pending" TransferUpdatedStatus_Completed TransferUpdatedStatus = "completed" TransferUpdatedStatus_Failed TransferUpdatedStatus = "failed" TransferUpdatedStatus_Reversed TransferUpdatedStatus = "reversed" TransferUpdatedStatus_Queued TransferUpdatedStatus = "queued" TransferUpdatedStatus_Canceled TransferUpdatedStatus = "canceled" TransferUpdatedStatus_SourceCompleted TransferUpdatedStatus = "source.completed" TransferUpdatedStatus_SourceCorrected TransferUpdatedStatus = "source.corrected" TransferUpdatedStatus_SourceInitiated TransferUpdatedStatus = "source.initiated" TransferUpdatedStatus_SourceReturned TransferUpdatedStatus = "source.returned" TransferUpdatedStatus_SourceOriginated TransferUpdatedStatus = "source.originated" TransferUpdatedStatus_SourceConfirmed TransferUpdatedStatus = "source.confirmed" TransferUpdatedStatus_SourceSettled TransferUpdatedStatus = "source.settled" TransferUpdatedStatus_SourceFailed TransferUpdatedStatus = "source.failed" TransferUpdatedStatus_SourceCanceled TransferUpdatedStatus = "source.canceled" TransferUpdatedStatus_DestinationCompleted TransferUpdatedStatus = "destination.completed" TransferUpdatedStatus_DestinationCorrected TransferUpdatedStatus = "destination.corrected" TransferUpdatedStatus_DestinationInitiated TransferUpdatedStatus = "destination.initiated" TransferUpdatedStatus_DestinationReturned TransferUpdatedStatus = "destination.returned" TransferUpdatedStatus_DestinationOriginated TransferUpdatedStatus = "destination.originated" TransferUpdatedStatus_DestinationConfirmed TransferUpdatedStatus = "destination.confirmed" TransferUpdatedStatus_DestinationFailed TransferUpdatedStatus = "destination.failed" TransferUpdatedStatus_DestinationAcceptedWithoutPosting TransferUpdatedStatus = "destination.accepted-without-posting" )
type WalletTransactionUpdated ¶
type WalletTransactionUpdated struct { // ID of the account associated with the wallet AccountID string `json:"accountID"` // ID of the Wallet WalletID string `json:"walletID"` // ID of the wallet transaction TransactionID string `json:"transactionID"` // Status of the wallet transaction Status moov.WalletTransactionStatus `json:"status"` // Available balance of the wallet. AvailableBalance *moov.AvailableBalance `json:"availableBalance,omitempty"` }
Click to show internal directories.
Click to hide internal directories.