MailchimpTransactional 1.0.5 → 1.0.6
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/MailchimpTransactional.gemspec +1 -1
- data/README.md +3 -3
- data/lib/MailchimpTransactional.rb +1 -1
- data/lib/MailchimpTransactional/api/exports_api.rb +1 -1
- data/lib/MailchimpTransactional/api/inbound_api.rb +1 -1
- data/lib/MailchimpTransactional/api/ips_api.rb +1 -1
- data/lib/MailchimpTransactional/api/messages_api.rb +1 -1
- data/lib/MailchimpTransactional/api/metadata_api.rb +1 -1
- data/lib/MailchimpTransactional/api/rejects_api.rb +1 -1
- data/lib/MailchimpTransactional/api/senders_api.rb +1 -1
- data/lib/MailchimpTransactional/api/subaccounts_api.rb +1 -1
- data/lib/MailchimpTransactional/api/tags_api.rb +1 -1
- data/lib/MailchimpTransactional/api/templates_api.rb +1 -1
- data/lib/MailchimpTransactional/api/urls_api.rb +1 -1
- data/lib/MailchimpTransactional/api/users_api.rb +1 -1
- data/lib/MailchimpTransactional/api/webhooks_api.rb +1 -1
- data/lib/MailchimpTransactional/api/whitelists_api.rb +1 -1
- data/lib/MailchimpTransactional/api_client.rb +79 -1
- data/lib/MailchimpTransactional/api_error.rb +2 -2
- data/lib/MailchimpTransactional/configuration.rb +1 -1
- data/lib/MailchimpTransactional/version.rb +2 -2
- 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: 94b7f006ff801831790e455857e889daad7ea3239d32721e200e59b0b05b658d
|
|
4
|
+
data.tar.gz: 1977467035f0a8dd0035619f2ce5b8cc3293764eed8359963b58c15da9c9a4fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1a232a09ac396bd9ab660f1718d94caa0a34277ba1c0d270524bb132779e24ef580058bb57a182021e96400f0fe8e419ecbbb410d1a5ff5592ee4904d16093e4
|
|
7
|
+
data.tar.gz: 100b14706cd3ab9f7843fe7c3b946bd04f34b657ae02ff2d95410c95bd53bfb92738bdb887d9e350b94d3070bb9b3d07a355912a4d74c4c149ab175a4be7e153
|
|
@@ -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: 1.0.
|
|
8
|
+
OpenAPI spec version: 1.0.6
|
|
9
9
|
Contact: apihelp@mandrill.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
|
@@ -15,15 +15,15 @@ gem build MailchimpTransactional.gemspec
|
|
|
15
15
|
Then either install the gem locally:
|
|
16
16
|
|
|
17
17
|
```shell
|
|
18
|
-
gem install ./MailchimpTransactional-1.0.
|
|
18
|
+
gem install ./MailchimpTransactional-1.0.6.gem
|
|
19
19
|
```
|
|
20
|
-
(for development, run `gem install --dev ./MailchimpTransactional-1.0.
|
|
20
|
+
(for development, run `gem install --dev ./MailchimpTransactional-1.0.6.gem` to install the development dependencies)
|
|
21
21
|
|
|
22
22
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
23
23
|
|
|
24
24
|
Finally add this to the Gemfile:
|
|
25
25
|
|
|
26
|
-
gem 'MailchimpTransactional', '~> 1.0.
|
|
26
|
+
gem 'MailchimpTransactional', '~> 1.0.6'
|
|
27
27
|
|
|
28
28
|
### Install from Git
|
|
29
29
|
|
|
@@ -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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.4.12
|
|
@@ -90,5 +90,83 @@ module MailchimpTransactional
|
|
|
90
90
|
fail ApiError.new('http_method must be :post')
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
|
+
|
|
94
|
+
# Return Accept header based on an array of accepts provided.
|
|
95
|
+
# @param [Array] accepts array for Accept
|
|
96
|
+
# @return [String] the Accept header (e.g. application/json)
|
|
97
|
+
def select_header_accept(accepts)
|
|
98
|
+
return nil if accepts.nil? || accepts.empty?
|
|
99
|
+
# use JSON when present, otherwise use all of the provided
|
|
100
|
+
json_accept = accepts.find { |s| json_mime?(s) }
|
|
101
|
+
json_accept || accepts.join(',')
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Return Content-Type header based on an array of content types provided.
|
|
105
|
+
# @param [Array] content_types array for Content-Type
|
|
106
|
+
# @return [String] the Content-Type header (e.g. application/json)
|
|
107
|
+
def select_header_content_type(content_types)
|
|
108
|
+
# use application/json by default
|
|
109
|
+
return 'application/json' if content_types.nil? || content_types.empty?
|
|
110
|
+
# use JSON when present, otherwise use the first one
|
|
111
|
+
json_content_type = content_types.find { |s| json_mime?(s) }
|
|
112
|
+
json_content_type || content_types.first
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Convert object (array, hash, object, etc) to JSON string.
|
|
116
|
+
# @param [Object] model object to be converted into JSON string
|
|
117
|
+
# @return [String] JSON string representation of the object
|
|
118
|
+
def object_to_http_body(model)
|
|
119
|
+
return model if model.nil? || model.is_a?(String)
|
|
120
|
+
local_body = nil
|
|
121
|
+
if model.is_a?(Array)
|
|
122
|
+
local_body = model.map { |m| object_to_hash(m) }
|
|
123
|
+
else
|
|
124
|
+
local_body = object_to_hash(model)
|
|
125
|
+
end
|
|
126
|
+
local_body.to_json
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Convert object(non-array) to hash.
|
|
130
|
+
# @param [Object] obj object to be converted into JSON string
|
|
131
|
+
# @return [String] JSON string representation of the object
|
|
132
|
+
def object_to_hash(obj)
|
|
133
|
+
if obj.respond_to?(:to_hash)
|
|
134
|
+
obj.to_hash
|
|
135
|
+
else
|
|
136
|
+
obj
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Build parameter value according to the given collection format.
|
|
141
|
+
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
|
142
|
+
def build_collection_param(param, collection_format)
|
|
143
|
+
case collection_format
|
|
144
|
+
when :csv
|
|
145
|
+
param.join(',')
|
|
146
|
+
when :ssv
|
|
147
|
+
param.join(' ')
|
|
148
|
+
when :tsv
|
|
149
|
+
param.join("\t")
|
|
150
|
+
when :pipes
|
|
151
|
+
param.join('|')
|
|
152
|
+
when :multi
|
|
153
|
+
# return the array directly as typhoeus will handle it as expected
|
|
154
|
+
param
|
|
155
|
+
else
|
|
156
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Check if the given MIME is a JSON MIME.
|
|
161
|
+
# JSON MIME examples:
|
|
162
|
+
# application/json
|
|
163
|
+
# application/json; charset=UTF8
|
|
164
|
+
# APPLICATION/JSON
|
|
165
|
+
# */*
|
|
166
|
+
# @param [String] mime MIME
|
|
167
|
+
# @return [Boolean] True if the MIME is application/json
|
|
168
|
+
def json_mime?(mime)
|
|
169
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
|
170
|
+
end
|
|
93
171
|
end
|
|
94
172
|
end
|
|
@@ -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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.com
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.4.12
|
|
@@ -12,7 +12,7 @@ Swagger Codegen version: 2.4.12
|
|
|
12
12
|
|
|
13
13
|
module MailchimpTransactional
|
|
14
14
|
class ApiError < StandardError
|
|
15
|
-
attr_reader :
|
|
15
|
+
attr_reader :status, :type, :title, :detail, :instance, :errors,:response_headers, :response_body
|
|
16
16
|
|
|
17
17
|
# Usage examples:
|
|
18
18
|
# ApiError.new
|
|
@@ -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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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: 1.0.
|
|
6
|
+
OpenAPI spec version: 1.0.6
|
|
7
7
|
Contact: apihelp@mandrill.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 MailchimpTransactional
|
|
14
|
-
VERSION = '1.0.
|
|
14
|
+
VERSION = '1.0.6'
|
|
15
15
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: MailchimpTransactional
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Swagger-Codegen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-07-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|