Class: Telerivet::Route

Inherits:
Entity
  • Object
show all
Defined in:
lib/telerivet/route.rb

Overview

Represents a custom route that can be used to send messages via one or more basic routes (phones).

Custom Routes were formerly referred to simply as “Routes” within Telerivet. API methods, parameters, and properties related to Custom Routes continue to use the term “Route” to maintain backwards compatibility.

Custom routing rules can currently only be configured via Telerivet’s web UI.

Fields:

- id (string, max 34 characters)
    * Telerivet's internal ID for the route
    * Read-only

- name
    * The name of the route
    * Updatable via API

- vars (Hash)
    * Custom variables stored for this route. Variable names may be up to 32 characters in
        length and can contain the characters a-z, A-Z, 0-9, and _.
        Values may be strings, numbers, or boolean (true/false).
        String values may be up to 4096 bytes in length when encoded as UTF-8.
        Up to 100 variables are supported per object.
        Setting a variable to null will delete the variable.
    * Updatable via API

- project_id
    * ID of the project this route belongs to
    * Read-only

Instance Method Summary collapse

Methods inherited from Entity

#get, #initialize, #load, #set, #set_data, #to_s, #vars

Constructor Details

This class inherits a constructor from Telerivet::Entity

Instance Method Details

#get_base_api_pathObject



62
63
64
# File 'lib/telerivet/route.rb', line 62

def get_base_api_path()
    "/projects/#{get('project_id')}/routes/#{get('id')}"
end

#idObject



46
47
48
# File 'lib/telerivet/route.rb', line 46

def id
    get('id')
end

#nameObject



50
51
52
# File 'lib/telerivet/route.rb', line 50

def name
    get('name')
end

#name=(value) ⇒ Object



54
55
56
# File 'lib/telerivet/route.rb', line 54

def name=(value)
    set('name', value)
end

#project_idObject



58
59
60
# File 'lib/telerivet/route.rb', line 58

def project_id
    get('project_id')
end

#saveObject

Saves any fields or custom variables that have changed for this custom route.



42
43
44
# File 'lib/telerivet/route.rb', line 42

def save()
    super
end