Gaetan Craig-Riou
a2cb1f4c37
Update swagger documentation
2024-01-22 10:12:39 +11:00
Gaetan Craig-Riou
4d52e169e2
Update taxon to not be a top concept product type
...
This is to test the product type matching is working properly
2024-01-22 10:12:39 +11:00
Gaetan Craig-Riou
42e2141d05
Match product taxon with DFC Product type
...
It relies on having dfc_name populated on the given taxon.
Matching is as follow:
- parse the DFC product types and store in PRODUCT_TYPES if needed
- match the dfc_name against PRODUCT_TYPES
- call the method returned on the DFC connector
2024-01-22 10:12:39 +11:00
Gaetan Craig-Riou
8014aa4c2f
Update test to check for Product Type
2024-01-22 10:12:39 +11:00
Gaetan Craig-Riou
403386ea09
Add basic match on the root level Product Types
...
Currently anything but the leaf level is modelled as a
DataFoodConsortium::Connector::SKOSInstance, which isn't supported
by the connector as "hasType" for a product. The lead level is modelled
by DataFoodConsortium::Connector::SKOSConcept which is supported by
connector. On top of is `#narrowers`, `#broaders`and `#prefLabels`
aren't set making it very difficult to travers the Product Type tree.
2024-01-22 10:12:32 +11:00
Maikel Linke
9ad2cf78ce
Spec requiring tax category when creating products
...
We observed an error when an instance requires a tax category and we
tried to create products via the DFC API:
* https://github.com/openfoodfoundation/openfoodnetwork/issues/11212
But I found that the error only appears after changing the instance
config without declaring a tax category as default. The right setup as
in the spec does work. The spec passes.
I don't think that this needs any fix. We shouldn't assign any tax
category just because it's required. The instance manager needs to
select a default.
2024-01-12 17:06:24 +11:00
Maikel Linke
aa5c6f34f2
Move product type definition to separate module
2024-01-12 14:58:03 +11:00
Maikel Linke
583ac65920
Move building of Offer to the right module
...
The DfcBuilder was doing everything to start with but we are moving its
parts to smaller modules now.
2024-01-12 14:57:58 +11:00
Maikel Linke
bdff8ffea3
Spec pending setting of on_demand via DFC API
...
The DFC Connector doesn't support importing null values. This has to
wait until it's solved in the Connector or we have an urgent use case.
2024-01-12 14:25:14 +11:00
Maikel Linke
af51177593
Update price and stock through the DFC API
2024-01-12 14:25:11 +11:00
Maikel Linke
8d6ae18fb6
Show Offers on the DFC API
2024-01-12 14:22:24 +11:00
Maikel Linke
4bac83dd83
Update variant name instead of product via DFC
...
A DFC SuppliedProduct relates to a Spree::Variant and when updating its
name we only want to change the name for that variant. Otherwise, when
we update the name of the product, it would update the name for all
variants and all the corresponding SuppliedProducts.
2024-01-12 14:22:24 +11:00
Maikel
90fb0ed399
Merge pull request #12024 from rioug/11707-DFC-update-enterprise-group
...
[DFC] add/delete enterprise to enterprise group
2024-01-12 08:53:17 +11:00
Maikel Linke
30b5d065c1
Replace deprecated swagger syntax
2024-01-11 15:13:41 +11:00
Gaetan Craig-Riou
a78042cee1
Remove save after adding an association with <<
...
`<<` operator already save the the association to the database
2024-01-10 15:48:36 +11:00
Gaetan Craig-Riou
92921c89d1
Add enpoint to delete enterprise from group
...
Plus documentation
2024-01-10 12:44:02 +11:00
Gaetan Craig-Riou
b90349e4c2
Add endpoint to add enterprise to a group
...
plus documentaion
2024-01-10 12:31:38 +11:00
Gaetan Craig-Riou
626e903ab9
Add ability for controller to use CanCan
2024-01-09 14:44:12 +11:00
Mohamed ABDELLANI
d239beb226
remove unnecessary require instructions
2024-01-03 11:34:57 +01:00
Maikel Linke
eb03235295
Use full product and variant name on DFC API
2023-12-20 16:43:29 +11:00
Gaetan Craig-Riou
021e292190
Add a quick patch description
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
9628045e1c
Fix indentation
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
a06e7c1d9e
Fix rubocop issue
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
0392806018
Parser, populate SKOSConcept label
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
9f209cac14
Fix rubocop warning
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
633d0eadfe
Parser element, add label
2023-12-04 13:56:14 +11:00
Gaetan Craig-Riou
c61e982a76
Fix rubocop warning
2023-12-04 12:00:18 +11:00
Gaetan Craig-Riou
e846761e54
WIP Patch DFC connector to fix SKOS Concept parsing
...
This is to let us use intermediary SKOS Concept.
Upstream PR for more details: https://github.com/datafoodconsortium/connector-codegen/pull/10/files
2023-12-01 14:26:09 +11:00
Maikel Linke
6e34c41f42
Bump DFC taxonomies to v1.0.2
...
Finally replacing the last of the old DFC context URLs that are not
valid any more.
2023-11-16 15:52:31 +11:00
Maikel Linke
b055474918
DRY long method
2023-11-16 09:30:04 +11:00
Maikel Linke
e5f5f3922c
Add contact name to DFC Enterprise API
2023-11-16 09:10:43 +11:00
Maikel Linke
fc8f0ec4f2
Add email address to DFC Enterprise API
2023-11-15 17:00:53 +11:00
Maikel Linke
057c1363b1
Add phone number to DFC Enterprise API
2023-11-15 16:57:38 +11:00
Maikel Linke
80c0df9d1e
Add website to DFC Enterprise API
2023-11-15 16:48:44 +11:00
Maikel Linke
1fb87bc497
Add SocialMedia to DFC Enterprise API
2023-11-15 16:19:23 +11:00
Maikel Linke
9311a29c9f
Add logo URL to DFC Enterprise API
2023-11-15 15:16:39 +11:00
Maikel Linke
6266df5c76
Add long description to DFC Enterprise API
2023-11-15 14:59:15 +11:00
Maikel Linke
cde57fcfb4
Update specs for changed attribute URI
2023-11-09 16:16:24 +11:00
Maikel Linke
eac632c81e
Use new DFC Connector API to add an address
2023-11-09 16:16:24 +11:00
Maikel Linke
8d81802f47
Update DFC SKOS Parser monkey patch with current code
2023-11-09 16:16:24 +11:00
Maikel Linke
5d29dee848
Update DFC Importer to use shortened URIs
...
The new Connector code uses shortened URIs now.
2023-11-09 16:16:24 +11:00
Maikel Linke
d0dd6e57ca
Replace variable values with fixed values in Swagger doc
2023-11-08 17:12:42 +11:00
Gaetan Craig-Riou
f76bdf0c6f
Fix rubocop warning
2023-11-08 13:57:35 +11:00
Gaetan Craig-Riou
7987967824
Check product image url is present on supplied product endpoint
2023-11-08 13:57:35 +11:00
Gaetan Craig-Riou
12c6257a0f
Pass the image url to DfcProvider::SuppliedProduct
2023-11-08 13:57:35 +11:00
Gaetan Craig-Riou
424954ec54
Add ofn:image to SuppliedProduct
...
Temporary solution as we wait for the DFC connector to be updated
to support "dfc_b:image" for SuppliedProduct
2023-11-08 13:57:35 +11:00
Maikel Linke
847ddab4e6
Improve readability of assignment without blank lines
2023-09-22 17:18:49 +10:00
Maikel Linke
02f251c900
Import DFC SuppliedProduct as new variant of existing product
2023-09-21 09:04:57 +10:00
Maikel Linke
db5b6e5406
Enable DFC importer to import OFN objects
2023-09-21 09:04:28 +10:00
Maikel Linke
fcf7b94278
Add our own SuppliedProduct with custom property
2023-09-21 09:02:20 +10:00