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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9465d7cdb78a36ee592fd8f16958bdd5395888c0d428a6df36b512f28deb524f
4
- data.tar.gz: f2d69942589fda15603306ae79f6f51022bf54033fca7c33801f35a976388a04
3
+ metadata.gz: f4baad691359d2fc23e5d08c60a23292f61ae88cca9d2c368e7813170ccc58c5
4
+ data.tar.gz: b973c66e26b298301fdb1edd606ae609f0950c8dbf7e7399af166832529332ee
5
5
  SHA512:
6
- metadata.gz: 5fdd379b432d868aea714a95f8ed037cae4ede3e573fdfc9a260ab4d8f41270ba4cf16234e4fc36a98176f6c3ffee93f9aa37f1fb85c8e8b4ab8f67229af11fe
7
- data.tar.gz: 2a86ffad3f6c6b61c75843909ece6bceffe61824009d0c3bba3013f8947f720061f4e202d8e9e65239442acdc5160e0b30628e2190761f1cce86a3c8f5b6d8b2
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(123, 456, [optional, fields])
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
@@ -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, fields=[], options={})
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
- builder.RECIPIENT_ID recipient_id
54
- builder.COLUMN {
55
- builder.NAME "Recipient ID"
56
- builder.VALUE recipient_id
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]
@@ -1,3 +1,3 @@
1
1
  module GoAcoustic
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
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.2
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-02-12 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable