e_plat 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -2
- data/lib/e_plat/mapping/bigcommerce/v_3/product/variant.rb +15 -0
- data/lib/e_plat/resource/product.rb +10 -0
- data/lib/e_plat/version.rb +1 -1
- 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: ed183e3b710ae9adba4b88d15cfdf13aeb6ab5bd92d0bc6e0c8dcea76378d866
|
4
|
+
data.tar.gz: 56690ee20b9fb9e5af97e127e6bd8f039e7e6576e0000b2a8cf94d72c0128df7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17457bebf58b2a091d5d9ef2b5b43598c9dd0545b25de1c3311eb4e063a73d2913673bc273fea5cf9b16048264bb3ce08b356b50be08106c6bfe429e6e102084
|
7
|
+
data.tar.gz: 82314eeed574fdb9bd063a69c1f72eb7941a133dfa801b4826c554d33a5652645e216f088da1ed6d32880771c9f2f6fec8a5f51b661c37ba4205f167f63491c4
|
data/README.md
CHANGED
@@ -157,7 +157,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
|
|
157
157
|
| shop_owner | string | * | nil | nil |
|
158
158
|
| money_format | string | * | nil | nil |
|
159
159
|
| money_with_currency_format | string | * | nil | nil |
|
160
|
-
| weight_unit | string | * |
|
160
|
+
| weight_unit | string | * | weight_units| nil |
|
161
161
|
| province_code | string | * | nil | nil |
|
162
162
|
| taxes_included | boolean | * | nil | nil |
|
163
163
|
| auto_configure_tax_inclusivity | boolean | * | nil | nil |
|
@@ -230,7 +230,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
|
|
230
230
|
| --------------------- | -------- | ------- | ----------------------| ------------|
|
231
231
|
| id | integer | * | id | nil |
|
232
232
|
| product_id | integer | * | product_id | nil |
|
233
|
-
| title | string | * |
|
233
|
+
| title | string | * | option_values&.map(&:label)&.join(' ') | nil |
|
234
234
|
| price | string | * | price | nil |
|
235
235
|
| sku | string | * | sku | nil |
|
236
236
|
| position | integer | * | nil | nil |
|
@@ -257,6 +257,8 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
|
|
257
257
|
| requires_shipping | boolean | * | nil | nil |
|
258
258
|
| admin_graphql_api_id | string | * | nil | nil |
|
259
259
|
|
260
|
+
*Bigcommerce variant.title= setter is not supported
|
261
|
+
|
260
262
|
|
261
263
|
### EPlat::Product::Option
|
262
264
|
|
@@ -57,6 +57,21 @@ module EPlat
|
|
57
57
|
{
|
58
58
|
existing_entry: {native_key: "product_id", e_plat_key: "product_id"}
|
59
59
|
},
|
60
|
+
{
|
61
|
+
alias_attribute: {native_key: "gtin", e_plat_key: "title",
|
62
|
+
custom_e_plat_getter: "-> (value) {
|
63
|
+
option_values&.map(&:label)&.join(' ').to_s
|
64
|
+
}",
|
65
|
+
custom_native_setter: "-> (value) {
|
66
|
+
if value && self.option_values.count == 1
|
67
|
+
self.option_values.first.label = value
|
68
|
+
self.option_values;
|
69
|
+
else;
|
70
|
+
warn 'Can not set title on variant with multiple option values';
|
71
|
+
end
|
72
|
+
}"
|
73
|
+
}
|
74
|
+
},
|
60
75
|
{
|
61
76
|
alias_attribute: {native_key: "option_values", e_plat_key: "option1",
|
62
77
|
custom_e_plat_getter: "-> (option_values) {
|
@@ -3,6 +3,16 @@ module EPlat
|
|
3
3
|
has_many :variants, class_name: "EPlat::Product::Variant"
|
4
4
|
has_many :images, class_name: "EPlat::Product::Image"
|
5
5
|
|
6
|
+
# graphql :shopify, :product do
|
7
|
+
# variants do
|
8
|
+
# edges { node as: :variant }
|
9
|
+
# end
|
10
|
+
# images do
|
11
|
+
# edges { node as: :image }
|
12
|
+
# end
|
13
|
+
# end
|
14
|
+
|
15
|
+
|
6
16
|
include Concerns::Metafieldable
|
7
17
|
|
8
18
|
schema do
|
data/lib/e_plat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: e_plat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oliwoodsuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|