akeneo 1.7.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/akeneo.gemspec +1 -1
- data/lib/akeneo/api.rb +4 -0
- data/lib/akeneo/product_service.rb +4 -0
- data/lib/akeneo/service_base.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e2c55807f94475e39690f1ac2eb6782379f501a3c89e8fa6a45b8073199bd70
|
4
|
+
data.tar.gz: 332e8bf0c5ccb96d735e40bc602b48da245b0970e5dc9716c908feb8974638bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ea4ddf2d9aa56a77c05697140fdea805e349da2736ef7c8e90097eb0d6c6ae3c7e959375f0ea7df29e04abd464044ccabd4ce9dbeabef0a07e717e3fb40bab6
|
7
|
+
data.tar.gz: 0e7b75d0a365852842118be5c027ca7cbb7cb16c337feaadc0c76a137a114b29d95fd86953bef567e3a14e5c1571e275674d8351740dc6bff93391ae73bb2695
|
data/Gemfile.lock
CHANGED
data/akeneo.gemspec
CHANGED
data/lib/akeneo/api.rb
CHANGED
@@ -43,6 +43,10 @@ module Akeneo
|
|
43
43
|
product_service.create_or_update(code, options)
|
44
44
|
end
|
45
45
|
|
46
|
+
def create_product(options:)
|
47
|
+
product_service.create(options)
|
48
|
+
end
|
49
|
+
|
46
50
|
def create_or_update_product_model(code:, options:)
|
47
51
|
product_model_service.create_or_update(code, options)
|
48
52
|
end
|
@@ -44,6 +44,10 @@ module Akeneo
|
|
44
44
|
patch_request("/products/#{code}", body: options.to_json)
|
45
45
|
end
|
46
46
|
|
47
|
+
def create(options)
|
48
|
+
post_request('/products', body: options.to_json)
|
49
|
+
end
|
50
|
+
|
47
51
|
def create_several(product_objects)
|
48
52
|
patch_for_collection_request('/products', body: product_objects.to_json)
|
49
53
|
end
|
data/lib/akeneo/service_base.rb
CHANGED
@@ -68,6 +68,13 @@ module Akeneo
|
|
68
68
|
)
|
69
69
|
end
|
70
70
|
|
71
|
+
def post_request(path, options = {})
|
72
|
+
HTTParty.post(
|
73
|
+
build_url(path),
|
74
|
+
options.merge(headers: default_request_headers)
|
75
|
+
)
|
76
|
+
end
|
77
|
+
|
71
78
|
def patch_for_collection_request(path, options = {})
|
72
79
|
HTTParty.patch(
|
73
80
|
build_url(path),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akeneo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AWN Dev Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|