datafoodconsortium-connector 1.0.0.pre.alpha.12 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/datafoodconsortium/connector/address.rb +1 -1
- data/lib/datafoodconsortium/connector/agent.rb +1 -1
- data/lib/datafoodconsortium/connector/allergen_characteristic.rb +1 -1
- data/lib/datafoodconsortium/connector/catalog_item.rb +1 -1
- data/lib/datafoodconsortium/connector/characteristic.rb +1 -1
- data/lib/datafoodconsortium/connector/customer_category.rb +1 -1
- data/lib/datafoodconsortium/connector/defined_product.rb +13 -1
- data/lib/datafoodconsortium/connector/enterprise.rb +1 -1
- data/lib/datafoodconsortium/connector/nutrient_characteristic.rb +1 -1
- data/lib/datafoodconsortium/connector/offer.rb +1 -1
- data/lib/datafoodconsortium/connector/order.rb +7 -1
- data/lib/datafoodconsortium/connector/order_line.rb +1 -1
- data/lib/datafoodconsortium/connector/person.rb +1 -1
- data/lib/datafoodconsortium/connector/phone_number.rb +1 -1
- data/lib/datafoodconsortium/connector/physical_characteristic.rb +1 -1
- data/lib/datafoodconsortium/connector/price.rb +1 -1
- data/lib/datafoodconsortium/connector/quantitative_value.rb +1 -1
- data/lib/datafoodconsortium/connector/quantity.rb +1 -1
- data/lib/datafoodconsortium/connector/sale_session.rb +1 -1
- data/lib/datafoodconsortium/connector/social_media.rb +1 -1
- data/lib/datafoodconsortium/connector/supplied_product.rb +4 -2
- data/lib/datafoodconsortium/connector/technical_product.rb +4 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 653a023fe7b9c3e2f59a738b31a8713745e4c106650ec743529397c0f817b331
|
4
|
+
data.tar.gz: 588951db4b8311fd71350b8668089958f5983e36712f50f458f3d00860c37230
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 666e12a902979c275b10a883861759a781e9bffbb8c9e58de95f72d74cd33d79d3e6060917ab4c8c2417c22d525097c218b56bc7482b087a8f8f186d3e8f466e
|
7
|
+
data.tar.gz: 2533e80077e344ed2c54b0466ce0347dd91267f45c42a5f779b0545154788d2296875d387671550e17427ab73ecd289ade1a0bc846a0163b28fa40cdbf1036c1
|
@@ -57,7 +57,7 @@ class DataFoodConsortium::Connector::Address
|
|
57
57
|
# @param latitude [Real]
|
58
58
|
# @param longitude [Real]
|
59
59
|
# @param region [String]
|
60
|
-
def initialize(semanticId, street:
|
60
|
+
def initialize(semanticId, street: nil, postalCode: nil, city: nil, country: nil, latitude: nil, longitude: nil, region: nil)
|
61
61
|
super(semanticId)
|
62
62
|
@street = street
|
63
63
|
@postalCode = postalCode
|
@@ -54,7 +54,7 @@ class DataFoodConsortium::Connector::Agent
|
|
54
54
|
# @param websites [String]
|
55
55
|
# @param socialMedias [ISocialMedia]
|
56
56
|
# @param logo [String]
|
57
|
-
def initialize(semanticId, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo:
|
57
|
+
def initialize(semanticId, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil)
|
58
58
|
super(semanticId)
|
59
59
|
@localizations = localizations
|
60
60
|
@phoneNumbers = phoneNumbers
|
@@ -35,7 +35,7 @@ class DataFoodConsortium::Connector::AllergenCharacteristic < DataFoodConsortium
|
|
35
35
|
# @param allergenDimension [ISKOSConcept]
|
36
36
|
# @param unit [ISKOSConcept]
|
37
37
|
# @param value [Real]
|
38
|
-
def initialize(allergenDimension: nil, unit: nil, value:
|
38
|
+
def initialize(allergenDimension: nil, unit: nil, value: nil)
|
39
39
|
super(unit: unit, value: value)
|
40
40
|
@allergenDimension = allergenDimension
|
41
41
|
self.semanticType = "dfc-b:AllergenCharacteristic"
|
@@ -52,7 +52,7 @@ class DataFoodConsortium::Connector::CatalogItem
|
|
52
52
|
# @param stockLimitation [Real]
|
53
53
|
# @param offers [IOffer]
|
54
54
|
# @param catalogs [ICatalog]
|
55
|
-
def initialize(semanticId, product: nil, sku:
|
55
|
+
def initialize(semanticId, product: nil, sku: nil, stockLimitation: nil, offers: [], catalogs: [])
|
56
56
|
super(semanticId)
|
57
57
|
@product = product
|
58
58
|
@sku = sku
|
@@ -30,7 +30,7 @@ class DataFoodConsortium::Connector::Characteristic < DataFoodConsortium::Connec
|
|
30
30
|
|
31
31
|
# @param unit [ISKOSConcept]
|
32
32
|
# @param value [Real]
|
33
|
-
def initialize(unit: nil, value:
|
33
|
+
def initialize(unit: nil, value: nil)
|
34
34
|
super(unit: unit, value: value)
|
35
35
|
|
36
36
|
|
@@ -33,7 +33,7 @@ class DataFoodConsortium::Connector::CustomerCategory
|
|
33
33
|
|
34
34
|
# @param semanticId [String]
|
35
35
|
# @param description [String]
|
36
|
-
def initialize(semanticId, description:
|
36
|
+
def initialize(semanticId, description: nil)
|
37
37
|
super(semanticId)
|
38
38
|
@description = description
|
39
39
|
self.semanticType = "dfc-b:CustomerCategory"
|
@@ -85,6 +85,12 @@ class DataFoodConsortium::Connector::DefinedProduct
|
|
85
85
|
# @return [String]
|
86
86
|
attr_accessor :images
|
87
87
|
|
88
|
+
# @return [IDefinedProduct]
|
89
|
+
attr_accessor :variants
|
90
|
+
|
91
|
+
# @return [IDefinedProduct]
|
92
|
+
attr_accessor :isVariantOf
|
93
|
+
|
88
94
|
# @param semanticId [String]
|
89
95
|
# @param name [String]
|
90
96
|
# @param description [String]
|
@@ -103,7 +109,9 @@ class DataFoodConsortium::Connector::DefinedProduct
|
|
103
109
|
# @param natureOrigin [ISKOSConcept]
|
104
110
|
# @param partOrigin [ISKOSConcept]
|
105
111
|
# @param images [String]
|
106
|
-
|
112
|
+
# @param variants [IDefinedProduct]
|
113
|
+
# @param isVariantOf [IDefinedProduct]
|
114
|
+
def initialize(semanticId, name: nil, description: nil, productType: nil, quantity: nil, alcoholPercentage: nil, lifetime: nil, claims: [], usageOrStorageConditions: nil, allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [], images: [], variants: [], isVariantOf: [])
|
107
115
|
super(semanticId)
|
108
116
|
@name = name
|
109
117
|
@description = description
|
@@ -122,6 +130,8 @@ class DataFoodConsortium::Connector::DefinedProduct
|
|
122
130
|
@natureOrigin = natureOrigin
|
123
131
|
@partOrigin = partOrigin
|
124
132
|
@images = images
|
133
|
+
@variants = variants
|
134
|
+
@isVariantOf = isVariantOf
|
125
135
|
self.semanticType = "dfc-b:DefinedProduct"
|
126
136
|
registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
|
127
137
|
registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
|
@@ -140,6 +150,8 @@ class DataFoodConsortium::Connector::DefinedProduct
|
|
140
150
|
registerSemanticProperty("dfc-b:hasNatureOrigin", &method("natureOrigin")).valueSetter = method("natureOrigin=")
|
141
151
|
registerSemanticProperty("dfc-b:hasPartOrigin", &method("partOrigin")).valueSetter = method("partOrigin=")
|
142
152
|
registerSemanticProperty("dfc-b:image", &method("images")).valueSetter = method("images=")
|
153
|
+
registerSemanticProperty("dfc-b:hasVariant", &method("variants")).valueSetter = method("variants=")
|
154
|
+
registerSemanticProperty("dfc-b:isVariantOf", &method("isVariantOf")).valueSetter = method("isVariantOf=")
|
143
155
|
end
|
144
156
|
|
145
157
|
|
@@ -80,7 +80,7 @@ class DataFoodConsortium::Connector::Enterprise < DataFoodConsortium::Connector:
|
|
80
80
|
# @param websites [String]
|
81
81
|
# @param socialMedias [ISocialMedia]
|
82
82
|
# @param logo [String]
|
83
|
-
def initialize(semanticId, name:
|
83
|
+
def initialize(semanticId, name: nil, description: nil, vatNumber: nil, customerCategories: [], catalogs: [], catalogItems: [], suppliedProducts: [], technicalProducts: [], mainContact: nil, localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil)
|
84
84
|
super(semanticId, localizations: localizations, phoneNumbers: phoneNumbers, emails: emails, websites: websites, socialMedias: socialMedias, logo: logo)
|
85
85
|
@name = name
|
86
86
|
@description = description
|
@@ -35,7 +35,7 @@ class DataFoodConsortium::Connector::NutrientCharacteristic < DataFoodConsortium
|
|
35
35
|
# @param nutrientDimension [ISKOSConcept]
|
36
36
|
# @param unit [ISKOSConcept]
|
37
37
|
# @param value [Real]
|
38
|
-
def initialize(nutrientDimension: nil, unit: nil, value:
|
38
|
+
def initialize(nutrientDimension: nil, unit: nil, value: nil)
|
39
39
|
super(unit: unit, value: value)
|
40
40
|
@nutrientDimension = nutrientDimension
|
41
41
|
self.semanticType = "dfc-b:NutrientCharacteristic"
|
@@ -48,7 +48,7 @@ class DataFoodConsortium::Connector::Offer
|
|
48
48
|
# @param stockLimitation [Real]
|
49
49
|
# @param offeredItem [ICatalogItem]
|
50
50
|
# @param offeredTo [ICustomerCategory]
|
51
|
-
def initialize(semanticId, price: nil, stockLimitation:
|
51
|
+
def initialize(semanticId, price: nil, stockLimitation: nil, offeredItem: nil, offeredTo: nil)
|
52
52
|
super(semanticId)
|
53
53
|
@price = price
|
54
54
|
@stockLimitation = stockLimitation
|
@@ -46,6 +46,9 @@ class DataFoodConsortium::Connector::Order
|
|
46
46
|
# @return [IAgent]
|
47
47
|
attr_accessor :client
|
48
48
|
|
49
|
+
# @return [IAgent]
|
50
|
+
attr_accessor :soldBy
|
51
|
+
|
49
52
|
# @return [ISKOSConcept]
|
50
53
|
attr_accessor :fulfilmentStatus
|
51
54
|
|
@@ -61,16 +64,18 @@ class DataFoodConsortium::Connector::Order
|
|
61
64
|
# @param saleSession [ISaleSession]
|
62
65
|
# @param lines [IOrderLine]
|
63
66
|
# @param client [IAgent]
|
67
|
+
# @param soldBy [IAgent]
|
64
68
|
# @param fulfilmentStatus [ISKOSConcept]
|
65
69
|
# @param orderStatus [ISKOSConcept]
|
66
70
|
# @param paymentStatus [ISKOSConcept]
|
67
|
-
def initialize(semanticId, number:
|
71
|
+
def initialize(semanticId, number: nil, date: nil, saleSession: nil, lines: [], client: nil, soldBy: nil, fulfilmentStatus: nil, orderStatus: nil, paymentStatus: nil)
|
68
72
|
super(semanticId)
|
69
73
|
@number = number
|
70
74
|
@date = date
|
71
75
|
@saleSession = saleSession
|
72
76
|
@lines = lines
|
73
77
|
@client = client
|
78
|
+
@soldBy = soldBy
|
74
79
|
@fulfilmentStatus = fulfilmentStatus
|
75
80
|
@orderStatus = orderStatus
|
76
81
|
@paymentStatus = paymentStatus
|
@@ -80,6 +85,7 @@ class DataFoodConsortium::Connector::Order
|
|
80
85
|
registerSemanticProperty("dfc-b:belongsTo", &method("saleSession")).valueSetter = method("saleSession=")
|
81
86
|
registerSemanticProperty("dfc-b:hasPart", &method("lines")).valueSetter = method("lines=")
|
82
87
|
registerSemanticProperty("dfc-b:orderedBy", &method("client")).valueSetter = method("client=")
|
88
|
+
registerSemanticProperty("dfc-b:soldBy", &method("soldBy")).valueSetter = method("soldBy=")
|
83
89
|
registerSemanticProperty("dfc-b:hasFulfilmentStatus", &method("fulfilmentStatus")).valueSetter = method("fulfilmentStatus=")
|
84
90
|
registerSemanticProperty("dfc-b:hasOrderStatus", &method("orderStatus")).valueSetter = method("orderStatus=")
|
85
91
|
registerSemanticProperty("dfc-b:hasPaymentStatus", &method("paymentStatus")).valueSetter = method("paymentStatus=")
|
@@ -52,7 +52,7 @@ class DataFoodConsortium::Connector::OrderLine
|
|
52
52
|
# @param price [IPrice]
|
53
53
|
# @param offer [IOffer]
|
54
54
|
# @param order [IOrder]
|
55
|
-
def initialize(semanticId, description:
|
55
|
+
def initialize(semanticId, description: nil, quantity: nil, price: nil, offer: nil, order: nil)
|
56
56
|
super(semanticId)
|
57
57
|
@description = description
|
58
58
|
@quantity = quantity
|
@@ -49,7 +49,7 @@ class DataFoodConsortium::Connector::Person < DataFoodConsortium::Connector::Age
|
|
49
49
|
# @param websites [String]
|
50
50
|
# @param socialMedias [ISocialMedia]
|
51
51
|
# @param logo [String]
|
52
|
-
def initialize(semanticId, firstName:
|
52
|
+
def initialize(semanticId, firstName: nil, lastName: nil, affiliatedOrganizations: [], localizations: [], phoneNumbers: [], emails: [], websites: [], socialMedias: [], logo: nil)
|
53
53
|
super(semanticId, localizations: localizations, phoneNumbers: phoneNumbers, emails: emails, websites: websites, socialMedias: socialMedias, logo: logo)
|
54
54
|
@firstName = firstName
|
55
55
|
@lastName = lastName
|
@@ -37,7 +37,7 @@ class DataFoodConsortium::Connector::PhoneNumber
|
|
37
37
|
# @param semanticId [String]
|
38
38
|
# @param countryCode [Integer]
|
39
39
|
# @param phoneNumber [String]
|
40
|
-
def initialize(semanticId, countryCode:
|
40
|
+
def initialize(semanticId, countryCode: nil, phoneNumber: nil)
|
41
41
|
super(semanticId)
|
42
42
|
@countryCode = countryCode
|
43
43
|
@phoneNumber = phoneNumber
|
@@ -35,7 +35,7 @@ class DataFoodConsortium::Connector::PhysicalCharacteristic < DataFoodConsortium
|
|
35
35
|
# @param physicalDimension [ISKOSConcept]
|
36
36
|
# @param unit [ISKOSConcept]
|
37
37
|
# @param value [Real]
|
38
|
-
def initialize(physicalDimension: nil, unit: nil, value:
|
38
|
+
def initialize(physicalDimension: nil, unit: nil, value: nil)
|
39
39
|
super(unit: unit, value: value)
|
40
40
|
@physicalDimension = physicalDimension
|
41
41
|
self.semanticType = "dfc-b:PhysicalCharacteristic"
|
@@ -41,7 +41,7 @@ class DataFoodConsortium::Connector::Price
|
|
41
41
|
# @param value [Real]
|
42
42
|
# @param vatRate [Real]
|
43
43
|
# @param unit [ISKOSConcept]
|
44
|
-
def initialize(value:
|
44
|
+
def initialize(value: nil, vatRate: nil, unit: nil)
|
45
45
|
super()
|
46
46
|
@value = value
|
47
47
|
@vatRate = vatRate
|
@@ -46,7 +46,7 @@ class DataFoodConsortium::Connector::SaleSession
|
|
46
46
|
# @param endDate [String]
|
47
47
|
# @param quantity [Real]
|
48
48
|
# @param offers [IOffer]
|
49
|
-
def initialize(semanticId, beginDate:
|
49
|
+
def initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: [])
|
50
50
|
super(semanticId)
|
51
51
|
@beginDate = beginDate
|
52
52
|
@endDate = endDate
|
@@ -37,7 +37,7 @@ class DataFoodConsortium::Connector::SocialMedia
|
|
37
37
|
# @param semanticId [String]
|
38
38
|
# @param name [String]
|
39
39
|
# @param url [String]
|
40
|
-
def initialize(semanticId, name:
|
40
|
+
def initialize(semanticId, name: nil, url: nil)
|
41
41
|
super(semanticId)
|
42
42
|
@name = name
|
43
43
|
@url = url
|
@@ -60,8 +60,10 @@ class DataFoodConsortium::Connector::SuppliedProduct < DataFoodConsortium::Conne
|
|
60
60
|
# @param natureOrigin [ISKOSConcept]
|
61
61
|
# @param partOrigin [ISKOSConcept]
|
62
62
|
# @param images [String]
|
63
|
-
|
64
|
-
|
63
|
+
# @param variants [IDefinedProduct]
|
64
|
+
# @param isVariantOf [IDefinedProduct]
|
65
|
+
def initialize(semanticId, totalTheoreticalStock: nil, name: nil, description: nil, productType: nil, quantity: nil, alcoholPercentage: nil, lifetime: nil, claims: [], usageOrStorageConditions: nil, allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [], images: [], variants: [], isVariantOf: [])
|
66
|
+
super(semanticId, name: name, description: description, productType: productType, quantity: quantity, alcoholPercentage: alcoholPercentage, lifetime: lifetime, claims: claims, usageOrStorageConditions: usageOrStorageConditions, allergenCharacteristics: allergenCharacteristics, nutrientCharacteristics: nutrientCharacteristics, physicalCharacteristics: physicalCharacteristics, geographicalOrigin: geographicalOrigin, catalogItems: catalogItems, certifications: certifications, natureOrigin: natureOrigin, partOrigin: partOrigin, images: images, variants: variants, isVariantOf: isVariantOf)
|
65
67
|
@totalTheoreticalStock = totalTheoreticalStock
|
66
68
|
self.semanticType = "dfc-b:SuppliedProduct"
|
67
69
|
registerSemanticProperty("dfc-b:totalTheoreticalStock", &method("totalTheoreticalStock")).valueSetter = method("totalTheoreticalStock=")
|
@@ -48,8 +48,10 @@ class DataFoodConsortium::Connector::TechnicalProduct < DataFoodConsortium::Conn
|
|
48
48
|
# @param natureOrigin [ISKOSConcept]
|
49
49
|
# @param partOrigin [ISKOSConcept]
|
50
50
|
# @param images [String]
|
51
|
-
|
52
|
-
|
51
|
+
# @param variants [IDefinedProduct]
|
52
|
+
# @param isVariantOf [IDefinedProduct]
|
53
|
+
def initialize(semanticId, name: nil, description: nil, productType: nil, quantity: nil, alcoholPercentage: nil, lifetime: nil, claims: [], usageOrStorageConditions: nil, allergenCharacteristics: [], nutrientCharacteristics: [], physicalCharacteristics: [], geographicalOrigin: nil, catalogItems: [], certifications: [], natureOrigin: [], partOrigin: [], images: [], variants: [], isVariantOf: [])
|
54
|
+
super(semanticId, name: name, description: description, productType: productType, quantity: quantity, alcoholPercentage: alcoholPercentage, lifetime: lifetime, claims: claims, usageOrStorageConditions: usageOrStorageConditions, allergenCharacteristics: allergenCharacteristics, nutrientCharacteristics: nutrientCharacteristics, physicalCharacteristics: physicalCharacteristics, geographicalOrigin: geographicalOrigin, catalogItems: catalogItems, certifications: certifications, natureOrigin: natureOrigin, partOrigin: partOrigin, images: images, variants: variants, isVariantOf: isVariantOf)
|
53
55
|
|
54
56
|
self.semanticType = "dfc-b:TechnicalProduct"
|
55
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datafoodconsortium-connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maxime Lecoq
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: virtual_assembly-semantizer
|
@@ -89,11 +89,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- - "
|
92
|
+
- - ">="
|
93
93
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
94
|
+
version: '0'
|
95
95
|
requirements: []
|
96
|
-
rubygems_version: 3.3.
|
96
|
+
rubygems_version: 3.3.27
|
97
97
|
signing_key:
|
98
98
|
specification_version: 4
|
99
99
|
summary: Data Food Consortium connector
|