mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add email address to DFC Enterprise API
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user