tagalys 0.0.1 → 0.0.2
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 +4 -4
- data/lib/tagalys.rb +13 -69
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3a55715c02f9b8b4c001a12c737fc0779c943f3
|
|
4
|
+
data.tar.gz: de663097bb0f70b4e7f22c22c0b2c45a14ad6d2b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4770031f09265df4075ab360c2fdd290073d51592d5a1ad79035f0aa53c7b3997fdc302c7186fc57966fa097f2518b0b6d0f3038ee69789b2ad469fa39bad1f7
|
|
7
|
+
data.tar.gz: 808932c2ff8088adc9ff73a3feca4fc252a1471b8ad4c61378e92bad1d5af2e6acc78162ac7a421cdf3e96473e8b231cdcb20d4ea3152216bba7c5f5b1e553ad
|
data/lib/tagalys.rb
CHANGED
|
@@ -12,81 +12,17 @@ class Tagalys
|
|
|
12
12
|
search_response = request_tagalys('/search', request_body)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
def create_store
|
|
15
|
+
def create_store(currencies, fields, tag_sets, sort_options)
|
|
16
16
|
request_body = {
|
|
17
17
|
identification: identification,
|
|
18
18
|
stores: [
|
|
19
19
|
{
|
|
20
20
|
id: "1",
|
|
21
21
|
label: "Store 1",
|
|
22
|
-
currencies:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
fractional_digits: 2,
|
|
27
|
-
rounding_mode: "round",
|
|
28
|
-
exchange_rate: 66.77,
|
|
29
|
-
default: false
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
fields: [
|
|
33
|
-
{
|
|
34
|
-
name: "sale_price", # core fields like sku, price, sale_price etc. described in the next section don't have to be defined here, but they can be for the purpose of overriding labels or other options.
|
|
35
|
-
type: "float",
|
|
36
|
-
label: "Final Price",
|
|
37
|
-
currency: true,
|
|
38
|
-
filters: true,
|
|
39
|
-
search: false
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "short_description",
|
|
43
|
-
type: "string",
|
|
44
|
-
label: "Short Description",
|
|
45
|
-
search: true
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: "name",
|
|
49
|
-
type: "string",
|
|
50
|
-
label: "Name",
|
|
51
|
-
search: true
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
tag_sets: [
|
|
55
|
-
{
|
|
56
|
-
id: "apparel_type",
|
|
57
|
-
label: "Type",
|
|
58
|
-
filters: true,
|
|
59
|
-
search: true
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "color",
|
|
63
|
-
label: "Color",
|
|
64
|
-
filters: true,
|
|
65
|
-
search: true
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: "gender",
|
|
69
|
-
label: "Gender",
|
|
70
|
-
filters: true,
|
|
71
|
-
search: true
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "size",
|
|
75
|
-
label: "Size",
|
|
76
|
-
filters: true,
|
|
77
|
-
search: true
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
sort_options: [
|
|
81
|
-
{
|
|
82
|
-
field: "name",
|
|
83
|
-
label: "Name"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
field: "price",
|
|
87
|
-
label: "Price"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
22
|
+
currencies: currencies,
|
|
23
|
+
fields: fields,
|
|
24
|
+
tag_sets: tag_sets,
|
|
25
|
+
sort_options: sort_options,
|
|
90
26
|
locale: "en_US",
|
|
91
27
|
timezone: "India/Kolkata",
|
|
92
28
|
multi_currency_mode: "exchange_rate",
|
|
@@ -97,6 +33,14 @@ class Tagalys
|
|
|
97
33
|
create_response = request_tagalys('/configuration', request_body)
|
|
98
34
|
end
|
|
99
35
|
|
|
36
|
+
def product_sync(link, product_count)
|
|
37
|
+
{
|
|
38
|
+
identification: identification,
|
|
39
|
+
link: link,
|
|
40
|
+
updates_count: product_count
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
100
44
|
def request_tagalys(path, request_body)
|
|
101
45
|
uri = URI.parse("https://api-r1.tagalys.com/v1/" + path)
|
|
102
46
|
header = {'Content-Type': 'application/json'}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tagalys
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Anbazhagan Palani
|
|
@@ -17,7 +17,7 @@ extensions: []
|
|
|
17
17
|
extra_rdoc_files: []
|
|
18
18
|
files:
|
|
19
19
|
- lib/tagalys.rb
|
|
20
|
-
homepage: https://
|
|
20
|
+
homepage: https://github.com/commutatus/tagalys
|
|
21
21
|
licenses:
|
|
22
22
|
- MIT
|
|
23
23
|
metadata: {}
|