fulfil-io 0.3.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +10 -0
- data/lib/fulfil/client.rb +7 -0
- data/lib/fulfil/model.rb +4 -0
- data/lib/fulfil/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4ad2709b85c238ad07608d510455eb6af65bbfb2b7bf1fe7a43bd42ec3327e8
|
4
|
+
data.tar.gz: 76d7e6189a7cc118eab1a3d4db1d10f7450a2ac96df50be1334abec7b877da7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b25ab906e005e6655a66db79f52a0edd4404a06a7a1ff1c90fea03eeb1e00e18c0e8a823e11ce45a2cf8a65ceb7c356882649d1cc3a586bc429eaedc1ec42f7
|
7
|
+
data.tar.gz: e7e965321b2e3aba9abd61add0c22dab1e81cc3ea3809f23ca164dcc46930ade6083bf3de243a23d53fae90b8bf08849041af40a808d41f1c27f1f750b575b32
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -68,6 +68,16 @@ pp sales
|
|
68
68
|
# "rec_name"=>""}]
|
69
69
|
```
|
70
70
|
|
71
|
+
### Count
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
client = Fulfil::Client.new
|
75
|
+
model = Fulfil::Model.new(client: client, model_name: 'stock.shipment.out')
|
76
|
+
model.count(domain: [['shipping_batch.state', '=', 'open']])
|
77
|
+
|
78
|
+
# Returns 7440
|
79
|
+
```
|
80
|
+
|
71
81
|
### Writing
|
72
82
|
|
73
83
|
As of v0.3.0, we've added very basic support for creates and updates via
|
data/lib/fulfil/client.rb
CHANGED
@@ -52,6 +52,13 @@ module Fulfil
|
|
52
52
|
parse(results: results)
|
53
53
|
end
|
54
54
|
|
55
|
+
def count(model:, domain:)
|
56
|
+
uri = URI("#{model_url(model: model)}/search_count")
|
57
|
+
body = [domain]
|
58
|
+
|
59
|
+
request(verb: :put, endpoint: uri, json: body)
|
60
|
+
end
|
61
|
+
|
55
62
|
def post(model:, body: {})
|
56
63
|
uri = URI(model_url(model: model))
|
57
64
|
|
data/lib/fulfil/model.rb
CHANGED
data/lib/fulfil/version.rb
CHANGED