goacoustic 0.1.2 → 0.1.3
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 +2 -2
- data/lib/client/contact.rb +11 -6
- data/lib/goacoustic/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: f4baad691359d2fc23e5d08c60a23292f61ae88cca9d2c368e7813170ccc58c5
|
4
|
+
data.tar.gz: b973c66e26b298301fdb1edd606ae609f0950c8dbf7e7399af166832529332ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6792f04323cc44eddc12cb3260ae2cae51626b8cd6208f552ebfb965ea091ed8dbe23e41726708cbf3eaf807f640c384367fbf208ff224db2fe116b12f34989e
|
7
|
+
data.tar.gz: 17f26d2a82f965c6bf7dc0ab7d297e36725cb0ef879918693c28404d324b376dd3725398ee8caca2bb3069eecb3aa0a168e418103d1adbde2483a3a0d8fd7303
|
data/README.md
CHANGED
@@ -26,8 +26,8 @@ A Ruby wrapper for the Acoustic API
|
|
26
26
|
a.Envelope.Body.RESULT.SUCCESS # => "TRUE"
|
27
27
|
|
28
28
|
#get_recipient
|
29
|
-
#pass in database id and recipient id
|
30
|
-
r = @client.get_recipient(
|
29
|
+
#pass in database id and recipient id or email
|
30
|
+
r = @client.get_recipient({email:"joe@schmoe.com"}, database_id, recipient_id, optional_fields)
|
31
31
|
r.Email # => "joe@schmoe.com"
|
32
32
|
|
33
33
|
## Contributing
|
data/lib/client/contact.rb
CHANGED
@@ -44,17 +44,22 @@ module GoAcoustic
|
|
44
44
|
|
45
45
|
# Retrieves a contact from a database
|
46
46
|
#
|
47
|
-
def get_recipient(list_id, recipient_id
|
47
|
+
def get_recipient(fields, list_id, recipient_id=nil, options={})
|
48
48
|
builder = Builder::XmlMarkup.new
|
49
49
|
xml = builder.Envelope {
|
50
50
|
builder.Body {
|
51
51
|
builder.SelectRecipientData {
|
52
52
|
builder.LIST_ID list_id
|
53
|
-
|
54
|
-
|
55
|
-
builder.
|
56
|
-
|
57
|
-
|
53
|
+
if recipient_id
|
54
|
+
builder.RECIPIENT_ID recipient_id
|
55
|
+
builder.COLUMN {
|
56
|
+
builder.NAME "Recipient ID"
|
57
|
+
builder.VALUE recipient_id
|
58
|
+
}
|
59
|
+
end
|
60
|
+
if fields[:email]
|
61
|
+
builder.EMAIL fields[:email]
|
62
|
+
end
|
58
63
|
unless options.empty?
|
59
64
|
options.each do |opt|
|
60
65
|
builder.tag! opt[0], opt[1]
|
data/lib/goacoustic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goacoustic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Anderson, Upworthy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|