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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc3770bdbc18b1976cc244a4029ce9b165aee66c1a4c5d71dd057788871ab2cf
4
- data.tar.gz: a3c68b2700ba2d5f017234c5f83f38938e03a1700d85b6fc2ce84d709500dfbd
3
+ metadata.gz: 011600cb6020fc6c693602571d3d7102b85046148a7347659b9b738338b965dc
4
+ data.tar.gz: 4e4ad6d391c40165e667f5ab5892dcae658f0c4f0cc3e41d2ded0bfa714d9eb3
5
5
  SHA512:
6
- metadata.gz: 1a7839aed557e837f04bf412a2923131ae29a84b21679edba9e7e6ee501ab608e44949bd651d924b6e5d7f10e618deb52c2b7ee762a3220c9d622a00e19839b8
7
- data.tar.gz: 4707b6dae09f3be12df850b14e970290c8537128a726ec1158d6e19716ccbc5ee49c052c7f1997d932adc8a842ab6ab0b0cb2753f0265c2715dffda2d02cbd42
6
+ metadata.gz: 83e7f94a4e2cb8296de9cd658d36e85c8ff3d85cb5cf97a46775986cb8235f2ddc361ab33b916b70cf316fd3c2061882f6d349f7326d1bce73f7b05f9493ebc0
7
+ data.tar.gz: 8729c8b021e94b0290c0c14bccfb697a8f9483051fecd1c275a8e23350a71dce41b75489ad05c5a58db09e29344077c5aa503d0e3303009287fc2b8fc4a6dc2a
data/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ v1.1.0 / 2019-07-16
3
+ ==================
4
+
5
+ * Add create contact card endpoint
6
+ * Add Cordial contactactivities find and create
7
+
2
8
  v1.0.0 / 2018-12-04
3
9
  ==================
4
10
 
@@ -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'
@@ -0,0 +1,13 @@
1
+ module Cordial
2
+ class Cart < Hashie::Dash
3
+ property :mcID
4
+ property :customerID
5
+ property :linkID
6
+ property :cartID
7
+ property :url
8
+ property :expiration
9
+ property :cartitems
10
+ property :totalAmount
11
+ property :tax
12
+ end
13
+ end
@@ -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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Cordial
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.1.0'.freeze
3
3
  end
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.0.0
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: 2018-12-04 00:00:00.000000000 Z
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
- rubyforge_project:
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