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,158 @@
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 GetFormLibrariesOptions
17
+ # Default value is 100 and max value is 100
18
+ attr_accessor :count
19
+
20
+ # Default value is 0
21
+ attr_accessor :start_position
22
+
23
+ def self.default
24
+ @@default ||= GetFormLibrariesOptions.new
25
+ end
26
+ end
27
+
28
+ class GetFormLibraryFormsOptions
29
+ # Default value is 100 and max value is 100
30
+ attr_accessor :count
31
+
32
+ # Default value is 0
33
+ attr_accessor :start_position
34
+
35
+ def self.default
36
+ @@default ||= GetFormLibraryFormsOptions.new
37
+ end
38
+ end
39
+
40
+
41
+ class FormLibrariesApi
42
+ attr_accessor :api_client
43
+
44
+ def initialize(api_client = FormLibrariesApi.default)
45
+ @api_client = api_client
46
+ end
47
+
48
+ # Gets a paged list of forms libraries.
49
+ #
50
+ # @param account_id
51
+ # @param DocuSign_Rooms::GetFormLibrariesOptions Options for modifying the behavior of the function.
52
+ # @return [FormLibrarySummaryList]
53
+ def get_form_libraries(account_id, options = DocuSign_Rooms::GetFormLibrariesOptions.default)
54
+ data, _status_code, _headers = get_form_libraries_with_http_info(account_id, options)
55
+ return data
56
+ end
57
+
58
+ # Gets a paged list of forms libraries.
59
+ #
60
+ # @param account_id
61
+ # @param DocuSign_Rooms::GetFormLibrariesOptions Options for modifying the behavior of the function.
62
+ # @return [Array<(FormLibrarySummaryList, Fixnum, Hash)>] FormLibrarySummaryList data, response status code and response headers
63
+ def get_form_libraries_with_http_info(account_id, options = DocuSign_Rooms::GetFormLibrariesOptions.default)
64
+ if @api_client.config.debugging
65
+ @api_client.config.logger.debug "Calling API: FormLibrariesApi.get_form_libraries ..."
66
+ end
67
+ # verify the required parameter 'account_id' is set
68
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormLibrariesApi.get_form_libraries" if account_id.nil?
69
+ # resource path
70
+ local_var_path = "/v2/accounts/{accountId}/form_libraries".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
71
+
72
+ # query parameters
73
+ query_params = {}
74
+ query_params[:'count'] = options.count if !options.count.nil?
75
+ query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
76
+
77
+ # header parameters
78
+ header_params = {}
79
+ # HTTP header 'Accept' (if needed)
80
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
81
+
82
+ # form parameters
83
+ form_params = {}
84
+
85
+ # http body (model)
86
+ post_body = nil
87
+ auth_names = []
88
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
89
+ :header_params => header_params,
90
+ :query_params => query_params,
91
+ :form_params => form_params,
92
+ :body => post_body,
93
+ :auth_names => auth_names,
94
+ :return_type => 'FormLibrarySummaryList')
95
+ if @api_client.config.debugging
96
+ @api_client.config.logger.debug "API called: FormLibrariesApi#get_form_libraries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
97
+ end
98
+ return data, status_code, headers
99
+ end
100
+
101
+ # Gets a paged list of forms in a forms library.
102
+ #
103
+ # @param form_library_id Library Id
104
+ # @param account_id
105
+ # @param DocuSign_Rooms::GetFormLibraryFormsOptions Options for modifying the behavior of the function.
106
+ # @return [FormSummaryList]
107
+ def get_form_library_forms(form_library_id, account_id, options = DocuSign_Rooms::GetFormLibraryFormsOptions.default)
108
+ data, _status_code, _headers = get_form_library_forms_with_http_info(form_library_id, account_id, options)
109
+ return data
110
+ end
111
+
112
+ # Gets a paged list of forms in a forms library.
113
+ #
114
+ # @param form_library_id Library Id
115
+ # @param account_id
116
+ # @param DocuSign_Rooms::GetFormLibraryFormsOptions Options for modifying the behavior of the function.
117
+ # @return [Array<(FormSummaryList, Fixnum, Hash)>] FormSummaryList data, response status code and response headers
118
+ def get_form_library_forms_with_http_info(form_library_id, account_id, options = DocuSign_Rooms::GetFormLibraryFormsOptions.default)
119
+ if @api_client.config.debugging
120
+ @api_client.config.logger.debug "Calling API: FormLibrariesApi.get_form_library_forms ..."
121
+ end
122
+ # verify the required parameter 'form_library_id' is set
123
+ fail ArgumentError, "Missing the required parameter 'form_library_id' when calling FormLibrariesApi.get_form_library_forms" if form_library_id.nil?
124
+ # verify the required parameter 'account_id' is set
125
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling FormLibrariesApi.get_form_library_forms" if account_id.nil?
126
+ # resource path
127
+ local_var_path = "/v2/accounts/{accountId}/form_libraries/{formLibraryId}/forms".sub('{format}','json').sub('{' + 'formLibraryId' + '}', form_library_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
128
+
129
+ # query parameters
130
+ query_params = {}
131
+ query_params[:'count'] = options.count if !options.count.nil?
132
+ query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
133
+
134
+ # header parameters
135
+ header_params = {}
136
+ # HTTP header 'Accept' (if needed)
137
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
138
+
139
+ # form parameters
140
+ form_params = {}
141
+
142
+ # http body (model)
143
+ post_body = nil
144
+ auth_names = []
145
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
146
+ :header_params => header_params,
147
+ :query_params => query_params,
148
+ :form_params => form_params,
149
+ :body => post_body,
150
+ :auth_names => auth_names,
151
+ :return_type => 'FormSummaryList')
152
+ if @api_client.config.debugging
153
+ @api_client.config.logger.debug "API called: FormLibrariesApi#get_form_library_forms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
154
+ end
155
+ return data, status_code, headers
156
+ end
157
+ end
158
+ end
@@ -0,0 +1,310 @@
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 GetOfficesOptions
17
+ # Number of offices to include in the response, (Default 100)
18
+ attr_accessor :count
19
+
20
+ # Position in the overall list of offices to begin results.
21
+ attr_accessor :start_position
22
+
23
+ # When true, the response only includes offices accessible to the calling user.
24
+ attr_accessor :only_accessible
25
+
26
+ # When specified, the response only includes offices whose names includes the specified search string.
27
+ attr_accessor :search
28
+
29
+ def self.default
30
+ @@default ||= GetOfficesOptions.new
31
+ end
32
+ end
33
+
34
+
35
+ class OfficesApi
36
+ attr_accessor :api_client
37
+
38
+ def initialize(api_client = OfficesApi.default)
39
+ @api_client = api_client
40
+ end
41
+
42
+ # Create an office.
43
+ #
44
+ # @param account_id
45
+ # @param office
46
+ # @return [Office]
47
+ def create_office(account_id, office)
48
+ data, _status_code, _headers = create_office_with_http_info(account_id, office)
49
+ return data
50
+ end
51
+
52
+ # Create an office.
53
+ #
54
+ # @param account_id
55
+ # @param office
56
+ # @return [Array<(Office, Fixnum, Hash)>] Office data, response status code and response headers
57
+ def create_office_with_http_info(account_id, office)
58
+ if @api_client.config.debugging
59
+ @api_client.config.logger.debug "Calling API: OfficesApi.create_office ..."
60
+ end
61
+ # verify the required parameter 'office' is set
62
+ fail ArgumentError, "Missing the required parameter 'office' when calling OfficesApi.create_office" if office.nil?
63
+ # verify the required parameter 'account_id' is set
64
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.create_office" if account_id.nil?
65
+ # resource path
66
+ local_var_path = "/v2/accounts/{accountId}/offices".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
67
+
68
+ # query parameters
69
+ query_params = {}
70
+
71
+ # header parameters
72
+ header_params = {}
73
+ # HTTP header 'Accept' (if needed)
74
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
75
+ # HTTP header 'Content-Type'
76
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
77
+
78
+ # form parameters
79
+ form_params = {}
80
+
81
+ # http body (model)
82
+ post_body = @api_client.object_to_http_body(office)
83
+ auth_names = []
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
85
+ :header_params => header_params,
86
+ :query_params => query_params,
87
+ :form_params => form_params,
88
+ :body => post_body,
89
+ :auth_names => auth_names,
90
+ :return_type => 'Office')
91
+ if @api_client.config.debugging
92
+ @api_client.config.logger.debug "API called: OfficesApi#create_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
+ end
94
+ return data, status_code, headers
95
+ end
96
+
97
+ # Delete an office.
98
+ #
99
+ # @param office_id
100
+ # @param account_id
101
+ # @return [nil]
102
+ def delete_office(office_id, account_id)
103
+ delete_office_with_http_info(office_id, account_id)
104
+ return nil
105
+ end
106
+
107
+ # Delete an office.
108
+ #
109
+ # @param office_id
110
+ # @param account_id
111
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
112
+ def delete_office_with_http_info(office_id, account_id)
113
+ if @api_client.config.debugging
114
+ @api_client.config.logger.debug "Calling API: OfficesApi.delete_office ..."
115
+ end
116
+ # verify the required parameter 'office_id' is set
117
+ fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.delete_office" if office_id.nil?
118
+ # verify the required parameter 'account_id' is set
119
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.delete_office" if account_id.nil?
120
+ # resource path
121
+ local_var_path = "/v2/accounts/{accountId}/offices/{officeId}".sub('{format}','json').sub('{' + 'officeId' + '}', office_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
122
+
123
+ # query parameters
124
+ query_params = {}
125
+
126
+ # header parameters
127
+ header_params = {}
128
+ # HTTP header 'Accept' (if needed)
129
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
130
+
131
+ # form parameters
132
+ form_params = {}
133
+
134
+ # http body (model)
135
+ post_body = nil
136
+ auth_names = []
137
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
138
+ :header_params => header_params,
139
+ :query_params => query_params,
140
+ :form_params => form_params,
141
+ :body => post_body,
142
+ :auth_names => auth_names)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: OfficesApi#delete_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+
149
+ # Get information about the office with the given officeId.
150
+ #
151
+ # @param office_id
152
+ # @param account_id
153
+ # @return [Office]
154
+ def get_office(office_id, account_id)
155
+ data, _status_code, _headers = get_office_with_http_info(office_id, account_id)
156
+ return data
157
+ end
158
+
159
+ # Get information about the office with the given officeId.
160
+ #
161
+ # @param office_id
162
+ # @param account_id
163
+ # @return [Array<(Office, Fixnum, Hash)>] Office data, response status code and response headers
164
+ def get_office_with_http_info(office_id, account_id)
165
+ if @api_client.config.debugging
166
+ @api_client.config.logger.debug "Calling API: OfficesApi.get_office ..."
167
+ end
168
+ # verify the required parameter 'office_id' is set
169
+ fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.get_office" if office_id.nil?
170
+ # verify the required parameter 'account_id' is set
171
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_office" if account_id.nil?
172
+ # resource path
173
+ local_var_path = "/v2/accounts/{accountId}/offices/{officeId}".sub('{format}','json').sub('{' + 'officeId' + '}', office_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
174
+
175
+ # query parameters
176
+ query_params = {}
177
+
178
+ # header parameters
179
+ header_params = {}
180
+ # HTTP header 'Accept' (if needed)
181
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
182
+
183
+ # form parameters
184
+ form_params = {}
185
+
186
+ # http body (model)
187
+ post_body = nil
188
+ auth_names = []
189
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
190
+ :header_params => header_params,
191
+ :query_params => query_params,
192
+ :form_params => form_params,
193
+ :body => post_body,
194
+ :auth_names => auth_names,
195
+ :return_type => 'Office')
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug "API called: OfficesApi#get_office\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
198
+ end
199
+ return data, status_code, headers
200
+ end
201
+
202
+ # Get all offices.
203
+ #
204
+ # @param account_id
205
+ # @param DocuSign_Rooms::GetOfficesOptions Options for modifying the behavior of the function.
206
+ # @return [OfficeSummaryList]
207
+ def get_offices(account_id, options = DocuSign_Rooms::GetOfficesOptions.default)
208
+ data, _status_code, _headers = get_offices_with_http_info(account_id, options)
209
+ return data
210
+ end
211
+
212
+ # Get all offices.
213
+ #
214
+ # @param account_id
215
+ # @param DocuSign_Rooms::GetOfficesOptions Options for modifying the behavior of the function.
216
+ # @return [Array<(OfficeSummaryList, Fixnum, Hash)>] OfficeSummaryList data, response status code and response headers
217
+ def get_offices_with_http_info(account_id, options = DocuSign_Rooms::GetOfficesOptions.default)
218
+ if @api_client.config.debugging
219
+ @api_client.config.logger.debug "Calling API: OfficesApi.get_offices ..."
220
+ end
221
+ # verify the required parameter 'account_id' is set
222
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_offices" if account_id.nil?
223
+ # resource path
224
+ local_var_path = "/v2/accounts/{accountId}/offices".sub('{format}','json').sub('{' + 'accountId' + '}', account_id.to_s)
225
+
226
+ # query parameters
227
+ query_params = {}
228
+ query_params[:'count'] = options.count if !options.count.nil?
229
+ query_params[:'startPosition'] = options.start_position if !options.start_position.nil?
230
+ query_params[:'onlyAccessible'] = options.only_accessible if !options.only_accessible.nil?
231
+ query_params[:'search'] = options.search if !options.search.nil?
232
+
233
+ # header parameters
234
+ header_params = {}
235
+ # HTTP header 'Accept' (if needed)
236
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
237
+
238
+ # form parameters
239
+ form_params = {}
240
+
241
+ # http body (model)
242
+ post_body = nil
243
+ auth_names = []
244
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
245
+ :header_params => header_params,
246
+ :query_params => query_params,
247
+ :form_params => form_params,
248
+ :body => post_body,
249
+ :auth_names => auth_names,
250
+ :return_type => 'OfficeSummaryList')
251
+ if @api_client.config.debugging
252
+ @api_client.config.logger.debug "API called: OfficesApi#get_offices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
253
+ end
254
+ return data, status_code, headers
255
+ end
256
+
257
+ # Lists the number of objects of each type that reference the office.
258
+ #
259
+ # @param office_id
260
+ # @param account_id
261
+ # @return [OfficeReferenceCountList]
262
+ def get_reference_counts(office_id, account_id)
263
+ data, _status_code, _headers = get_reference_counts_with_http_info(office_id, account_id)
264
+ return data
265
+ end
266
+
267
+ # Lists the number of objects of each type that reference the office.
268
+ #
269
+ # @param office_id
270
+ # @param account_id
271
+ # @return [Array<(OfficeReferenceCountList, Fixnum, Hash)>] OfficeReferenceCountList data, response status code and response headers
272
+ def get_reference_counts_with_http_info(office_id, account_id)
273
+ if @api_client.config.debugging
274
+ @api_client.config.logger.debug "Calling API: OfficesApi.get_reference_counts ..."
275
+ end
276
+ # verify the required parameter 'office_id' is set
277
+ fail ArgumentError, "Missing the required parameter 'office_id' when calling OfficesApi.get_reference_counts" if office_id.nil?
278
+ # verify the required parameter 'account_id' is set
279
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling OfficesApi.get_reference_counts" if account_id.nil?
280
+ # resource path
281
+ local_var_path = "/v2/accounts/{accountId}/offices/{officeId}/reference_counts".sub('{format}','json').sub('{' + 'officeId' + '}', office_id.to_s).sub('{' + 'accountId' + '}', account_id.to_s)
282
+
283
+ # query parameters
284
+ query_params = {}
285
+
286
+ # header parameters
287
+ header_params = {}
288
+ # HTTP header 'Accept' (if needed)
289
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
290
+
291
+ # form parameters
292
+ form_params = {}
293
+
294
+ # http body (model)
295
+ post_body = nil
296
+ auth_names = []
297
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
298
+ :header_params => header_params,
299
+ :query_params => query_params,
300
+ :form_params => form_params,
301
+ :body => post_body,
302
+ :auth_names => auth_names,
303
+ :return_type => 'OfficeReferenceCountList')
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: OfficesApi#get_reference_counts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+ end
310
+ end