Module: SmartSMS::FakeSMS
- Defined in:
- lib/smart_sms/helpers/fake_sms.rb
Overview
Module that contains methods to generate fake message
Class Method Summary collapse
-
.build_fake_sms(mobile, code, company) ⇒ Object
This will generate fake sms with all necessary attributes.
Class Method Details
.build_fake_sms(mobile, code, company) ⇒ Object
This will generate fake sms with all necessary attributes
Options:
* mobile: mobile number
* code: verification code
* company: assigned company, format is【company】
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/smart_sms/helpers/fake_sms.rb', line 17 def build_fake_sms(mobile, code, company) { 'sid' => SecureRandom.uuid, 'mobile' => mobile, 'send_time' => Time.zone.now, 'text' => "您的验证码是#{code}。如非本人操作,请忽略本短信【#{company}】", 'send_status' => 'SUCCESS', 'report_status' => 'UNKNOWN', 'fee' => 1, 'user_receive_time' => nil, 'error_msg' => nil } end |