Documentation
¶
Index ¶
- Constants
- Variables
- type AccountCreated
- type AccountDisconnected
- type AccountUpdated
- type BalanceUpdated
- type BankAccountCreated
- type BankAccountDeleted
- type BankAccountUpdated
- type BillingStatementCreated
- type CancellationCreated
- type CancellationUpdated
- type CapabilityRequested
- type CapabilityUpdated
- type CardAutoUpdated
- type DisputeCreated
- type DisputeUpdated
- type Event
- func (e Event) AccountCreated() (*AccountCreated, error)
- func (e Event) AccountDisconnected() (*AccountDisconnected, 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) BillingStatementCreated() (*BillingStatementCreated, error)
- func (e Event) CancellationCreated() (*CancellationCreated, error)
- func (e Event) CancellationUpdated() (*CancellationUpdated, 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) InvoiceCreated() (*InvoiceCreated, error)
- func (e Event) InvoiceUpdated() (*InvoiceUpdated, 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) SweepCreated() (*SweepCreated, error)
- func (e Event) SweepUpdated() (*SweepUpdated, error)
- func (e Event) TestPing() (*TestPing, error)
- func (e Event) TicketCreated() (*TicketCreated, error)
- func (e Event) TicketMessageAdded() (*TicketMessageAdded, error)
- func (e Event) TicketUpdated() (*TicketUpdated, error)
- func (e Event) TransferCreated() (*TransferCreated, error)
- func (e Event) TransferUpdated() (*TransferUpdated, error)
- func (e Event) WalletCreated() (*WalletCreated, error)
- func (e Event) WalletTransactionUpdated() (*WalletTransactionUpdated, error)
- func (e Event) WalletUpdated() (*WalletUpdated, error)
- type EventType
- type InvoiceCreated
- type InvoiceUpdated
- type NetworkIDUpdated
- type PaymentMethodDisabled
- type PaymentMethodEnabled
- type PaymentMethodPartial
- type RefundCreated
- type RefundUpdated
- type RepresentativeCreated
- type RepresentativeDeleted
- type RepresentativeUpdated
- type SweepCreated
- type SweepUpdated
- type TestPing
- type TicketCreated
- type TicketMessageAdded
- type TicketUpdated
- type TransferCreated
- type TransferUpdated
- type TransferUpdatedStatus
- type WalletCreated
- type WalletTransactionUpdated
- type WalletUpdated
Constants ¶
View Source
const ( EventTypeAccountCreated = moov.EventTypeAccountCreated EventTypeAccountDisconnected = moov.EventTypeAccountDisconnected EventTypeAccountUpdated = moov.EventTypeAccountUpdated EventTypeBalanceUpdated = moov.EventTypeBalanceUpdated EventTypeBankAccountCreated = moov.EventTypeBankAccountCreated EventTypeBankAccountDeleted = moov.EventTypeBankAccountDeleted EventTypeBankAccountUpdated = moov.EventTypeBankAccountUpdated EventTypeBillingStatementCreated = moov.EventTypeBillingStatementCreated EventTypeCancellationCreated = moov.EventTypeCancellationCreated EventTypeCancellationUpdated = moov.EventTypeCancellationUpdated EventTypeCardAutoUpdated = moov.EventTypeCardAutoUpdated EventTypeCapabilityRequested = moov.EventTypeCapabilityRequested EventTypeCapabilityUpdated = moov.EventTypeCapabilityUpdated EventTypeDisputeCreated = moov.EventTypeDisputeCreated EventTypeDisputeUpdated = moov.EventTypeDisputeUpdated EventTypeInvoiceCreated = moov.EventTypeInvoiceCreated EventTypeInvoiceUpdated = moov.EventTypeInvoiceUpdated EventTypeNetworkIDUpdated = moov.EventTypeNetworkIDUpdated EventTypePaymentMethodDisabled = moov.EventTypePaymentMethodDisabled EventTypePaymentMethodEnabled = moov.EventTypePaymentMethodEnabled EventTypeRefundCreated = moov.EventTypeRefundCreated EventTypeRefundUpdated = moov.EventTypeRefundUpdated EventTypeRepresentativeCreated = moov.EventTypeRepresentativeCreated EventTypeRepresentativeDeleted = moov.EventTypeRepresentativeDeleted EventTypeRepresentativeUpdated = moov.EventTypeRepresentativeUpdated EventTypeSweepCreated = moov.EventTypeSweepCreated EventTypeSweepUpdated = moov.EventTypeSweepUpdated EventTypeTestPing = moov.EventTypeTestPing EventTypeTicketCreated = moov.EventTypeTicketCreated EventTypeTicketUpdated = moov.EventTypeTicketUpdated EventTypeTicketMessageAdded = moov.EventTypeTicketMessageAdded EventTypeTransferCreated = moov.EventTypeTransferCreated EventTypeTransferUpdated = moov.EventTypeTransferUpdated EventTypeWalletCreated = moov.EventTypeWalletCreated EventTypeWalletUpdated = moov.EventTypeWalletUpdated EventTypeWalletTransactionUpdated = moov.EventTypeWalletTransactionUpdated )
Variables ¶
View Source
var ErrInvalidSignature = errors.New("calculated signature does not match X-Signature header")
Functions ¶
This section is empty.
Types ¶
type AccountCreated ¶
type AccountDisconnected ¶ added in v0.22.0
type AccountUpdated ¶
type BalanceUpdated ¶
type BankAccountCreated ¶
type BankAccountCreated struct {
// ID of the bank account
BankAccountID string `json:"bankAccountID"`
// ID of the account where the bank account was created
AccountID string `json:"accountID"`
// Status of the bank account
Status moov.BankAccountStatus `json:"status"`
}
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 BillingStatementCreated ¶ added in v0.23.1
type BillingStatementCreated struct {
StatementID string `json:"statementID"`
}
type CancellationCreated ¶ added in v0.10.0
type CancellationCreated struct {
CancellationID string `json:"cancellationID"`
TransferID string `json:"transferID"`
Status moov.CancellationStatus `json:"status"`
}
type CancellationUpdated ¶ added in v0.10.0
type CancellationUpdated struct {
CancellationID string `json:"cancellationID"`
TransferID string `json:"transferID"`
Status moov.CancellationStatus `json:"status"`
}
type CapabilityRequested ¶
type CapabilityRequested struct {
Capability moov.CapabilityName `json:"capabilityID"`
// ID of the account requesting the capability
AccountID string `json:"accountID"`
ForeignID string `json:"foreignID,omitempty"`
}
type CapabilityUpdated ¶
type CapabilityUpdated struct {
Capability moov.CapabilityName `json:"capabilityID"`
// ID of the account requesting the capability
AccountID string `json:"accountID"`
ForeignID string `json:"foreignID,omitempty"`
// 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) AccountDisconnected ¶ added in v0.22.0
func (e Event) AccountDisconnected() (*AccountDisconnected, 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) BillingStatementCreated ¶ added in v0.23.1
func (e Event) BillingStatementCreated() (*BillingStatementCreated, error)
func (Event) CancellationCreated ¶ added in v0.10.0
func (e Event) CancellationCreated() (*CancellationCreated, error)
func (Event) CancellationUpdated ¶ added in v0.10.0
func (e Event) CancellationUpdated() (*CancellationUpdated, 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) InvoiceCreated ¶ added in v0.30.0
func (e Event) InvoiceCreated() (*InvoiceCreated, error)
func (Event) InvoiceUpdated ¶ added in v0.30.0
func (e Event) InvoiceUpdated() (*InvoiceUpdated, 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) SweepCreated ¶ added in v0.6.0
func (e Event) SweepCreated() (*SweepCreated, error)
func (Event) SweepUpdated ¶ added in v0.6.0
func (e Event) SweepUpdated() (*SweepUpdated, error)
func (Event) TicketCreated ¶ added in v0.22.0
func (e Event) TicketCreated() (*TicketCreated, error)
func (Event) TicketMessageAdded ¶ added in v0.22.0
func (e Event) TicketMessageAdded() (*TicketMessageAdded, error)
func (Event) TicketUpdated ¶ added in v0.22.0
func (e Event) TicketUpdated() (*TicketUpdated, error)
func (Event) TransferCreated ¶
func (e Event) TransferCreated() (*TransferCreated, error)
func (Event) TransferUpdated ¶
func (e Event) TransferUpdated() (*TransferUpdated, error)
func (Event) WalletCreated ¶ added in v0.22.0
func (e Event) WalletCreated() (*WalletCreated, error)
func (Event) WalletTransactionUpdated ¶
func (e Event) WalletTransactionUpdated() (*WalletTransactionUpdated, error)
func (Event) WalletUpdated ¶ added in v0.22.0
func (e Event) WalletUpdated() (*WalletUpdated, error)
type InvoiceCreated ¶ added in v0.30.0
type InvoiceUpdated ¶ added in v0.30.0
type InvoiceUpdated struct {
AccountID string `json:"accountID"`
InvoiceID string `json:"invoiceID"`
Status moov.InvoiceStatus `json:"status"`
}
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 SweepCreated ¶ added in v0.6.0
type SweepUpdated ¶ added in v0.6.0
type SweepUpdated struct {
// ID of the sweep
SweepID string `json:"sweepID"`
// ID of the Wallet
WalletID string `json:"walletID"`
Status moov.SweepStatus `json:"status"`
// ID of the transfer
TransferID *string `json:"transferID,omitempty"`
}
SweepUpdated struct for SweepUpdated
type TicketCreated ¶ added in v0.22.0
type TicketMessageAdded ¶ added in v0.22.0
type TicketUpdated ¶ added in v0.22.0
type TicketUpdated struct {
// ID of the account
AccountID string `json:"accountID"`
// ID of the ticket
TicketID string `json:"ticketID"`
ForeignID string `json:"foreignID,omitempty"`
// Status of the ticket
Status moov.TicketStatus `json:"status"`
}
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 WalletCreated ¶ added in v0.22.0
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"`
}
type WalletUpdated ¶ added in v0.22.0
type WalletUpdated struct {
// ID of the account
AccountID string `json:"accountID"`
// ID of the wallet
WalletID string `json:"walletID"`
// Status of the wallet
Status moov.WalletStatus `json:"status"`
}
Click to show internal directories.
Click to hide internal directories.