Documentation
¶
Index ¶
- Constants
- Variables
- type AppBase
- type AppData
- type CreateAppStripeInput
- type CreateCheckoutSessionInput
- type CreateCheckoutSessionOutput
- type CreateStripeCustomerInput
- type CreateStripeCustomerOutput
- type CustomerData
- type DeleteStripeAppDataInput
- type DeleteStripeCustomerDataInput
- type GetAppInput
- type GetStripeAppDataInput
- type GetStripeCustomerDataInput
- type GetStripeInvoiceInput
- type GetSupplierContactInput
- type GetWebhookSecretInput
- type GetWebhookSecretOutput
- type HandleInvoiceSentEventInput
- type HandleInvoiceStateTransitionInput
- type SetCustomerDefaultPaymentMethodInput
- type SetCustomerDefaultPaymentMethodOutput
- type UpdateAPIKeyInput
- type UpsertStripeCustomerDataInput
- type ValidationErrorsInput
Constants ¶
View Source
const ( APIKeySecretKey = "stripe_api_key" WebhookSecretKey = "stripe_webhook_secret" )
Variables ¶
View Source
var ( StripeMarketplaceListing = app.MarketplaceListing{ Type: app.AppTypeStripe, Name: "Stripe", Description: "Send invoices, calculate tax and collect payments.", Capabilities: []app.Capability{ StripeCollectPaymentCapability, StripeCalculateTaxCapability, StripeInvoiceCustomerCapability, }, } StripeCollectPaymentCapability = app.Capability{ Type: app.CapabilityTypeCollectPayments, Key: "stripe_collect_payment", Name: "Payment", Description: "Process payments", } StripeCalculateTaxCapability = app.Capability{ Type: app.CapabilityTypeCalculateTax, Key: "stripe_calculate_tax", Name: "Calculate Tax", Description: "Calculate tax for a payment", } StripeInvoiceCustomerCapability = app.Capability{ Type: app.CapabilityTypeInvoiceCustomers, Key: "stripe_invoice_customer", Name: "Invoice Customer", Description: "Invoice a customer", } )
Functions ¶
This section is empty.
Types ¶
type AppData ¶
type AppData struct { StripeAccountID string Livemode bool APIKey secretentity.SecretID StripeWebhookID string WebhookSecret secretentity.SecretID }
AppData represents the Stripe associated data for the app
type CreateAppStripeInput ¶
type CreateAppStripeInput struct { app.CreateAppInput StripeAccountID string Livemode bool APIKey secretentity.SecretID StripeWebhookID string WebhookSecret secretentity.SecretID }
func (CreateAppStripeInput) Validate ¶
func (i CreateAppStripeInput) Validate() error
type CreateCheckoutSessionInput ¶
type CreateCheckoutSessionInput struct { Namespace string AppID *app.AppID CreateCustomerInput *customer.CreateCustomerInput CustomerID *customer.CustomerID CustomerKey *string StripeCustomerID *string Options api.CreateStripeCheckoutSessionRequestOptions }
func (CreateCheckoutSessionInput) Validate ¶
func (i CreateCheckoutSessionInput) Validate() error
type CreateCheckoutSessionOutput ¶
type CreateCheckoutSessionOutput struct { CustomerID customer.CustomerID StripeCustomerID string SessionID string SetupIntentID string URL *string Mode stripe.CheckoutSessionMode CancelURL *string SuccessURL *string ReturnURL *string }
func (CreateCheckoutSessionOutput) Validate ¶
func (o CreateCheckoutSessionOutput) Validate() error
type CreateStripeCustomerInput ¶
type CreateStripeCustomerInput struct { AppID app.AppID CustomerID customer.CustomerID Name *string Email *string }
func (CreateStripeCustomerInput) Validate ¶
func (i CreateStripeCustomerInput) Validate() error
type CreateStripeCustomerOutput ¶
type CreateStripeCustomerOutput struct {
StripeCustomerID string
}
func (CreateStripeCustomerOutput) Validate ¶
func (o CreateStripeCustomerOutput) Validate() error
type CustomerData ¶
func (CustomerData) Validate ¶
func (d CustomerData) Validate() error
type DeleteStripeAppDataInput ¶
func (DeleteStripeAppDataInput) Validate ¶
func (i DeleteStripeAppDataInput) Validate() error
type DeleteStripeCustomerDataInput ¶
type DeleteStripeCustomerDataInput struct { AppID *app.AppID CustomerID *customer.CustomerID }
func (DeleteStripeCustomerDataInput) Validate ¶
func (i DeleteStripeCustomerDataInput) Validate() error
type GetAppInput ¶
type GetStripeAppDataInput ¶
func (GetStripeAppDataInput) Validate ¶
func (i GetStripeAppDataInput) Validate() error
type GetStripeCustomerDataInput ¶
type GetStripeCustomerDataInput struct { AppID app.AppID CustomerID customer.CustomerID }
func (GetStripeCustomerDataInput) Validate ¶
func (i GetStripeCustomerDataInput) Validate() error
type GetStripeInvoiceInput ¶
func (GetStripeInvoiceInput) Validate ¶
func (i GetStripeInvoiceInput) Validate() error
type GetSupplierContactInput ¶
GetSupplierContactInput to get the default supplier
func (GetSupplierContactInput) Validate ¶
func (i GetSupplierContactInput) Validate() error
type GetWebhookSecretInput ¶
type GetWebhookSecretInput struct {
AppID string
}
func (GetWebhookSecretInput) Validate ¶
func (i GetWebhookSecretInput) Validate() error
type GetWebhookSecretOutput ¶
type GetWebhookSecretOutput = secretentity.Secret
type HandleInvoiceSentEventInput ¶
func (HandleInvoiceSentEventInput) Validate ¶
func (i HandleInvoiceSentEventInput) Validate() error
type HandleInvoiceStateTransitionInput ¶
type HandleInvoiceStateTransitionInput struct { AppID app.AppID Invoice stripe.Invoice // Trigger is the state machine trigger that will be used to transition the invoice Trigger billing.InvoiceTrigger // TargetStatus specifies the expected status of the invoice after the transition, needed to filter // for duplicate events as the state machine doesn't allow transition into the same state TargetStatuses []billing.InvoiceStatus // IgnoreInvoiceInStatus is a list of invoice statuses. If the invoice is in this status we ignore the event // this allows to filter for out of order events. IgnoreInvoiceInStatus []billing.InvoiceStatusMatcher // ShouldTriggerOnEvent gets the *current* stripe invoice and returns true if the state machine should be triggered // useful for filtering late events based on the current state (optional) ShouldTriggerOnEvent func(*stripe.Invoice) (bool, error) // Validation errors // GetValidationErrors is invoked with the current stripe invoice and returns the validation errors if any GetValidationErrors func(*stripe.Invoice) (*ValidationErrorsInput, error) }
func (HandleInvoiceStateTransitionInput) Validate ¶
func (i HandleInvoiceStateTransitionInput) Validate() error
type SetCustomerDefaultPaymentMethodInput ¶
type SetCustomerDefaultPaymentMethodInput struct { AppID app.AppID StripeCustomerID string PaymentMethodID string }
func (SetCustomerDefaultPaymentMethodInput) Validate ¶
func (i SetCustomerDefaultPaymentMethodInput) Validate() error
type SetCustomerDefaultPaymentMethodOutput ¶
type SetCustomerDefaultPaymentMethodOutput struct {
CustomerID customer.CustomerID
}
type UpdateAPIKeyInput ¶
func (UpdateAPIKeyInput) Validate ¶
func (i UpdateAPIKeyInput) Validate() error
type UpsertStripeCustomerDataInput ¶
type UpsertStripeCustomerDataInput struct { AppID app.AppID CustomerID customer.CustomerID StripeCustomerID string StripeDefaultPaymentMethodID *string }
func (UpsertStripeCustomerDataInput) Validate ¶
func (i UpsertStripeCustomerDataInput) Validate() error
type ValidationErrorsInput ¶
type ValidationErrorsInput struct { Op billing.InvoiceOperation Errors []*stripe.Error }
Click to show internal directories.
Click to hide internal directories.