zavudev 0.5.0 → 0.6.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: b4ef6b1c38f382a0031988389835d7a923e031d506e14fe9f760ffa0e1b653f1
4
- data.tar.gz: 461d663dc49c09fbb91bf15feaae55818f8cb5a259dc1e551d7d408781436996
3
+ metadata.gz: 4dbf4d9ec7209d43777007a92d0e1aad8f33cee64ca9989e008984dcd6062e24
4
+ data.tar.gz: 8a1770208c5d4a6ee15e860a666cd24a6c885531807e2cc7181692068e236b4b
5
5
  SHA512:
6
- metadata.gz: 429315f63bb85c17c6e0be83a569fec22516f393ce234a6f763a4b83b099f8dc116e609dcebfd9034ea6f3034653c6a8e5d571fffcf6763ab30f68db78725d94
7
- data.tar.gz: 7325d1f541ab42cdb0d40ecfbcc71b72f111cbb88747fb85344af03f49b5126ea0c554afae9379cb0bb0950055d330058cac51755088092c69b1dfcc0eeedccd
6
+ metadata.gz: f1431108ee40a20b494d97445cfac79fb0291902c23f1ce9ed407eb33d57b92b571ac70df0dbd0de21e1b1af5ba80fa09f9d29b1b0b5703477481da8551931fb
7
+ data.tar.gz: 7042f8c8df6775399db26fdcbcfdf84361df6f6f9546b299c54dcf4aa5394c2aceb228829ff1545f2a5efae45d4c9552e21902e8d31d0e37e9316198f08318b5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (2026-04-12)
4
+
5
+ Full Changelog: [v0.5.0...v0.6.0](https://github.com/zavudev/sdk-ruby/compare/v0.5.0...v0.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([e8f0d51](https://github.com/zavudev/sdk-ruby/commit/e8f0d51ff5eab8b1a35aa443188197929ce80b66))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * multipart encoding for file arrays ([b578a65](https://github.com/zavudev/sdk-ruby/commit/b578a6587fc86e324b69dd9397a719db1b4e9f5a))
15
+
3
16
  ## 0.5.0 (2026-04-03)
4
17
 
5
18
  Full Changelog: [v0.4.1...v0.5.0](https://github.com/zavudev/sdk-ruby/compare/v0.4.1...v0.5.0)
data/README.md CHANGED
@@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application
26
26
  <!-- x-release-please-start-version -->
27
27
 
28
28
  ```ruby
29
- gem "zavudev", "~> 0.5.0"
29
+ gem "zavudev", "~> 0.6.0"
30
30
  ```
31
31
 
32
32
  <!-- x-release-please-end -->
@@ -610,6 +610,7 @@ module Zavudev
610
610
  #
611
611
  # @return [Array(String, Enumerable<String>)]
612
612
  private def encode_multipart_streaming(body)
613
+ # rubocop:disable Style/CaseEquality
613
614
  # RFC 1521 Section 7.2.1 says we should have 70 char maximum for boundary length
614
615
  boundary = SecureRandom.urlsafe_base64(46)
615
616
 
@@ -619,7 +620,7 @@ module Zavudev
619
620
  in Hash
620
621
  body.each do |key, val|
621
622
  case val
622
- in Array if val.all? { primitive?(_1) }
623
+ in Array if val.all? { primitive?(_1) || Zavudev::Internal::Type::FileInput === _1 }
623
624
  val.each do |v|
624
625
  write_multipart_chunk(y, boundary: boundary, key: key, val: v, closing: closing)
625
626
  end
@@ -635,6 +636,7 @@ module Zavudev
635
636
 
636
637
  fused_io = fused_enum(strio) { closing.each(&:call) }
637
638
  [boundary, fused_io]
639
+ # rubocop:enable Style/CaseEquality
638
640
  end
639
641
 
640
642
  # @api private
@@ -22,8 +22,9 @@ module Zavudev
22
22
  optional :attachments, -> { Zavudev::Internal::Type::ArrayOf[Zavudev::MessageSendParams::Attachment] }
23
23
 
24
24
  # @!attribute channel
25
- # Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text
26
- # messageType, WhatsApp is used. For email recipients, defaults to 'email'.
25
+ # Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
26
+ # auto-selected based on sender capabilities and recipient type. For email
27
+ # recipients, defaults to 'email'.
27
28
  #
28
29
  # @return [Symbol, Zavudev::Models::Channel, nil]
29
30
  optional :channel, enum: -> { Zavudev::Channel }
@@ -104,7 +105,7 @@ module Zavudev
104
105
  #
105
106
  # @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Email attachments. Only supported when channel is 'email'. Maximum 40MB total si
106
107
  #
107
- # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text m
108
+ # @param channel [Symbol, Zavudev::Models::Channel] Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is aut
108
109
  #
109
110
  # @param content [Zavudev::Models::MessageContent] Additional content for non-text message types.
110
111
  #
@@ -10,7 +10,8 @@ module Zavudev
10
10
  required :id, String
11
11
 
12
12
  # @!attribute body
13
- # Template body with variables: {{1}}, {{2}}, etc.
13
+ # Default template body with variables: {{1}}, {{2}}, or named variables like
14
+ # {{contact.first_name}}. Used when no channel-specific body is set.
14
15
  #
15
16
  # @return [String]
16
17
  required :body, String
@@ -28,7 +29,7 @@ module Zavudev
28
29
  required :language, String
29
30
 
30
31
  # @!attribute name
31
- # Template name (must match WhatsApp template name).
32
+ # Template name. For WhatsApp, must match the approved template name in Meta.
32
33
  #
33
34
  # @return [String]
34
35
  required :name, String
@@ -76,11 +77,29 @@ module Zavudev
76
77
  # @return [String, nil]
77
78
  optional :header_type, String, api_name: :headerType
78
79
 
80
+ # @!attribute instagram_body
81
+ # Channel-specific body for Instagram messages. Falls back to `body` if not set.
82
+ #
83
+ # @return [String, nil]
84
+ optional :instagram_body, String, api_name: :instagramBody
85
+
86
+ # @!attribute sms_body
87
+ # Channel-specific body for SMS messages. Falls back to `body` if not set.
88
+ #
89
+ # @return [String, nil]
90
+ optional :sms_body, String, api_name: :smsBody
91
+
79
92
  # @!attribute status
80
93
  #
81
94
  # @return [Symbol, Zavudev::Models::Template::Status, nil]
82
95
  optional :status, enum: -> { Zavudev::Template::Status }
83
96
 
97
+ # @!attribute telegram_body
98
+ # Channel-specific body for Telegram messages. Falls back to `body` if not set.
99
+ #
100
+ # @return [String, nil]
101
+ optional :telegram_body, String, api_name: :telegramBody
102
+
84
103
  # @!attribute updated_at
85
104
  #
86
105
  # @return [Time, nil]
@@ -98,16 +117,19 @@ module Zavudev
98
117
  # @return [Zavudev::Models::Template::Whatsapp, nil]
99
118
  optional :whatsapp, -> { Zavudev::Template::Whatsapp }
100
119
 
101
- # @!method initialize(id:, body:, category:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, created_at: nil, footer: nil, header_content: nil, header_type: nil, status: nil, updated_at: nil, variables: nil, whatsapp: nil)
120
+ # @!method initialize(id:, body:, category:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, created_at: nil, footer: nil, header_content: nil, header_type: nil, instagram_body: nil, sms_body: nil, status: nil, telegram_body: nil, updated_at: nil, variables: nil, whatsapp: nil)
121
+ # Some parameter documentations has been truncated, see
122
+ # {Zavudev::Models::Template} for more details.
123
+ #
102
124
  # @param id [String]
103
125
  #
104
- # @param body [String] Template body with variables: {{1}}, {{2}}, etc.
126
+ # @param body [String] Default template body with variables: {{1}}, {{2}}, or named variables like {{co
105
127
  #
106
128
  # @param category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
107
129
  #
108
130
  # @param language [String] Language code.
109
131
  #
110
- # @param name [String] Template name (must match WhatsApp template name).
132
+ # @param name [String] Template name. For WhatsApp, must match the approved template name in Meta.
111
133
  #
112
134
  # @param add_security_recommendation [Boolean] Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
113
135
  #
@@ -123,8 +145,14 @@ module Zavudev
123
145
  #
124
146
  # @param header_type [String] Type of header (text, image, video, document).
125
147
  #
148
+ # @param instagram_body [String] Channel-specific body for Instagram messages. Falls back to `body` if not set.
149
+ #
150
+ # @param sms_body [String] Channel-specific body for SMS messages. Falls back to `body` if not set.
151
+ #
126
152
  # @param status [Symbol, Zavudev::Models::Template::Status]
127
153
  #
154
+ # @param telegram_body [String] Channel-specific body for Telegram messages. Falls back to `body` if not set.
155
+ #
128
156
  # @param updated_at [Time]
129
157
  #
130
158
  # @param variables [Array<String>] List of variable names for documentation.
@@ -8,6 +8,7 @@ module Zavudev
8
8
  include Zavudev::Internal::Type::RequestParameters
9
9
 
10
10
  # @!attribute body
11
+ # Default template body. Used when no channel-specific body is set.
11
12
  #
12
13
  # @return [String]
13
14
  required :body, String
@@ -42,6 +43,24 @@ module Zavudev
42
43
  # @return [Integer, nil]
43
44
  optional :code_expiration_minutes, Integer, api_name: :codeExpirationMinutes
44
45
 
46
+ # @!attribute instagram_body
47
+ # Channel-specific body for Instagram. Falls back to `body` if not set.
48
+ #
49
+ # @return [String, nil]
50
+ optional :instagram_body, String, api_name: :instagramBody
51
+
52
+ # @!attribute sms_body
53
+ # Channel-specific body for SMS. Falls back to `body` if not set.
54
+ #
55
+ # @return [String, nil]
56
+ optional :sms_body, String, api_name: :smsBody
57
+
58
+ # @!attribute telegram_body
59
+ # Channel-specific body for Telegram. Falls back to `body` if not set.
60
+ #
61
+ # @return [String, nil]
62
+ optional :telegram_body, String, api_name: :telegramBody
63
+
45
64
  # @!attribute variables
46
65
  #
47
66
  # @return [Array<String>, nil]
@@ -53,8 +72,8 @@ module Zavudev
53
72
  # @return [Symbol, Zavudev::Models::WhatsappCategory, nil]
54
73
  optional :whatsapp_category, enum: -> { Zavudev::WhatsappCategory }, api_name: :whatsappCategory
55
74
 
56
- # @!method initialize(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, variables: nil, whatsapp_category: nil, request_options: {})
57
- # @param body [String]
75
+ # @!method initialize(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, instagram_body: nil, sms_body: nil, telegram_body: nil, variables: nil, whatsapp_category: nil, request_options: {})
76
+ # @param body [String] Default template body. Used when no channel-specific body is set.
58
77
  #
59
78
  # @param language [String]
60
79
  #
@@ -66,6 +85,12 @@ module Zavudev
66
85
  #
67
86
  # @param code_expiration_minutes [Integer] Code expiration time in minutes. Only for AUTHENTICATION templates.
68
87
  #
88
+ # @param instagram_body [String] Channel-specific body for Instagram. Falls back to `body` if not set.
89
+ #
90
+ # @param sms_body [String] Channel-specific body for SMS. Falls back to `body` if not set.
91
+ #
92
+ # @param telegram_body [String] Channel-specific body for Telegram. Falls back to `body` if not set.
93
+ #
69
94
  # @param variables [Array<String>]
70
95
  #
71
96
  # @param whatsapp_category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
@@ -113,7 +113,7 @@ module Zavudev
113
113
  #
114
114
  # @param attachments [Array<Zavudev::Models::MessageSendParams::Attachment>] Body param: Email attachments. Only supported when channel is 'email'. Maximum 4
115
115
  #
116
- # @param channel [Symbol, Zavudev::Models::Channel] Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted wit
116
+ # @param channel [Symbol, Zavudev::Models::Channel] Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted, ch
117
117
  #
118
118
  # @param content [Zavudev::Models::MessageContent] Body param: Additional content for non-text message types.
119
119
  #
@@ -6,9 +6,9 @@ module Zavudev
6
6
  # Create a WhatsApp message template. Note: Templates must be approved by Meta
7
7
  # before use.
8
8
  #
9
- # @overload create(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, variables: nil, whatsapp_category: nil, request_options: {})
9
+ # @overload create(body:, language:, name:, add_security_recommendation: nil, buttons: nil, code_expiration_minutes: nil, instagram_body: nil, sms_body: nil, telegram_body: nil, variables: nil, whatsapp_category: nil, request_options: {})
10
10
  #
11
- # @param body [String]
11
+ # @param body [String] Default template body. Used when no channel-specific body is set.
12
12
  #
13
13
  # @param language [String]
14
14
  #
@@ -20,6 +20,12 @@ module Zavudev
20
20
  #
21
21
  # @param code_expiration_minutes [Integer] Code expiration time in minutes. Only for AUTHENTICATION templates.
22
22
  #
23
+ # @param instagram_body [String] Channel-specific body for Instagram. Falls back to `body` if not set.
24
+ #
25
+ # @param sms_body [String] Channel-specific body for SMS. Falls back to `body` if not set.
26
+ #
27
+ # @param telegram_body [String] Channel-specific body for Telegram. Falls back to `body` if not set.
28
+ #
23
29
  # @param variables [Array<String>]
24
30
  #
25
31
  # @param whatsapp_category [Symbol, Zavudev::Models::WhatsappCategory] WhatsApp template category.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zavudev
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
@@ -30,8 +30,9 @@ module Zavudev
30
30
  end
31
31
  attr_writer :attachments
32
32
 
33
- # Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text
34
- # messageType, WhatsApp is used. For email recipients, defaults to 'email'.
33
+ # Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
34
+ # auto-selected based on sender capabilities and recipient type. For email
35
+ # recipients, defaults to 'email'.
35
36
  sig { returns(T.nilable(Zavudev::Channel::OrSymbol)) }
36
37
  attr_reader :channel
37
38
 
@@ -143,8 +144,9 @@ module Zavudev
143
144
  # Email attachments. Only supported when channel is 'email'. Maximum 40MB total
144
145
  # size.
145
146
  attachments: nil,
146
- # Delivery channel. Use 'auto' for intelligent routing. If omitted with non-text
147
- # messageType, WhatsApp is used. For email recipients, defaults to 'email'.
147
+ # Delivery channel. Use 'auto' for intelligent routing. If omitted, channel is
148
+ # auto-selected based on sender capabilities and recipient type. For email
149
+ # recipients, defaults to 'email'.
148
150
  channel: nil,
149
151
  # Additional content for non-text message types.
150
152
  content: nil,
@@ -9,7 +9,8 @@ module Zavudev
9
9
  sig { returns(String) }
10
10
  attr_accessor :id
11
11
 
12
- # Template body with variables: {{1}}, {{2}}, etc.
12
+ # Default template body with variables: {{1}}, {{2}}, or named variables like
13
+ # {{contact.first_name}}. Used when no channel-specific body is set.
13
14
  sig { returns(String) }
14
15
  attr_accessor :body
15
16
 
@@ -21,7 +22,7 @@ module Zavudev
21
22
  sig { returns(String) }
22
23
  attr_accessor :language
23
24
 
24
- # Template name (must match WhatsApp template name).
25
+ # Template name. For WhatsApp, must match the approved template name in Meta.
25
26
  sig { returns(String) }
26
27
  attr_accessor :name
27
28
 
@@ -73,12 +74,33 @@ module Zavudev
73
74
  sig { params(header_type: String).void }
74
75
  attr_writer :header_type
75
76
 
77
+ # Channel-specific body for Instagram messages. Falls back to `body` if not set.
78
+ sig { returns(T.nilable(String)) }
79
+ attr_reader :instagram_body
80
+
81
+ sig { params(instagram_body: String).void }
82
+ attr_writer :instagram_body
83
+
84
+ # Channel-specific body for SMS messages. Falls back to `body` if not set.
85
+ sig { returns(T.nilable(String)) }
86
+ attr_reader :sms_body
87
+
88
+ sig { params(sms_body: String).void }
89
+ attr_writer :sms_body
90
+
76
91
  sig { returns(T.nilable(Zavudev::Template::Status::TaggedSymbol)) }
77
92
  attr_reader :status
78
93
 
79
94
  sig { params(status: Zavudev::Template::Status::OrSymbol).void }
80
95
  attr_writer :status
81
96
 
97
+ # Channel-specific body for Telegram messages. Falls back to `body` if not set.
98
+ sig { returns(T.nilable(String)) }
99
+ attr_reader :telegram_body
100
+
101
+ sig { params(telegram_body: String).void }
102
+ attr_writer :telegram_body
103
+
82
104
  sig { returns(T.nilable(Time)) }
83
105
  attr_reader :updated_at
84
106
 
@@ -113,7 +135,10 @@ module Zavudev
113
135
  footer: String,
114
136
  header_content: String,
115
137
  header_type: String,
138
+ instagram_body: String,
139
+ sms_body: String,
116
140
  status: Zavudev::Template::Status::OrSymbol,
141
+ telegram_body: String,
117
142
  updated_at: Time,
118
143
  variables: T::Array[String],
119
144
  whatsapp: Zavudev::Template::Whatsapp::OrHash
@@ -121,13 +146,14 @@ module Zavudev
121
146
  end
122
147
  def self.new(
123
148
  id:,
124
- # Template body with variables: {{1}}, {{2}}, etc.
149
+ # Default template body with variables: {{1}}, {{2}}, or named variables like
150
+ # {{contact.first_name}}. Used when no channel-specific body is set.
125
151
  body:,
126
152
  # WhatsApp template category.
127
153
  category:,
128
154
  # Language code.
129
155
  language:,
130
- # Template name (must match WhatsApp template name).
156
+ # Template name. For WhatsApp, must match the approved template name in Meta.
131
157
  name:,
132
158
  # Add 'Do not share this code' disclaimer. Only for AUTHENTICATION templates.
133
159
  add_security_recommendation: nil,
@@ -142,7 +168,13 @@ module Zavudev
142
168
  header_content: nil,
143
169
  # Type of header (text, image, video, document).
144
170
  header_type: nil,
171
+ # Channel-specific body for Instagram messages. Falls back to `body` if not set.
172
+ instagram_body: nil,
173
+ # Channel-specific body for SMS messages. Falls back to `body` if not set.
174
+ sms_body: nil,
145
175
  status: nil,
176
+ # Channel-specific body for Telegram messages. Falls back to `body` if not set.
177
+ telegram_body: nil,
146
178
  updated_at: nil,
147
179
  # List of variable names for documentation.
148
180
  variables: nil,
@@ -166,7 +198,10 @@ module Zavudev
166
198
  footer: String,
167
199
  header_content: String,
168
200
  header_type: String,
201
+ instagram_body: String,
202
+ sms_body: String,
169
203
  status: Zavudev::Template::Status::TaggedSymbol,
204
+ telegram_body: String,
170
205
  updated_at: Time,
171
206
  variables: T::Array[String],
172
207
  whatsapp: Zavudev::Template::Whatsapp
@@ -11,6 +11,7 @@ module Zavudev
11
11
  T.any(Zavudev::TemplateCreateParams, Zavudev::Internal::AnyHash)
12
12
  end
13
13
 
14
+ # Default template body. Used when no channel-specific body is set.
14
15
  sig { returns(String) }
15
16
  attr_accessor :body
16
17
 
@@ -47,6 +48,27 @@ module Zavudev
47
48
  sig { params(code_expiration_minutes: Integer).void }
48
49
  attr_writer :code_expiration_minutes
49
50
 
51
+ # Channel-specific body for Instagram. Falls back to `body` if not set.
52
+ sig { returns(T.nilable(String)) }
53
+ attr_reader :instagram_body
54
+
55
+ sig { params(instagram_body: String).void }
56
+ attr_writer :instagram_body
57
+
58
+ # Channel-specific body for SMS. Falls back to `body` if not set.
59
+ sig { returns(T.nilable(String)) }
60
+ attr_reader :sms_body
61
+
62
+ sig { params(sms_body: String).void }
63
+ attr_writer :sms_body
64
+
65
+ # Channel-specific body for Telegram. Falls back to `body` if not set.
66
+ sig { returns(T.nilable(String)) }
67
+ attr_reader :telegram_body
68
+
69
+ sig { params(telegram_body: String).void }
70
+ attr_writer :telegram_body
71
+
50
72
  sig { returns(T.nilable(T::Array[String])) }
51
73
  attr_reader :variables
52
74
 
@@ -70,12 +92,16 @@ module Zavudev
70
92
  add_security_recommendation: T::Boolean,
71
93
  buttons: T::Array[Zavudev::TemplateCreateParams::Button::OrHash],
72
94
  code_expiration_minutes: Integer,
95
+ instagram_body: String,
96
+ sms_body: String,
97
+ telegram_body: String,
73
98
  variables: T::Array[String],
74
99
  whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
75
100
  request_options: Zavudev::RequestOptions::OrHash
76
101
  ).returns(T.attached_class)
77
102
  end
78
103
  def self.new(
104
+ # Default template body. Used when no channel-specific body is set.
79
105
  body:,
80
106
  language:,
81
107
  name:,
@@ -85,6 +111,12 @@ module Zavudev
85
111
  buttons: nil,
86
112
  # Code expiration time in minutes. Only for AUTHENTICATION templates.
87
113
  code_expiration_minutes: nil,
114
+ # Channel-specific body for Instagram. Falls back to `body` if not set.
115
+ instagram_body: nil,
116
+ # Channel-specific body for SMS. Falls back to `body` if not set.
117
+ sms_body: nil,
118
+ # Channel-specific body for Telegram. Falls back to `body` if not set.
119
+ telegram_body: nil,
88
120
  variables: nil,
89
121
  # WhatsApp template category.
90
122
  whatsapp_category: nil,
@@ -101,6 +133,9 @@ module Zavudev
101
133
  add_security_recommendation: T::Boolean,
102
134
  buttons: T::Array[Zavudev::TemplateCreateParams::Button],
103
135
  code_expiration_minutes: Integer,
136
+ instagram_body: String,
137
+ sms_body: String,
138
+ telegram_body: String,
104
139
  variables: T::Array[String],
105
140
  whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
106
141
  request_options: Zavudev::RequestOptions
@@ -100,9 +100,9 @@ module Zavudev
100
100
  # Body param: Email attachments. Only supported when channel is 'email'. Maximum
101
101
  # 40MB total size.
102
102
  attachments: nil,
103
- # Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted
104
- # with non-text messageType, WhatsApp is used. For email recipients, defaults to
105
- # 'email'.
103
+ # Body param: Delivery channel. Use 'auto' for intelligent routing. If omitted,
104
+ # channel is auto-selected based on sender capabilities and recipient type. For
105
+ # email recipients, defaults to 'email'.
106
106
  channel: nil,
107
107
  # Body param: Additional content for non-text message types.
108
108
  content: nil,
@@ -13,12 +13,16 @@ module Zavudev
13
13
  add_security_recommendation: T::Boolean,
14
14
  buttons: T::Array[Zavudev::TemplateCreateParams::Button::OrHash],
15
15
  code_expiration_minutes: Integer,
16
+ instagram_body: String,
17
+ sms_body: String,
18
+ telegram_body: String,
16
19
  variables: T::Array[String],
17
20
  whatsapp_category: Zavudev::WhatsappCategory::OrSymbol,
18
21
  request_options: Zavudev::RequestOptions::OrHash
19
22
  ).returns(Zavudev::Template)
20
23
  end
21
24
  def create(
25
+ # Default template body. Used when no channel-specific body is set.
22
26
  body:,
23
27
  language:,
24
28
  name:,
@@ -28,6 +32,12 @@ module Zavudev
28
32
  buttons: nil,
29
33
  # Code expiration time in minutes. Only for AUTHENTICATION templates.
30
34
  code_expiration_minutes: nil,
35
+ # Channel-specific body for Instagram. Falls back to `body` if not set.
36
+ instagram_body: nil,
37
+ # Channel-specific body for SMS. Falls back to `body` if not set.
38
+ sms_body: nil,
39
+ # Channel-specific body for Telegram. Falls back to `body` if not set.
40
+ telegram_body: nil,
31
41
  variables: nil,
32
42
  # WhatsApp template category.
33
43
  whatsapp_category: nil,
@@ -14,7 +14,10 @@ module Zavudev
14
14
  footer: String,
15
15
  header_content: String,
16
16
  header_type: String,
17
+ instagram_body: String,
18
+ sms_body: String,
17
19
  status: Zavudev::Models::Template::status,
20
+ telegram_body: String,
18
21
  updated_at: Time,
19
22
  variables: ::Array[String],
20
23
  whatsapp: Zavudev::Template::Whatsapp
@@ -61,12 +64,24 @@ module Zavudev
61
64
 
62
65
  def header_type=: (String) -> String
63
66
 
67
+ attr_reader instagram_body: String?
68
+
69
+ def instagram_body=: (String) -> String
70
+
71
+ attr_reader sms_body: String?
72
+
73
+ def sms_body=: (String) -> String
74
+
64
75
  attr_reader status: Zavudev::Models::Template::status?
65
76
 
66
77
  def status=: (
67
78
  Zavudev::Models::Template::status
68
79
  ) -> Zavudev::Models::Template::status
69
80
 
81
+ attr_reader telegram_body: String?
82
+
83
+ def telegram_body=: (String) -> String
84
+
70
85
  attr_reader updated_at: Time?
71
86
 
72
87
  def updated_at=: (Time) -> Time
@@ -94,7 +109,10 @@ module Zavudev
94
109
  ?footer: String,
95
110
  ?header_content: String,
96
111
  ?header_type: String,
112
+ ?instagram_body: String,
113
+ ?sms_body: String,
97
114
  ?status: Zavudev::Models::Template::status,
115
+ ?telegram_body: String,
98
116
  ?updated_at: Time,
99
117
  ?variables: ::Array[String],
100
118
  ?whatsapp: Zavudev::Template::Whatsapp
@@ -113,7 +131,10 @@ module Zavudev
113
131
  footer: String,
114
132
  header_content: String,
115
133
  header_type: String,
134
+ instagram_body: String,
135
+ sms_body: String,
116
136
  status: Zavudev::Models::Template::status,
137
+ telegram_body: String,
117
138
  updated_at: Time,
118
139
  variables: ::Array[String],
119
140
  whatsapp: Zavudev::Template::Whatsapp
@@ -8,6 +8,9 @@ module Zavudev
8
8
  add_security_recommendation: bool,
9
9
  buttons: ::Array[Zavudev::TemplateCreateParams::Button],
10
10
  code_expiration_minutes: Integer,
11
+ instagram_body: String,
12
+ sms_body: String,
13
+ telegram_body: String,
11
14
  variables: ::Array[String],
12
15
  whatsapp_category: Zavudev::Models::whatsapp_category
13
16
  }
@@ -37,6 +40,18 @@ module Zavudev
37
40
 
38
41
  def code_expiration_minutes=: (Integer) -> Integer
39
42
 
43
+ attr_reader instagram_body: String?
44
+
45
+ def instagram_body=: (String) -> String
46
+
47
+ attr_reader sms_body: String?
48
+
49
+ def sms_body=: (String) -> String
50
+
51
+ attr_reader telegram_body: String?
52
+
53
+ def telegram_body=: (String) -> String
54
+
40
55
  attr_reader variables: ::Array[String]?
41
56
 
42
57
  def variables=: (::Array[String]) -> ::Array[String]
@@ -54,6 +69,9 @@ module Zavudev
54
69
  ?add_security_recommendation: bool,
55
70
  ?buttons: ::Array[Zavudev::TemplateCreateParams::Button],
56
71
  ?code_expiration_minutes: Integer,
72
+ ?instagram_body: String,
73
+ ?sms_body: String,
74
+ ?telegram_body: String,
57
75
  ?variables: ::Array[String],
58
76
  ?whatsapp_category: Zavudev::Models::whatsapp_category,
59
77
  ?request_options: Zavudev::request_opts
@@ -66,6 +84,9 @@ module Zavudev
66
84
  add_security_recommendation: bool,
67
85
  buttons: ::Array[Zavudev::TemplateCreateParams::Button],
68
86
  code_expiration_minutes: Integer,
87
+ instagram_body: String,
88
+ sms_body: String,
89
+ telegram_body: String,
69
90
  variables: ::Array[String],
70
91
  whatsapp_category: Zavudev::Models::whatsapp_category,
71
92
  request_options: Zavudev::RequestOptions
@@ -8,6 +8,9 @@ module Zavudev
8
8
  ?add_security_recommendation: bool,
9
9
  ?buttons: ::Array[Zavudev::TemplateCreateParams::Button],
10
10
  ?code_expiration_minutes: Integer,
11
+ ?instagram_body: String,
12
+ ?sms_body: String,
13
+ ?telegram_body: String,
11
14
  ?variables: ::Array[String],
12
15
  ?whatsapp_category: Zavudev::Models::whatsapp_category,
13
16
  ?request_options: Zavudev::request_opts
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zavudev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zavudev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-03 00:00:00.000000000 Z
11
+ date: 2026-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi