MailchimpMarketing 3.0.7 → 3.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/MailchimpMarketing.gemspec +1 -1
  3. data/README.md +2 -2
  4. data/lib/MailchimpMarketing.rb +1 -1
  5. data/lib/MailchimpMarketing/api/activity_feed_api.rb +1 -1
  6. data/lib/MailchimpMarketing/api/authorized_apps_api.rb +1 -1
  7. data/lib/MailchimpMarketing/api/automations_api.rb +1 -1
  8. data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +1 -1
  9. data/lib/MailchimpMarketing/api/batches_api.rb +1 -1
  10. data/lib/MailchimpMarketing/api/campaign_folders_api.rb +1 -1
  11. data/lib/MailchimpMarketing/api/campaigns_api.rb +1 -1
  12. data/lib/MailchimpMarketing/api/connected_sites_api.rb +1 -1
  13. data/lib/MailchimpMarketing/api/conversations_api.rb +1 -1
  14. data/lib/MailchimpMarketing/api/dashboard_api.rb +1 -1
  15. data/lib/MailchimpMarketing/api/ecommerce_api.rb +1 -1
  16. data/lib/MailchimpMarketing/api/external_auths_api.rb +1 -1
  17. data/lib/MailchimpMarketing/api/facebook_ads_api.rb +1 -1
  18. data/lib/MailchimpMarketing/api/file_manager_api.rb +1 -1
  19. data/lib/MailchimpMarketing/api/landing_pages_api.rb +1 -1
  20. data/lib/MailchimpMarketing/api/lists_api.rb +1 -1
  21. data/lib/MailchimpMarketing/api/ping_api.rb +1 -1
  22. data/lib/MailchimpMarketing/api/postcards_api.rb +1 -1
  23. data/lib/MailchimpMarketing/api/reporting_api.rb +1 -1
  24. data/lib/MailchimpMarketing/api/reports_api.rb +1 -1
  25. data/lib/MailchimpMarketing/api/root_api.rb +1 -1
  26. data/lib/MailchimpMarketing/api/search_campaigns_api.rb +1 -1
  27. data/lib/MailchimpMarketing/api/search_members_api.rb +1 -1
  28. data/lib/MailchimpMarketing/api/template_folders_api.rb +1 -1
  29. data/lib/MailchimpMarketing/api/templates_api.rb +1 -1
  30. data/lib/MailchimpMarketing/api/verified_domains_api.rb +1 -1
  31. data/lib/MailchimpMarketing/api_client.rb +17 -9
  32. data/lib/MailchimpMarketing/api_error.rb +1 -1
  33. data/lib/MailchimpMarketing/configuration.rb +1 -1
  34. data/lib/MailchimpMarketing/version.rb +2 -2
  35. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d5c9a6f26fc432848d4bbc7ca0584a6239a8e85774a32bc83ad5cd5ce99e082
4
- data.tar.gz: a9c21e03c5e0213451bc88870dc00f1796626608abe1b80e8c6c9a05ba45f27c
3
+ metadata.gz: e7345416325d95b973d89425c687838e5850879467255143fd42dfaa6a61f075
4
+ data.tar.gz: f9ad2549cf2395924d4f2697ab85fc6f91aeafbf543d9669c1379bee2e27aeac
5
5
  SHA512:
6
- metadata.gz: 7085e5c5fdf42013581a0ad06fb4076f1e0a091dad65c9331e001c357995f9fa888289639d13c0474b7fc2880998c540589877070396112067ddcfc487b6c29f
7
- data.tar.gz: 06bca4d9419c14ea18de591be7ea5467816a44c2845093de37243225d3caef0db225c1709a34d717d6b3956219a254feeb1e4f0b6f5ff691477e46ab24871069
6
+ metadata.gz: 3869ca68063c42e747ef074e3ecf174ddff9cf41e11c18489abd49ac7fa1f0e6d7ff0573fa715c683bf6cd68faec2dd7218a6620611a86139b1768a3a3dc148b
7
+ data.tar.gz: 6ba1658ef9337abb5531ca4d503cc418348f263afbaa98a6763434eb074fe900feb094186c8bd13ab479fd42e4057aa906e81573f3b5a808d9ea5819b22a1ea2
@@ -5,7 +5,7 @@
5
5
 
6
6
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
7
7
 
8
- OpenAPI spec version: 3.0.7
8
+ OpenAPI spec version: 3.0.8
9
9
  Contact: apihelp@mailchimp.com
10
10
  Generated by: https://github.com/swagger-api/swagger-codegen.git
11
11
  Swagger Codegen version: 2.4.12
data/README.md CHANGED
@@ -20,8 +20,8 @@ gem 'MailchimpMarketing', :git => 'https://github.com/mailchimp/mailchimp-market
20
20
 
21
21
  ```shell
22
22
  gem build MailchimpMarketing.gemspec
23
- gem install ./MailchimpMarketing-3.0.7.gem
24
- gem 'MailchimpMarketing', '~> 3.0.7'
23
+ gem install ./MailchimpMarketing-3.0.8.gem
24
+ gem 'MailchimpMarketing', '~> 3.0.8'
25
25
  ```
26
26
 
27
27
  ## Quick Start
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -67,11 +67,19 @@ module MailchimpMarketing
67
67
 
68
68
  res = request(http_method, path, query_params, header_params, body)
69
69
 
70
- if res.status <= 200
70
+ data = nil
71
+ if res.headers['content-type'] && res.headers['content-type'].include?('application/json')
71
72
  data = JSON.parse(res.body)
72
- data
73
73
  else
74
- fail ApiError.new(res.body)
74
+ data = res.body
75
+ end
76
+
77
+ if data
78
+ if res.status <= 200
79
+ data
80
+ else
81
+ fail ApiError.new(res.body)
82
+ end
75
83
  end
76
84
  end
77
85
 
@@ -94,7 +102,7 @@ module MailchimpMarketing
94
102
  case http_method.to_sym.downcase
95
103
  when :delete
96
104
  conn.delete do |req|
97
- req.body = body
105
+ req.body = body.to_json
98
106
  end
99
107
  when :get
100
108
  conn.get
@@ -104,15 +112,15 @@ module MailchimpMarketing
104
112
  conn.options
105
113
  when :post
106
114
  conn.post do |req|
107
- req.body = body
115
+ req.body = body.to_json
108
116
  end
109
117
  when :put
110
118
  conn.put do |req|
111
- req.body = body
119
+ req.body = body.to_json
112
120
  end
113
121
  when :patch
114
122
  conn.patch do |req|
115
- req.body = body
123
+ req.body = body.to_json
116
124
  end
117
125
  else
118
126
  fail ApiError.new('Invalid http_method')
@@ -131,7 +139,7 @@ module MailchimpMarketing
131
139
  URI.encode(@config.base_url + path)
132
140
  end
133
141
 
134
- # Format HTTP request body
142
+ # Format HTTP request body as string
135
143
  def build_request_body(header_params, form_params, body)
136
144
  if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
137
145
  header_params['Content-Type'] == 'multipart/form-data'
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -3,7 +3,7 @@
3
3
 
4
4
  #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
5
5
 
6
- OpenAPI spec version: 3.0.7
6
+ OpenAPI spec version: 3.0.8
7
7
  Contact: apihelp@mailchimp.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 2.4.12
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.12
11
11
  =end
12
12
 
13
13
  module MailchimpMarketing
14
- VERSION = '3.0.7'
14
+ VERSION = '3.0.8'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MailchimpMarketing
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.7
4
+ version: 3.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swagger-Codegen