Class: Twilio::REST::Microvisor::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/microvisor/v1.rb,
lib/twilio-ruby/rest/microvisor/v1/app.rb,
lib/twilio-ruby/rest/microvisor/v1/device.rb,
lib/twilio-ruby/rest/microvisor/v1/account_config.rb,
lib/twilio-ruby/rest/microvisor/v1/account_secret.rb,
lib/twilio-ruby/rest/microvisor/v1/app/app_manifest.rb,
lib/twilio-ruby/rest/microvisor/v1/device/device_config.rb,
lib/twilio-ruby/rest/microvisor/v1/device/device_secret.rb

Defined Under Namespace

Classes: AccountConfigContext, AccountConfigInstance, AccountConfigList, AccountConfigPage, AccountSecretContext, AccountSecretInstance, AccountSecretList, AccountSecretPage, AppContext, AppInstance, AppList, AppPage, DeviceContext, DeviceInstance, DeviceList, DevicePage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Microvisor



21
22
23
24
25
26
27
28
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @account_configs = nil
    @account_secrets = nil
    @apps = nil
    @devices = nil
end

Instance Method Details

#account_configs(key = :unset) ⇒ Twilio::REST::Microvisor::V1::AccountConfigContext, Twilio::REST::Microvisor::V1::AccountConfigList

Parameters:

  • key (String) (defaults to: :unset)

    The config key; up to 100 characters.

Returns:



34
35
36
37
38
39
40
41
42
43
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 34

def (key=:unset)
    if key.nil?
        raise ArgumentError, 'key cannot be nil'
    end
    if key == :unset
        @account_configs ||= AccountConfigList.new self
    else
        AccountConfigContext.new(self, key)
    end
end

#account_secrets(key = :unset) ⇒ Twilio::REST::Microvisor::V1::AccountSecretContext, Twilio::REST::Microvisor::V1::AccountSecretList

Parameters:

  • key (String) (defaults to: :unset)

    The secret key; up to 100 characters.

Returns:



48
49
50
51
52
53
54
55
56
57
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 48

def (key=:unset)
    if key.nil?
        raise ArgumentError, 'key cannot be nil'
    end
    if key == :unset
        @account_secrets ||= AccountSecretList.new self
    else
        AccountSecretContext.new(self, key)
    end
end

#apps(sid = :unset) ⇒ Twilio::REST::Microvisor::V1::AppContext, Twilio::REST::Microvisor::V1::AppList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34-character string that uniquely identifies this App.

Returns:



62
63
64
65
66
67
68
69
70
71
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 62

def apps(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @apps ||= AppList.new self
    else
        AppContext.new(self, sid)
    end
end

#devices(sid = :unset) ⇒ Twilio::REST::Microvisor::V1::DeviceContext, Twilio::REST::Microvisor::V1::DeviceList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34-character string that uniquely identifies this Device.

Returns:



76
77
78
79
80
81
82
83
84
85
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 76

def devices(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @devices ||= DeviceList.new self
    else
        DeviceContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



88
89
90
# File 'lib/twilio-ruby/rest/microvisor/v1.rb', line 88

def to_s
    '<Twilio::REST::Microvisor::V1>';
end