cordial 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +6 -0
- data/lib/cordial.rb +2 -0
- data/lib/cordial/cart.rb +13 -0
- data/lib/cordial/contactactivities.rb +30 -0
- data/lib/cordial/contacts.rb +12 -0
- data/lib/cordial/version.rb +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 011600cb6020fc6c693602571d3d7102b85046148a7347659b9b738338b965dc
|
4
|
+
data.tar.gz: 4e4ad6d391c40165e667f5ab5892dcae658f0c4f0cc3e41d2ded0bfa714d9eb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83e7f94a4e2cb8296de9cd658d36e85c8ff3d85cb5cf97a46775986cb8235f2ddc361ab33b916b70cf316fd3c2061882f6d349f7326d1bce73f7b05f9493ebc0
|
7
|
+
data.tar.gz: 8729c8b021e94b0290c0c14bccfb697a8f9483051fecd1c275a8e23350a71dce41b75489ad05c5a58db09e29344077c5aa503d0e3303009287fc2b8fc4a6dc2a
|
data/History.md
CHANGED
data/lib/cordial.rb
CHANGED
@@ -7,9 +7,11 @@ require 'cordial/client'
|
|
7
7
|
|
8
8
|
# Models
|
9
9
|
require 'cordial/order'
|
10
|
+
require 'cordial/cart'
|
10
11
|
|
11
12
|
# Controllers
|
12
13
|
require 'cordial/contacts'
|
14
|
+
require 'cordial/contactactivities'
|
13
15
|
require 'cordial/products'
|
14
16
|
require 'cordial/orders'
|
15
17
|
require 'cordial/automation_templates'
|
data/lib/cordial/cart.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
module Cordial
|
2
|
+
# Pragmatic wrapper around the orders REST Api.
|
3
|
+
#
|
4
|
+
# @see https://api.cordial.io/docs/v1/#!/contactactivities
|
5
|
+
class Contactactivities
|
6
|
+
include ::HTTParty
|
7
|
+
extend Client
|
8
|
+
|
9
|
+
# Get Activity list
|
10
|
+
# @example Usage
|
11
|
+
# Cordial::Contactactivities.find({...})
|
12
|
+
#
|
13
|
+
# @return [Hash]
|
14
|
+
# @return [{"error"=>true, "message"=>"record not found"}]
|
15
|
+
def self.find(options)
|
16
|
+
client.get("/contactactivities", query: options)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Add a new activity
|
20
|
+
#
|
21
|
+
# @example Usage.
|
22
|
+
# Cordial::Contactactivities.create({...})
|
23
|
+
#
|
24
|
+
# @return [{"success"=>true}]
|
25
|
+
# @return [{"error"=>true, "messages"=>"..."}]
|
26
|
+
def self.create(options)
|
27
|
+
client.post("/contactactivities", body: options.to_json)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/cordial/contacts.rb
CHANGED
@@ -96,5 +96,17 @@ module Cordial
|
|
96
96
|
|
97
97
|
client.put(url, body: body.to_json)
|
98
98
|
end
|
99
|
+
|
100
|
+
# Create a new contact cart.
|
101
|
+
#
|
102
|
+
# @example Usage.
|
103
|
+
# Cordial::Contacts.create_cart({...})
|
104
|
+
#
|
105
|
+
# @return [{"success"=>true}]
|
106
|
+
# @return [{"error"=>true, "messages"=>"..."}]
|
107
|
+
def self.create_cart(email, options)
|
108
|
+
cart = Cordial::Cart.new(options)
|
109
|
+
client.post("/contacts/#{email}/cart", body: cart.to_json)
|
110
|
+
end
|
99
111
|
end
|
100
112
|
end
|
data/lib/cordial/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cordial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Hood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -187,7 +187,9 @@ files:
|
|
187
187
|
- cordial.gemspec
|
188
188
|
- lib/cordial.rb
|
189
189
|
- lib/cordial/automation_templates.rb
|
190
|
+
- lib/cordial/cart.rb
|
190
191
|
- lib/cordial/client.rb
|
192
|
+
- lib/cordial/contactactivities.rb
|
191
193
|
- lib/cordial/contacts.rb
|
192
194
|
- lib/cordial/order.rb
|
193
195
|
- lib/cordial/orders.rb
|
@@ -213,8 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
215
|
- !ruby/object:Gem::Version
|
214
216
|
version: '0'
|
215
217
|
requirements: []
|
216
|
-
|
217
|
-
rubygems_version: 2.7.6
|
218
|
+
rubygems_version: 3.0.3
|
218
219
|
signing_key:
|
219
220
|
specification_version: 4
|
220
221
|
summary: Cordial API Client
|