sendmux-sending 1.0.0 → 1.2.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 +14 -0
- data/LICENSE +21 -0
- data/README.md +95 -0
- data/lib/sendmux/sending/client.rb +9 -1
- data/lib/sendmux/sending/version.rb +1 -1
- data/lib/sendmux_sending_generated/api/attachments_api.rb +370 -0
- data/lib/sendmux_sending_generated/api/emails_api.rb +2 -20
- data/lib/sendmux_sending_generated/api/meta_api.rb +82 -0
- data/lib/sendmux_sending_generated/api_client.rb +9 -3
- data/lib/sendmux_sending_generated/api_error.rb +2 -2
- data/lib/sendmux_sending_generated/api_model_base.rb +2 -2
- data/lib/sendmux_sending_generated/configuration.rb +2 -2
- data/lib/sendmux_sending_generated/models/address.rb +2 -2
- data/lib/sendmux_sending_generated/models/attachment.rb +78 -249
- data/lib/sendmux_sending_generated/models/attachment_upload_data.rb +284 -0
- data/lib/sendmux_sending_generated/models/attachment_upload_intent_data.rb +337 -0
- data/lib/sendmux_sending_generated/models/attachment_upload_intent_request.rb +279 -0
- data/lib/sendmux_sending_generated/models/attachment_upload_intent_response.rb +223 -0
- data/lib/sendmux_sending_generated/models/attachment_upload_response.rb +223 -0
- data/lib/sendmux_sending_generated/models/batch_result_item.rb +2 -2
- data/lib/sendmux_sending_generated/models/batch_send_request.rb +2 -2
- data/lib/sendmux_sending_generated/models/batch_send_success_data.rb +2 -2
- data/lib/sendmux_sending_generated/models/batch_send_success_response.rb +2 -2
- data/lib/sendmux_sending_generated/models/batch_summary.rb +2 -2
- data/lib/sendmux_sending_generated/models/email_send_request.rb +3 -3
- data/lib/sendmux_sending_generated/models/error_detail.rb +2 -2
- data/lib/sendmux_sending_generated/models/error_issue.rb +2 -2
- data/lib/sendmux_sending_generated/models/error_response.rb +2 -2
- data/lib/sendmux_sending_generated/models/inline_attachment.rb +274 -0
- data/lib/sendmux_sending_generated/models/meta.rb +2 -2
- data/lib/sendmux_sending_generated/models/recipient.rb +2 -2
- data/lib/sendmux_sending_generated/models/send_success_data.rb +2 -2
- data/lib/sendmux_sending_generated/models/send_success_response.rb +2 -2
- data/lib/sendmux_sending_generated/models/success_envelope.rb +2 -2
- data/lib/sendmux_sending_generated/models/uploaded_attachment_ref.rb +176 -0
- data/lib/sendmux_sending_generated/version.rb +2 -2
- data/lib/sendmux_sending_generated.rb +11 -2
- metadata +22 -6
|
@@ -0,0 +1,176 @@
|
|
|
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 UploadedAttachmentRef < ApiModelBase
|
|
18
|
+
# Temporary uploaded attachment ID returned by POST /emails/attachments.
|
|
19
|
+
attr_accessor :attachment_id
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'attachment_id' => :'attachment_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
|
+
:'attachment_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::UploadedAttachmentRef` 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::UploadedAttachmentRef`. 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?(:'attachment_id')
|
|
68
|
+
self.attachment_id = attributes[:'attachment_id']
|
|
69
|
+
else
|
|
70
|
+
self.attachment_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 @attachment_id.nil?
|
|
80
|
+
invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
pattern = Regexp.new(/^att_[a-z0-9]{24}$/)
|
|
84
|
+
if @attachment_id !~ pattern
|
|
85
|
+
invalid_properties.push("invalid value for \"attachment_id\", must conform to the pattern #{pattern}.")
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
95
|
+
return false if @attachment_id.nil?
|
|
96
|
+
return false if @attachment_id !~ Regexp.new(/^att_[a-z0-9]{24}$/)
|
|
97
|
+
true
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Custom attribute writer method with validation
|
|
101
|
+
# @param [Object] attachment_id Value to be assigned
|
|
102
|
+
def attachment_id=(attachment_id)
|
|
103
|
+
if attachment_id.nil?
|
|
104
|
+
fail ArgumentError, 'attachment_id cannot be nil'
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
pattern = Regexp.new(/^att_[a-z0-9]{24}$/)
|
|
108
|
+
if attachment_id !~ pattern
|
|
109
|
+
fail ArgumentError, "invalid value for \"attachment_id\", must conform to the pattern #{pattern}."
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
@attachment_id = attachment_id
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Checks equality by comparing each attribute.
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def ==(o)
|
|
118
|
+
return true if self.equal?(o)
|
|
119
|
+
self.class == o.class &&
|
|
120
|
+
attachment_id == o.attachment_id
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# @see the `==` method
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def eql?(o)
|
|
126
|
+
self == o
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Calculates hash code according to all attributes.
|
|
130
|
+
# @return [Integer] Hash code
|
|
131
|
+
def hash
|
|
132
|
+
[attachment_id].hash
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Builds the object from hash
|
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
137
|
+
# @return [Object] Returns the model itself
|
|
138
|
+
def self.build_from_hash(attributes)
|
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
|
140
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
141
|
+
transformed_hash = {}
|
|
142
|
+
openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = nil
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
149
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
152
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
new(transformed_hash)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Returns the object in the form of hash
|
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
|
160
|
+
def to_hash
|
|
161
|
+
hash = {}
|
|
162
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
163
|
+
value = self.send(attr)
|
|
164
|
+
if value.nil?
|
|
165
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
166
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Sendmux Sending API
|
|
3
3
|
|
|
4
|
-
#Send emails programmatically via the
|
|
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
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Sendmux Sending API
|
|
3
3
|
|
|
4
|
-
#Send emails programmatically via the
|
|
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
5
|
|
|
6
6
|
The version of the OpenAPI document: 1.0.0
|
|
7
7
|
|
|
@@ -20,6 +20,11 @@ require 'sendmux_sending_generated/configuration'
|
|
|
20
20
|
# Models
|
|
21
21
|
require 'sendmux_sending_generated/models/address'
|
|
22
22
|
require 'sendmux_sending_generated/models/attachment'
|
|
23
|
+
require 'sendmux_sending_generated/models/attachment_upload_data'
|
|
24
|
+
require 'sendmux_sending_generated/models/attachment_upload_intent_data'
|
|
25
|
+
require 'sendmux_sending_generated/models/attachment_upload_intent_request'
|
|
26
|
+
require 'sendmux_sending_generated/models/attachment_upload_intent_response'
|
|
27
|
+
require 'sendmux_sending_generated/models/attachment_upload_response'
|
|
23
28
|
require 'sendmux_sending_generated/models/batch_result_item'
|
|
24
29
|
require 'sendmux_sending_generated/models/batch_send_request'
|
|
25
30
|
require 'sendmux_sending_generated/models/batch_send_success_data'
|
|
@@ -29,14 +34,18 @@ require 'sendmux_sending_generated/models/email_send_request'
|
|
|
29
34
|
require 'sendmux_sending_generated/models/error_detail'
|
|
30
35
|
require 'sendmux_sending_generated/models/error_issue'
|
|
31
36
|
require 'sendmux_sending_generated/models/error_response'
|
|
37
|
+
require 'sendmux_sending_generated/models/inline_attachment'
|
|
32
38
|
require 'sendmux_sending_generated/models/meta'
|
|
33
39
|
require 'sendmux_sending_generated/models/recipient'
|
|
34
40
|
require 'sendmux_sending_generated/models/send_success_data'
|
|
35
41
|
require 'sendmux_sending_generated/models/send_success_response'
|
|
36
42
|
require 'sendmux_sending_generated/models/success_envelope'
|
|
43
|
+
require 'sendmux_sending_generated/models/uploaded_attachment_ref'
|
|
37
44
|
|
|
38
45
|
# APIs
|
|
46
|
+
require 'sendmux_sending_generated/api/attachments_api'
|
|
39
47
|
require 'sendmux_sending_generated/api/emails_api'
|
|
48
|
+
require 'sendmux_sending_generated/api/meta_api'
|
|
40
49
|
|
|
41
50
|
module Sendmux::Sending::Generated
|
|
42
51
|
class << self
|
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.2.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-07-08 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: faraday
|
|
@@ -75,16 +75,22 @@ dependencies:
|
|
|
75
75
|
name: sendmux-core
|
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
|
77
77
|
requirements:
|
|
78
|
-
- - "
|
|
78
|
+
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
|
-
version:
|
|
80
|
+
version: 1.1.0
|
|
81
|
+
- - "<"
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '2.0'
|
|
81
84
|
type: :runtime
|
|
82
85
|
prerelease: false
|
|
83
86
|
version_requirements: !ruby/object:Gem::Requirement
|
|
84
87
|
requirements:
|
|
85
|
-
- - "
|
|
88
|
+
- - ">="
|
|
86
89
|
- !ruby/object:Gem::Version
|
|
87
|
-
version:
|
|
90
|
+
version: 1.1.0
|
|
91
|
+
- - "<"
|
|
92
|
+
- !ruby/object:Gem::Version
|
|
93
|
+
version: '2.0'
|
|
88
94
|
email:
|
|
89
95
|
- contact@sendmux.ai
|
|
90
96
|
executables: []
|
|
@@ -92,18 +98,26 @@ extensions: []
|
|
|
92
98
|
extra_rdoc_files: []
|
|
93
99
|
files:
|
|
94
100
|
- CHANGELOG.md
|
|
101
|
+
- LICENSE
|
|
95
102
|
- README.md
|
|
96
103
|
- lib/sendmux/sending.rb
|
|
97
104
|
- lib/sendmux/sending/client.rb
|
|
98
105
|
- lib/sendmux/sending/version.rb
|
|
99
106
|
- lib/sendmux_sending_generated.rb
|
|
107
|
+
- lib/sendmux_sending_generated/api/attachments_api.rb
|
|
100
108
|
- lib/sendmux_sending_generated/api/emails_api.rb
|
|
109
|
+
- lib/sendmux_sending_generated/api/meta_api.rb
|
|
101
110
|
- lib/sendmux_sending_generated/api_client.rb
|
|
102
111
|
- lib/sendmux_sending_generated/api_error.rb
|
|
103
112
|
- lib/sendmux_sending_generated/api_model_base.rb
|
|
104
113
|
- lib/sendmux_sending_generated/configuration.rb
|
|
105
114
|
- lib/sendmux_sending_generated/models/address.rb
|
|
106
115
|
- lib/sendmux_sending_generated/models/attachment.rb
|
|
116
|
+
- lib/sendmux_sending_generated/models/attachment_upload_data.rb
|
|
117
|
+
- lib/sendmux_sending_generated/models/attachment_upload_intent_data.rb
|
|
118
|
+
- lib/sendmux_sending_generated/models/attachment_upload_intent_request.rb
|
|
119
|
+
- lib/sendmux_sending_generated/models/attachment_upload_intent_response.rb
|
|
120
|
+
- lib/sendmux_sending_generated/models/attachment_upload_response.rb
|
|
107
121
|
- lib/sendmux_sending_generated/models/batch_result_item.rb
|
|
108
122
|
- lib/sendmux_sending_generated/models/batch_send_request.rb
|
|
109
123
|
- lib/sendmux_sending_generated/models/batch_send_success_data.rb
|
|
@@ -113,11 +127,13 @@ files:
|
|
|
113
127
|
- lib/sendmux_sending_generated/models/error_detail.rb
|
|
114
128
|
- lib/sendmux_sending_generated/models/error_issue.rb
|
|
115
129
|
- lib/sendmux_sending_generated/models/error_response.rb
|
|
130
|
+
- lib/sendmux_sending_generated/models/inline_attachment.rb
|
|
116
131
|
- lib/sendmux_sending_generated/models/meta.rb
|
|
117
132
|
- lib/sendmux_sending_generated/models/recipient.rb
|
|
118
133
|
- lib/sendmux_sending_generated/models/send_success_data.rb
|
|
119
134
|
- lib/sendmux_sending_generated/models/send_success_response.rb
|
|
120
135
|
- lib/sendmux_sending_generated/models/success_envelope.rb
|
|
136
|
+
- lib/sendmux_sending_generated/models/uploaded_attachment_ref.rb
|
|
121
137
|
- lib/sendmux_sending_generated/version.rb
|
|
122
138
|
homepage: https://github.com/Sendmux/sendmux-sdk
|
|
123
139
|
licenses:
|