class PortaText::Command::Api::DidSettings

The dids/:did endpoint. github.com/PortaText/docs/wiki/REST-API#api_did_settings

Author

Marcelo Gornstein (marcelog@portatext.com)

Copyright

Copyright © 2015 PortaText

License

Apache-2.0

Public Instance Methods

autorespond_with(text) click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 35
def autorespond_with(text)
  set :autoresponder_text, text
  set :autoresponder_enabled, true
end
disable_cnam() click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 23
def disable_cnam
  set :cnam_enabled, false
end
disable_stop_words() click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 15
def disable_stop_words
  set :stop_words_enabled, false
end
dont_autorespond() click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 31
def dont_autorespond
  set :autoresponder_enabled, false
end
enable_cnam() click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 27
def enable_cnam
  set :cnam_enabled, true
end
enable_stop_words() click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 19
def enable_stop_words
  set :stop_words_enabled, true
end
endpoint(_method) click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 40
def endpoint(_method)
  id = @args[:id]
  @args.delete :id
  return "dids/#{id}" unless id.nil?
  'dids'
end
for_number(number) click to toggle source
# File lib/portatext/command/api/did_settings.rb, line 11
def for_number(number)
  set :id, number
end