Class: CiscoWebex::Template

Inherits:
Views show all
Defined in:
lib/CC/Journey/Views.rb

Instance Method Summary collapse

Methods inherited from Views

#template

Methods inherited from Journey

#actions, #aliases, #events, #head, #identities, #post, #profile_views, #put, #reports, #streams, #views

Methods inherited from ContactCenter

#address_books, #agent_profiles, #agents, #auxiliary_codes, #captures, #dial_plans, #entry_point_mappings, #entry_points, #head, #journey, #multimedia_profiles, #my_org, #outbound_ani, #post, #put, #queues, #sites, #skill_profiles, #skills, #subscriptions, #tasks, #teams, #user_profiles, #users

Constructor Details

#initialize(token = nil, org_id = nil) ⇒ Template

Returns a new instance of Template.



49
50
51
52
53
54
55
56
57
# File 'lib/CC/Journey/Views.rb', line 49

def initialize(token=nil, org_id=nil)
	if token == nil || org_id == nil
		STDERR.puts "Must provde token and org_id when initiating CiscoWebex::CC::Journey::View::Template"
		return false
	else 
		@org_id = org_id
		@auth_token = token
	end
end

Instance Method Details

#create(params) ⇒ Object



76
77
78
# File 'lib/CC/Journey/Views.rb', line 76

def create(params)
	return CiscoWebex::RestCC.post(@auth_token, "/v1/journey/views/templates", params)
end

#get(id) ⇒ Object



67
68
69
70
71
72
73
74
# File 'lib/CC/Journey/Views.rb', line 67

def get(id)
	if id
		return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/views/templates/#{id}")
	else
		STDERR.puts "CiscoWebex::CC::Journey::View - Required parameter 'id'"
		return false
	end
end

#listObject



63
64
65
# File 'lib/CC/Journey/Views.rb', line 63

def list()
	return CiscoWebex::RestCC.get(@auth_token, "/v1/journey/views/templates")
end

#thisObject



59
60
61
# File 'lib/CC/Journey/Views.rb', line 59

def this()
	puts "CiscoWebex::CC::Journey::View::Template - Org:#{@org_id}"
end