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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/dooca_commerce.rb +24 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69ac8fe0db3c29bd4dd00306455b950acb6fdd4d9e904c7c15c70dd9d25609ce
4
- data.tar.gz: 2a71165d41f191332a2135496711c758e9b3df6011b504d22c00d162549141e3
3
+ metadata.gz: 43b4d0da62e063f804c9a223ed013a18c113e1869ab1602207bf1d9cb71bb404
4
+ data.tar.gz: e2c48b41fb5990d95467308cf2a5558ad31ed2817612833b4cb607744e78d721
5
5
  SHA512:
6
- metadata.gz: a7320cb8afa53bc1b9b268a98f9e5c583cc9743151af3fb36f2f1c589e222cf8e2fbf52998e960634f6e63ff49b8e72b6555b7cd58017316c99896123fff8ea5
7
- data.tar.gz: 837449914984dfe36ed627e2ea3a790204550341a0847472cf5b7560b57d0e7c0e34ea92ff27e59fa85130621a345cfcf8eb63e3104051f370be410143c05ca9
6
+ metadata.gz: 681e5bf4e585c6b013b9961508b37be6d6609a1c47ba176146288be9cea73bbac903819cd912c08e9c74ca9367638c56002a1b5efd6afd68ec564c249dfd0371
7
+ data.tar.gz: db094d2bdbb06604ba0bfb84dd48330c11bd966c0c60d43481f53ad29060012027f0fa95ea1c446de19c9cb853a64cd4ac3cd5f848329e3b895fa63f2b814a4a
@@ -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
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-27 00:00:00.000000000 Z
11
+ date: 2022-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday