ontraport_api 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 100d1e11e295ba1f0d131d1242b238ff8903fbcd
4
- data.tar.gz: e2fd3068a0f65bafea755d96a617208151f02cf6
3
+ metadata.gz: 6a9c8999a20018aa968a518686e421690f37ba41
4
+ data.tar.gz: 9e8ecc30e3988402976626eda06511099f6e0416
5
5
  SHA512:
6
- metadata.gz: 38f94ba278200b750385c5c7103f74a8845e3b48bd7d7a79496b7b9c8eef5bb0a036c896f7490e4a241be99c17d5dc368f4ec5e76eb7a5b605c1c1a1686c5990
7
- data.tar.gz: eb9e121e18c1bf6da429812dd3acf203bac6628f2f16b360448654089b5baac4d3374a864103741d412ee2fff8c048f50c50140b2141113d30d6b9eefccf955f
6
+ metadata.gz: b43976b869094a0d383c91badd6dc613b5e3e8b9e533925ab2da4a033e5d208e7102d94ff0d476fc07ad54862bc882e79f9e942ce7fa7b33db87f81e66b176fe
7
+ data.tar.gz: 495671c6d545ffa750c2ec319ed56d5dab061cdf5a8d8daf1ddcf2cb51b514baf48c3a6988caf007717ab935d8f4ae8ae40fd77f696479490433efc05bd8ad9b
data/README.md CHANGED
@@ -98,6 +98,11 @@ Otherwise, they're missing because I haven't got to them yet. Check the TODO lis
98
98
 
99
99
  ## Release Notes
100
100
 
101
+ #### v0.1.0
102
+ - Fix bug on PUT methods
103
+ - Fix bug on add / remove Contact Tags
104
+ - Bump minor version
105
+
101
106
  #### v0.0.4
102
107
  - Add Tags API
103
108
  - Wildcard field_name search
@@ -0,0 +1,20 @@
1
+ module OntraportApi
2
+ module APIs
3
+ module ContactSequences
4
+ CONTACT_SEQUENCES_OBJECT_ID = 8
5
+ CONTACT_SEQUENCES_API_METHODS_AND_PATHS = {
6
+ 'add_sequence_to_contact' => [:post, '/objects']
7
+ }
8
+
9
+ def add_sequence_to_contact(sequence_id, contact_id)
10
+ query_contact_sequences({ drip_id: sequence_id, contact_id: contact_id })
11
+ end
12
+
13
+ def query_contact_sequences(payload)
14
+ method, path = CONTACT_SEQUENCES_API_METHODS_AND_PATHS[caller[0][/`.*'/][1..-2]]
15
+ query(method, path, payload.merge({ objectID: CONTACT_SEQUENCES_OBJECT_ID }))
16
+ end
17
+
18
+ end
19
+ end
20
+ end
@@ -1,5 +1,6 @@
1
1
  require 'httparty'
2
2
  require_relative 'apis/contacts'
3
+ require_relative 'apis/contact_sequences'
3
4
  require_relative 'apis/forms'
4
5
  require_relative 'apis/messages'
5
6
  require_relative 'apis/products'
@@ -14,6 +15,7 @@ module OntraportApi
14
15
  base_uri 'https://api.ontraport.com/1'
15
16
 
16
17
  include APIs::Contacts
18
+ include APIs::ContactSequences
17
19
  include APIs::Products
18
20
  include APIs::Forms
19
21
  include APIs::Messages
@@ -1,3 +1,3 @@
1
1
  module OntraportApi
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/objectids.txt CHANGED
@@ -6,7 +6,7 @@
6
6
  5 - Sequences
7
7
  6 - ?
8
8
  7 - Messages
9
- 8 - ?
9
+ 8 - Contact Sequences
10
10
  9 - Sequences Steps
11
11
  10 - ?
12
12
  11 - ?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ontraport_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Ngu
@@ -79,6 +79,7 @@ files:
79
79
  - README.md
80
80
  - Rakefile
81
81
  - lib/ontraport_api.rb
82
+ - lib/ontraport_api/apis/contact_sequences.rb
82
83
  - lib/ontraport_api/apis/contacts.rb
83
84
  - lib/ontraport_api/apis/forms.rb
84
85
  - lib/ontraport_api/apis/messages.rb