entityintegrationmapping

package
v1.0.30 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(m *EntityIntegrationMapping) error

Validate validates the EntityIntegrationMapping

func ValidateEntityType

func ValidateEntityType(entityType types.IntegrationEntityType) bool

ValidateEntityType validates the entity type

func ValidateProviderType

func ValidateProviderType(providerType string) bool

ValidateProviderType validates the provider type

Types

type EntityIntegrationMapping

type EntityIntegrationMapping struct {
	// ID is the unique identifier for the mapping
	ID string `db:"id" json:"id"`

	// EntityID is the FlexPrice entity ID (e.g., customer_id, plan_id, etc.)
	EntityID string `db:"entity_id" json:"entity_id"`

	// EntityType is the type of entity (e.g., customer, plan, invoice, subscription, etc.)
	EntityType types.IntegrationEntityType `db:"entity_type" json:"entity_type"`

	// ProviderType is the payment provider type (e.g., stripe, razorpay, etc.)
	ProviderType string `db:"provider_type" json:"provider_type"`

	// ProviderEntityID is the provider's entity ID (e.g., stripe_customer_id, etc.)
	ProviderEntityID string `db:"provider_entity_id" json:"provider_entity_id"`

	// Metadata contains provider-specific data
	Metadata map[string]interface{} `db:"metadata" json:"metadata"`

	// EnvironmentID is the environment identifier
	EnvironmentID string `db:"environment_id" json:"environment_id"`

	types.BaseModel
}

EntityIntegrationMapping represents an entity integration mapping in the system

func FromEnt

FromEnt converts an ent EntityIntegrationMapping to a domain EntityIntegrationMapping

func FromEntList

func FromEntList(mappings []*ent.EntityIntegrationMapping) []*EntityIntegrationMapping

FromEntList converts a list of ent EntityIntegrationMapping to domain EntityIntegrationMapping

type Repository

Repository defines the interface for entity integration mapping data access

Jump to

Keyboard shortcuts

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