Class: PureCloud::EmailsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloud/api/emails_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ EmailsApi

Returns a new instance of EmailsApi.



7
8
9
# File 'lib/purecloud/api/emails_api.rb', line 7

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



5
6
7
# File 'lib/purecloud/api/emails_api.rb', line 5

def api_client
  @api_client
end

Instance Method Details

#delete_conversation_id_messages_draft_attachments_attachment_id(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ String

Delete attachment from draft

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


865
866
867
868
# File 'lib/purecloud/api/emails_api.rb', line 865

def delete_conversation_id_messages_draft_attachments_attachment_id(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = delete_conversation_id_messages_draft_attachments_attachment_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#delete_conversation_id_messages_draft_attachments_attachment_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Delete attachment from draft

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
# File 'lib/purecloud/api/emails_api.rb', line 878

def delete_conversation_id_messages_draft_attachments_attachment_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#delete_conversation_id_messages_draft_attachments_attachment_id ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling delete_conversation_id_messages_draft_attachments_attachment_id" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling delete_conversation_id_messages_draft_attachments_attachment_id" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling delete_conversation_id_messages_draft_attachments_attachment_id" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling delete_conversation_id_messages_draft_attachments_attachment_id" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages/draft/attachments/{attachmentId}".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:DELETE, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#delete_conversation_id_messages_draft_attachments_attachment_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_conversation_id(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailConversation

Get email conversation

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



481
482
483
484
# File 'lib/purecloud/api/emails_api.rb', line 481

def get_conversation_id(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_conversation_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_conversation_id_messages(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailMessageListing

Get conversation messages

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



557
558
559
560
# File 'lib/purecloud/api/emails_api.rb', line 557

def get_conversation_id_messages(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_conversation_id_messages_draft(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailMessage

Get conversation draft reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



711
712
713
714
# File 'lib/purecloud/api/emails_api.rb', line 711

def get_conversation_id_messages_draft(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailMessage, Fixnum, Hash)>

Get conversation draft reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmailMessage, Fixnum, Hash)>)

    EmailMessage data, response status code and response headers



724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
# File 'lib/purecloud/api/emails_api.rb', line 724

def get_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_conversation_id_messages_draft ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_conversation_id_messages_draft" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_conversation_id_messages_draft" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_messages_draft" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_conversation_id_messages_draft" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages/draft".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_conversation_id_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_conversation_id_messages_message_id(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailMessage

Get conversation message

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



941
942
943
944
# File 'lib/purecloud/api/emails_api.rb', line 941

def get_conversation_id_messages_message_id(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_conversation_id_messages_message_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_conversation_id_messages_message_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailMessage, Fixnum, Hash)>

Get conversation message

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmailMessage, Fixnum, Hash)>)

    EmailMessage data, response status code and response headers



954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
# File 'lib/purecloud/api/emails_api.rb', line 954

def get_conversation_id_messages_message_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_conversation_id_messages_message_id ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_conversation_id_messages_message_id" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_conversation_id_messages_message_id" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_messages_message_id" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_conversation_id_messages_message_id" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages/{messageId}".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_conversation_id_messages_message_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailMessageListing, Fixnum, Hash)>

Get conversation messages

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmailMessageListing, Fixnum, Hash)>)

    EmailMessageListing data, response status code and response headers



570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
# File 'lib/purecloud/api/emails_api.rb', line 570

def get_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_conversation_id_messages ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_conversation_id_messages" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_conversation_id_messages" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_conversation_id_messages" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_conversation_id_messages" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailMessageListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_conversation_id_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_conversation_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailConversation, Fixnum, Hash)>

Get email conversation

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmailConversation, Fixnum, Hash)>)

    EmailConversation data, response status code and response headers



494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/purecloud/api/emails_api.rb', line 494

