sendmux-sending 1.4.0 → 1.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 195959762d9b4fe1a794ad4b40bde49927733d5bf6bbbe751ff7975a74a3be4b
4
- data.tar.gz: 0b4e725dd8a434917954bd0d0bddc0232e58f7596c6e3fada3ff404f98a017d0
3
+ metadata.gz: 821d58d8a919591323d101d48bb9c4f53d14cb5085ac2d71f6ed5142a0273958
4
+ data.tar.gz: 742e3fe7e4a957c8eeca20f60e3905b58a242ccf862dd1e59046bfe753e7f1f9
5
5
  SHA512:
6
- metadata.gz: d14fc7657e5a681d1624acf5fa069f04d795435c6f6422662d0e4e25f2a2598d7dfe049c35deda0262ab0fca4e1f15a6610fe06bc737d7090aa8d657c5bbd377
7
- data.tar.gz: 0d415c60df2619d31805dbc5b9aebe0580feaa47b12d6ae9e3e81826e3f5044054fb46423489f2f18f39473207cbf2c89556eb3ec7a66651c4893b231f577c02
6
+ metadata.gz: 48d0e04ccf42e9c2a5886621d42263688354f716886cf3df5b0d06f803e9321e472eb5035ba3ed7da07ebe1269e4db6a288d3925d2adcebe5e2f8c937421b8fd
7
+ data.tar.gz: b80609c92fb6144f7adcf1faf06de6adba24c7789ac7533df72fa20972c3c4a2c6a574d8c796582d013b5a493fffeaf012022008b52d6decc4b137bf3fe742f0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ### Features
6
+
7
+ * Add one delivery group or a list of `delivery_group` IDs to email send requests.
8
+
9
+ ## [1.5.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sending/v1.4.0...ruby-sending/v1.5.0) (2026-09-19)
10
+
11
+
12
+ ### Features
13
+
14
+ * integrate combined provider variables and delivery routing ([81bbf22](https://github.com/Sendmux/sendmux-sdk/commit/81bbf221a357bf5d588eba654184ff34491473df))
15
+ * **sdk:** add provider variables and delivery group routing ([94f52d4](https://github.com/Sendmux/sendmux-sdk/commit/94f52d4e9f6157e197308541cc5987517bac7a4a))
16
+
3
17
  ## [1.4.0](https://github.com/Sendmux/sendmux-sdk/compare/ruby-sending/v1.3.0...ruby-sending/v1.4.0) (2026-09-10)
4
18
 
5
19
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sendmux
4
4
  module Sending
5
- VERSION = '1.4.0'
5
+ VERSION = '1.5.0'
6
6
  end
7
7
  end
@@ -27,6 +27,8 @@ module Sendmux::Sending::Generated
27
27
  # Custom X-* headers to include in the email
28
28
  attr_accessor :custom_headers
29
29
 
30
+ attr_accessor :delivery_group
31
+
30
32
  attr_accessor :from
31
33
 
32
34
  # HTML email content (max 25MB)
@@ -54,6 +56,7 @@ module Sendmux::Sending::Generated
54
56
  :'bcc' => :'bcc',
55
57
  :'cc' => :'cc',
56
58
  :'custom_headers' => :'custom_headers',
59
+ :'delivery_group' => :'delivery_group',
57
60
  :'from' => :'from',
58
61
  :'html_body' => :'html_body',
59
62
  :'reply_to' => :'reply_to',
@@ -81,6 +84,7 @@ module Sendmux::Sending::Generated
81
84
  :'bcc' => :'Array<Recipient>',
82
85
  :'cc' => :'Array<Recipient>',
83
86
  :'custom_headers' => :'Hash<String, String>',
87
+ :'delivery_group' => :'EmailSendRequestDeliveryGroup',
84
88
  :'from' => :'Address',
85
89
  :'html_body' => :'String',
86
90
  :'reply_to' => :'Address',
@@ -137,6 +141,10 @@ module Sendmux::Sending::Generated
137
141
  end
138
142
  end
139
143
 
144
+ if attributes.key?(:'delivery_group')
145
+ self.delivery_group = attributes[:'delivery_group']
146
+ end
147
+
140
148
  if attributes.key?(:'from')
141
149
  self.from = attributes[:'from']
142
150
  else
@@ -400,6 +408,7 @@ module Sendmux::Sending::Generated
400
408
  bcc == o.bcc &&
401
409
  cc == o.cc &&
402
410
  custom_headers == o.custom_headers &&
411
+ delivery_group == o.delivery_group &&
403
412
  from == o.from &&
404
413
  html_body == o.html_body &&
405
414
  reply_to == o.reply_to &&
@@ -418,7 +427,7 @@ module Sendmux::Sending::Generated
418
427
  # Calculates hash code according to all attributes.
419
428
  # @return [Integer] Hash code
420
429
  def hash
421
- [attachments, bcc, cc, custom_headers, from, html_body, reply_to, return_path, subject, text_body, to].hash
430
+ [attachments, bcc, cc, custom_headers, delivery_group, from, html_body, reply_to, return_path, subject, text_body, to].hash
422
431
  end
423
432
 
424
433
  # Builds the object from hash
@@ -0,0 +1,105 @@
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
+ # One delivery group public ID or a non-empty array of up to 50 IDs
18
+ module EmailSendRequestDeliveryGroup
19
+ class << self
20
+ # List of class defined in oneOf (OpenAPI v3)
21
+ def openapi_one_of
22
+ [
23
+ :'Array<String>',
24
+ :'String'
25
+ ]
26
+ end
27
+
28
+ # Builds the object
29
+ # @param [Mixed] Data to be matched against the list of oneOf items
30
+ # @return [Object] Returns the model or the data itself
31
+ def build(data)
32
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
33
+ # Note:
34
+ # - We do not attempt to check whether exactly one item matches.
35
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
36
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
37
+ # - TODO: scalar values are de facto behaving as if they were nullable.
38
+ # - TODO: logging when debugging is set.
39
+ openapi_one_of.each do |klass|
40
+ begin
41
+ next if klass == :AnyType # "nullable: true"
42
+ return find_and_cast_into_type(klass, data)
43
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
44
+ end
45
+ end
46
+
47
+ openapi_one_of.include?(:AnyType) ? data : nil
48
+ end
49
+
50
+ private
51
+
52
+ SchemaMismatchError = Class.new(StandardError)
53
+
54
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
55
+ def find_and_cast_into_type(klass, data)
56
+ return if data.nil?
57
+
58
+ case klass.to_s
59
+ when 'Boolean'
60
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
61
+ when 'Float'
62
+ return data if data.instance_of?(Float)
63
+ when 'Integer'
64
+ return data if data.instance_of?(Integer)
65
+ when 'Time'
66
+ return Time.parse(data)
67
+ when 'Date'
68
+ return Date.iso8601(data)
69
+ when 'String'
70
+ return data if data.instance_of?(String)
71
+ when 'Object' # "type: object"
72
+ return data if data.instance_of?(Hash)
73
+ when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
74
+ if data.instance_of?(Array)
75
+ sub_type = Regexp.last_match[:sub_type]
76
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
77
+ end
78
+ when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
79
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
80
+ sub_type = Regexp.last_match[:sub_type]
81
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
82
+ end
83
+ else # model
84
+ const = Sendmux::Sending::Generated.const_get(klass)
85
+ if const
86
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
87
+ model = const.build(data)
88
+ return model if model
89
+ else
90
+ # raise if data contains keys that are not known to the model
91
+ raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
92
+ model = const.build_from_hash(data)
93
+ return model if model
94
+ end
95
+ end
96
+ end
97
+
98
+ raise # if no match by now, raise
99
+ rescue
100
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
101
+ end
102
+ end
103
+ end
104
+
105
+ end
@@ -36,6 +36,7 @@ require 'sendmux_sending_generated/models/connection_mailboxes_inner'
36
36
  require 'sendmux_sending_generated/models/connection_response'
37
37
  require 'sendmux_sending_generated/models/connection_team'
38
38
  require 'sendmux_sending_generated/models/email_send_request'
39
+ require 'sendmux_sending_generated/models/email_send_request_delivery_group'
39
40
  require 'sendmux_sending_generated/models/error_detail'
40
41
  require 'sendmux_sending_generated/models/error_issue'
41
42
  require 'sendmux_sending_generated/models/error_response'
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.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sendmux
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-09-10 00:00:00.000000000 Z
10
+ date: 2026-09-19 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: faraday
@@ -129,6 +129,7 @@ files:
129
129
  - lib/sendmux_sending_generated/models/connection_response.rb
130
130
  - lib/sendmux_sending_generated/models/connection_team.rb
131
131
  - lib/sendmux_sending_generated/models/email_send_request.rb
132
+ - lib/sendmux_sending_generated/models/email_send_request_delivery_group.rb
132
133
  - lib/sendmux_sending_generated/models/error_detail.rb
133
134
  - lib/sendmux_sending_generated/models/error_issue.rb
134
135
  - lib/sendmux_sending_generated/models/error_response.rb