Class: SignalWire::REST::Namespaces::FabricNamespace

Inherits:
Object
  • Object
show all
Defined in:
lib/signalwire/rest/namespaces/fabric.rb

Overview

Fabric API namespace grouping all resource types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http) ⇒ FabricNamespace

Returns a new instance of FabricNamespace.



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 204

def initialize(http)
  base = '/api/fabric/resources'

  # PUT-update resources
  @swml_scripts           = FabricResourcePUT.new(http, "#{base}/swml_scripts")
  @relay_applications     = FabricResourcePUT.new(http, "#{base}/relay_applications")
  @call_flows             = CallFlowsResource.new(http, "#{base}/call_flows")
  @conference_rooms       = ConferenceRoomsResource.new(http, "#{base}/conference_rooms")
  @freeswitch_connectors  = FabricResourcePUT.new(http, "#{base}/freeswitch_connectors")
  @subscribers            = SubscribersResource.new(http, "#{base}/subscribers")
  @sip_endpoints          = FabricResourcePUT.new(http, "#{base}/sip_endpoints")
  @cxml_scripts           = FabricResourcePUT.new(http, "#{base}/cxml_scripts")
  @cxml_applications      = CxmlApplicationsResource.new(http, "#{base}/cxml_applications")

  # PATCH-update resources
  # swml_webhooks and cxml_webhooks are normally auto-materialized by
  # phone_numbers.set_swml_webhook / set_cxml_webhook. Direct create
  # still works for backcompat but emits a deprecation warning.
  @swml_webhooks = SwmlWebhooksResource.new(http, "#{base}/swml_webhooks")
  @ai_agents     = FabricResource.new(http, "#{base}/ai_agents")
  @sip_gateways  = FabricResource.new(http, "#{base}/sip_gateways")
  @cxml_webhooks = CxmlWebhooksResource.new(http, "#{base}/cxml_webhooks")

  # Special resources
  @resources = GenericResources.new(http, base)
  @addresses = FabricAddresses.new(http, '/api/fabric/addresses')
  @tokens    = FabricTokens.new(http)
end

Instance Attribute Details

#addressesObject (readonly)

Returns the value of attribute addresses.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def addresses
  @addresses
end

#ai_agentsObject (readonly)

Returns the value of attribute ai_agents.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def ai_agents
  @ai_agents
end

#call_flowsObject (readonly)

Returns the value of attribute call_flows.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def call_flows
  @call_flows
end

#conference_roomsObject (readonly)

Returns the value of attribute conference_rooms.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def conference_rooms
  @conference_rooms
end

#cxml_applicationsObject (readonly)

Returns the value of attribute cxml_applications.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def cxml_applications
  @cxml_applications
end

#cxml_scriptsObject (readonly)

Returns the value of attribute cxml_scripts.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def cxml_scripts
  @cxml_scripts
end

#cxml_webhooksObject (readonly)

Returns the value of attribute cxml_webhooks.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def cxml_webhooks
  @cxml_webhooks
end

#freeswitch_connectorsObject (readonly)

Returns the value of attribute freeswitch_connectors.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def freeswitch_connectors
  @freeswitch_connectors
end

#relay_applicationsObject (readonly)

Returns the value of attribute relay_applications.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def relay_applications
  @relay_applications
end

#resourcesObject (readonly)

Returns the value of attribute resources.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def resources
  @resources
end

#sip_endpointsObject (readonly)

Returns the value of attribute sip_endpoints.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def sip_endpoints
  @sip_endpoints
end

#sip_gatewaysObject (readonly)

Returns the value of attribute sip_gateways.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def sip_gateways
  @sip_gateways
end

#subscribersObject (readonly)

Returns the value of attribute subscribers.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def subscribers
  @subscribers
end

#swml_scriptsObject (readonly)

Returns the value of attribute swml_scripts.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def swml_scripts
  @swml_scripts
end

#swml_webhooksObject (readonly)

Returns the value of attribute swml_webhooks.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def swml_webhooks
  @swml_webhooks
end

#tokensObject (readonly)

Returns the value of attribute tokens.



198
199
200
# File 'lib/signalwire/rest/namespaces/fabric.rb', line 198

def tokens
  @tokens
end