sendmux-sending 1.4.0 → 2.0.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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. metadata +11 -120
  3. data/CHANGELOG.md +0 -41
  4. data/LICENSE +0 -21
  5. data/README.md +0 -112
  6. data/lib/sendmux/sending/client.rb +0 -49
  7. data/lib/sendmux/sending/version.rb +0 -7
  8. data/lib/sendmux/sending.rb +0 -12
  9. data/lib/sendmux_sending_generated/api/attachments_api.rb +0 -370
  10. data/lib/sendmux_sending_generated/api/emails_api.rb +0 -172
  11. data/lib/sendmux_sending_generated/api/meta_api.rb +0 -142
  12. data/lib/sendmux_sending_generated/api_client.rb +0 -447
  13. data/lib/sendmux_sending_generated/api_error.rb +0 -58
  14. data/lib/sendmux_sending_generated/api_model_base.rb +0 -88
  15. data/lib/sendmux_sending_generated/configuration.rb +0 -399
  16. data/lib/sendmux_sending_generated/models/address.rb +0 -215
  17. data/lib/sendmux_sending_generated/models/attachment.rb +0 -103
  18. data/lib/sendmux_sending_generated/models/attachment_upload_data.rb +0 -284
  19. data/lib/sendmux_sending_generated/models/attachment_upload_intent_data.rb +0 -337
  20. data/lib/sendmux_sending_generated/models/attachment_upload_intent_request.rb +0 -279
  21. data/lib/sendmux_sending_generated/models/attachment_upload_intent_response.rb +0 -223
  22. data/lib/sendmux_sending_generated/models/attachment_upload_response.rb +0 -223
  23. data/lib/sendmux_sending_generated/models/batch_result_item.rb +0 -256
  24. data/lib/sendmux_sending_generated/models/batch_send_request.rb +0 -185
  25. data/lib/sendmux_sending_generated/models/batch_send_success_data.rb +0 -192
  26. data/lib/sendmux_sending_generated/models/batch_send_success_response.rb +0 -223
  27. data/lib/sendmux_sending_generated/models/batch_summary.rb +0 -219
  28. data/lib/sendmux_sending_generated/models/connection.rb +0 -273
  29. data/lib/sendmux_sending_generated/models/connection_credential.rb +0 -226
  30. data/lib/sendmux_sending_generated/models/connection_mailboxes_inner.rb +0 -190
  31. data/lib/sendmux_sending_generated/models/connection_response.rb +0 -223
  32. data/lib/sendmux_sending_generated/models/connection_team.rb +0 -190
  33. data/lib/sendmux_sending_generated/models/email_send_request.rb +0 -465
  34. data/lib/sendmux_sending_generated/models/error_detail.rb +0 -251
  35. data/lib/sendmux_sending_generated/models/error_issue.rb +0 -219
  36. data/lib/sendmux_sending_generated/models/error_response.rb +0 -216
  37. data/lib/sendmux_sending_generated/models/inline_attachment.rb +0 -274
  38. data/lib/sendmux_sending_generated/models/meta.rb +0 -165
  39. data/lib/sendmux_sending_generated/models/recipient.rb +0 -214
  40. data/lib/sendmux_sending_generated/models/send_success_data.rb +0 -227
  41. data/lib/sendmux_sending_generated/models/send_success_response.rb +0 -223
  42. data/lib/sendmux_sending_generated/models/success_envelope.rb +0 -190
  43. data/lib/sendmux_sending_generated/models/uploaded_attachment_ref.rb +0 -176
  44. data/lib/sendmux_sending_generated/version.rb +0 -15
  45. data/lib/sendmux_sending_generated.rb +0 -71
