neomode_client 0.2.0 → 0.5.0
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/neomode_client/api.rb +56 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23c65c53b93af2f00f584d06f94bdbbcc52ce2247061f84f1cadbe5a346dfd15
|
4
|
+
data.tar.gz: 15b19c8ebf707070b812f7cb7b828aed20b053e3151f5775413366ec20a32f8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9252bd4614b1910fc29c931cf15921c8f2ae8df21c1fc382fa105496a488f5a9891c85f92845086a69e5b98d249d55ce7708340bc60e81d5bfffa36ca2b28a6b
|
7
|
+
data.tar.gz: 97aada5c99c2a219ef32901dd47263e90e447c954b7a2a41ff4261353855863fdb3dd4e9a967c1057fef450a741cd06065ae5c5bdc0ddb5fa1cbf0c53bfd1733
|
data/lib/neomode_client/api.rb
CHANGED
@@ -31,6 +31,62 @@ module NeomodeClient
|
|
31
31
|
handler.new(response).parse!
|
32
32
|
end
|
33
33
|
|
34
|
+
def update_order_status(order_id:, status:)
|
35
|
+
response = connection.put("/management/commerce/orders/#{order_id}/status/#{status}")
|
36
|
+
|
37
|
+
handler.new(response).parse!
|
38
|
+
end
|
39
|
+
|
40
|
+
def update_invoice(order_id:, invoice:)
|
41
|
+
response = connection.put("/management/commerce/orders/#{order_id}/invoicedetails", {invoice: invoice}.to_json)
|
42
|
+
|
43
|
+
handler.new(response).parse!
|
44
|
+
end
|
45
|
+
|
46
|
+
def update_tracking(order_id:, tracking:)
|
47
|
+
response = connection.put("/management/commerce/orders/#{order_id}/trackingdetails", tracking.to_json)
|
48
|
+
|
49
|
+
handler.new(response).parse!
|
50
|
+
end
|
51
|
+
|
52
|
+
def fetch_stock_quantities(args = {})
|
53
|
+
response = connection.get("/management/catalog/stocks", args)
|
54
|
+
|
55
|
+
handler.new(response).parse!
|
56
|
+
end
|
57
|
+
|
58
|
+
def fetch_categories(args = {})
|
59
|
+
response = connection.get("/management/catalog/categories", args)
|
60
|
+
|
61
|
+
handler.new(response).parse!
|
62
|
+
end
|
63
|
+
|
64
|
+
def fetch_products(args = {})
|
65
|
+
response = connection.get("/management/catalog/products", args)
|
66
|
+
|
67
|
+
handler.new(response).parse!
|
68
|
+
end
|
69
|
+
|
70
|
+
def fetch_product_by_id(product_id)
|
71
|
+
response = connection.get("/management/catalog/products/#{product_id}")
|
72
|
+
|
73
|
+
handler.new(response).parse!
|
74
|
+
end
|
75
|
+
|
76
|
+
def send_order(order)
|
77
|
+
response = connection.post("/management/commerce/orders", order.to_json)
|
78
|
+
|
79
|
+
handler.new(response).parse!
|
80
|
+
end
|
81
|
+
|
82
|
+
def mark_order_as_paid(args = {})
|
83
|
+
response = Faraday
|
84
|
+
.new(url: "https://#{is_production ? "" : "hlog-"}lori.neomode.com.br", headers: headers)
|
85
|
+
.post("/orderupdatequeue?#{args.to_query}")
|
86
|
+
|
87
|
+
handler.new(response).parse!
|
88
|
+
end
|
89
|
+
|
34
90
|
private
|
35
91
|
|
36
92
|
attr_reader :token, :is_production
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neomode_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luciano Cesar Cordeiro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
requirements: []
|
56
|
-
rubygems_version: 3.
|
56
|
+
rubygems_version: 3.3.7
|
57
57
|
signing_key:
|
58
58
|
specification_version: 4
|
59
59
|
summary: Neomode Client!
|