Class: PortaText::Command::Api::DidSettings
- Defined in:
- lib/portatext/command/api/did_settings.rb
Overview
The dids/:did endpoint. github.com/PortaText/docs/wiki/REST-API#api_did_settings
- Author
-
Marcelo Gornstein ([email protected])
- Copyright
-
Copyright © 2015 PortaText
- License
-
Apache-2.0
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #autorespond_with(text) ⇒ Object
- #disable_cnam ⇒ Object
- #dont_autorespond ⇒ Object
- #enable_cnam ⇒ Object
- #endpoint(_method) ⇒ Object
- #for_number(number) ⇒ Object
Methods inherited from Base
#accept_content_type, #body, #content_type, #delete, #get, #initialize, #patch, #post, #put, #set
Constructor Details
This class inherits a constructor from PortaText::Command::Base
Instance Method Details
#autorespond_with(text) ⇒ Object
27 28 29 30 |
# File 'lib/portatext/command/api/did_settings.rb', line 27 def autorespond_with(text) set :autoresponder_text, text set :autoresponder_enabled, true end |
#disable_cnam ⇒ Object
15 16 17 |
# File 'lib/portatext/command/api/did_settings.rb', line 15 def disable_cnam set :cnam_enabled, false end |
#dont_autorespond ⇒ Object
23 24 25 |
# File 'lib/portatext/command/api/did_settings.rb', line 23 def dont_autorespond set :autoresponder_enabled, false end |
#enable_cnam ⇒ Object
19 20 21 |
# File 'lib/portatext/command/api/did_settings.rb', line 19 def enable_cnam set :cnam_enabled, true end |
#endpoint(_method) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/portatext/command/api/did_settings.rb', line 32 def endpoint(_method) id = @args[:id] @args.delete :id return "dids/#{id}" unless id.nil? 'dids' end |
#for_number(number) ⇒ Object
11 12 13 |
# File 'lib/portatext/command/api/did_settings.rb', line 11 def for_number(number) set :id, number end |