@@ -1,165 +0,0 @@
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 Meta < ApiModelBase
18
- # Unique request identifier
19
- attr_accessor :request_id
20
-
21
- # Attribute mapping from ruby-style variable name to JSON key.
22
- def self.attribute_map
23
- {
24
- :'request_id' => :'request_id'
25
- }
26
- end
27
-
28
- # Returns attribute mapping this model knows about
29
- def self.acceptable_attribute_map
30
- attribute_map
31
- end
32
-
33
- # Returns all the JSON keys this model knows about
34
- def self.acceptable_attributes
35
- acceptable_attribute_map.values
36
- end
37
-
38
- # Attribute type mapping.
39
- def self.openapi_types
40
- {
41
- :'request_id' => :'String'
42
- }
43
- end
44
-
45
- # List of attributes with nullable: true
46
- def self.openapi_nullable
47
- Set.new([
48
- ])
49
- end
50
-
51
- # Initializes the object
52
- # @param [Hash] attributes Model attributes in the form of hash
53
- def initialize(attributes = {})
54
- if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Sending::Generated::Meta` initialize method"
56
- end
57
-
58
- # check to see if the attribute exists and convert string to symbol for hash key
59
- acceptable_attribute_map = self.class.acceptable_attribute_map
60
- attributes = attributes.each_with_object({}) { |(k, v), h|
61
- if (!acceptable_attribute_map.key?(k.to_sym))
62
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Sending::Generated::Meta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
- end
64
- h[k.to_sym] = v
65
- }
66
-
67
- if attributes.key?(:'request_id')
68
- self.request_id = attributes[:'request_id']
69
- else
70
- self.request_id = nil
71
- end
72
- end
73
-
74
- # Show invalid properties with the reasons. Usually used together with valid?
75
- # @return Array for valid properties with the reasons
76
- def list_invalid_properties
77
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
- invalid_properties = Array.new
79
- if @request_id.nil?
80
- invalid_properties.push('invalid value for "request_id", request_id cannot be nil.')
81
- end
82
-
83
- invalid_properties
84
- end
85
-
86
- # Check to see if the all the properties in the model are valid
87
- # @return true if the model is valid
88
- def valid?
89
- warn '[DEPRECATED] the `valid?` method is obsolete'
90
- return false if @request_id.nil?
91
- true
92
- end
93
-
94
- # Custom attribute writer method with validation
95
- # @param [Object] request_id Value to be assigned
96
- def request_id=(request_id)
97
- if request_id.nil?
98
- fail ArgumentError, 'request_id cannot be nil'
99
- end
100
-
101
- @request_id = request_id
102
- end
103
-
104
- # Checks equality by comparing each attribute.
105
- # @param [Object] Object to be compared
106
- def ==(o)
107
- return true if self.equal?(o)
108
- self.class == o.class &&
109
- request_id == o.request_id
110
- end
111
-
112
- # @see the `==` method
113
- # @param [Object] Object to be compared
114
- def eql?(o)
115
- self == o
116
- end
117
-
118
- # Calculates hash code according to all attributes.
119
- # @return [Integer] Hash code
120
- def hash
121
- [request_id].hash
122
- end
123
-
124
- # Builds the object from hash
125
- # @param [Hash] attributes Model attributes in the form of hash
126
- # @return [Object] Returns the model itself
127
- def self.build_from_hash(attributes)
128
- return nil unless attributes.is_a?(Hash)
129
- attributes = attributes.transform_keys(&:to_sym)
130
- transformed_hash = {}
131
- openapi_types.each_pair do |key, type|
132
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
- transformed_hash["#{key}"] = nil
134
- elsif type =~ /\AArray<(.*)>/i
135
- # check to ensure the input is an array given that the attribute
136
- # is documented as an array but the input is not
137
- if attributes[attribute_map[key]].is_a?(Array)
138
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
- end
140
- elsif !attributes[attribute_map[key]].nil?
141
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
- end
143
- end
144
- new(transformed_hash)
145
- end
146
-
147
- # Returns the object in the form of hash
148
- # @return [Hash] Returns the object in the form of hash
149
- def to_hash
150
- hash = {}
151
- self.class.attribute_map.each_pair do |attr, param|
152
- value = self.send(attr)
153
- if value.nil?
154
- is_nullable = self.class.openapi_nullable.include?(attr)
155
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
- end
157
-
158
- hash[param] = _to_hash(value)
159
- end
160
- hash
161
- end
162
-
163
- end
164
-
165
- end
@@ -1,214 +0,0 @@
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 Recipient < ApiModelBase
18
- # Recipient email address
19
- attr_accessor :email
20
-
21
- # Recipient display name
22
- attr_accessor :name
23
-
24
- # Attribute mapping from ruby-style variable name to JSON key.
25
- def self.attribute_map
26
- {
27
- :'email' => :'email',
28
- :'name' => :'name'
29
- }
30
- end
31
-
32
- # Returns attribute mapping this model knows about
33
- def self.acceptable_attribute_map
34
- attribute_map
35
- end
36
-
37
- # Returns all the JSON keys this model knows about
38
- def self.acceptable_attributes
39
- acceptable_attribute_map.values
40
- end
41
-
42
- # Attribute type mapping.
43
- def self.openapi_types
44
- {
45
- :'email' => :'String',
46
- :'name' => :'String'
47
- }
48
- end
49
-
50
- # List of attributes with nullable: true
51
- def self.openapi_nullable
52
- Set.new([
53
- ])
54
- end
55
-
56
- # Initializes the object
57
- # @param [Hash] attributes Model attributes in the form of hash
58
- def initialize(attributes = {})
59
- if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Sending::Generated::Recipient` initialize method"
61
- end
62
-
63
- # check to see if the attribute exists and convert string to symbol for hash key
64
- acceptable_attribute_map = self.class.acceptable_attribute_map
65
- attributes = attributes.each_with_object({}) { |(k, v), h|
66
- if (!acceptable_attribute_map.key?(k.to_sym))
67
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Sending::Generated::Recipient`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
68
- end
69
- h[k.to_sym] = v
70
- }
71
-
72
- if attributes.key?(:'email')
73
- self.email = attributes[:'email']
74
- else
75
- self.email = nil
76
- end
77
-
78
- if attributes.key?(:'name')
79
- self.name = attributes[:'name']
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 @email.nil?
89
- invalid_properties.push('invalid value for "email", email cannot be nil.')
90
- end
91
-
92
- if @email.to_s.length > 254
93
- invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
94
- end
95
-
96
- if !@name.nil? && @name.to_s.length > 100
97
- invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
98
- end
99
-
100
- pattern = Regexp.new(/^[^\r\n]*$/)
101
- if !@name.nil? && @name !~ pattern
102
- invalid_properties.push("invalid value for \"name\", must conform to the pattern #{pattern}.")
103
- end
104
-
105
- invalid_properties
106
- end
107
-
108
- # Check to see if the all the properties in the model are valid
109
- # @return true if the model is valid
110
- def valid?
111
- warn '[DEPRECATED] the `valid?` method is obsolete'
112
- return false if @email.nil?
113
- return false if @email.to_s.length > 254
114
- return false if !@name.nil? && @name.to_s.length > 100
115
- return false if !@name.nil? && @name !~ Regexp.new(/^[^\r\n]*$/)
116
- true
117
- end
118
-
119
- # Custom attribute writer method with validation
120
- # @param [Object] email Value to be assigned
121
- def email=(email)
122
- if email.nil?
123
- fail ArgumentError, 'email cannot be nil'
124
- end
125
-
126
- if email.to_s.length > 254
127
- fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
128
- end
129
-
130
- @email = email
131
- end
132
-
133
- # Custom attribute writer method with validation
134
- # @param [Object] name Value to be assigned
135
- def name=(name)
136
- if name.nil?
137
- fail ArgumentError, 'name cannot be nil'
138
- end
139
-
140
- if name.to_s.length > 100
141
- fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
142
- end
143
-
144
- pattern = Regexp.new(/^[^\r\n]*$/)
145
- if name !~ pattern
146
- fail ArgumentError, "invalid value for \"name\", must conform to the pattern #{pattern}."
147
- end
148
-
149
- @name = name
150
- end
151
-
152
- # Checks equality by comparing each attribute.
153
- # @param [Object] Object to be compared
154
- def ==(o)
155
- return true if self.equal?(o)
156
- self.class == o.class &&
157
- email == o.email &&
158
- name == o.name
159
- end
160
-
161
- # @see the `==` method
162
- # @param [Object] Object to be compared
163
- def eql?(o)
164
- self == o
165
- end
166
-
167
- # Calculates hash code according to all attributes.
168
- # @return [Integer] Hash code
169
- def hash
170
- [email, name].hash
171
- end
172
-
173
- # Builds the object from hash
174
- # @param [Hash] attributes Model attributes in the form of hash
175
- # @return [Object] Returns the model itself
176
- def self.build_from_hash(attributes)
177
- return nil unless attributes.is_a?(Hash)
178
- attributes = attributes.transform_keys(&:to_sym)
179
- transformed_hash = {}
180
- openapi_types.each_pair do |key, type|
181
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
182
- transformed_hash["#{key}"] = nil
183
- elsif type =~ /\AArray<(.*)>/i
184
- # check to ensure the input is an array given that the attribute
185
- # is documented as an array but the input is not
186
- if attributes[attribute_map[key]].is_a?(Array)
187
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
188
- end
189
- elsif !attributes[attribute_map[key]].nil?
190
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
191
- end
192
- end
193
- new(transformed_hash)
194
- end
195
-
196
- # Returns the object in the form of hash
197
- # @return [Hash] Returns the object in the form of hash
198
- def to_hash
199
- hash = {}
200
- self.class.attribute_map.each_pair do |attr, param|
201
- value = self.send(attr)
202
- if value.nil?
203
- is_nullable = self.class.openapi_nullable.include?(attr)
204
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
205
- end
206
-
207
- hash[param] = _to_hash(value)
208
- end
209
- hash
210
- end
211
-
212
- end
213
-
214
- end
@@ -1,227 +0,0 @@
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 SendSuccessData < ApiModelBase
18
- # Unique message identifier (eml_ prefix + 24 alphanumeric chars)
19
- attr_accessor :message_id
20
-
21
- # Message queuing status
22
- attr_accessor :status
23
-
24
- class EnumAttributeValidator
25
- attr_reader :datatype
26
- attr_reader :allowable_values
27
-
28
- def initialize(datatype, allowable_values)
29
- @allowable_values = allowable_values.map do |value|
30
- case datatype.to_s
31
- when /Integer/i
32
- value.to_i
33
- when /Float/i
34
- value.to_f
35
- else
36
- value
37
- end
38
- end
39
- end
40
-
41
- def valid?(value)
42
- !value || allowable_values.include?(value)
43
- end
44
- end
45
-
46
- # Attribute mapping from ruby-style variable name to JSON key.
47
- def self.attribute_map
48
- {
49
- :'message_id' => :'message_id',
50
- :'status' => :'status'
51
- }
52
- end
53
-
54
- # Returns attribute mapping this model knows about
55
- def self.acceptable_attribute_map
56
- attribute_map
57
- end
58
-
59
- # Returns all the JSON keys this model knows about
60
- def self.acceptable_attributes
61
- acceptable_attribute_map.values
62
- end
63
-
64
- # Attribute type mapping.
65
- def self.openapi_types
66
- {
67
- :'message_id' => :'String',
68
- :'status' => :'String'
69
- }
70
- end
71
-
72
- # List of attributes with nullable: true
73
- def self.openapi_nullable
74
- Set.new([
75
- ])
76
- end
77
-
78
- # Initializes the object
79
- # @param [Hash] attributes Model attributes in the form of hash
80
- def initialize(attributes = {})
81
- if (!attributes.is_a?(Hash))
82
- fail ArgumentError, "The input argument (attributes) must be a hash in `Sendmux::Sending::Generated::SendSuccessData` initialize method"
83
- end
84
-
85
- # check to see if the attribute exists and convert string to symbol for hash key
86
- acceptable_attribute_map = self.class.acceptable_attribute_map
87
- attributes = attributes.each_with_object({}) { |(k, v), h|
88
- if (!acceptable_attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `Sendmux::Sending::Generated::SendSuccessData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
90
- end
91
- h[k.to_sym] = v
92
- }
93
-
94
- if attributes.key?(:'message_id')
95
- self.message_id = attributes[:'message_id']
96
- else
97
- self.message_id = nil
98
- end
99
-
100
- if attributes.key?(:'status')
101
- self.status = attributes[:'status']
102
- else
103
- self.status = nil
104
- end
105
- end
106
-
107
- # Show invalid properties with the reasons. Usually used together with valid?
108
- # @return Array for valid properties with the reasons
109
- def list_invalid_properties
110
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
- invalid_properties = Array.new
112
- if @message_id.nil?
113
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
114
- end
115
-
116
- pattern = Regexp.new(/^eml_[a-z0-9]{24}$/)
117
- if @message_id !~ pattern
118
- invalid_properties.push("invalid value for \"message_id\", must conform to the pattern #{pattern}.")
119
- end
120
-
121
- if @status.nil?
122
- invalid_properties.push('invalid value for "status", status cannot be nil.')
123
- end
124
-
125
- invalid_properties
126
- end
127
-
128
- # Check to see if the all the properties in the model are valid
129
- # @return true if the model is valid
130
- def valid?
131
- warn '[DEPRECATED] the `valid?` method is obsolete'
132
- return false if @message_id.nil?
133
- return false if @message_id !~ Regexp.new(/^eml_[a-z0-9]{24}$/)
134
- return false if @status.nil?
135
- status_validator = EnumAttributeValidator.new('String', ["queued", "unknown_default_open_api"])
136
- return false unless status_validator.valid?(@status)
137
- true
138
- end
139
-
140
- # Custom attribute writer method with validation
141
- # @param [Object] message_id Value to be assigned
142
- def message_id=(message_id)
143
- if message_id.nil?
144
- fail ArgumentError, 'message_id cannot be nil'
145
- end
146
-
147
- pattern = Regexp.new(/^eml_[a-z0-9]{24}$/)
148
- if message_id !~ pattern
149
- fail ArgumentError, "invalid value for \"message_id\", must conform to the pattern #{pattern}."
150
- end
151
-
152
- @message_id = message_id
153
- end
154
-
155
- # Custom attribute writer method checking allowed values (enum).
156
- # @param [Object] status Object to be assigned
157
- def status=(status)
158
- validator = EnumAttributeValidator.new('String', ["queued", "unknown_default_open_api"])
159
- unless validator.valid?(status)
160
- fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
161
- end
162
- @status = status
163
- end
164
-
165
- # Checks equality by comparing each attribute.
166
- # @param [Object] Object to be compared
167
- def ==(o)
168
- return true if self.equal?(o)
169
- self.class == o.class &&
170
- message_id == o.message_id &&
171
- status == o.status
172
- end
173
-
174
- # @see the `==` method
175
- # @param [Object] Object to be compared
176
- def eql?(o)
177
- self == o
178
- end
179
-
180
- # Calculates hash code according to all attributes.
181
- # @return [Integer] Hash code
182
- def hash
183
- [message_id, status].hash
184
- end
185
-
186
- # Builds the object from hash
187
- # @param [Hash] attributes Model attributes in the form of hash
188
- # @return [Object] Returns the model itself
189
- def self.build_from_hash(attributes)
190
- return nil unless attributes.is_a?(Hash)
191
- attributes = attributes.transform_keys(&:to_sym)
192
- transformed_hash = {}
193
- openapi_types.each_pair do |key, type|
194
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
195
- transformed_hash["#{key}"] = nil
196
- elsif type =~ /\AArray<(.*)>/i
197
- # check to ensure the input is an array given that the attribute
198
- # is documented as an array but the input is not
199
- if attributes[attribute_map[key]].is_a?(Array)
200
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
- end
202
- elsif !attributes[attribute_map[key]].nil?
203
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
204
- end
205
- end
206
- new(transformed_hash)
207
- end
208
-
209
- # Returns the object in the form of hash
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_hash
212
- hash = {}
213
- self.class.attribute_map.each_pair do |attr, param|
214
- value = self.send(attr)
215
- if value.nil?
216
- is_nullable = self.class.openapi_nullable.include?(attr)
217
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
218
- end
219
-
220
- hash[param] = _to_hash(value)
221
- end
222
- hash
223
- end
224
-
225
- end
226
-
227
- end