From 8ae9885d070caa57c2176f8e1aa27fa49de1a483 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Fri, 24 Jan 2025 08:12:05 -0800 Subject: [PATCH 1/4] Add billing contact --- components/schemas/hubs/HubBillingProfile.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/components/schemas/hubs/HubBillingProfile.yml b/components/schemas/hubs/HubBillingProfile.yml index 2092fc5c..4ffb5120 100644 --- a/components/schemas/hubs/HubBillingProfile.yml +++ b/components/schemas/hubs/HubBillingProfile.yml @@ -42,3 +42,21 @@ 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: + type: object + name: BillingContact + 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. From 9dcc7a556b5f416bd8f31d8626f11fbd29ca9ab9 Mon Sep 17 00:00:00 2001 From: Alexander Mattoni <5110855+mattoni@users.noreply.github.com> Date: Fri, 24 Jan 2025 08:13:55 -0800 Subject: [PATCH 2/4] name -> title --- components/schemas/hubs/HubBillingProfile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/schemas/hubs/HubBillingProfile.yml b/components/schemas/hubs/HubBillingProfile.yml index 4ffb5120..a0f006e3 100644 --- a/components/schemas/hubs/HubBillingProfile.yml +++ b/components/schemas/hubs/HubBillingProfile.yml @@ -44,7 +44,7 @@ properties: 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: type: object - name: BillingContact + title: BillingContact description: The contact to whom invoices are billed. required: - name From d72889c83d72a15fcce9110b65ce5b4a6f5d3cb0 Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Wed, 29 Jan 2025 15:39:44 -0800 Subject: [PATCH 3/4] add to invoice and patch hub call --- .../schemas/billing/invoices/Invoice.yml | 4 ++++ components/schemas/hubs/HubBillingContact.yml | 17 +++++++++++++++++ components/schemas/hubs/HubBillingProfile.yml | 18 +----------------- platform/paths/hubs/hub.yml | 19 +++++++++++++++++++ 4 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 components/schemas/hubs/HubBillingContact.yml diff --git a/components/schemas/billing/invoices/Invoice.yml b/components/schemas/billing/invoices/Invoice.yml index 56b02d59..894fd457 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: + - type: "null" + - $ref: ../../hubs/HubBillingContact.yml 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 a0f006e3..d411b4e7 100644 --- a/components/schemas/hubs/HubBillingProfile.yml +++ b/components/schemas/hubs/HubBillingProfile.yml @@ -43,20 +43,4 @@ properties: 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: - type: object - title: BillingContact - 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. + $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. From cc6478adad999678448b268d4f557294f297272f Mon Sep 17 00:00:00 2001 From: blewisCycle Date: Wed, 29 Jan 2025 16:00:08 -0800 Subject: [PATCH 4/4] comment --- components/schemas/billing/invoices/Invoice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/schemas/billing/invoices/Invoice.yml b/components/schemas/billing/invoices/Invoice.yml index 894fd457..84f533c6 100644 --- a/components/schemas/billing/invoices/Invoice.yml +++ b/components/schemas/billing/invoices/Invoice.yml @@ -17,8 +17,8 @@ properties: "$ref": "../../HubID.yml" billing_contact: oneOf: - - type: "null" - $ref: ../../hubs/HubBillingContact.yml + - type: "null" approved: type: boolean description: A boolean where true represents the invoice is approved for collection.