e_plat 0.5.3 → 0.5.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1bf98dd0669c2254edf77d509adbe4fb771d34a0ffba64850d2b7e6d26ce90a5
4
- data.tar.gz: 3dd4c3434e14c383148127fb067be4c284b68de6597ffb145ec57aab3cbfbcaf
3
+ metadata.gz: 85b0fb58fb552bdd494649429de66feb12612b53ee0cf49bda4b1a87e14e81b7
4
+ data.tar.gz: e5702192f1057e1f65736e20c88d7c35a4d6490db785d0dc4ef95381015cc6b2
5
5
  SHA512:
6
- metadata.gz: 601697b693b3343500dc1a5bb426b5254ef0c60eb0b2a21274ffce0e9090ca4292f5ce0ba713bdbae7fcf476dfa79e87ea3e261c950cf2ff69d4212f69f36d6a
7
- data.tar.gz: 16b4ee16637677c02eb18a8f292ec7010fc357fd1f023bac3c311bfc1773ab7ed5c246c69eb887fd52696c05bec3d50a61a1f6635b4af27675281531beff2696
6
+ metadata.gz: ac493807a5ffc4e61a7eb7d5fa4b28777697a9aa5c50a8cb145e8d1327bef821f8efcdacc672e6652778fb3b3c5c5961d76d5844d4a874a2f2bdacdf3b7896e8
7
+ data.tar.gz: c69b4fb8c31be9eecaaf6e587bbdd964a4a7ff046a844f0e3c81063d95a156fffe5667d9273a40e3e25fed5460e780bf02b2a5f29b7eb215d55c7806b15d718d
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
 
@@ -346,7 +348,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
346
348
  | note | string | * | staff_notes | nil |
347
349
  | note_attributes | array | * | nil | nil |
348
350
  | number | integer | * | nil | nil |
349
- | order_number | integer | * | nil | nil |
351
+ | order_number | integer | * | id | nil |
350
352
  | order_status_url | string | * | nil | nil |
351
353
  | original_total_duties_set | hash | * | nil | nil |
352
354
  | payment_gateway_names | array | * | nil | nil |
@@ -144,6 +144,9 @@ module EPlat
144
144
  {
145
145
  alias_attribute: {native_key: "discount_amount", e_plat_key: "current_total_discounts"} #poundage string. eg "9.99"
146
146
  },
147
+ {
148
+ alias_attribute: {native_key: "id", e_plat_key: "order_number"}
149
+ },
147
150
  {
148
151
  alias_attribute: {native_key: "staff_notes", e_plat_key: "note"}
149
152
  },
@@ -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.5"
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.5
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-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler