diff --git a/components/schemas/billing/invoices/Invoice.yml b/components/schemas/billing/invoices/Invoice.yml index 56b02d59..84f533c6 100644 --- a/components/schemas/billing/invoices/Invoice.yml +++ b/components/schemas/billing/invoices/Invoice.yml @@ -15,6 +15,10 @@ properties: "$ref": "../../ID.yml" hub_id: "$ref": "../../HubID.yml" + billing_contact: + oneOf: + - $ref: ../../hubs/HubBillingContact.yml + - type: "null" approved: type: boolean description: A boolean where true represents the invoice is approved for collection. diff --git a/components/schemas/hubs/HubBillingContact.yml b/components/schemas/hubs/HubBillingContact.yml new file mode 100644 index 00000000..c3f538d7 --- /dev/null +++ b/components/schemas/hubs/HubBillingContact.yml @@ -0,0 +1,17 @@ +title: HubBillingContact +type: object +description: The contact to whom invoices are billed. +required: + - name + - legal_business_name + - tax_id +properties: + name: + type: string + description: The name of the billing contact. + legal_business_name: + type: string + description: The legal business name of the billing contact. + tax_id: + type: string + description: The legal tax ID of the billing contact, if applicable. diff --git a/components/schemas/hubs/HubBillingProfile.yml b/components/schemas/hubs/HubBillingProfile.yml index 2092fc5c..d411b4e7 100644 --- a/components/schemas/hubs/HubBillingProfile.yml +++ b/components/schemas/hubs/HubBillingProfile.yml @@ -42,3 +42,5 @@ properties: items: type: string description: An array of email addresses to whom the billing invoices will be sent to. If left empty, they will be sent to the owner of this hub. + contact: + $ref: HubBillingContact.yml diff --git a/platform/paths/hubs/hub.yml b/platform/paths/hubs/hub.yml index 0c977722..e6ec8312 100644 --- a/platform/paths/hubs/hub.yml +++ b/platform/paths/hubs/hub.yml @@ -56,6 +56,25 @@ patch: $ref: ../../../components/schemas/hubs/HubWebhooks.yml security: $ref: ../../../components/schemas/hubs/HubSecurity.yml + identifier: + type: string + billing_contact: + oneOf: + - type: object + properties: + name: + type: + - string + - "null" + legal_business_name: + type: + - string + - "null" + tax_id: + type: + - string + - "null" + - type: "null" responses: 200: description: Returns the updated Hub resource.