Class: DocuSign_Rooms::RoomEnvelopesApi

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_rooms/api/room_envelopes_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = RoomEnvelopesApi.default) ⇒ RoomEnvelopesApi

Returns a new instance of RoomEnvelopesApi.



20
21
22
# File 'lib/docusign_rooms/api/room_envelopes_api.rb', line 20

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



18
19
20
# File 'lib/docusign_rooms/api/room_envelopes_api.rb', line 18

def api_client
  @api_client
end

Instance Method Details

#create_room_envelope(room_id, account_id, body) ⇒ Envelope

Creates an envelope with given documents. Returns the eSign envelope ID created Creates an envelope with given documents. Returns the eSign envelope ID created

Parameters:

  • room_id

    Room ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Envelope Name and list of document IDs (optional parameter)

Returns:



30
31
32
33
# File 'lib/docusign_rooms/api/room_envelopes_api.rb', line 30

def create_room_envelope(room_id, , body)
  data, _status_code, _headers = create_room_envelope_with_http_info(room_id, ,  body)
  return data
end

#create_room_envelope_with_http_info(room_id, account_id, body) ⇒ Array<(Envelope, Fixnum, Hash)>

Creates an envelope with given documents. Returns the eSign envelope ID created Creates an envelope with given documents. Returns the eSign envelope ID created

Parameters:

  • room_id

    Room ID

  • account_id (Required)

    The globally unique identifier (GUID) for the account.

  • body

    Envelope Name and list of document IDs (optional parameter)

Returns:

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

    Envelope data, response status code and response headers



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
# File 'lib/docusign_rooms/api/room_envelopes_api.rb', line 41

def create_room_envelope_with_http_info(room_id, , body)
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: RoomEnvelopesApi.create_room_envelope ..."
  end
  # verify the required parameter 'room_id' is set
  fail ArgumentError, "Missing the required parameter 'room_id' when calling RoomEnvelopesApi.create_room_envelope" if room_id.nil?
  # verify the required parameter 'account_id' is set
  fail ArgumentError, "Missing the required parameter 'account_id' when calling RoomEnvelopesApi.create_room_envelope" if .nil?
  # resource path
  local_var_path = "/v2/accounts/{accountId}/rooms/{roomId}/envelopes".sub('{format}','json').sub('{' + 'roomId' + '}', room_id.to_s).sub('{' + 'accountId' + '}', .to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['text/plain', 'application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json-patch+json', 'application/json', 'text/json', 'application/*+json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  auth_names = []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Envelope')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RoomEnvelopesApi#create_room_envelope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end