docusign_rooms 1.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +66 -0
  3. data/Gemfile +7 -0
  4. data/Gemfile.lock +71 -0
  5. data/LICENSE +21 -0
  6. data/README.md +80 -0
  7. data/Rakefile +8 -0
  8. data/docusign_rooms-1.0.0.pre.alpha.gem +0 -0
  9. data/docusign_rooms.gemspec +45 -0
  10. data/git_push.sh +55 -0
  11. data/lib/.DS_Store +0 -0
  12. data/lib/docusign_rooms.rb +193 -0
  13. data/lib/docusign_rooms/.DS_Store +0 -0
  14. data/lib/docusign_rooms/api/accounts_api.rb +73 -0
  15. data/lib/docusign_rooms/api/activity_types_api.rb +69 -0
  16. data/lib/docusign_rooms/api/closing_statuses_api.rb +69 -0
  17. data/lib/docusign_rooms/api/contact_sides_api.rb +69 -0
  18. data/lib/docusign_rooms/api/countries_api.rb +69 -0
  19. data/lib/docusign_rooms/api/currencies_api.rb +69 -0
  20. data/lib/docusign_rooms/api/documents_api.rb +200 -0
  21. data/lib/docusign_rooms/api/e_sign_permission_profiles_api.rb +73 -0
  22. data/lib/docusign_rooms/api/external_form_fill_sessions_api.rb +79 -0
  23. data/lib/docusign_rooms/api/fields_api.rb +92 -0
  24. data/lib/docusign_rooms/api/financing_types_api.rb +69 -0
  25. data/lib/docusign_rooms/api/form_details_api.rb +77 -0
  26. data/lib/docusign_rooms/api/form_groups_api.rb +89 -0
  27. data/lib/docusign_rooms/api/form_libraries_api.rb +158 -0
  28. data/lib/docusign_rooms/api/offices_api.rb +310 -0
  29. data/lib/docusign_rooms/api/origins_of_leads_api.rb +69 -0
  30. data/lib/docusign_rooms/api/property_types_api.rb +69 -0
  31. data/lib/docusign_rooms/api/regions_api.rb +306 -0
  32. data/lib/docusign_rooms/api/roles_api.rb +328 -0
  33. data/lib/docusign_rooms/api/room_contact_types_api.rb +69 -0
  34. data/lib/docusign_rooms/api/room_folders_api.rb +93 -0
  35. data/lib/docusign_rooms/api/room_templates_api.rb +97 -0
  36. data/lib/docusign_rooms/api/rooms_api.rb +1146 -0
  37. data/lib/docusign_rooms/api/seller_decision_types_api.rb +69 -0
  38. data/lib/docusign_rooms/api/special_circumstance_types_api.rb +69 -0
  39. data/lib/docusign_rooms/api/states_api.rb +69 -0
  40. data/lib/docusign_rooms/api/task_date_types_api.rb +69 -0
  41. data/lib/docusign_rooms/api/task_list_templates_api.rb +89 -0
  42. data/lib/docusign_rooms/api/task_lists_api.rb +188 -0
  43. data/lib/docusign_rooms/api/task_responsibility_types_api.rb +69 -0
  44. data/lib/docusign_rooms/api/task_statuses_api.rb +69 -0
  45. data/lib/docusign_rooms/api/time_zones_api.rb +69 -0
  46. data/lib/docusign_rooms/api/transaction_sides_api.rb +69 -0
  47. data/lib/docusign_rooms/api/users_api.rb +908 -0
  48. data/lib/docusign_rooms/client/.DS_Store +0 -0
  49. data/lib/docusign_rooms/client/api_client.rb +590 -0
  50. data/lib/docusign_rooms/client/api_error.rb +37 -0
  51. data/lib/docusign_rooms/client/auth/oauth.rb +1061 -0
  52. data/lib/docusign_rooms/configuration.rb +202 -0
  53. data/lib/docusign_rooms/models/account_summary.rb +262 -0
  54. data/lib/docusign_rooms/models/activity_type.rb +192 -0
  55. data/lib/docusign_rooms/models/api_error.rb +192 -0
  56. data/lib/docusign_rooms/models/assignable_roles.rb +239 -0
  57. data/lib/docusign_rooms/models/classic_admin_to_invite.rb +216 -0
  58. data/lib/docusign_rooms/models/classic_agent_to_invite.rb +240 -0
  59. data/lib/docusign_rooms/models/classic_manager_permissions.rb +291 -0
  60. data/lib/docusign_rooms/models/classic_manager_to_invite.rb +338 -0
  61. data/lib/docusign_rooms/models/closing_status.rb +192 -0
  62. data/lib/docusign_rooms/models/contact_side.rb +192 -0
  63. data/lib/docusign_rooms/models/country.rb +192 -0
  64. data/lib/docusign_rooms/models/currency.rb +192 -0
  65. data/lib/docusign_rooms/models/custom_data.rb +192 -0
  66. data/lib/docusign_rooms/models/depends_on.rb +192 -0
  67. data/lib/docusign_rooms/models/designated_office.rb +188 -0
  68. data/lib/docusign_rooms/models/designated_region.rb +188 -0
  69. data/lib/docusign_rooms/models/document.rb +265 -0
  70. data/lib/docusign_rooms/models/document_user.rb +291 -0
  71. data/lib/docusign_rooms/models/document_user_for_create.rb +188 -0
  72. data/lib/docusign_rooms/models/e_sign_account_role_settings.rb +183 -0
  73. data/lib/docusign_rooms/models/e_sign_permission_profile.rb +201 -0
  74. data/lib/docusign_rooms/models/e_sign_permission_profile_list.rb +185 -0
  75. data/lib/docusign_rooms/models/external_form_fill_session.rb +183 -0
  76. data/lib/docusign_rooms/models/external_form_fill_session_for_create.rb +211 -0
  77. data/lib/docusign_rooms/models/field.rb +248 -0
  78. data/lib/docusign_rooms/models/field_configuration.rb +259 -0
  79. data/lib/docusign_rooms/models/field_data.rb +185 -0
  80. data/lib/docusign_rooms/models/field_data_for_create.rb +185 -0
  81. data/lib/docusign_rooms/models/field_data_for_update.rb +185 -0
  82. data/lib/docusign_rooms/models/field_set.rb +203 -0
  83. data/lib/docusign_rooms/models/financing_type.rb +192 -0
  84. data/lib/docusign_rooms/models/form_details.rb +246 -0
  85. data/lib/docusign_rooms/models/form_for_add.rb +188 -0
  86. data/lib/docusign_rooms/models/form_group_summary.rb +201 -0
  87. data/lib/docusign_rooms/models/form_group_summary_list.rb +230 -0
  88. data/lib/docusign_rooms/models/form_library_summary.rb +201 -0
  89. data/lib/docusign_rooms/models/form_library_summary_list.rb +230 -0
  90. data/lib/docusign_rooms/models/form_summary.rb +201 -0
  91. data/lib/docusign_rooms/models/form_summary_list.rb +230 -0
  92. data/lib/docusign_rooms/models/global_activity_types.rb +185 -0
  93. data/lib/docusign_rooms/models/global_closing_statuses.rb +185 -0
  94. data/lib/docusign_rooms/models/global_contact_sides.rb +185 -0
  95. data/lib/docusign_rooms/models/global_countries.rb +185 -0
  96. data/lib/docusign_rooms/models/global_currencies.rb +185 -0
  97. data/lib/docusign_rooms/models/global_financing_types.rb +185 -0
  98. data/lib/docusign_rooms/models/global_origins_of_leads.rb +185 -0
  99. data/lib/docusign_rooms/models/global_property_types.rb +185 -0
  100. data/lib/docusign_rooms/models/global_room_contact_types.rb +185 -0
  101. data/lib/docusign_rooms/models/global_seller_decision_types.rb +185 -0
  102. data/lib/docusign_rooms/models/global_special_circumstance_types.rb +185 -0
  103. data/lib/docusign_rooms/models/global_states.rb +185 -0
  104. data/lib/docusign_rooms/models/global_task_date_types.rb +185 -0
  105. data/lib/docusign_rooms/models/global_task_responsibility_types.rb +185 -0
  106. data/lib/docusign_rooms/models/global_task_statuses.rb +185 -0
  107. data/lib/docusign_rooms/models/global_time_zones.rb +185 -0
  108. data/lib/docusign_rooms/models/global_transaction_sides.rb +185 -0
  109. data/lib/docusign_rooms/models/locked_out_details.rb +188 -0
  110. data/lib/docusign_rooms/models/nullable_field_data.rb +185 -0
  111. data/lib/docusign_rooms/models/nullable_permissions.rb +660 -0
  112. data/lib/docusign_rooms/models/office.rb +287 -0
  113. data/lib/docusign_rooms/models/office_for_create.rb +269 -0
  114. data/lib/docusign_rooms/models/office_reference_count.rb +192 -0
  115. data/lib/docusign_rooms/models/office_reference_count_list.rb +185 -0
  116. data/lib/docusign_rooms/models/office_summary.rb +282 -0
  117. data/lib/docusign_rooms/models/office_summary_list.rb +230 -0
  118. data/lib/docusign_rooms/models/origin_of_lead.rb +192 -0
  119. data/lib/docusign_rooms/models/permissions.rb +660 -0
  120. data/lib/docusign_rooms/models/property_type.rb +192 -0
  121. data/lib/docusign_rooms/models/region.rb +206 -0
  122. data/lib/docusign_rooms/models/region_reference_count.rb +192 -0
  123. data/lib/docusign_rooms/models/region_reference_count_list.rb +185 -0
  124. data/lib/docusign_rooms/models/region_summary.rb +201 -0
  125. data/lib/docusign_rooms/models/region_summary_list.rb +230 -0
  126. data/lib/docusign_rooms/models/role.rb +246 -0
  127. data/lib/docusign_rooms/models/role_for_create.rb +201 -0
  128. data/lib/docusign_rooms/models/role_for_update.rb +201 -0
  129. data/lib/docusign_rooms/models/role_summary.rb +228 -0
  130. data/lib/docusign_rooms/models/role_summary_list.rb +230 -0
  131. data/lib/docusign_rooms/models/room.rb +282 -0
  132. data/lib/docusign_rooms/models/room_contact_type.rb +192 -0
  133. data/lib/docusign_rooms/models/room_document.rb +246 -0
  134. data/lib/docusign_rooms/models/room_document_list.rb +230 -0
  135. data/lib/docusign_rooms/models/room_folder.rb +201 -0
  136. data/lib/docusign_rooms/models/room_folder_list.rb +230 -0
  137. data/lib/docusign_rooms/models/room_for_create.rb +248 -0
  138. data/lib/docusign_rooms/models/room_invite.rb +240 -0
  139. data/lib/docusign_rooms/models/room_invite_response.rb +237 -0
  140. data/lib/docusign_rooms/models/room_picture.rb +183 -0
  141. data/lib/docusign_rooms/models/room_summary.rb +273 -0
  142. data/lib/docusign_rooms/models/room_summary_list.rb +230 -0
  143. data/lib/docusign_rooms/models/room_template.rb +201 -0
  144. data/lib/docusign_rooms/models/room_templates_summary_list.rb +230 -0
  145. data/lib/docusign_rooms/models/room_user.rb +246 -0
  146. data/lib/docusign_rooms/models/room_user_for_update.rb +192 -0
  147. data/lib/docusign_rooms/models/room_user_removal_detail.rb +183 -0
  148. data/lib/docusign_rooms/models/room_user_summary.rb +237 -0
  149. data/lib/docusign_rooms/models/room_users_result.rb +230 -0
  150. data/lib/docusign_rooms/models/select_list_field_option.rb +201 -0
  151. data/lib/docusign_rooms/models/seller_decision_type.rb +192 -0
  152. data/lib/docusign_rooms/models/special_circumstance_type.rb +192 -0
  153. data/lib/docusign_rooms/models/state.rb +192 -0
  154. data/lib/docusign_rooms/models/task_date_type.rb +192 -0
  155. data/lib/docusign_rooms/models/task_list.rb +275 -0
  156. data/lib/docusign_rooms/models/task_list_for_create.rb +183 -0
  157. data/lib/docusign_rooms/models/task_list_summary.rb +264 -0
  158. data/lib/docusign_rooms/models/task_list_summary_list.rb +185 -0
  159. data/lib/docusign_rooms/models/task_list_template.rb +210 -0
  160. data/lib/docusign_rooms/models/task_list_template_list.rb +230 -0
  161. data/lib/docusign_rooms/models/task_responsibility_type.rb +192 -0
  162. data/lib/docusign_rooms/models/task_status.rb +192 -0
  163. data/lib/docusign_rooms/models/task_summary.rb +291 -0
  164. data/lib/docusign_rooms/models/time_zone.rb +192 -0
  165. data/lib/docusign_rooms/models/transaction_side.rb +192 -0
  166. data/lib/docusign_rooms/models/user.rb +338 -0
  167. data/lib/docusign_rooms/models/user_for_update.rb +188 -0
  168. data/lib/docusign_rooms/models/user_summary.rb +307 -0
  169. data/lib/docusign_rooms/models/user_summary_list.rb +230 -0
  170. data/lib/docusign_rooms/models/user_to_invite.rb +337 -0
  171. data/lib/docusign_rooms/version.rb +14 -0
  172. data/tests/Gemfile +5 -0
  173. data/tests/Gemfile.lock +42 -0
  174. data/tests/docs/Test.pdf +0 -0
  175. data/tests/docs/private.pem +27 -0
  176. data/tests/spec/unit_tests_using_jwt_spec.rb +125 -0
  177. metadata +420 -0
