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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bf98dd0669c2254edf77d509adbe4fb771d34a0ffba64850d2b7e6d26ce90a5
4
- data.tar.gz: 3dd4c3434e14c383148127fb067be4c284b68de6597ffb145ec57aab3cbfbcaf
3
+ metadata.gz: ed183e3b710ae9adba4b88d15cfdf13aeb6ab5bd92d0bc6e0c8dcea76378d866
4
+ data.tar.gz: 56690ee20b9fb9e5af97e127e6bd8f039e7e6576e0000b2a8cf94d72c0128df7
5
5
  SHA512:
6
- metadata.gz: 601697b693b3343500dc1a5bb426b5254ef0c60eb0b2a21274ffce0e9090ca4292f5ce0ba713bdbae7fcf476dfa79e87ea3e261c950cf2ff69d4212f69f36d6a
7
- data.tar.gz: 16b4ee16637677c02eb18a8f292ec7010fc357fd1f023bac3c311bfc1773ab7ed5c246c69eb887fd52696c05bec3d50a61a1f6635b4af27675281531beff2696
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 | * | weight_unit| nil |
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 | * | nil | nil |
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
@@ -1,3 +1,3 @@
1
1
  module EPlat
2
- VERSION = "0.5.3"
2
+ VERSION = "0.5.4"
3
3
  end
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.3
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-02-15 00:00:00.000000000 Z
11
+ date: 2024-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler