Add email address to DFC Enterprise API

This commit is contained in:
Maikel Linke
2023-11-15 17:00:53 +11:00
parent 057c1363b1
commit fc8f0ec4f2
3 changed files with 3 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ class EnterpriseBuilder < DfcBuilder
vatNumber: enterprise.abn,
suppliedProducts: supplied_products,
catalogItems: catalog_items,
emails: [enterprise.email_address].compact,
localizations: [address],
phoneNumbers: [enterprise.phone].compact,
socialMedias: SocialMediaBuilder.social_medias(enterprise),

View File

@@ -10,6 +10,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
id: 10_000, owner: user, abn: "123 456", name: "Fred's Farm",
description: "This is an awesome enterprise",
facebook: "https://facebook.com/user",
email_address: "hello@example.org",
phone: "0404 444 000 200",
website: "https://openfoodnetwork.org",
address: build(:address, id: 40_000, address1: "42 Doveton Street"),

View File

@@ -319,6 +319,7 @@ paths:
"@type": dfc-b:Enterprise
dfc-b:hasAddress: http://test.host/api/dfc/addresses/40000
dfc-b:hasPhoneNumber: 0404 444 000 200
dfc-b:email: hello@example.org
dfc-b:websitePage: openfoodnetwork.org
dfc-b:hasSocialMedia: http://test.host/api/dfc/enterprises/10000/social_medias/facebook
dfc-b:name: Fred's Farm