sendmux-sending 1.2.0 → 1.4.0
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/CHANGELOG.md +15 -0
- data/README.md +15 -1
- data/lib/sendmux/sending/client.rb +9 -2
- data/lib/sendmux/sending/version.rb +1 -1
- data/lib/sendmux_sending_generated/api/attachments_api.rb +3 -3
- data/lib/sendmux_sending_generated/api/emails_api.rb +2 -2
- data/lib/sendmux_sending_generated/api/meta_api.rb +60 -0
- data/lib/sendmux_sending_generated/configuration.rb +7 -0
- data/lib/sendmux_sending_generated/models/connection.rb +273 -0
- data/lib/sendmux_sending_generated/models/connection_credential.rb +226 -0
- data/lib/sendmux_sending_generated/models/connection_mailboxes_inner.rb +190 -0
- data/lib/sendmux_sending_generated/models/connection_response.rb +223 -0
- data/lib/sendmux_sending_generated/models/connection_team.rb +190 -0
- data/lib/sendmux_sending_generated/models/email_send_request.rb +12 -12
- data/lib/sendmux_sending_generated.rb +5 -0
- metadata +9 -4
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Sendmux Sending API
|
|
3
|
+
|
|
4
|
+
#Send emails programmatically via the Sendmux email infrastructure. Every response carries an `X-Request-Id` header; errors include a `retryable` flag. 429 and 503 responses include `Retry-After`. Mutating endpoints accept an `Idempotency-Key` header for safe retries.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.22.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Sendmux::Sending::Generated
|
|
17
|
+
class ConnectionTeam < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'id' => :'id',
|
|
26
|
+
:'name' => :'name'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'id' => :'String',
|
|
44
|
+
:'name' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Sending::Generated::ConnectionTeam` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Sending::Generated::ConnectionTeam`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'id')
|
|
71
|
+
self.id = attributes[:'id']
|
|
72
|
+
else
|
|
73
|
+
self.id = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'name')
|
|
77
|
+
self.name = attributes[:'name']
|
|
78
|
+
else
|
|
79
|
+
self.name = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @id.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @name.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @id.nil?
|
|
104
|
+
return false if @name.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] id Value to be assigned
|
|
110
|
+
def id=(id)
|
|
111
|
+
if id.nil?
|
|
112
|
+
fail ArgumentError, 'id cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@id = id
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] name Value to be assigned
|
|
120
|
+
def name=(name)
|
|
121
|
+
if name.nil?
|
|
122
|
+
fail ArgumentError, 'name cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@name = name
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
id == o.id &&
|
|
134
|
+
name == o.name
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[id, name].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
@@ -18,10 +18,10 @@ module Sendmux::Sending::Generated
|
|
|
18
18
|
# File attachments (max 10). Use attachment_id refs for uploaded files.
|
|
19
19
|
attr_accessor :attachments
|
|
20
20
|
|
|
21
|
-
# BCC recipients (
|
|
21
|
+
# BCC recipients (subject to 50 total To, CC, and BCC recipients)
|
|
22
22
|
attr_accessor :bcc
|
|
23
23
|
|
|
24
|
-
# CC recipients (
|
|
24
|
+
# CC recipients (subject to 50 total To, CC, and BCC recipients)
|
|
25
25
|
attr_accessor :cc
|
|
26
26
|
|
|
27
27
|
# Custom X-* headers to include in the email
|
|
@@ -183,12 +183,12 @@ module Sendmux::Sending::Generated
|
|
|
183
183
|
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 10.')
|
|
184
184
|
end
|
|
185
185
|
|
|
186
|
-
if !@bcc.nil? && @bcc.length >
|
|
187
|
-
invalid_properties.push('invalid value for "bcc", number of items must be less than or equal to
|
|
186
|
+
if !@bcc.nil? && @bcc.length > 49
|
|
187
|
+
invalid_properties.push('invalid value for "bcc", number of items must be less than or equal to 49.')
|
|
188
188
|
end
|
|
189
189
|
|
|
190
|
-
if !@cc.nil? && @cc.length >
|
|
191
|
-
invalid_properties.push('invalid value for "cc", number of items must be less than or equal to
|
|
190
|
+
if !@cc.nil? && @cc.length > 49
|
|
191
|
+
invalid_properties.push('invalid value for "cc", number of items must be less than or equal to 49.')
|
|
192
192
|
end
|
|
193
193
|
|
|
194
194
|
if @from.nil?
|
|
@@ -244,8 +244,8 @@ module Sendmux::Sending::Generated
|
|
|
244
244
|
def valid?
|
|
245
245
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
246
246
|
return false if !@attachments.nil? && @attachments.length > 10
|
|
247
|
-
return false if !@bcc.nil? && @bcc.length >
|
|
248
|
-
return false if !@cc.nil? && @cc.length >
|
|
247
|
+
return false if !@bcc.nil? && @bcc.length > 49
|
|
248
|
+
return false if !@cc.nil? && @cc.length > 49
|
|
249
249
|
return false if @from.nil?
|
|
250
250
|
return false if @html_body.nil?
|
|
251
251
|
return false if @html_body.to_s.length > 26214400
|
|
@@ -281,8 +281,8 @@ module Sendmux::Sending::Generated
|
|
|
281
281
|
fail ArgumentError, 'bcc cannot be nil'
|
|
282
282
|
end
|
|
283
283
|
|
|
284
|
-
if bcc.length >
|
|
285
|
-
fail ArgumentError, 'invalid value for "bcc", number of items must be less than or equal to
|
|
284
|
+
if bcc.length > 49
|
|
285
|
+
fail ArgumentError, 'invalid value for "bcc", number of items must be less than or equal to 49.'
|
|
286
286
|
end
|
|
287
287
|
|
|
288
288
|
@bcc = bcc
|
|
@@ -295,8 +295,8 @@ module Sendmux::Sending::Generated
|
|
|
295
295
|
fail ArgumentError, 'cc cannot be nil'
|
|
296
296
|
end
|
|
297
297
|
|
|
298
|
-
if cc.length >
|
|
299
|
-
fail ArgumentError, 'invalid value for "cc", number of items must be less than or equal to
|
|
298
|
+
if cc.length > 49
|
|
299
|
+
fail ArgumentError, 'invalid value for "cc", number of items must be less than or equal to 49.'
|
|
300
300
|
end
|
|
301
301
|
|
|
302
302
|
@cc = cc
|
|
@@ -30,6 +30,11 @@ require 'sendmux_sending_generated/models/batch_send_request'
|
|
|
30
30
|
require 'sendmux_sending_generated/models/batch_send_success_data'
|
|
31
31
|
require 'sendmux_sending_generated/models/batch_send_success_response'
|
|
32
32
|
require 'sendmux_sending_generated/models/batch_summary'
|
|
33
|
+
require 'sendmux_sending_generated/models/connection'
|
|
34
|
+
require 'sendmux_sending_generated/models/connection_credential'
|
|
35
|
+
require 'sendmux_sending_generated/models/connection_mailboxes_inner'
|
|
36
|
+
require 'sendmux_sending_generated/models/connection_response'
|
|
37
|
+
require 'sendmux_sending_generated/models/connection_team'
|
|
33
38
|
require 'sendmux_sending_generated/models/email_send_request'
|
|
34
39
|
require 'sendmux_sending_generated/models/error_detail'
|
|
35
40
|
require 'sendmux_sending_generated/models/error_issue'
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sendmux-sending
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sendmux
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2026-
|
|
10
|
+
date: 2026-09-10 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -77,7 +77,7 @@ dependencies:
|
|
|
77
77
|
requirements:
|
|
78
78
|
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
|
-
version: 1.
|
|
80
|
+
version: 1.3.0
|
|
81
81
|
- - "<"
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '2.0'
|
|
@@ -87,7 +87,7 @@ dependencies:
|
|
|
87
87
|
requirements:
|
|
88
88
|
- - ">="
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: 1.
|
|
90
|
+
version: 1.3.0
|
|
91
91
|
- - "<"
|
|
92
92
|
- !ruby/object:Gem::Version
|
|
93
93
|
version: '2.0'
|
|
@@ -123,6 +123,11 @@ files:
|
|
|
123
123
|
- lib/sendmux_sending_generated/models/batch_send_success_data.rb
|
|
124
124
|
- lib/sendmux_sending_generated/models/batch_send_success_response.rb
|
|
125
125
|
- lib/sendmux_sending_generated/models/batch_summary.rb
|
|
126
|
+
- lib/sendmux_sending_generated/models/connection.rb
|
|
127
|
+
- lib/sendmux_sending_generated/models/connection_credential.rb
|
|
128
|
+
- lib/sendmux_sending_generated/models/connection_mailboxes_inner.rb
|
|
129
|
+
- lib/sendmux_sending_generated/models/connection_response.rb
|
|
130
|
+
- lib/sendmux_sending_generated/models/connection_team.rb
|
|
126
131
|
- lib/sendmux_sending_generated/models/email_send_request.rb
|
|
127
132
|
- lib/sendmux_sending_generated/models/error_detail.rb
|
|
128
133
|
- lib/sendmux_sending_generated/models/error_issue.rb
|