Class: Bandwidth::Bxml::Connect

Inherits:
NestableVerb show all
Defined in:
lib/bandwidth-sdk/models/bxml/verbs/connect.rb

Instance Method Summary collapse

Methods inherited from NestableVerb

#generate_xml

Methods inherited from Verb

#generate_xml, #set_attributes, #to_bxml

Constructor Details

#initialize(endpoints = [], attributes = {}) ⇒ Connect

Initializer

Parameters:

  • endpoints (Verb) (defaults to: []) —

    or [Array] XML element children. Defaults to an empty array. Valid nested connect verbs are: Endpoint.

  • attributes (Hash) (defaults to: {}) —

    The attributes to add to the element. Defaults to an empty hash.



7
8
9
10
11
12
13
14
# File 'lib/bandwidth-sdk/models/bxml/verbs/connect.rb', line 7

def initialize(endpoints = [], attributes = {})
  super('Connect', nil, endpoints, attributes)

  @attribute_map = {
    event_callback_url: 'eventCallbackUrl',  # Optional [String]: URL to send events to during the connection lifecycle. May be a relative URL. Defaults to None.
    event_fallback_url: 'eventFallbackUrl',  # Optional [String]: Fallback URL used by Bandwidth when delivery to event_callback_url fails. May be a relative URL.
  }
end

Instance Method Details

#add_endpoints(endpoints) ⇒ Object

Add endpoint or endpoints to the nested verbs array

Parameters:

  • endpoints (Endpoint) —

    or [Array] Verb or verbs to add to the array.



18
19
20
# File 'lib/bandwidth-sdk/models/bxml/verbs/connect.rb', line 18

def add_endpoints(endpoints)
  @nested_verbs.push(*endpoints)
end