def get_conversation_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_conversation_id ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_conversation_id" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_conversation_id" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_conversation_id" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_conversation_id" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailConversation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_conversation_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_emails(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailConversationEntityListing

Get conversations

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



19
20
21
22
# File 'lib/purecloud/api/emails_api.rb', line 19

def get_emails(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_emails_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_emails_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailConversationEntityListing, Fixnum, Hash)>

Get conversations

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/purecloud/api/emails_api.rb', line 32

def get_emails_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_emails ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_emails" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_emails" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_emails" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_emails" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailConversationEntityListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participants_participant_id_wrapup(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ WrapupCode

Get the wrap-up for this conversation participant.

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provisional (BOOLEAN)

    Indicates if the wrap-up code is provisional.

Returns:



327
328
329
330
# File 'lib/purecloud/api/emails_api.rb', line 327

def get_participants_participant_id_wrapup(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_participants_participant_id_wrapup_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_participants_participant_id_wrapup_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(WrapupCode, Fixnum, Hash)>

Get the wrap-up for this conversation participant.

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :provisional (BOOLEAN)

    Indicates if the wrap-up code is provisional.

Returns:

  • (Array<(WrapupCode, Fixnum, Hash)>)

    WrapupCode data, response status code and response headers



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/purecloud/api/emails_api.rb', line 341

def get_participants_participant_id_wrapup_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_participants_participant_id_wrapup ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_participants_participant_id_wrapup" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_participants_participant_id_wrapup" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_participants_participant_id_wrapup" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_participants_participant_id_wrapup" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WrapupCode')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_participants_participant_id_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_participants_participant_id_wrapupcodes(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ WrapupCode

Get list of wrapup codes for this conversation participant

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



405
406
407
408
# File 'lib/purecloud/api/emails_api.rb', line 405

def get_participants_participant_id_wrapupcodes(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = get_participants_participant_id_wrapupcodes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#get_participants_participant_id_wrapupcodes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(WrapupCode, Fixnum, Hash)>

Get list of wrapup codes for this conversation participant

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WrapupCode, Fixnum, Hash)>)

    WrapupCode data, response status code and response headers



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/purecloud/api/emails_api.rb', line 418

def get_participants_participant_id_wrapupcodes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#get_participants_participant_id_wrapupcodes ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling get_participants_participant_id_wrapupcodes" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling get_participants_participant_id_wrapupcodes" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling get_participants_participant_id_wrapupcodes" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling get_participants_participant_id_wrapupcodes" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:GET, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'WrapupCode')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#get_participants_participant_id_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_participants_participant_id(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ nil

Update conversation participant

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


96
97
98
99
# File 'lib/purecloud/api/emails_api.rb', line 96

def patch_participants_participant_id(attachment_id, message_id, conversation_id, participant_id, opts = {})
  patch_participants_participant_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return nil
end

#patch_participants_participant_id_attributes(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ nil

Update the attributes on a conversation participant.

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


173
174
175
176
# File 'lib/purecloud/api/emails_api.rb', line 173

def patch_participants_participant_id_attributes(attachment_id, message_id, conversation_id, participant_id, opts = {})
  patch_participants_participant_id_attributes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return nil
end

#patch_participants_participant_id_attributes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update the attributes on a conversation participant.

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
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
232
233
234
235
236
237
238
239
# File 'lib/purecloud/api/emails_api.rb', line 187

def patch_participants_participant_id_attributes_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#patch_participants_participant_id_attributes ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling patch_participants_participant_id_attributes" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling patch_participants_participant_id_attributes" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling patch_participants_participant_id_attributes" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling patch_participants_participant_id_attributes" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:PATCH, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#patch_participants_participant_id_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_participants_participant_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Update conversation participant

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/purecloud/api/emails_api.rb', line 110

def patch_participants_participant_id_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#patch_participants_participant_id ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling patch_participants_participant_id" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling patch_participants_participant_id" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling patch_participants_participant_id" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling patch_participants_participant_id" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/participants/{participantId}".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:PATCH, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#patch_participants_participant_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_conversation_id_messages(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailMessage

Send an email reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



634
635
636
637
# File 'lib/purecloud/api/emails_api.rb', line 634

def post_conversation_id_messages(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = post_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#post_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailMessage, Fixnum, Hash)>

Send an email reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(EmailMessage, Fixnum, Hash)>)

    EmailMessage data, response status code and response headers



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'lib/purecloud/api/emails_api.rb', line 648

def post_conversation_id_messages_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#post_conversation_id_messages ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling post_conversation_id_messages" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling post_conversation_id_messages" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling post_conversation_id_messages" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling post_conversation_id_messages" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#post_conversation_id_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_participants_participant_id_replace(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ nil

Replace this participant with the specified user and/or address

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


250
251
252
253
# File 'lib/purecloud/api/emails_api.rb', line 250

def post_participants_participant_id_replace(attachment_id, message_id, conversation_id, participant_id, opts = {})
  post_participants_participant_id_replace_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return nil
end

#post_participants_participant_id_replace_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Replace this participant with the specified user and/or address

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/purecloud/api/emails_api.rb', line 264

def post_participants_participant_id_replace_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#post_participants_participant_id_replace ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling post_participants_participant_id_replace" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling post_participants_participant_id_replace" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling post_participants_participant_id_replace" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling post_participants_participant_id_replace" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:POST, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#post_participants_participant_id_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_conversation_id_messages_draft(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ EmailMessage

Update conversation draft reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



788
789
790
791
# File 'lib/purecloud/api/emails_api.rb', line 788

def put_conversation_id_messages_draft(attachment_id, message_id, conversation_id, participant_id, opts = {})
  data, status_code, headers = put_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts)
  return data
end

#put_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {}) ⇒ Array<(EmailMessage, Fixnum, Hash)>

Update conversation draft reply

Parameters:

  • attachment_id

    attachment ID

  • message_id

    message ID

  • conversation_id

    conversation ID

  • participant_id

    participant ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(EmailMessage, Fixnum, Hash)>)

    EmailMessage data, response status code and response headers



802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# File 'lib/purecloud/api/emails_api.rb', line 802

def put_conversation_id_messages_draft_with_http_info(attachment_id, message_id, conversation_id, participant_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: EmailsApi#put_conversation_id_messages_draft ..."
  end
  
  # verify the required parameter 'attachment_id' is set
  fail "Missing the required parameter 'attachment_id' when calling put_conversation_id_messages_draft" if attachment_id.nil?
  
  # verify the required parameter 'message_id' is set
  fail "Missing the required parameter 'message_id' when calling put_conversation_id_messages_draft" if message_id.nil?
  
  # verify the required parameter 'conversation_id' is set
  fail "Missing the required parameter 'conversation_id' when calling put_conversation_id_messages_draft" if conversation_id.nil?
  
  # verify the required parameter 'participant_id' is set
  fail "Missing the required parameter 'participant_id' when calling put_conversation_id_messages_draft" if participant_id.nil?
  
  # resource path
  path = "/api/v2/emails/{conversationId}/messages/draft".sub('{format}','json').sub('{' + 'attachmentId' + '}', attachment_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s).sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  _header_accept = ['application/json']
  _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result

  # HTTP header 'Content-Type'
  _header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(opts[:'body'])
  

  auth_names = ['PureCloud Auth']
  data, status_code, headers = @api_client.call_api(:PUT, path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmailMessage')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: EmailsApi#put_conversation_id_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end