appstripeentity

package
v1.0.0-beta.187 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIKeySecretKey  = "stripe_api_key"
	WebhookSecretKey = "stripe_webhook_secret"
)

Variables

View Source
var (
	StripeMarketplaceListing = appentitybase.MarketplaceListing{
		Type:        appentitybase.AppTypeStripe,
		Name:        "Stripe",
		Description: "Stripe is a payment processing platform.",
		IconURL:     "https://stripe.com/favicon.ico",
		Capabilities: []appentitybase.Capability{
			StripeCollectPaymentCapability,
			StripeCalculateTaxCapability,
			StripeInvoiceCustomerCapability,
		},
	}

	StripeCollectPaymentCapability = appentitybase.Capability{
		Type:        appentitybase.CapabilityTypeCollectPayments,
		Key:         "stripe_collect_payment",
		Name:        "Payment",
		Description: "Process payments",
	}

	StripeCalculateTaxCapability = appentitybase.Capability{
		Type:        appentitybase.CapabilityTypeCalculateTax,
		Key:         "stripe_calculate_tax",
		Name:        "Calculate Tax",
		Description: "Calculate tax for a payment",
	}

	StripeInvoiceCustomerCapability = appentitybase.Capability{
		Type:        appentitybase.CapabilityTypeInvoiceCustomers,
		Key:         "stripe_invoice_customer",
		Name:        "Invoice Customer",
		Description: "Invoice a customer",
	}
)

Functions

This section is empty.

Types

type AppBase

type AppBase struct {
	appentitybase.AppBase
	AppData
}

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

func (AppData) Validate

func (d AppData) Validate() error

type CreateAppStripeInput

type CreateAppStripeInput struct {
	ID              *string
	Namespace       string
	Name            string
	Description     string
	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               *appentitybase.AppID
	CreateCustomerInput *customerentity.CreateCustomerInput
	CustomerID          *customerentity.CustomerID
	StripeCustomerID    *string
	Options             stripeclient.StripeCheckoutSessionOptions
}

func (CreateCheckoutSessionInput) Validate

func (i CreateCheckoutSessionInput) Validate() error

type CreateCheckoutSessionOutput

type CreateCheckoutSessionOutput struct {
	CustomerID       customerentity.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      appentitybase.AppID
	CustomerID customerentity.CustomerID

	Name *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

type CustomerData struct {
	StripeCustomerID             string
	StripeDefaultPaymentMethodID *string
}

func (CustomerData) Validate

func (d CustomerData) Validate() error

type DeleteStripeCustomerDataInput

type DeleteStripeCustomerDataInput struct {
	AppID      *appentitybase.AppID
	CustomerID customerentity.CustomerID
}

func (DeleteStripeCustomerDataInput) Validate

func (i DeleteStripeCustomerDataInput) Validate() error

type GetAppInput

type GetAppInput = appentitybase.AppID

type GetStripeAppDataInput

type GetStripeAppDataInput struct {
	AppID appentitybase.AppID
}

func (GetStripeAppDataInput) Validate

func (i GetStripeAppDataInput) Validate() error

type GetStripeCustomerDataInput

type GetStripeCustomerDataInput struct {
	AppID      appentitybase.AppID
	CustomerID customerentity.CustomerID
}

func (GetStripeCustomerDataInput) Validate

func (i GetStripeCustomerDataInput) Validate() error

type GetWebhookSecretInput

type GetWebhookSecretInput struct {
	AppID string
}

func (GetWebhookSecretInput) Validate

func (i GetWebhookSecretInput) Validate() error

type GetWebhookSecretOutput

type GetWebhookSecretOutput = secretentity.Secret

type SetCustomerDefaultPaymentMethodInput

type SetCustomerDefaultPaymentMethodInput struct {
	AppID            appentitybase.AppID
	StripeCustomerID string
	PaymentMethodID  string
}

func (SetCustomerDefaultPaymentMethodInput) Validate

type SetCustomerDefaultPaymentMethodOutput

type SetCustomerDefaultPaymentMethodOutput struct {
	CustomerID customerentity.CustomerID
}

type UpsertStripeCustomerDataInput

type UpsertStripeCustomerDataInput struct {
	AppID                        appentitybase.AppID
	CustomerID                   customerentity.CustomerID
	StripeCustomerID             string
	StripeDefaultPaymentMethodID *string
}

func (UpsertStripeCustomerDataInput) Validate

func (i UpsertStripeCustomerDataInput) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL