mailchimp-api 2.0.1 → 2.0.2

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.
Files changed (3) hide show
  1. data/lib/mailchimp.rb +2 -2
  2. data/lib/mailchimp/api.rb +7 -2
  3. metadata +4 -4
data/lib/mailchimp.rb CHANGED
@@ -152,9 +152,9 @@ module Mailchimp
152
152
  raise Error, "We received an unexpected error: #{body}"
153
153
  end
154
154
  if error_map[error_info['name']]
155
- raise error_map[error_info['name']], error_info['message']
155
+ raise error_map[error_info['name']], error_info['error']
156
156
  else
157
- raise Error, error_info['message']
157
+ raise Error, error_info['error']
158
158
  end
159
159
  rescue JSON::ParserError
160
160
  raise Error, "We received an unexpected error: #{body}"
data/lib/mailchimp/api.rb CHANGED
@@ -976,7 +976,7 @@ module Mailchimp
976
976
  # - [Array] merge_vars of structs for each merge var
977
977
  # - [String] name Name of the merge field
978
978
  # - [Bool] req Denotes whether the field is required (true) or not (false)
979
- # - [String] field_type The "data type" of this merge var. One of: email, text, number, radio, dropdown, date, address, phone, url, imageurl
979
+ # - [String] field_type The "data type" of this merge var. One of the options accepted by field_type in lists/merge-var-add
980
980
  # - [Bool] public Whether or not this field is visible to list subscribers
981
981
  # - [Bool] show Whether the list owner has this field displayed on their list dashboard
982
982
  # - [String] order The order the list owner has set this field to display in
@@ -1478,7 +1478,12 @@ module Mailchimp
1478
1478
 
1479
1479
  # Returns information on whether a campaign is ready to send and possible issues we may have detected with it - very similar to the confirmation step in the app.
1480
1480
  # @param [String] cid the Campaign Id to replicate
1481
- # @return [Hash] the matching campaign's details - will return same data as single campaign from campaigns/list()
1481
+ # @return [Hash] containing:
1482
+ # - [Bool] is_ready whether or not you're going to be able to send this campaign
1483
+ # - [Array] items an array of structs explaining basically what the app's confirmation step would
1484
+ # - [String] type the item type - generally success, warning, or error
1485
+ # - [String] heading the item's heading in the app
1486
+ # - [String] details the item's details from the app, sans any html tags/links
1482
1487
  def ready(cid)
1483
1488
  _params = {:cid => cid}
1484
1489
  return @master.call 'campaigns/ready', _params
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailchimp-api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 1
10
- version: 2.0.1
9
+ - 2
10
+ version: 2.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - MailChimp Devs
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-08-09 00:00:00 Z
18
+ date: 2013-08-22 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json