moysklad 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moysklad/entities/image.rb +0 -1
- data/lib/moysklad/entities/images.rb +15 -0
- data/lib/moysklad/entities/meta.rb +1 -0
- data/lib/moysklad/entities/product.rb +5 -1
- data/lib/moysklad/entities.rb +1 -0
- data/lib/moysklad/resources/product_images.rb +14 -0
- data/lib/moysklad/resources.rb +1 -0
- data/lib/moysklad/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11853c0cd626e6f922838a5d91e0cb83a48092f359ddc8b1437374d0ccf0c29a
|
4
|
+
data.tar.gz: 61dbc0e2db3b56ba8ed1200dd8b2d91b5e7500a926bd32c839c92d2e73ce58a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5aeaa2c2892de2abed0dcabe6f30a88428bbe0635a67a548330aa049af6b303be2743394ceb8e2a41f73407addaa9bc606b26b51ca8c4dd43b62dbec701b8759
|
7
|
+
data.tar.gz: c177b77a933b4ae86d18a353f7eb96d2a1e370707251cce96e22ef7138e04a531ef9aac159593fc7410e64ed784fd7a78bdd3e5575e72e0b0771d68f3a4c8be1
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Moysklad::Entities
|
2
|
+
class ImagesMeta < Base
|
3
|
+
attribute :href, String
|
4
|
+
attribute :type, String
|
5
|
+
attribute :mediaType, String
|
6
|
+
attribute :size, Integer
|
7
|
+
attribute :limit, Integer
|
8
|
+
attribute :offset, Integer
|
9
|
+
end
|
10
|
+
|
11
|
+
class Images < Base
|
12
|
+
attribute :meta, ImagesMeta
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
@@ -17,7 +17,7 @@ module Moysklad::Entities
|
|
17
17
|
attribute :buyPrice, Currency
|
18
18
|
attribute :salePrices, Array[Price]
|
19
19
|
|
20
|
-
attribute :
|
20
|
+
attribute :images, Images # MetaArray
|
21
21
|
|
22
22
|
attribute :article, String
|
23
23
|
attribute :weighed, Boolean
|
@@ -44,5 +44,9 @@ module Moysklad::Entities
|
|
44
44
|
universe.features.where goodUuid: uuid
|
45
45
|
end
|
46
46
|
end
|
47
|
+
|
48
|
+
def product_images(universe)
|
49
|
+
Moysklad::Resources::ProductImages.new(client: universe.client, list_path: images.meta.href).list
|
50
|
+
end
|
47
51
|
end
|
48
52
|
end
|
data/lib/moysklad/entities.rb
CHANGED
data/lib/moysklad/resources.rb
CHANGED
data/lib/moysklad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moysklad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danil Pismenny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -322,6 +322,7 @@ files:
|
|
322
322
|
- lib/moysklad/entities/entity.rb
|
323
323
|
- lib/moysklad/entities/group.rb
|
324
324
|
- lib/moysklad/entities/image.rb
|
325
|
+
- lib/moysklad/entities/images.rb
|
325
326
|
- lib/moysklad/entities/meta.rb
|
326
327
|
- lib/moysklad/entities/organization.rb
|
327
328
|
- lib/moysklad/entities/owner.rb
|
@@ -351,6 +352,7 @@ files:
|
|
351
352
|
- lib/moysklad/resources/indexed_cache.rb
|
352
353
|
- lib/moysklad/resources/load_all.rb
|
353
354
|
- lib/moysklad/resources/positions.rb
|
355
|
+
- lib/moysklad/resources/product_images.rb
|
354
356
|
- lib/moysklad/resources/products.rb
|
355
357
|
- lib/moysklad/resources/stock.rb
|
356
358
|
- lib/moysklad/resources/subresource.rb
|