commercelayer-cli 0.2.0 → 0.2.1

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: b27cda80e9a81029b3d68786542fae661dc0edf17fd96a4605c0aad2b2a800f7
4
- data.tar.gz: 9a36090bfdde858d9c70306841ba31f31698050784f78c9e39260829e5ff79ee
3
+ metadata.gz: d389331fdc49d71bb60ed32db70492e7efc1962c4cc2882333deeef38c1c5b8f
4
+ data.tar.gz: 65a2cc630935e96825243aede65681d3b234b32019543cb12a1b8cee861e4302
5
5
  SHA512:
6
- metadata.gz: 99836768ebaefb187adca6727c7d72646e910d02de02cc2aa8089c6bb0e28636f3547ac389b88eb25cb176aa795b7211ffd46e4b90233ec8436473a2fc71cf5b
7
- data.tar.gz: 32969c9c228efcb51db98a24d1bbfccb05eb513506ae3efd47e8baa2d9a5c8a730ec6e41a28976e1f80621fc61ef2ff888b666cfa765400c923e25748ed2a87c
6
+ metadata.gz: 6304af246d16fdaf2b6b128dfeb57736c4e47eabe97d0c4cdd6902eaa7192283c9fd4732c98b3f3c2adbb24d43a82b2411519e40c3abca01726583c138c8dbb0
7
+ data.tar.gz: b8004de7e452099b9e50c55b9dc4396708e6cf34c05f536b1b5674308fc1b4b10a188a3fb2b2decff591b06f2f90ac35453165d2a5993a2866291a9f213c6b54
@@ -102,7 +102,10 @@ module Commercelayer
102
102
  required: {},
103
103
  unique: {}
104
104
  },
105
- appeareance: { type: "plain" }
105
+ appeareance: {
106
+ editor: "single_line",
107
+ parameters: {}
108
+ }
106
109
  },
107
110
  variants: {
108
111
  label: "Variants",
@@ -110,61 +113,67 @@ module Commercelayer
110
113
  hint: "The product's variants",
111
114
  position: 2,
112
115
  validators: { items_item_type: { item_types: [@variant_model[:id]] } },
113
- appeareance: { type: "select" }
116
+ appeareance: {
117
+ editor: "links_select",
118
+ parameters: {}
119
+ }
114
120
  }
115
121
  }
116
122
  end
117
123
 
118
124
  def variant_model_fields
119
125
  {
120
- product: {
121
- label: "Product",
122
- field_type: "link",
123
- hint: "The reference product",
124
- position: 1,
125
- validators: {
126
- required: {},
127
- item_item_type: { item_types: [@product_model[:id]] }
128
- },
129
- appeareance: { type: "select" }
130
- },
131
126
  code: {
132
127
  label: "Code",
133
128
  field_type: "string",
134
129
  hint: "The variant's code",
135
- position: 2,
130
+ position: 1,
136
131
  validators: {
137
132
  required: {},
138
133
  unique: {}
139
134
  },
140
- appeareance: { type: "plain" }
135
+ appeareance: {
136
+ editor: "single_line",
137
+ parameters: {}
138
+ }
141
139
  },
142
140
  name: {
143
141
  label: "Name",
144
142
  field_type: "string",
145
143
  hint: "The variant's name",
146
- position: 3,
144
+ position: 2,
147
145
  validators: {
148
146
  required: {},
149
147
  unique: {}
150
148
  },
151
- appeareance: { type: "plain" }
149
+ appeareance: {
150
+ editor: "single_line",
151
+ parameters: {}
152
+ }
152
153
  },
153
154
  description: {
154
155
  label: "Description",
155
156
  field_type: "text",
156
157
  hint: "The variant's description",
157
- position: 4,
158
+ position: 3,
158
159
  validators: {},
159
- appeareance: { type: "plain" }
160
+ appeareance: {
161
+ editor: "markdown",
162
+ parameters: {
163
+ "toolbar" => ["heading", "bold", "italic", "strikethrough", "unordered_list", "ordered_list", "quote", "link", "image", "fullscreen"]
164
+ }
165
+ }
160
166
  },
161
167
  image: {
162
168
  label: "Image",
163
169
  field_type: "file",
164
170
  hint: "The variant's image",
165
- position: 5,
171
+ position: 4,
166
172
  validators: {},
167
- appeareance: {}
173
+ appeareance: {
174
+ editor: "file",
175
+ parameters: {}
176
+ }
168
177
  }
169
178
  }
170
179
  end
@@ -201,7 +210,6 @@ module Commercelayer
201
210
  begin
202
211
  variant = client.items.create({
203
212
  item_type: @variant_model[:id],
204
- product: last_product_id,
205
213
  code: sku.code,
206
214
  name: sku.name,
207
215
  description: sku.description,
@@ -1,5 +1,5 @@
1
1
  module Commercelayer
2
2
  module CLI
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commercelayer-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Filippo Conforti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-07-16 00:00:00.000000000 Z
11
+ date: 2018-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler