customerio_api 0.2.0 → 0.3.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/README.md +23 -0
- data/lib/customerio_api/resources/customer_resource.rb +6 -0
- data/lib/customerio_api/version.rb +1 -1
- 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: ceb70ea4c24738a144afeec3e73c100388dcef171d985dc5313cb54e7e2abd2c
|
4
|
+
data.tar.gz: 8405496d81614f120f367ad2f2023fa7b0f73a020410365c9113ccac883050ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ba268b0f46e31618b0dfb1619273dc9556f1331fa3564d720a97aef18ed7fc92f61e36fda4d13df13658d0ef0a52da104acb94492a1cc22ce3da59dbc04ecfd
|
7
|
+
data.tar.gz: 5f5cc64abde43908745d0d4f284a75664169a917c41a1dffc764b5e84c479d9b8998c1834ba9cd1632d7132f5f88948b7709af0319edd745d9c690a33eb054b3
|
data/README.md
CHANGED
@@ -50,6 +50,29 @@ customers = v1_client.customer.where(email: 'test@example.com')
|
|
50
50
|
# => returns a list of CustomerioAPI::Customer
|
51
51
|
```
|
52
52
|
|
53
|
+
#### 2. Use s set of filter conditions to find customer
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
attributes =
|
57
|
+
{
|
58
|
+
filter: {
|
59
|
+
and:
|
60
|
+
[
|
61
|
+
{
|
62
|
+
attribute: {
|
63
|
+
field: 'cio_id',
|
64
|
+
operator: 'eq',
|
65
|
+
value: 'd7a90a000a0b'
|
66
|
+
}
|
67
|
+
}
|
68
|
+
]
|
69
|
+
}
|
70
|
+
}
|
71
|
+
customer_identifiers = v1_client.customer.search(attributes: attributes)
|
72
|
+
|
73
|
+
# => returns a CustomerioAPI::Customer object, containing arrays of identifiers and ids
|
74
|
+
```
|
75
|
+
|
53
76
|
### CustomerioObject
|
54
77
|
|
55
78
|
#### 1. Use a set of filter conditions to find object
|
@@ -10,5 +10,11 @@ module CustomerioAPI
|
|
10
10
|
response_body = get_request('customers', params: { email: email }).body
|
11
11
|
response_body['results'].map { |customers| Customer.new(customers) }
|
12
12
|
end
|
13
|
+
|
14
|
+
# client.customer.search(attributes: attributes)
|
15
|
+
def search(attributes:, start: nil, limit: nil)
|
16
|
+
response_body = post_request("customers?start=#{start}&limit=#{limit}", body: attributes).body
|
17
|
+
Customer.new(response_body)
|
18
|
+
end
|
13
19
|
end
|
14
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: customerio_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- linhho0702
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|