Module: Mock::Twilio::Generator
- Included in:
- Decorators::Api2010::AvailablePhoneNumbersLocal, Decorators::Api2010::IncomingPhoneNumbers, Decorators::CustomerProfilesV1::ChannelEndpointAssignments, Decorators::MessagingV1::PhoneNumberCreate, Decorators::MessagingV1::PhoneNumberFetch, Decorators::TrustProductsV1::ChannelEndpointAssignments
- Defined in:
- lib/mock/twilio/util/generator.rb
Instance Method Summary collapse
- #friendly_number_generator ⇒ Object
- #phone_number_generator ⇒ Object
- #random_account_sid ⇒ Object
- #random_address_sid ⇒ Object
- #random_assignment_sid ⇒ Object
- #random_bundle_sid ⇒ Object
- #random_identity_sid ⇒ Object
- #random_latitude ⇒ Object
- #random_longitude ⇒ Object
- #random_phone_number_sid ⇒ Object
- #random_twiml_app_sid ⇒ Object
Instance Method Details
#friendly_number_generator ⇒ Object
10 11 12 |
# File 'lib/mock/twilio/util/generator.rb', line 10 def friendly_number_generator "(#{rand(100..999)}) #{rand(100..999)}-#{rand(1000..9999)}" end |
#phone_number_generator ⇒ Object
6 7 8 |
# File 'lib/mock/twilio/util/generator.rb', line 6 def phone_number_generator "+1" + rand(1000000000..9999999999).to_s end |
#random_account_sid ⇒ Object
18 19 20 |
# File 'lib/mock/twilio/util/generator.rb', line 18 def random_account_sid random_sid_prefixed_by "AC" end |
#random_address_sid ⇒ Object
30 31 32 |
# File 'lib/mock/twilio/util/generator.rb', line 30 def random_address_sid random_sid_prefixed_by "AD" end |
#random_assignment_sid ⇒ Object
38 39 40 |
# File 'lib/mock/twilio/util/generator.rb', line 38 def random_assignment_sid random_sid_prefixed_by "RA" end |
#random_bundle_sid ⇒ Object
34 35 36 |
# File 'lib/mock/twilio/util/generator.rb', line 34 def random_bundle_sid random_sid_prefixed_by "BU" end |
#random_identity_sid ⇒ Object
26 27 28 |
# File 'lib/mock/twilio/util/generator.rb', line 26 def random_identity_sid random_sid_prefixed_by "RI" end |
#random_latitude ⇒ Object
46 47 48 |
# File 'lib/mock/twilio/util/generator.rb', line 46 def random_latitude rand(MIN_LATITUDE..MAX_LATITUDE) end |
#random_longitude ⇒ Object
42 43 44 |
# File 'lib/mock/twilio/util/generator.rb', line 42 def random_longitude rand(MIN_LONGITUDE..MAX_LONGITUDE) end |
#random_phone_number_sid ⇒ Object
14 15 16 |
# File 'lib/mock/twilio/util/generator.rb', line 14 def random_phone_number_sid random_sid_prefixed_by "PN" end |
#random_twiml_app_sid ⇒ Object
22 23 24 |
# File 'lib/mock/twilio/util/generator.rb', line 22 def random_twiml_app_sid random_sid_prefixed_by "AP" end |