APPUiO Control API: BillingEntity
|This resource implements the "Manage Billing Information" features.|
BillingEntity allows a user to manage billing information in a self-service manner.
It allows users to choose where to bill their used resources through a link to the
BillingEntity maps records and fields needed to create invoices from an external ERP to the API.
All information required for an invoice can be accessed through the APPUiO Portal and the APPUiO Control API.
It is required that billing data can be modified by the billing entity owner in the APPUiO Portal and by our accounting team in the ERP.
A naive implementation with a controller that synchronizes the
BillingEntity resource with the ERP would be problematic.
An implementation based on a controller would create a system with multiple sources of truth.
To ensure we have a single source of truth the
BillingEntity is a virtual resource that is stored in the ERP and fetched by an aggregated API server.
See Billing Entity as Virtual Resource.
apiVersion: billing.appuio.io/v1 kind: BillingEntity metadata: name: be-2494 (1) spec: name: Cyber AI (2) phone: "+41313131313" emails: (3) - firstname.lastname@example.org address: line1: "Zisternenstrasse 3f" line2: "" postalCode: "3600" city: "Thun" accountingContact: (4) name: "Ursula Gurnmeister" (5) emails: (6) - email@example.com - firstname.lastname@example.org languagePreference: de (7)
|1||The name of the
|2||The name of the company. Also used as the display name.|
|3||The general contact email address of the company.|
|4||The accounting contact information. Used when generating invoices.|
|5||The name of the accounting contact person. Used in the "c/o" line of the invoice.|
|6||The email addresses of the accounting contact person. Invoices are sent to these addresses.|
|7||The language preference of the company. Used when generating invoices for text content not from the billing system. Future use.|
apiVersion: organization.appuio.io/v1 (1) kind: Organization spec: billingEntityRef: be-234234 (2) status: billingEntityName: Acme Corp. (3)
|1||Only relevant fields are shown for brevity.|
|3||The cached display name of the
We use the same access control mechanism for
We use standard Kubernetes role-based access control for
BillingEntity with two distinct differences.
Access needs to be granted for
billingentitiesresources in API group
rbac.appuio.ioand not for resources in API group
billing.appuio.io. Permissions can be configured through both
RoleBindings, as well as
watchverbs the API server will only return resources that the user also has permission to
Users with the