Documentation ¶
Index ¶
- Constants
- func GetTenantName(aggregateID string) string
- type BankAccount
- type Tenant
- type TenantAggregate
- func (a *TenantAggregate) AddBankAccount(ctx context.Context, r *tenantpb.AddBankAccountGrpcRequest) (string, error)
- func (a *TenantAggregate) AddBillingProfile(ctx context.Context, request *tenantpb.AddBillingProfileRequest) (string, error)
- func (a *TenantAggregate) DeleteBankAccount(ctx context.Context, r *tenantpb.DeleteBankAccountGrpcRequest) error
- func (a *TenantAggregate) HandleGRPCRequest(ctx context.Context, request any, params map[string]any) (any, error)
- func (a *TenantAggregate) UpdateBankAccount(ctx context.Context, r *tenantpb.UpdateBankAccountGrpcRequest) error
- func (a *TenantAggregate) UpdateBillingProfile(ctx context.Context, r *tenantpb.UpdateBillingProfileRequest) error
- func (a *TenantAggregate) UpdateTenantSettings(ctx context.Context, r *tenantpb.UpdateTenantSettingsRequest) error
- func (a *TenantAggregate) When(evt eventstore.Event) error
- type TenantBillingProfile
- type TenantSettings
Constants ¶
View Source
const (
TenantAggregateType eventstore.AggregateType = "tenant"
)
Variables ¶
This section is empty.
Functions ¶
func GetTenantName ¶
Types ¶
type BankAccount ¶
type BankAccount struct { Id string `json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields commonmodel.Source `json:"source"` BankName string `json:"bankName"` BankTransferEnabled bool `json:"bankTransferEnabled"` AllowInternational bool `json:"allowInternational"` Currency string `json:"currency"` Iban string `json:"iban"` Bic string `json:"bic"` SortCode string `json:"sortCode"` AccountNumber string `json:"accountNumber"` RoutingNumber string `json:"routingNumber"` OtherDetails string `json:"otherDetails"` }
type Tenant ¶
type Tenant struct { Id string `json:"id"` Name string `json:"name"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields commonmodel.Source `json:"source"` BillingProfiles []TenantBillingProfile `json:"billingProfiles"` BankAccounts []BankAccount `json:"bankAccounts"` TenantSettings TenantSettings `json:"tenantSettings"` }
func (Tenant) AddBankAccount ¶
func (t Tenant) AddBankAccount(ba BankAccount)
func (Tenant) GetBankAccount ¶
func (t Tenant) GetBankAccount(id string) *BankAccount
func (Tenant) GetBillingProfile ¶
func (t Tenant) GetBillingProfile(id string) *TenantBillingProfile
func (Tenant) HasBankAccount ¶
func (Tenant) HasBillingProfile ¶
type TenantAggregate ¶
type TenantAggregate struct { *aggregate.CommonIdAggregate TenantDetails *Tenant }
func NewTenantAggregate ¶
func NewTenantAggregate(tenant string) *TenantAggregate
func (*TenantAggregate) AddBankAccount ¶
func (a *TenantAggregate) AddBankAccount(ctx context.Context, r *tenantpb.AddBankAccountGrpcRequest) (string, error)
func (*TenantAggregate) AddBillingProfile ¶
func (a *TenantAggregate) AddBillingProfile(ctx context.Context, request *tenantpb.AddBillingProfileRequest) (string, error)
func (*TenantAggregate) DeleteBankAccount ¶
func (a *TenantAggregate) DeleteBankAccount(ctx context.Context, r *tenantpb.DeleteBankAccountGrpcRequest) error
func (*TenantAggregate) HandleGRPCRequest ¶
func (*TenantAggregate) UpdateBankAccount ¶
func (a *TenantAggregate) UpdateBankAccount(ctx context.Context, r *tenantpb.UpdateBankAccountGrpcRequest) error
func (*TenantAggregate) UpdateBillingProfile ¶
func (a *TenantAggregate) UpdateBillingProfile(ctx context.Context, r *tenantpb.UpdateBillingProfileRequest) error
func (*TenantAggregate) UpdateTenantSettings ¶
func (a *TenantAggregate) UpdateTenantSettings(ctx context.Context, r *tenantpb.UpdateTenantSettingsRequest) error
func (*TenantAggregate) When ¶
func (a *TenantAggregate) When(evt eventstore.Event) error
type TenantBillingProfile ¶
type TenantBillingProfile struct { Id string `json:"id"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` SourceFields commonmodel.Source `json:"source"` Phone string `json:"phone"` AddressLine1 string `json:"addressLine1"` AddressLine2 string `json:"addressLine2"` AddressLine3 string `json:"addressLine3"` Locality string `json:"locality"` Country string `json:"country"` Region string `json:"region"` Zip string `json:"zip"` LegalName string `json:"legalName"` VatNumber string `json:"vatNumber"` SendInvoicesFrom string `json:"sendInvoicesFrom"` SendInvoicesBcc string `json:"sendInvoicesBcc"` CanPayWithPigeon bool `json:"canPayWithPigeon"` CanPayWithBankTransfer bool `json:"canPayWithBankTransfer"` Check bool `json:"check"` }
Click to show internal directories.
Click to hide internal directories.