legacy_infusionsoft_api 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -2
- data/lib/legacy_infusionsoft_api.rb +1 -0
- data/lib/legacy_infusionsoft_api/client.rb +1 -0
- data/lib/legacy_infusionsoft_api/models/base.rb +5 -1
- data/lib/legacy_infusionsoft_api/models/contact_action.rb +9 -0
- data/lib/legacy_infusionsoft_api/models/contact_group_assign.rb +4 -2
- data/lib/legacy_infusionsoft_api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d6bc3af11bb4cbe87a3778a5c8a54557ef88103
|
4
|
+
data.tar.gz: cabfa605bc6e378f31fae61c9393a026a64b9e2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0254923e7d5a7aeb7f886a131a76558feaa8aea97926f4b111fa8891a9e2f5c8e2ce17994936c0b1dcd6029dc6b8c1a8a70d805d1ee34941bbe71be9534525c
|
7
|
+
data.tar.gz: cd192d42d71fb6d1cf7f3fba05a97efe08158adc960b5feca7bcbacaa20a810634e5dd8ead774c5888027834af1e057375721d31a42e374954899a32c12f3c1f
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Ruby client for Legacy XML-RPC Infusionsoft Api
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/legacy_infusionsoft_api.svg)](https://badge.fury.io/rb/legacy_infusionsoft_api)
|
4
|
+
|
3
5
|
<a href="https://app.codesponsor.io/link/Z24Ypyn8iC1Q4i6uCwNyLW3r/cavneb/legacy_infusionsoft_api" rel="nofollow"><img src="https://app.codesponsor.io/embed/Z24Ypyn8iC1Q4i6uCwNyLW3r/cavneb/legacy_infusionsoft_api.svg" style="width: 888px; height: 68px;" alt="Sponsor" /></a>
|
4
6
|
|
5
7
|
[Legacy Infusionsoft Api](https://github.com/cavneb/legacy_infusionsoft_api) is an interface for accessing [Infusionsoft's](http://help.infusionsoft.com/developers/api-basics) API.
|
@@ -81,6 +83,17 @@ Or by passing a query
|
|
81
83
|
:FirstName => 'Trevor',
|
82
84
|
})
|
83
85
|
|
86
|
+
#### Contact Actions
|
87
|
+
|
88
|
+
Add a note to a contact
|
89
|
+
|
90
|
+
api_client.contact_action.create({
|
91
|
+
"ContactId" => 1234,
|
92
|
+
"CompletionDate" => Time.now.utc.strftime("%F\T%T"),
|
93
|
+
"ActionDescription" => "My Note Title",
|
94
|
+
"CreationNotes" => "My note body"
|
95
|
+
})
|
96
|
+
|
84
97
|
#### Contact Groups
|
85
98
|
|
86
99
|
Return a list of all contact groups
|
@@ -125,7 +138,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
125
138
|
|
126
139
|
## Contributing
|
127
140
|
|
128
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
141
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/cavneb/legacy_infusionsoft_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
129
142
|
|
130
143
|
## License
|
131
144
|
|
@@ -133,4 +146,4 @@ The gem is available as open source under the terms of the [MIT License](http://
|
|
133
146
|
|
134
147
|
## Code of Conduct
|
135
148
|
|
136
|
-
Everyone interacting in the LegacyInfusionsoftApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/
|
149
|
+
Everyone interacting in the LegacyInfusionsoftApi project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cavneb/legacy_infusionsoft_api/blob/master/CODE_OF_CONDUCT.md).
|
@@ -2,6 +2,7 @@ require "legacy_infusionsoft_api/version"
|
|
2
2
|
require "legacy_infusionsoft_api/helpers"
|
3
3
|
require "legacy_infusionsoft_api/models/base"
|
4
4
|
require "legacy_infusionsoft_api/models/contact"
|
5
|
+
require "legacy_infusionsoft_api/models/contact_action"
|
5
6
|
require "legacy_infusionsoft_api/models/contact_group"
|
6
7
|
require "legacy_infusionsoft_api/models/contact_group_assign"
|
7
8
|
require "legacy_infusionsoft_api/models/contact_group_category"
|
@@ -19,8 +19,12 @@ module LegacyInfusionsoftApi::Model
|
|
19
19
|
true
|
20
20
|
end
|
21
21
|
|
22
|
+
def load(id)
|
23
|
+
@client.connection.call("DataService.load", @client.api_key, self.table_name, id, self.fields)
|
24
|
+
end
|
25
|
+
|
22
26
|
def first(query = {})
|
23
|
-
self.all(query, false)[0]
|
27
|
+
self.all(query, false, 1)[0]
|
24
28
|
end
|
25
29
|
|
26
30
|
def create(data = {})
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module LegacyInfusionsoftApi::Model
|
2
|
+
class ContactAction < LegacyInfusionsoftApi::Model::Base
|
3
|
+
def fields
|
4
|
+
[ :Accepted, :ActionDate, :ActionDescription, :ActionType, :CompletionDate, :ContactId,
|
5
|
+
:CreatedBy, :CreationDate, :CreationNotes, :EndDate, :Id, :IsAppointment, :LastUpdated,
|
6
|
+
:LastUpdatedBy, :Location, :ObjectType, :OpportunityId, :PopupDate, :Priority, :UserID ]
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -24,8 +24,10 @@ module LegacyInfusionsoftApi::Model
|
|
24
24
|
@client.connection.call("ContactService.removeFromGroup", @client.api_key, query[:ContactId], query[:GroupId])
|
25
25
|
else
|
26
26
|
self.all(query).each do |data|
|
27
|
-
self.delete(
|
28
|
-
|
27
|
+
self.delete(
|
28
|
+
ContactId: data["Id"],
|
29
|
+
GroupId: data["GroupId"]
|
30
|
+
)
|
29
31
|
end
|
30
32
|
end
|
31
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: legacy_infusionsoft_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Berry
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: xmlrpc
|
@@ -103,6 +103,7 @@ files:
|
|
103
103
|
- lib/legacy_infusionsoft_api/helpers.rb
|
104
104
|
- lib/legacy_infusionsoft_api/models/base.rb
|
105
105
|
- lib/legacy_infusionsoft_api/models/contact.rb
|
106
|
+
- lib/legacy_infusionsoft_api/models/contact_action.rb
|
106
107
|
- lib/legacy_infusionsoft_api/models/contact_group.rb
|
107
108
|
- lib/legacy_infusionsoft_api/models/contact_group_assign.rb
|
108
109
|
- lib/legacy_infusionsoft_api/models/contact_group_category.rb
|