@@ -0,0 +1,69 @@
1
+ =begin
2
+ #DocuSign Rooms API - v2
3
+
4
+ #An API for an integrator to access the features of DocuSign Rooms
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module DocuSign_Rooms
15
+
16
+
17
+ class OriginsOfLeadsApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client = OriginsOfLeadsApi.default)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # Retrieves the list of valid origins of leads.
25
+ #
26
+ # @return [GlobalOriginsOfLeads]
27
+ def get_origins_of_leads()
28
+ data, _status_code, _headers = get_origins_of_leads_with_http_info()
29
+ return data
30
+ end
31
+
32
+ # Retrieves the list of valid origins of leads.
33
+ #
34
+ # @return [Array<(GlobalOriginsOfLeads, Fixnum, Hash)>] GlobalOriginsOfLeads data, response status code and response headers
35
+ def get_origins_of_leads_with_http_info()
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug "Calling API: OriginsOfLeadsApi.get_origins_of_leads ..."
38
+ end
39
+ # resource path
40
+ local_var_path = "/v2/origins_of_leads".sub('{format}','json')
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = []
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'GlobalOriginsOfLeads')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: OriginsOfLeadsApi#get_origins_of_leads\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,69 @@
1
+ =begin
2
+ #DocuSign Rooms API - v2
3
+
4
+ #An API for an integrator to access the features of DocuSign Rooms
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module DocuSign_Rooms
15
+
16
+
17
+ class PropertyTypesApi
18
+ attr_accessor :api_client
19
+
20
+ def initialize(api_client = PropertyTypesApi.default)
21
+ @api_client = api_client
22
+ end
23
+
24
+ # Retrieves the list of valid property types.
25
+ #
26
+ # @return [GlobalPropertyTypes]
27
+ def get_property_types()
28
+ data, _status_code, _headers = get_property_types_with_http_info()
29
+ return data
30
+ end
31
+
32
+ # Retrieves the list of valid property types.
33
+ #
34
+ # @return [Array<(GlobalPropertyTypes, Fixnum, Hash)>] GlobalPropertyTypes data, response status code and response headers
35
+ def get_property_types_with_http_info()
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug "Calling API: PropertyTypesApi.get_property_types ..."
38
+ end
39
+ # resource path
40
+ local_var_path = "/v2/property_types".sub('{format}','json')
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+
50
+ # form parameters
51
+ form_params = {}
52
+
53
+ # http body (model)
54
+ post_body = nil
55
+ auth_names = []
56
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
57
+ :header_params => header_params,
58
+ :query_params => query_params,
59
+ :form_params => form_params,
60
+ :body => post_body,
61
+ :auth_names => auth_names,
62
+ :return_type => 'GlobalPropertyTypes')
63
+ if @api_client.config.debugging
64
+ @api_client.config.logger.debug "API called: PropertyTypesApi#get_property_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
+ end
66
+ return data, status_code, headers
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,306 @@
1
+ =begin
2
+ #DocuSign Rooms API - v2
3
+
4
+ #An API for an integrator to access the features of DocuSign Rooms
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module DocuSign_Rooms
15
+
16
+ class GetRegionsOptions
17
+ # Number of regions to include in the response, (Default 100).
18
+ attr_accessor :count
19
+
20
+ # Position in the overall list of regions to begin results.
21
+ attr_accessor :start_position
22
+
23
+ # When true, the response only includes regions that the calling user can manage.
24
+ attr_accessor :managed_only
25
+
26
+ def self.default
27
+ @@default ||= GetRegionsOptions.new
28
+ end
29
+ end
30
+
31
+
32
+ class RegionsApi
33
+ attr_accessor :api_client
34
+
35
+ def initialize(api_client = RegionsApi.default)
36
+ @api_client = api_client
37
+ end
38
+
39
+ # Creates a new region for a company
40
+ #
41
+ # @param account_id
42
+ # @param region The information required to create a new region for the caller's company
43
+ # @return [Region]
44
+ def create_region(account_id, region)
45
+ data, _status_code, _headers = create_region_with_http_info(account_id, region)
46
+ return data
47
+ end
48
+
49
+ # Creates a new region for a company
50
+ #
51
+ # @param account_id
52
+ # @param region The information required to create a new region for the caller's company
53
+ # @return [Array<(Region, Fixnum, Hash)>] Region data, response status code and response headers
54
+ def create_region_with_http_info(account_id, region)
55
+ if @api_client.config.debugging
56
+ @api_client.config.logger.debug "Calling API: RegionsApi.create_region ..."
57
+ end
58
+ # verify the required parameter 'region' is set
59
+ fail ArgumentError, "Missing the required parameter 'region' when calling RegionsApi.create_region" if region.nil?
60
+ # verify the required parameter 'account_id' is set
61
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.create_region" if account_id.nil?
62
+ # resource path
63
+ local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
64
+
65
+ # query parameters
66
+ query_params = {}
67
+
68
+ # header parameters
69
+ header_params = {}
70
+ # HTTP header 'Accept' (if needed)
71
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
72
+ # HTTP header 'Content-Type'
73
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
74
+
75
+ # form parameters
76
+ form_params = {}
77
+
78
+ # http body (model)
79
+ post_body = @api_client.object_to_http_body(region)
80
+ auth_names = []
81
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => 'Region')
88
+ if @api_client.config.debugging
89
+ @api_client.config.logger.debug "API called: RegionsApi#create_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
90
+ end
91
+ return data, status_code, headers
92
+ end
93
+
94
+ # Delete a region.
95
+ #
96
+ # @param region_id Id of the desired region
97
+ # @param account_id
98
+ # @return [nil]
99
+ def delete_region(region_id, account_id)
100
+ delete_region_with_http_info(region_id, account_id)
101
+ return nil
102
+ end
103
+
104
+ # Delete a region.
105
+ #
106
+ # @param region_id Id of the desired region
107
+ # @param account_id
108
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
109
+ def delete_region_with_http_info(region_id, account_id)
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug "Calling API: RegionsApi.delete_region ..."
112
+ end
113
+ # verify the required parameter 'region_id' is set
114
+ fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.delete_region" if region_id.nil?
115
+ # verify the required parameter 'account_id' is set
116
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.delete_region" if account_id.nil?
117
+ # resource path
118
+ local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
119
+
120
+ # query parameters
121
+ query_params = {}
122
+
123
+ # header parameters
124
+ header_params = {}
125
+ # HTTP header 'Accept' (if needed)
126
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
127
+
128
+ # form parameters
129
+ form_params = {}
130
+
131
+ # http body (model)
132
+ post_body = nil
133
+ auth_names = []
134
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
135
+ :header_params => header_params,
136
+ :query_params => query_params,
137
+ :form_params => form_params,
138
+ :body => post_body,
139
+ :auth_names => auth_names)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: RegionsApi#delete_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # Get information about the region with the given regionId
147
+ #
148
+ # @param region_id Id of the desired region
149
+ # @param account_id
150
+ # @return [Region]
151
+ def get_region(region_id, account_id)
152
+ data, _status_code, _headers = get_region_with_http_info(region_id, account_id)
153
+ return data
154
+ end
155
+
156
+ # Get information about the region with the given regionId
157
+ #
158
+ # @param region_id Id of the desired region
159
+ # @param account_id
160
+ # @return [Array<(Region, Fixnum, Hash)>] Region data, response status code and response headers
161
+ def get_region_with_http_info(region_id, account_id)
162
+ if @api_client.config.debugging
163
+ @api_client.config.logger.debug "Calling API: RegionsApi.get_region ..."
164
+ end
165
+ # verify the required parameter 'region_id' is set
166
+ fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.get_region" if region_id.nil?
167
+ # verify the required parameter 'account_id' is set
168
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_region" if account_id.nil?
169
+ # resource path
170
+ local_var_path = "/v2/accounts/{accountId}/regions/{regionId}".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
171
+
172
+ # query parameters
173
+ query_params = {}
174
+
175
+ # header parameters
176
+ header_params = {}
177
+ # HTTP header 'Accept' (if needed)
178
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
179
+
180
+ # form parameters
181
+ form_params = {}
182
+
183
+ # http body (model)
184
+ post_body = nil
185
+ auth_names = []
186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
187
+ :header_params => header_params,
188
+ :query_params => query_params,
189
+ :form_params => form_params,
190
+ :body => post_body,
191
+ :auth_names => auth_names,
192
+ :return_type => 'Region')
193
+ if @api_client.config.debugging
194
+ @api_client.config.logger.debug "API called: RegionsApi#get_region\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
195
+ end
196
+ return data, status_code, headers
197
+ end
198
+
199
+ # Get region reference counts.
200
+ #
201
+ # @param region_id Id of the desired region
202
+ # @param account_id
203
+ # @return [RegionReferenceCountList]
204
+ def get_region_reference_counts(region_id, account_id)
205
+ data, _status_code, _headers = get_region_reference_counts_with_http_info(region_id, account_id)
206
+ return data
207
+ end
208
+
209
+ # Get region reference counts.
210
+ #
211
+ # @param region_id Id of the desired region
212
+ # @param account_id
213
+ # @return [Array<(RegionReferenceCountList, Fixnum, Hash)>] RegionReferenceCountList data, response status code and response headers
214
+ def get_region_reference_counts_with_http_info(region_id, account_id)
215
+ if @api_client.config.debugging
216
+ @api_client.config.logger.debug "Calling API: RegionsApi.get_region_reference_counts ..."
217
+ end
218
+ # verify the required parameter 'region_id' is set
219
+ fail ArgumentError, "Missing the required parameter 'region_id' when calling RegionsApi.get_region_reference_counts" if region_id.nil?
220
+ # verify the required parameter 'account_id' is set
221
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_region_reference_counts" if account_id.nil?
222
+ # resource path
223
+ local_var_path = "/v2/accounts/{accountId}/regions/{regionId}/reference_counts".sub('{format}','json').sub('{' + 'regionId' + '}', region_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
224
+
225
+ # query parameters
226
+ query_params = {}
227
+
228
+ # header parameters
229
+ header_params = {}
230
+ # HTTP header 'Accept' (if needed)
231
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
232
+
233
+ # form parameters
234
+ form_params = {}
235
+
236
+ # http body (model)
237
+ post_body = nil
238
+ auth_names = []
239
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
240
+ :header_params => header_params,
241
+ :query_params => query_params,
242
+ :form_params => form_params,
243
+ :body => post_body,
244
+ :auth_names => auth_names,
245
+ :return_type => 'RegionReferenceCountList')
246
+ if @api_client.config.debugging
247
+ @api_client.config.logger.debug "API called: RegionsApi#get_region_reference_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
248
+ end
249
+ return data, status_code, headers
250
+ end
251
+
252
+ # Get account regions.
253
+ #
254
+ # @param account_id
255
+ # @param DocuSign_Rooms::GetRegionsOptions Options for modifying the behavior of the function.
256
+ # @return [RegionSummaryList]
257
+ def get_regions(account_id, options = DocuSign_Rooms::GetRegionsOptions.default)
258
+ data, _status_code, _headers = get_regions_with_http_info(account_id, options)
259
+ return data
260
+ end
261
+
262
+ # Get account regions.
263
+ #
264
+ # @param account_id
265
+ # @param DocuSign_Rooms::GetRegionsOptions Options for modifying the behavior of the function.
266
+ # @return [Array<(RegionSummaryList, Fixnum, Hash)>] RegionSummaryList data, response status code and response headers
267
+ def get_regions_with_http_info(account_id, options = DocuSign_Rooms::GetRegionsOptions.default)
268
+ if @api_client.config.debugging
269
+ @api_client.config.logger.debug "Calling API: RegionsApi.get_regions ..."
270
+ end
271
+ # verify the required parameter 'account_id' is set
272
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RegionsApi.get_regions" if account_id.nil?
273
+ # resource path
274
+ local_var_path = "/v2/accounts/{accountId}/regions".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
275
+
276
+ # query parameters
277
+ query_params = {}
278
+ query_params[:'count'] = options.count if !options.count.nil?
279
+ query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
280
+ query_params[:'managedOnly'] = options.managed_only if !options.managed_only.nil?
281
+
282
+ # header parameters
283
+ header_params = {}
284
+ # HTTP header 'Accept' (if needed)
285
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
286
+
287
+ # form parameters
288
+ form_params = {}
289
+
290
+ # http body (model)
291
+ post_body = nil
292
+ auth_names = []
293
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
294
+ :header_params => header_params,
295
+ :query_params => query_params,
296
+ :form_params => form_params,
297
+ :body => post_body,
298
+ :auth_names => auth_names,
299
+ :return_type => 'RegionSummaryList')
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: RegionsApi#get_regions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+ end
306
+ end
@@ -0,0 +1,328 @@
1
+ =begin
2
+ #DocuSign Rooms API - v2
3
+
4
+ #An API for an integrator to access the features of DocuSign Rooms
5
+
6
+ OpenAPI spec version: v2
7
+ Contact: devcenter@docusign.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module DocuSign_Rooms
15
+
16
+ class GetRoleOptions
17
+ #
18
+ attr_accessor :include_is_assigned
19
+
20
+ def self.default
21
+ @@default ||= GetRoleOptions.new
22
+ end
23
+ end
24
+
25
+ class GetRolesOptions
26
+ #
27
+ attr_accessor :only_assignable
28
+
29
+ #
30
+ attr_accessor :filter
31
+
32
+ #
33
+ attr_accessor :start_position
34
+
35
+ #
36
+ attr_accessor :count
37
+
38
+ def self.default
39
+ @@default ||= GetRolesOptions.new
40
+ end
41
+ end
42
+
43
+
44
+ class RolesApi
45
+ attr_accessor :api_client
46
+
47
+ def initialize(api_client = RolesApi.default)
48
+ @api_client = api_client
49
+ end
50
+
51
+ # Creates a role.
52
+ #
53
+ # @param account_id
54
+ # @param role
55
+ # @return [Role]
56
+ def create_role(account_id, role)
57
+ data, _status_code, _headers = create_role_with_http_info(account_id, role)
58
+ return data
59
+ end
60
+
61
+ # Creates a role.
62
+ #
63
+ # @param account_id
64
+ # @param role
65
+ # @return [Array<(Role, Fixnum, Hash)>] Role data, response status code and response headers
66
+ def create_role_with_http_info(account_id, role)
67
+ if @api_client.config.debugging
68
+ @api_client.config.logger.debug "Calling API: RolesApi.create_role ..."
69
+ end
70
+ # verify the required parameter 'role' is set
71
+ fail ArgumentError, "Missing the required parameter 'role' when calling RolesApi.create_role" if role.nil?
72
+ # verify the required parameter 'account_id' is set
73
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.create_role" if account_id.nil?
74
+ # resource path
75
+ local_var_path = "/v2/accounts/{accountId}/roles".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
76
+
77
+ # query parameters
78
+ query_params = {}
79
+
80
+ # header parameters
81
+ header_params = {}
82
+ # HTTP header 'Accept' (if needed)
83
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
84
+ # HTTP header 'Content-Type'
85
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
86
+
87
+ # form parameters
88
+ form_params = {}
89
+
90
+ # http body (model)
91
+ post_body = @api_client.object_to_http_body(role)
92
+ auth_names = []
93
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
94
+ :header_params => header_params,
95
+ :query_params => query_params,
96
+ :form_params => form_params,
97
+ :body => post_body,
98
+ :auth_names => auth_names,
99
+ :return_type => 'Role')
100
+ if @api_client.config.debugging
101
+ @api_client.config.logger.debug "API called: RolesApi#create_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
102
+ end
103
+ return data, status_code, headers
104
+ end
105
+
106
+ # Deletes the role with the given roleId.
107
+ #
108
+ # @param role_id
109
+ # @param account_id
110
+ # @return [nil]
111
+ def delete_role(role_id, account_id)
112
+ delete_role_with_http_info(role_id, account_id)
113
+ return nil
114
+ end
115
+
116
+ # Deletes the role with the given roleId.
117
+ #
118
+ # @param role_id
119
+ # @param account_id
120
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
121
+ def delete_role_with_http_info(role_id, account_id)
122
+ if @api_client.config.debugging
123
+ @api_client.config.logger.debug "Calling API: RolesApi.delete_role ..."
124
+ end
125
+ # verify the required parameter 'role_id' is set
126
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.delete_role" if role_id.nil?
127
+ # verify the required parameter 'account_id' is set
128
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.delete_role" if account_id.nil?
129
+ # resource path
130
+ local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
131
+
132
+ # query parameters
133
+ query_params = {}
134
+
135
+ # header parameters
136
+ header_params = {}
137
+ # HTTP header 'Accept' (if needed)
138
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
139
+
140
+ # form parameters
141
+ form_params = {}
142
+
143
+ # http body (model)
144
+ post_body = nil
145
+ auth_names = []
146
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
147
+ :header_params => header_params,
148
+ :query_params => query_params,
149
+ :form_params => form_params,
150
+ :body => post_body,
151
+ :auth_names => auth_names)
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: RolesApi#delete_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+
158
+ # Get information about the role with the given roleId.
159
+ #
160
+ # @param role_id
161
+ # @param account_id
162
+ # @param DocuSign_Rooms::GetRoleOptions Options for modifying the behavior of the function.
163
+ # @return [Role]
164
+ def get_role(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default)
165
+ data, _status_code, _headers = get_role_with_http_info(role_id, account_id, options)
166
+ return data
167
+ end
168
+
169
+ # Get information about the role with the given roleId.
170
+ #
171
+ # @param role_id
172
+ # @param account_id
173
+ # @param DocuSign_Rooms::GetRoleOptions Options for modifying the behavior of the function.
174
+ # @return [Array<(Role, Fixnum, Hash)>] Role data, response status code and response headers
175
+ def get_role_with_http_info(role_id, account_id, options = DocuSign_Rooms::GetRoleOptions.default)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "Calling API: RolesApi.get_role ..."
178
+ end
179
+ # verify the required parameter 'role_id' is set
180
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.get_role" if role_id.nil?
181
+ # verify the required parameter 'account_id' is set
182
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.get_role" if account_id.nil?
183
+ # resource path
184
+ local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
185
+
186
+ # query parameters
187
+ query_params = {}
188
+ query_params[:'includeIsAssigned'] = options.include_is_assigned if !options.include_is_assigned.nil?
189
+
190
+ # header parameters
191
+ header_params = {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
194
+
195
+ # form parameters
196
+ form_params = {}
197
+
198
+ # http body (model)
199
+ post_body = nil
200
+ auth_names = []
201
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
202
+ :header_params => header_params,
203
+ :query_params => query_params,
204
+ :form_params => form_params,
205
+ :body => post_body,
206
+ :auth_names => auth_names,
207
+ :return_type => 'Role')
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "API called: RolesApi#get_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
210
+ end
211
+ return data, status_code, headers
212
+ end
213
+
214
+ # Gets a paged-list of roles in your company
215
+ #
216
+ # @param account_id
217
+ # @param DocuSign_Rooms::GetRolesOptions Options for modifying the behavior of the function.
218
+ # @return [RoleSummaryList]
219
+ def get_roles(account_id, options = DocuSign_Rooms::GetRolesOptions.default)
220
+ data, _status_code, _headers = get_roles_with_http_info(account_id, options)
221
+ return data
222
+ end
223
+
224
+ # Gets a paged-list of roles in your company
225
+ #
226
+ # @param account_id
227
+ # @param DocuSign_Rooms::GetRolesOptions Options for modifying the behavior of the function.
228
+ # @return [Array<(RoleSummaryList, Fixnum, Hash)>] RoleSummaryList data, response status code and response headers
229
+ def get_roles_with_http_info(account_id, options = DocuSign_Rooms::GetRolesOptions.default)
230
+ if @api_client.config.debugging
231
+ @api_client.config.logger.debug "Calling API: RolesApi.get_roles ..."
232
+ end
233
+ # verify the required parameter 'account_id' is set
234
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.get_roles" if account_id.nil?
235
+ # resource path
236
+ local_var_path = "/v2/accounts/{accountId}/roles".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
237
+
238
+ # query parameters
239
+ query_params = {}
240
+ query_params[:'onlyAssignable'] = options.only_assignable if !options.only_assignable.nil?
241
+ query_params[:'filter'] = options.filter if !options.filter.nil?
242
+ query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
243
+ query_params[:'count'] = options.count if !options.count.nil?
244
+
245
+ # header parameters
246
+ header_params = {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+
250
+ # form parameters
251
+ form_params = {}
252
+
253
+ # http body (model)
254
+ post_body = nil
255
+ auth_names = []
256
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => 'RoleSummaryList')
263
+ if @api_client.config.debugging
264
+ @api_client.config.logger.debug "API called: RolesApi#get_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
265
+ end
266
+ return data, status_code, headers
267
+ end
268
+
269
+ # Updates the role with the given roleId.
270
+ #
271
+ # @param role_id
272
+ # @param account_id
273
+ # @param role
274
+ # @return [Role]
275
+ def update_role(role_id, account_id, role)
276
+ data, _status_code, _headers = update_role_with_http_info(role_id, account_id, role)
277
+ return data
278
+ end
279
+
280
+ # Updates the role with the given roleId.
281
+ #
282
+ # @param role_id
283
+ # @param account_id
284
+ # @param role
285
+ # @return [Array<(Role, Fixnum, Hash)>] Role data, response status code and response headers
286
+ def update_role_with_http_info(role_id, account_id, role)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "Calling API: RolesApi.update_role ..."
289
+ end
290
+ # verify the required parameter 'role_id' is set
291
+ fail ArgumentError, "Missing the required parameter 'role_id' when calling RolesApi.update_role" if role_id.nil?
292
+ # verify the required parameter 'role' is set
293
+ fail ArgumentError, "Missing the required parameter 'role' when calling RolesApi.update_role" if role.nil?
294
+ # verify the required parameter 'account_id' is set
295
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling RolesApi.update_role" if account_id.nil?
296
+ # resource path
297
+ local_var_path = "/v2/accounts/{accountId}/roles/{roleId}".sub('{format}','json').sub('{' + 'roleId' + '}', role_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
298
+
299
+ # query parameters
300
+ query_params = {}
301
+
302
+ # header parameters
303
+ header_params = {}
304
+ # HTTP header 'Accept' (if needed)
305
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
306
+ # HTTP header 'Content-Type'
307
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
308
+
309
+ # form parameters
310
+ form_params = {}
311
+
312
+ # http body (model)
313
+ post_body = @api_client.object_to_http_body(role)
314
+ auth_names = []
315
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
316
+ :header_params => header_params,
317
+ :query_params => query_params,
318
+ :form_params => form_params,
319
+ :body => post_body,
320
+ :auth_names => auth_names,
321
+ :return_type => 'Role')
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug "API called: RolesApi#update_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
+ end
325
+ return data, status_code, headers
326
+ end
327
+ end
328
+ end