Skip to content

Commit d04cfd6

Browse files
Merge pull request #21 from sendinblue/feature_updated_swagger_sync
Swagger update: transactional sms length check updated
2 parents 6df4b08 + 4b1c666 commit d04cfd6

File tree

3 files changed

+3
-22
lines changed

3 files changed

+3
-22
lines changed

docs/SendTransacSms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**sender** | **String** | Name of the sender. Only alphanumeric characters. No more than 11 characters |
77
**recipient** | **String** | Mobile number to send SMS with the country code |
8-
**content** | **String** | Content of the message. If more than 160 characters long, multiple text messages will be sent |
8+
**content** | **String** | Content of the message. If more than 160 characters long, will be sent as multiple text messages |
99
**type** | **String** | Type of the SMS | [optional] [default to "transactional"]
1010
**tag** | **String** | Tag of the message | [optional]
1111
**web_url** | **String** | Webhook to call for each event triggered by the message (delivered etc.) | [optional]

lib/sib-api-v3-sdk/models/send_transac_sms.rb

+1-20
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class SendTransacSms
2121
# Mobile number to send SMS with the country code
2222
attr_accessor :recipient
2323

24-
# Content of the message. If more than 160 characters long, multiple text messages will be sent
24+
# Content of the message. If more than 160 characters long, will be sent as multiple text messages
2525
attr_accessor :content
2626

2727
# Type of the SMS
@@ -135,10 +135,6 @@ def list_invalid_properties
135135
invalid_properties.push("invalid value for 'content', content cannot be nil.")
136136
end
137137

138-
if @content.to_s.length > 160
139-
invalid_properties.push("invalid value for 'content', the character length must be smaller than or equal to 160.")
140-
end
141-
142138
return invalid_properties
143139
end
144140

@@ -149,7 +145,6 @@ def valid?
149145
return false if @sender.to_s.length > 11
150146
return false if @recipient.nil?
151147
return false if @content.nil?
152-
return false if @content.to_s.length > 160
153148
type_validator = EnumAttributeValidator.new('String', ["transactional", "marketing"])
154149
return false unless type_validator.valid?(@type)
155150
return true
@@ -169,20 +164,6 @@ def sender=(sender)
169164
@sender = sender
170165
end
171166

172-
# Custom attribute writer method with validation
173-
# @param [Object] content Value to be assigned
174-
def content=(content)
175-
if content.nil?
176-
fail ArgumentError, "content cannot be nil"
177-
end
178-
179-
if content.to_s.length > 160
180-
fail ArgumentError, "invalid value for 'content', the character length must be smaller than or equal to 160."
181-
end
182-
183-
@content = content
184-
end
185-
186167
# Custom attribute writer method checking allowed values (enum).
187168
# @param [Object] type Object to be assigned
188169
def type=(type)

lib/sib-api-v3-sdk/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
=end
1212

1313
module SibApiV3Sdk
14-
VERSION = "5.0.0"
14+
VERSION = "5.0.1"
1515
end

0 commit comments

Comments
 (0)