Class: Ribose::CLI::Commands::Conversation

Inherits:
Base
  • Object
show all
Defined in:
lib/ribose/cli/commands/conversation.rb

Instance Method Summary collapse

Instance Method Details

#addObject



33
34
35
36
# File 'lib/ribose/cli/commands/conversation.rb', line 33

def add
  conversation = create_conversation(options)
  say("New Conversation created! Id: " + conversation.id)
end

#listObject



9
10
11
# File 'lib/ribose/cli/commands/conversation.rb', line 9

def list
  say(build_output(list_conversations, options))
end

#removeObject



60
61
62
63
64
65
# File 'lib/ribose/cli/commands/conversation.rb', line 60

def remove
  remove_conversation(options)
  say("The Conversation has been removed!")
rescue
  say("Please provide a valid Conversation UUID")
end

#showObject



24
25
26
# File 'lib/ribose/cli/commands/conversation.rb', line 24

def show
  say(build_resource_output(conversation(options), options))
end

#updateObject



49
50
51
52
53
54
# File 'lib/ribose/cli/commands/conversation.rb', line 49

def update
  update_conversation(symbolize_keys(options))
  say("Your conversation has been updated!")
rescue Ribose::UnprocessableEntity
  say("Something went wrong!, please check required attributes")
end