Skip to content

Commit b6d6b91

Browse files
Aakanksha SharmaAakanksha Sharma
Aakanksha Sharma
authored and
Aakanksha Sharma
committed
double slashes in regex fix
1 parent 2a52579 commit b6d6b91

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def list_invalid_properties
9898
invalid_properties.push("invalid value for 'sender', the character length must be smaller than or equal to 11.")
9999
end
100100

101-
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/)
102-
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/.")
101+
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
102+
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/.")
103103
end
104104

105105
return invalid_properties
@@ -111,7 +111,7 @@ def valid?
111111
return false if @name.nil?
112112
return false if @sender.nil?
113113
return false if @sender.to_s.length > 11
114-
return false if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/)
114+
return false if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
115115
return true
116116
end
117117

@@ -133,8 +133,8 @@ def sender=(sender)
133133
# @param [Object] scheduled_at Value to be assigned
134134
def scheduled_at=(scheduled_at)
135135

136-
if !scheduled_at.nil? && scheduled_at !~ Regexp.new(/^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/)
137-
fail ArgumentError, "invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/."
136+
if !scheduled_at.nil? && scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
137+
fail ArgumentError, "invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/."
138138
end
139139

140140
@scheduled_at = scheduled_at

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ def list_invalid_properties
137137
invalid_properties.push("invalid value for 'status', status cannot be nil.")
138138
end
139139

140-
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/)
141-
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\\d{3}-\\d{2}-\\d{2} [0-2]\\d:[0-5]\\d:[0-5]\\d)?$/.")
140+
if !@scheduled_at.nil? && @scheduled_at !~ Regexp.new(/^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/)
141+
invalid_properties.push("invalid value for 'scheduled_at', must conform to the pattern /^([1-9]\d{3}-\d{2}-\d{2} [0-2]\d:[0-5]\d:[0-5]\d)?$/.")
142142
end
143143

144144
return invalid_properties

0 commit comments

Comments
 (0)