dooca_commerce 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dooca_commerce.rb +24 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43b4d0da62e063f804c9a223ed013a18c113e1869ab1602207bf1d9cb71bb404
|
4
|
+
data.tar.gz: e2c48b41fb5990d95467308cf2a5558ad31ed2817612833b4cb607744e78d721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 681e5bf4e585c6b013b9961508b37be6d6609a1c47ba176146288be9cea73bbac903819cd912c08e9c74ca9367638c56002a1b5efd6afd68ec564c249dfd0371
|
7
|
+
data.tar.gz: db094d2bdbb06604ba0bfb84dd48330c11bd966c0c60d43481f53ad29060012027f0fa95ea1c446de19c9cb853a64cd4ac3cd5f848329e3b895fa63f2b814a4a
|
data/lib/dooca_commerce.rb
CHANGED
@@ -160,6 +160,30 @@ class DoocaCommerce
|
|
160
160
|
handler.new(response).parse!
|
161
161
|
end
|
162
162
|
|
163
|
+
def create_fulfillment(order_id:)
|
164
|
+
response = connection.post("/orders/#{order_id}/fulfillment")
|
165
|
+
|
166
|
+
handler.new(response).parse!
|
167
|
+
end
|
168
|
+
|
169
|
+
def update_invoice(order_id:, body:)
|
170
|
+
response = connection.put("/orders/#{order_id}/fulfillment/invoiced", body.to_json)
|
171
|
+
|
172
|
+
handler.new(response).parse!
|
173
|
+
end
|
174
|
+
|
175
|
+
def update_tracking(order_id:, body:)
|
176
|
+
response = connection.put("/orders/#{order_id}/fulfillment/shipped", body.to_json)
|
177
|
+
|
178
|
+
handler.new(response).parse!
|
179
|
+
end
|
180
|
+
|
181
|
+
def mark_as_delivered(order_id:)
|
182
|
+
response = connection.put("/orders/#{order_id}/fulfillment/delivered")
|
183
|
+
|
184
|
+
handler.new(response).parse!
|
185
|
+
end
|
186
|
+
|
163
187
|
private
|
164
188
|
|
165
189
|
URL = "https://api.dooca.store"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dooca_commerce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
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-01-
|
11
|
+
date: 2022-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|