gong_api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (531) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +906 -0
  4. data/Rakefile +8 -0
  5. data/config.json +12 -0
  6. data/docs/Actor.md +10 -0
  7. data/docs/AggregateActivity.md +21 -0
  8. data/docs/AggregateActivityWithDates.md +23 -0
  9. data/docs/Answer.md +12 -0
  10. data/docs/AnsweredScorecard.md +16 -0
  11. data/docs/AnsweredScorecards.md +9 -0
  12. data/docs/AnsweredScorecardsFilter.md +12 -0
  13. data/docs/AssociationObject.md +8 -0
  14. data/docs/AsyncProcessingResponse.md +8 -0
  15. data/docs/AuditingApi.md +61 -0
  16. data/docs/BaseResponse.md +7 -0
  17. data/docs/CRMApi.md +490 -0
  18. data/docs/Call.md +13 -0
  19. data/docs/CallAccessDetails.md +8 -0
  20. data/docs/CallAccessWithPermissionLevel.md +8 -0
  21. data/docs/CallBasicData.md +25 -0
  22. data/docs/CallCollaboration.md +7 -0
  23. data/docs/CallContent.md +11 -0
  24. data/docs/CallContext.md +8 -0
  25. data/docs/CallInteraction.md +10 -0
  26. data/docs/CallParticipant.md +13 -0
  27. data/docs/CallReference.md +9 -0
  28. data/docs/CallTranscript.md +8 -0
  29. data/docs/CallTranscripts.md +9 -0
  30. data/docs/CallUploadContext.md +8 -0
  31. data/docs/CallUsersAccessDto.md +8 -0
  32. data/docs/Calls.md +9 -0
  33. data/docs/CallsAccessDetailsResponse.md +8 -0
  34. data/docs/CallsAccessGetDto.md +7 -0
  35. data/docs/CallsApi.md +349 -0
  36. data/docs/CallsFilter.md +10 -0
  37. data/docs/CallsRequestFilterWithOwners.md +11 -0
  38. data/docs/CallsResponse.md +9 -0
  39. data/docs/CallsUsersAccessAddDto.md +7 -0
  40. data/docs/CallsUsersAccessDeleteDto.md +7 -0
  41. data/docs/CoachingAccessWithPermissionLevel.md +8 -0
  42. data/docs/Collaboration.md +7 -0
  43. data/docs/Comment.md +14 -0
  44. data/docs/CompanyUsersAggregateActivityResponse.md +12 -0
  45. data/docs/CompanyUsersIntercationStatsResponse.md +12 -0
  46. data/docs/Content.md +10 -0
  47. data/docs/ContentSelector.md +9 -0
  48. data/docs/ContentSharedEvent.md +23 -0
  49. data/docs/ContentViewedEvent.md +23 -0
  50. data/docs/ContextField.md +8 -0
  51. data/docs/CrmPartyContextField.md +8 -0
  52. data/docs/CustomActionEvent.md +22 -0
  53. data/docs/CustomerData.md +8 -0
  54. data/docs/CustomerDataObject.md +11 -0
  55. data/docs/CustomerEngagement.md +13 -0
  56. data/docs/DailyActivityWithDates.md +23 -0
  57. data/docs/DataPrivacyApi.md +195 -0
  58. data/docs/DealsAccessWithPermissionLevel.md +8 -0
  59. data/docs/DeleteMeetingRequest.md +7 -0
  60. data/docs/EmailAddressReferences.md +12 -0
  61. data/docs/EmailMessage.md +11 -0
  62. data/docs/EmailsAccessWithPermissionLevel.md +8 -0
  63. data/docs/EngagementInBetaPhaseApi.md +148 -0
  64. data/docs/ErrorResponse.md +8 -0
  65. data/docs/EventAcceptedResponse.md +7 -0
  66. data/docs/ExposedFields.md +11 -0
  67. data/docs/ExternalCallObject.md +10 -0
  68. data/docs/ExternalCrmCallObject.md +9 -0
  69. data/docs/ExternalCrmPartyObject.md +9 -0
  70. data/docs/ExternalPartyObject.md +10 -0
  71. data/docs/ExternalSystem.md +8 -0
  72. data/docs/ExternalSystemObject.md +8 -0
  73. data/docs/ForecastAccessWithPermissionLevel.md +8 -0
  74. data/docs/GenericCrmIntegration.md +9 -0
  75. data/docs/GenericCrmRegistrationRequest.md +8 -0
  76. data/docs/GenericDealStageRequest.md +10 -0
  77. data/docs/GenericProperty.md +9 -0
  78. data/docs/GenericSchemaFieldRequest.md +14 -0
  79. data/docs/GetGenericCrmObjectsResponse.md +8 -0
  80. data/docs/IdMediaBody.md +7 -0
  81. data/docs/InsightsAccessWithPermissionLevel.md +8 -0
  82. data/docs/IntegrationStatusRequest.md +7 -0
  83. data/docs/IntegrationStatusResponse.md +8 -0
  84. data/docs/Interaction.md +10 -0
  85. data/docs/InteractionStat.md +8 -0
  86. data/docs/InteractionStats.md +9 -0
  87. data/docs/LibraryApi.md +103 -0
  88. data/docs/LibraryCall.md +13 -0
  89. data/docs/LibraryFolder.md +11 -0
  90. data/docs/LibraryFolderAccess.md +11 -0
  91. data/docs/LibraryFolderListOfCallsResponse.md +12 -0
  92. data/docs/LibraryResponse.md +8 -0
  93. data/docs/LineErrorResponse.md +8 -0
  94. data/docs/ListGenericCrmIntegrationsResponse.md +8 -0
  95. data/docs/ListSelectedFieldsResponse.md +8 -0
  96. data/docs/LogEntry.md +15 -0
  97. data/docs/LogsResponse.md +9 -0
  98. data/docs/ManualAssociationResponse.md +9 -0
  99. data/docs/ManualAssociationsBasicData.md +10 -0
  100. data/docs/MapUsersBody.md +7 -0
  101. data/docs/Media.md +8 -0
  102. data/docs/Meeting.md +7 -0
  103. data/docs/MeetingInvitee.md +10 -0
  104. data/docs/MeetingsErrorResponse.md +11 -0
  105. data/docs/MeetingsInBetaPhaseApi.md +199 -0
  106. data/docs/Monologue.md +9 -0
  107. data/docs/MultipleUsersRequestWithCreationDates.md +10 -0
  108. data/docs/MultipleUsersWithDates.md +9 -0
  109. data/docs/NewCallAddingRequest.md +25 -0
  110. data/docs/NewCallAddingResponse.md +8 -0
  111. data/docs/NewCallRecordingResponse.md +9 -0
  112. data/docs/NewMeetingRequest.md +12 -0
  113. data/docs/NewMeetingResponse.md +10 -0
  114. data/docs/ObjectEntitiesBody.md +7 -0
  115. data/docs/Occurrences.md +8 -0
  116. data/docs/Party.md +16 -0
  117. data/docs/PartyContext.md +8 -0
  118. data/docs/PartyContextField.md +8 -0
  119. data/docs/PartyUploadContext.md +8 -0
  120. data/docs/PermissionProfileDTO.md +41 -0
  121. data/docs/PermissionProfileResponse.md +8 -0
  122. data/docs/PermissionProfileUsersResponse.md +8 -0
  123. data/docs/PermissionProfilesResponse.md +8 -0
  124. data/docs/PermissionsApi.md +387 -0
  125. data/docs/PhoneNumberReferences.md +14 -0
  126. data/docs/PointOfInterest.md +10 -0
  127. data/docs/PointsOfInterest.md +7 -0
  128. data/docs/Question.md +13 -0
  129. data/docs/Questions.md +8 -0
  130. data/docs/Records.md +10 -0
  131. data/docs/RegisterGenericCrmResponse.md +8 -0
  132. data/docs/RequestAnsweredScorecardsFilter.md +8 -0
  133. data/docs/RequestCallsAccessGetDto.md +7 -0
  134. data/docs/RequestCallsFilter.md +8 -0
  135. data/docs/RequestCallsRequestFilterWithOwnersContentSelector.md +9 -0
  136. data/docs/RequestMultipleUsersRequestWithCreationDates.md +8 -0
  137. data/docs/RequestMultipleUsersWithDates.md +8 -0
  138. data/docs/RequestStatusResponse.md +11 -0
  139. data/docs/RequestWithTimePeriodMultipleUsersWithDates.md +9 -0
  140. data/docs/SchemaUpdateResponse.md +7 -0
  141. data/docs/Scorecard.md +14 -0
  142. data/docs/Scorecards.md +8 -0
  143. data/docs/Sentence.md +9 -0
  144. data/docs/Settings.md +12 -0
  145. data/docs/SettingsApi.md +91 -0
  146. data/docs/SettingsHistory.md +8 -0
  147. data/docs/Sharer.md +9 -0
  148. data/docs/Snippet.md +8 -0
  149. data/docs/Speaker.md +9 -0
  150. data/docs/SpeakersTimeline.md +8 -0
  151. data/docs/SpecificCall.md +8 -0
  152. data/docs/SpeechSegment.md +9 -0
  153. data/docs/SpokenLanguage.md +8 -0
  154. data/docs/StatsApi.md +242 -0
  155. data/docs/Structure.md +8 -0
  156. data/docs/Topic.md +8 -0
  157. data/docs/Tracker.md +12 -0
  158. data/docs/TrackerPhrases.md +9 -0
  159. data/docs/UpdateMeetingRequest.md +12 -0
  160. data/docs/UpdateMeetingResponse.md +8 -0
  161. data/docs/User.md +8 -0
  162. data/docs/UserAccessDetails.md +7 -0
  163. data/docs/UserActivity.md +9 -0
  164. data/docs/UserAggregateByPeriodActivities.md +9 -0
  165. data/docs/UserDayByDayActivity.md +9 -0
  166. data/docs/UserIntegrationStatus.md +12 -0
  167. data/docs/UserMetadata.md +21 -0
  168. data/docs/UserSettingsHistory.md +9 -0
  169. data/docs/UserSimpleMetadata.md +9 -0
  170. data/docs/UsersAggregateByPeriodActivity.md +9 -0
  171. data/docs/UsersApi.md +198 -0
  172. data/docs/UsersDayByDayActivity.md +9 -0
  173. data/docs/UsersMetadata.md +9 -0
  174. data/docs/Video.md +8 -0
  175. data/docs/WorkspaceMetadata.md +9 -0
  176. data/docs/WorkspacesMetadata.md +8 -0
  177. data/git_push.sh +55 -0
  178. data/gong-swagger.json +1 -0
  179. data/gong_api.gemspec +38 -0
  180. data/lib/gong_api/api/auditing_api.rb +94 -0
  181. data/lib/gong_api/api/calls_api.rb +437 -0
  182. data/lib/gong_api/api/crm_api.rb +651 -0
  183. data/lib/gong_api/api/data_privacy_api.rb +248 -0
  184. data/lib/gong_api/api/engagement_in_beta_phase_api.rb +194 -0
  185. data/lib/gong_api/api/library_api.rb +126 -0
  186. data/lib/gong_api/api/meetings_in_beta_phase_api.rb +264 -0
  187. data/lib/gong_api/api/permissions_api.rb +495 -0
  188. data/lib/gong_api/api/settings_api.rb +120 -0
  189. data/lib/gong_api/api/stats_api.rb +310 -0
  190. data/lib/gong_api/api/users_api.rb +246 -0
  191. data/lib/gong_api/api_client.rb +387 -0
  192. data/lib/gong_api/api_error.rb +57 -0
  193. data/lib/gong_api/configuration.rb +198 -0
  194. data/lib/gong_api/models/actor.rb +239 -0
  195. data/lib/gong_api/models/aggregate_activity.rb +348 -0
  196. data/lib/gong_api/models/aggregate_activity_with_dates.rb +368 -0
  197. data/lib/gong_api/models/answer.rb +257 -0
  198. data/lib/gong_api/models/answered_scorecard.rb +332 -0
  199. data/lib/gong_api/models/answered_scorecards.rb +228 -0
  200. data/lib/gong_api/models/answered_scorecards_filter.rb +258 -0
  201. data/lib/gong_api/models/association_object.rb +217 -0
  202. data/lib/gong_api/models/async_processing_response.rb +217 -0
  203. data/lib/gong_api/models/base_response.rb +207 -0
  204. data/lib/gong_api/models/call.rb +267 -0
  205. data/lib/gong_api/models/call_access_details.rb +220 -0
  206. data/lib/gong_api/models/call_access_with_permission_level.rb +254 -0
  207. data/lib/gong_api/models/call_basic_data.rb +446 -0
  208. data/lib/gong_api/models/call_collaboration.rb +208 -0
  209. data/lib/gong_api/models/call_content.rb +248 -0
  210. data/lib/gong_api/models/call_context.rb +254 -0
  211. data/lib/gong_api/models/call_interaction.rb +238 -0
  212. data/lib/gong_api/models/call_participant.rb +269 -0
  213. data/lib/gong_api/models/call_reference.rb +230 -0
  214. data/lib/gong_api/models/call_transcript.rb +219 -0
  215. data/lib/gong_api/models/call_transcripts.rb +228 -0
  216. data/lib/gong_api/models/call_upload_context.rb +259 -0
  217. data/lib/gong_api/models/call_users_access_dto.rb +228 -0
  218. data/lib/gong_api/models/calls.rb +228 -0
  219. data/lib/gong_api/models/calls_access_details_response.rb +219 -0
  220. data/lib/gong_api/models/calls_access_get_dto.rb +212 -0
  221. data/lib/gong_api/models/calls_filter.rb +238 -0
  222. data/lib/gong_api/models/calls_request_filter_with_owners.rb +248 -0
  223. data/lib/gong_api/models/calls_response.rb +228 -0
  224. data/lib/gong_api/models/calls_users_access_add_dto.rb +209 -0
  225. data/lib/gong_api/models/calls_users_access_delete_dto.rb +209 -0
  226. data/lib/gong_api/models/coaching_access_with_permission_level.rb +254 -0
  227. data/lib/gong_api/models/collaboration.rb +210 -0
  228. data/lib/gong_api/models/comment.rb +277 -0
  229. data/lib/gong_api/models/company_users_aggregate_activity_response.rb +258 -0
  230. data/lib/gong_api/models/company_users_intercation_stats_response.rb +258 -0
  231. data/lib/gong_api/models/content.rb +243 -0
  232. data/lib/gong_api/models/content_selector.rb +263 -0
  233. data/lib/gong_api/models/content_shared_event.rb +400 -0
  234. data/lib/gong_api/models/content_viewed_event.rb +432 -0
  235. data/lib/gong_api/models/context_field.rb +218 -0
  236. data/lib/gong_api/models/crm_party_context_field.rb +218 -0
  237. data/lib/gong_api/models/custom_action_event.rb +407 -0
  238. data/lib/gong_api/models/customer_data.rb +253 -0
  239. data/lib/gong_api/models/customer_data_object.rb +283 -0
  240. data/lib/gong_api/models/customer_engagement.rb +301 -0
  241. data/lib/gong_api/models/daily_activity_with_dates.rb +368 -0
  242. data/lib/gong_api/models/deals_access_with_permission_level.rb +254 -0
  243. data/lib/gong_api/models/delete_meeting_request.rb +208 -0
  244. data/lib/gong_api/models/email_address_references.rb +267 -0
  245. data/lib/gong_api/models/email_message.rb +247 -0
  246. data/lib/gong_api/models/emails_access_with_permission_level.rb +254 -0
  247. data/lib/gong_api/models/error_response.rb +217 -0
  248. data/lib/gong_api/models/event_accepted_response.rb +207 -0
  249. data/lib/gong_api/models/exposed_fields.rb +245 -0
  250. data/lib/gong_api/models/external_call_object.rb +286 -0
  251. data/lib/gong_api/models/external_crm_call_object.rb +274 -0
  252. data/lib/gong_api/models/external_crm_party_object.rb +274 -0
  253. data/lib/gong_api/models/external_party_object.rb +286 -0
  254. data/lib/gong_api/models/external_system.rb +253 -0
  255. data/lib/gong_api/models/external_system_object.rb +251 -0
  256. data/lib/gong_api/models/forecast_access_with_permission_level.rb +254 -0
  257. data/lib/gong_api/models/generic_crm_integration.rb +227 -0
  258. data/lib/gong_api/models/generic_crm_registration_request.rb +227 -0
  259. data/lib/gong_api/models/generic_deal_stage_request.rb +257 -0
  260. data/lib/gong_api/models/generic_property.rb +276 -0
  261. data/lib/gong_api/models/generic_schema_field_request.rb +328 -0
  262. data/lib/gong_api/models/get_generic_crm_objects_response.rb +219 -0
  263. data/lib/gong_api/models/id_media_body.rb +206 -0
  264. data/lib/gong_api/models/insights_access_with_permission_level.rb +254 -0
  265. data/lib/gong_api/models/integration_status_request.rb +209 -0
  266. data/lib/gong_api/models/integration_status_response.rb +219 -0
  267. data/lib/gong_api/models/interaction.rb +243 -0
  268. data/lib/gong_api/models/interaction_stat.rb +217 -0
  269. data/lib/gong_api/models/interaction_stats.rb +228 -0
  270. data/lib/gong_api/models/library_call.rb +267 -0
  271. data/lib/gong_api/models/library_folder.rb +248 -0
  272. data/lib/gong_api/models/library_folder_access.rb +284 -0
  273. data/lib/gong_api/models/library_folder_list_of_calls_response.rb +259 -0
  274. data/lib/gong_api/models/library_response.rb +219 -0
  275. data/lib/gong_api/models/line_error_response.rb +217 -0
  276. data/lib/gong_api/models/list_generic_crm_integrations_response.rb +219 -0
  277. data/lib/gong_api/models/list_selected_fields_response.rb +219 -0
  278. data/lib/gong_api/models/log_entry.rb +287 -0
  279. data/lib/gong_api/models/logs_response.rb +228 -0
  280. data/lib/gong_api/models/manual_association_response.rb +228 -0
  281. data/lib/gong_api/models/manual_associations_basic_data.rb +240 -0
  282. data/lib/gong_api/models/map_users_body.rb +206 -0
  283. data/lib/gong_api/models/media.rb +218 -0
  284. data/lib/gong_api/models/meeting.rb +207 -0
  285. data/lib/gong_api/models/meeting_invitee.rb +237 -0
  286. data/lib/gong_api/models/meetings_error_response.rb +247 -0
  287. data/lib/gong_api/models/monologue.rb +229 -0
  288. data/lib/gong_api/models/multiple_users_request_with_creation_dates.rb +238 -0
  289. data/lib/gong_api/models/multiple_users_with_dates.rb +238 -0
  290. data/lib/gong_api/models/new_call_adding_request.rb +450 -0
  291. data/lib/gong_api/models/new_call_adding_response.rb +217 -0
  292. data/lib/gong_api/models/new_call_recording_response.rb +227 -0
  293. data/lib/gong_api/models/new_meeting_request.rb +265 -0
  294. data/lib/gong_api/models/new_meeting_response.rb +239 -0
  295. data/lib/gong_api/models/object_entities_body.rb +206 -0
  296. data/lib/gong_api/models/occurrences.rb +217 -0
  297. data/lib/gong_api/models/party.rb +335 -0
  298. data/lib/gong_api/models/party_context.rb +254 -0
  299. data/lib/gong_api/models/party_context_field.rb +218 -0
  300. data/lib/gong_api/models/party_upload_context.rb +259 -0
  301. data/lib/gong_api/models/permission_profile_dto.rb +541 -0
  302. data/lib/gong_api/models/permission_profile_response.rb +216 -0
  303. data/lib/gong_api/models/permission_profile_users_response.rb +219 -0
  304. data/lib/gong_api/models/permission_profiles_response.rb +219 -0
  305. data/lib/gong_api/models/phone_number_references.rb +289 -0
  306. data/lib/gong_api/models/point_of_interest.rb +237 -0
  307. data/lib/gong_api/models/points_of_interest.rb +210 -0
  308. data/lib/gong_api/models/question.rb +267 -0
  309. data/lib/gong_api/models/questions.rb +218 -0
  310. data/lib/gong_api/models/records.rb +238 -0
  311. data/lib/gong_api/models/register_generic_crm_response.rb +217 -0
  312. data/lib/gong_api/models/request_answered_scorecards_filter.rb +216 -0
  313. data/lib/gong_api/models/request_calls_access_get_dto.rb +206 -0
  314. data/lib/gong_api/models/request_calls_filter.rb +216 -0
  315. data/lib/gong_api/models/request_calls_request_filter_with_owners_content_selector.rb +225 -0
  316. data/lib/gong_api/models/request_multiple_users_request_with_creation_dates.rb +216 -0
  317. data/lib/gong_api/models/request_multiple_users_with_dates.rb +216 -0
  318. data/lib/gong_api/models/request_status_response.rb +282 -0
  319. data/lib/gong_api/models/request_with_time_period_multiple_users_with_dates.rb +265 -0
  320. data/lib/gong_api/models/schema_update_response.rb +207 -0
  321. data/lib/gong_api/models/scorecard.rb +279 -0
  322. data/lib/gong_api/models/scorecards.rb +219 -0
  323. data/lib/gong_api/models/sentence.rb +227 -0
  324. data/lib/gong_api/models/settings.rb +258 -0
  325. data/lib/gong_api/models/settings_history.rb +219 -0
  326. data/lib/gong_api/models/sharer.rb +227 -0
  327. data/lib/gong_api/models/snippet.rb +218 -0
  328. data/lib/gong_api/models/speaker.rb +228 -0
  329. data/lib/gong_api/models/speakers_timeline.rb +219 -0
  330. data/lib/gong_api/models/specific_call.rb +216 -0
  331. data/lib/gong_api/models/speech_segment.rb +244 -0
  332. data/lib/gong_api/models/spoken_language.rb +218 -0
  333. data/lib/gong_api/models/structure.rb +218 -0
  334. data/lib/gong_api/models/topic.rb +217 -0
  335. data/lib/gong_api/models/tracker.rb +295 -0
  336. data/lib/gong_api/models/tracker_phrases.rb +229 -0
  337. data/lib/gong_api/models/update_meeting_request.rb +265 -0
  338. data/lib/gong_api/models/update_meeting_response.rb +217 -0
  339. data/lib/gong_api/models/user.rb +216 -0
  340. data/lib/gong_api/models/user_access_details.rb +208 -0
  341. data/lib/gong_api/models/user_activity.rb +226 -0
  342. data/lib/gong_api/models/user_aggregate_by_period_activities.rb +229 -0
  343. data/lib/gong_api/models/user_day_by_day_activity.rb +229 -0
  344. data/lib/gong_api/models/user_integration_status.rb +257 -0
  345. data/lib/gong_api/models/user_metadata.rb +347 -0
  346. data/lib/gong_api/models/user_settings_history.rb +261 -0
  347. data/lib/gong_api/models/user_simple_metadata.rb +227 -0
  348. data/lib/gong_api/models/users_aggregate_by_period_activity.rb +228 -0
  349. data/lib/gong_api/models/users_day_by_day_activity.rb +228 -0
  350. data/lib/gong_api/models/users_metadata.rb +228 -0
  351. data/lib/gong_api/models/video.rb +218 -0
  352. data/lib/gong_api/models/workspace_metadata.rb +227 -0
  353. data/lib/gong_api/models/workspaces_metadata.rb +219 -0
  354. data/lib/gong_api/version.rb +14 -0
  355. data/lib/gong_api.rb +209 -0
  356. data/spec/api/auditing_api_spec.rb +49 -0
  357. data/spec/api/calls_api_spec.rb +123 -0
  358. data/spec/api/crm_api_spec.rb +161 -0
  359. data/spec/api/data_privacy_api_spec.rb +82 -0
  360. data/spec/api/engagement_in_beta_phase_api_spec.rb +70 -0
  361. data/spec/api/library_api_spec.rb +58 -0
  362. data/spec/api/meetings_in_beta_phase_api_spec.rb +84 -0
  363. data/spec/api/permissions_api_spec.rb +132 -0
  364. data/spec/api/settings_api_spec.rb +56 -0
  365. data/spec/api/stats_api_spec.rb +94 -0
  366. data/spec/api/users_api_spec.rb +83 -0
  367. data/spec/api_client_spec.rb +225 -0
  368. data/spec/base_object_spec.rb +109 -0
  369. data/spec/configuration_spec.rb +41 -0
  370. data/spec/models/actor_spec.rb +58 -0
  371. data/spec/models/aggregate_activity_spec.rb +124 -0
  372. data/spec/models/aggregate_activity_with_dates_spec.rb +136 -0
  373. data/spec/models/answer_spec.rb +70 -0
  374. data/spec/models/answered_scorecard_spec.rb +98 -0
  375. data/spec/models/answered_scorecards_filter_spec.rb +70 -0
  376. data/spec/models/answered_scorecards_spec.rb +52 -0
  377. data/spec/models/association_object_spec.rb +46 -0
  378. data/spec/models/async_processing_response_spec.rb +46 -0
  379. data/spec/models/base_response_spec.rb +40 -0
  380. data/spec/models/call_access_details_spec.rb +46 -0
  381. data/spec/models/call_access_with_permission_level_spec.rb +50 -0
  382. data/spec/models/call_basic_data_spec.rb +160 -0
  383. data/spec/models/call_collaboration_spec.rb +40 -0
  384. data/spec/models/call_content_spec.rb +64 -0
  385. data/spec/models/call_context_spec.rb +50 -0
  386. data/spec/models/call_interaction_spec.rb +58 -0
  387. data/spec/models/call_participant_spec.rb +76 -0
  388. data/spec/models/call_reference_spec.rb +52 -0
  389. data/spec/models/call_spec.rb +76 -0
  390. data/spec/models/call_transcript_spec.rb +46 -0
  391. data/spec/models/call_transcripts_spec.rb +52 -0
  392. data/spec/models/call_upload_context_spec.rb +50 -0
  393. data/spec/models/call_users_access_dto_spec.rb +46 -0
  394. data/spec/models/calls_access_details_response_spec.rb +46 -0
  395. data/spec/models/calls_access_get_dto_spec.rb +40 -0
  396. data/spec/models/calls_filter_spec.rb +58 -0
  397. data/spec/models/calls_request_filter_with_owners_spec.rb +64 -0
  398. data/spec/models/calls_response_spec.rb +52 -0
  399. data/spec/models/calls_spec.rb +52 -0
  400. data/spec/models/calls_users_access_add_dto_spec.rb +40 -0
  401. data/spec/models/calls_users_access_delete_dto_spec.rb +40 -0
  402. data/spec/models/coaching_access_with_permission_level_spec.rb +50 -0
  403. data/spec/models/collaboration_spec.rb +40 -0
  404. data/spec/models/comment_spec.rb +82 -0
  405. data/spec/models/company_users_aggregate_activity_response_spec.rb +70 -0
  406. data/spec/models/company_users_intercation_stats_response_spec.rb +70 -0
  407. data/spec/models/content_selector_spec.rb +60 -0
  408. data/spec/models/content_shared_event_spec.rb +136 -0
  409. data/spec/models/content_spec.rb +58 -0
  410. data/spec/models/content_viewed_event_spec.rb +140 -0
  411. data/spec/models/context_field_spec.rb +46 -0
  412. data/spec/models/crm_party_context_field_spec.rb +46 -0
  413. data/spec/models/custom_action_event_spec.rb +134 -0
  414. data/spec/models/customer_data_object_spec.rb +68 -0
  415. data/spec/models/customer_data_spec.rb +50 -0
  416. data/spec/models/customer_engagement_spec.rb +80 -0
  417. data/spec/models/daily_activity_with_dates_spec.rb +136 -0
  418. data/spec/models/deals_access_with_permission_level_spec.rb +50 -0
  419. data/spec/models/delete_meeting_request_spec.rb +40 -0
  420. data/spec/models/email_address_references_spec.rb +70 -0
  421. data/spec/models/email_message_spec.rb +64 -0
  422. data/spec/models/emails_access_with_permission_level_spec.rb +50 -0
  423. data/spec/models/error_response_spec.rb +46 -0
  424. data/spec/models/event_accepted_response_spec.rb +40 -0
  425. data/spec/models/exposed_fields_spec.rb +64 -0
  426. data/spec/models/external_call_object_spec.rb +66 -0
  427. data/spec/models/external_crm_call_object_spec.rb +56 -0
  428. data/spec/models/external_crm_party_object_spec.rb +56 -0
  429. data/spec/models/external_party_object_spec.rb +66 -0
  430. data/spec/models/external_system_object_spec.rb +50 -0
  431. data/spec/models/external_system_spec.rb +50 -0
  432. data/spec/models/forecast_access_with_permission_level_spec.rb +50 -0
  433. data/spec/models/generic_crm_integration_spec.rb +52 -0
  434. data/spec/models/generic_crm_registration_request_spec.rb +46 -0
  435. data/spec/models/generic_deal_stage_request_spec.rb +58 -0
  436. data/spec/models/generic_property_spec.rb +56 -0
  437. data/spec/models/generic_schema_field_request_spec.rb +86 -0
  438. data/spec/models/get_generic_crm_objects_response_spec.rb +46 -0
  439. data/spec/models/id_media_body_spec.rb +40 -0
  440. data/spec/models/insights_access_with_permission_level_spec.rb +50 -0
  441. data/spec/models/integration_status_request_spec.rb +40 -0
  442. data/spec/models/integration_status_response_spec.rb +46 -0
  443. data/spec/models/interaction_spec.rb +58 -0
  444. data/spec/models/interaction_stat_spec.rb +46 -0
  445. data/spec/models/interaction_stats_spec.rb +52 -0
  446. data/spec/models/library_call_spec.rb +76 -0
  447. data/spec/models/library_folder_access_spec.rb +68 -0
  448. data/spec/models/library_folder_list_of_calls_response_spec.rb +70 -0
  449. data/spec/models/library_folder_spec.rb +64 -0
  450. data/spec/models/library_response_spec.rb +46 -0
  451. data/spec/models/line_error_response_spec.rb +46 -0
  452. data/spec/models/list_generic_crm_integrations_response_spec.rb +46 -0
  453. data/spec/models/list_selected_fields_response_spec.rb +46 -0
  454. data/spec/models/log_entry_spec.rb +88 -0
  455. data/spec/models/logs_response_spec.rb +52 -0
  456. data/spec/models/manual_association_response_spec.rb +52 -0
  457. data/spec/models/manual_associations_basic_data_spec.rb +58 -0
  458. data/spec/models/map_users_body_spec.rb +40 -0
  459. data/spec/models/media_spec.rb +46 -0
  460. data/spec/models/meeting_invitee_spec.rb +58 -0
  461. data/spec/models/meeting_spec.rb +40 -0
  462. data/spec/models/meetings_error_response_spec.rb +64 -0
  463. data/spec/models/monologue_spec.rb +52 -0
  464. data/spec/models/multiple_users_request_with_creation_dates_spec.rb +58 -0
  465. data/spec/models/multiple_users_with_dates_spec.rb +52 -0
  466. data/spec/models/new_call_adding_request_spec.rb +152 -0
  467. data/spec/models/new_call_adding_response_spec.rb +46 -0
  468. data/spec/models/new_call_recording_response_spec.rb +52 -0
  469. data/spec/models/new_meeting_request_spec.rb +70 -0
  470. data/spec/models/new_meeting_response_spec.rb +58 -0
  471. data/spec/models/object_entities_body_spec.rb +40 -0
  472. data/spec/models/occurrences_spec.rb +46 -0
  473. data/spec/models/party_context_field_spec.rb +46 -0
  474. data/spec/models/party_context_spec.rb +50 -0
  475. data/spec/models/party_spec.rb +102 -0
  476. data/spec/models/party_upload_context_spec.rb +50 -0
  477. data/spec/models/permission_profile_dto_spec.rb +244 -0
  478. data/spec/models/permission_profile_response_spec.rb +46 -0
  479. data/spec/models/permission_profile_users_response_spec.rb +46 -0
  480. data/spec/models/permission_profiles_response_spec.rb +46 -0
  481. data/spec/models/phone_number_references_spec.rb +82 -0
  482. data/spec/models/point_of_interest_spec.rb +58 -0
  483. data/spec/models/points_of_interest_spec.rb +40 -0
  484. data/spec/models/question_spec.rb +76 -0
  485. data/spec/models/questions_spec.rb +46 -0
  486. data/spec/models/records_spec.rb +58 -0
  487. data/spec/models/register_generic_crm_response_spec.rb +46 -0
  488. data/spec/models/request_answered_scorecards_filter_spec.rb +46 -0
  489. data/spec/models/request_calls_access_get_dto_spec.rb +40 -0
  490. data/spec/models/request_calls_filter_spec.rb +46 -0
  491. data/spec/models/request_calls_request_filter_with_owners_content_selector_spec.rb +52 -0
  492. data/spec/models/request_multiple_users_request_with_creation_dates_spec.rb +46 -0
  493. data/spec/models/request_multiple_users_with_dates_spec.rb +46 -0
  494. data/spec/models/request_status_response_spec.rb +68 -0
  495. data/spec/models/request_with_time_period_multiple_users_with_dates_spec.rb +56 -0
  496. data/spec/models/schema_update_response_spec.rb +40 -0
  497. data/spec/models/scorecard_spec.rb +82 -0
  498. data/spec/models/scorecards_spec.rb +46 -0
  499. data/spec/models/sentence_spec.rb +52 -0
  500. data/spec/models/settings_history_spec.rb +46 -0
  501. data/spec/models/settings_spec.rb +70 -0
  502. data/spec/models/sharer_spec.rb +52 -0
  503. data/spec/models/snippet_spec.rb +46 -0
  504. data/spec/models/speaker_spec.rb +52 -0
  505. data/spec/models/speakers_timeline_spec.rb +46 -0
  506. data/spec/models/specific_call_spec.rb +46 -0
  507. data/spec/models/speech_segment_spec.rb +52 -0
  508. data/spec/models/spoken_language_spec.rb +46 -0
  509. data/spec/models/structure_spec.rb +46 -0
  510. data/spec/models/topic_spec.rb +46 -0
  511. data/spec/models/tracker_phrases_spec.rb +52 -0
  512. data/spec/models/tracker_spec.rb +74 -0
  513. data/spec/models/update_meeting_request_spec.rb +70 -0
  514. data/spec/models/update_meeting_response_spec.rb +46 -0
  515. data/spec/models/user_access_details_spec.rb +40 -0
  516. data/spec/models/user_activity_spec.rb +52 -0
  517. data/spec/models/user_aggregate_by_period_activities_spec.rb +52 -0
  518. data/spec/models/user_day_by_day_activity_spec.rb +52 -0
  519. data/spec/models/user_integration_status_spec.rb +70 -0
  520. data/spec/models/user_metadata_spec.rb +124 -0
  521. data/spec/models/user_settings_history_spec.rb +56 -0
  522. data/spec/models/user_simple_metadata_spec.rb +52 -0
  523. data/spec/models/user_spec.rb +46 -0
  524. data/spec/models/users_aggregate_by_period_activity_spec.rb +52 -0
  525. data/spec/models/users_day_by_day_activity_spec.rb +52 -0
  526. data/spec/models/users_metadata_spec.rb +52 -0
  527. data/spec/models/video_spec.rb +46 -0
  528. data/spec/models/workspace_metadata_spec.rb +52 -0
  529. data/spec/models/workspaces_metadata_spec.rb +46 -0
  530. data/spec/spec_helper.rb +110 -0
  531. metadata +807 -0
@@ -0,0 +1,123 @@
1
+ =begin
2
+ #Gong API
3
+
4
+ #<h2>Overview</h2> <p> The Gong API allows you to: </p> <ol> <li> Receive the following information from Gong: <ol type=\"a\"> <li> Your company's <a href=\"#tag--Calls\">calls</a> in Gong </li> <li> Your company's <a href=\"#tag--Users\">users</a> in Gong </li> <li> Your company's user <a href=\"#tag--Stats\">stats</a> in Gong </li> <li> Your company's user <a href=\"#tag--Settings\">settings</a> in Gong </li> <li> Your company's <a href=\"#tag--Library\">libraries</a> in Gong </li> </ol></li> <li> <a href=\"#post-/v2/calls\">Upload</a> new or <a href=\"#put-/v2/calls/-id-/media\">update</a> call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity. </li> <li> <a href=\"#post-/v2/data-privacy/erase-data-for-email-address\">Data Privacy</a>: Delete users and all their associated elements.</li> <li> Upload <a href=\"#tag--CRM\">CRM</a> data into Gong. </li> </ol> <p>Base URL for all API calls is <a href=\"https://us-55616.api.gong.io\"> https://us-55616.api.gong.io </a> </p> <h2>Authentication</h2> <p> There are two ways to retrieve credentials to the Gong Public API: </p> <ol><li>Retrieve Manually:<br> <p> In the <a href=\"https://app.gong.io/company/api\">Gong API Page</a> (you must be a technical administrator in Gong), click \"Create\" to receive an <b>Access Key</b> and an <b>Access Key Secret</b>.<br> </p> <p> Use the Basic Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc7617.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Basic &lt;token&gt;</code><br> </p> <p> To create the basic token, combine the <b>Access Key</b> and the <b>Access Key Secret</b> with colon (:) and then encode in Base64 as following:<br> <code>Base64(&lt;accessKey&gt; : &lt;accessKeySecret&gt;)</code><br><br> </p></li> <li>Retrieve through OAuth<br> <p> To obtain the Bearer token, follow the steps described in the <a target=\"_blank\" href=\"https://help.gong.io/hc/en-us/articles/360056677792\">Gong OAuth Guide</a>. <br></p> <p> After obtaining the token, use the Bearer Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc6750.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Bearer &lt;token&gt;</code> </p> </li></ol> <h2>Limits</h2> <p> By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day. </p> <p> When the rate of API calls exceeds these limits an HTTP status code <b>429</b> is returned and a <b>Retry-After</b> header indicates how many seconds to wait before making a new request. </p><p> If required, contact help@gong.io to change these limits. </p> <h2>Cursors</h2> <p> Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a <b>records</b> field, which contains the number of records in the current page, the current page number and the total number of records. </p> <p> In cases where the total number of records exceeds the number of records thus far retrieved, the <b>records</b> field will also contain a <b>cursor</b> field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the <b>cursor</b> value as supplied by the previous API call. All other request inputs should remain the same. </p> <h2>Forward Compatibility</h2> <p> When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use. </p><p></p>
5
+
6
+ OpenAPI spec version: V2
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.37
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for GongAPI::CallsApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'CallsApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = GongAPI::CallsApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of CallsApi' do
29
+ it 'should create an instance of CallsApi' do
30
+ expect(@instance).to be_instance_of(GongAPI::CallsApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for add_call_recording_using_put
35
+ # Add call media (/v2/calls/{id}/media)
36
+ # Adds a call media, recorded by a telephony system (PBX) or other media recording facility. Gong accepts call recordings in various audio and video file formats, including WAV, MP3, MP4, MKV and FLAC. If uploading a dual-channel (stereo) file separated by speaker, make sure to specify which channel correspondsto the company team member (rep) in the parties/mediaChannelId parameter of the Add New Call operation. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:create&#x27;.
37
+ # @param id callId returned from &#x27;Add New Call&#x27; request
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :media_file
40
+ # @return [NewCallRecordingResponse]
41
+ describe 'add_call_recording_using_put test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for add_call_using_post
48
+ # Add new call (/v2/calls)
49
+ # When using this endpoint, either provide a downloadMediaUrl or use the returned callId in a follow-up request to /v2/calls/{id}/media to upload the media file. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:create&#x27;.
50
+ # @param body newCallAddingRequest
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [NewCallAddingResponse]
53
+ describe 'add_call_using_post test' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for get_call_transcripts_using_post
60
+ # Retrieve transcripts of calls by date or callIds (/v2/calls/transcript)
61
+ # Lists the transcripts of calls that took place during a specified date range and have specified callIds. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:read:transcript&#x27;.
62
+ # @param body callsRequest
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [CallTranscripts]
65
+ describe 'get_call_transcripts_using_post test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for get_call_using_get
72
+ # Retrieve data for a specific call (/v2/calls/{id})
73
+ # Retrieve data for a specific call. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:read:basic&#x27;.
74
+ # @param id Gong&#x27;s unique numeric identifier for the call (up to 20 digits).
75
+ # @param [Hash] opts the optional parameters
76
+ # @return [SpecificCall]
77
+ describe 'get_call_using_get test' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ # unit tests for list_calls_extensive_using_post
84
+ # Retrieve detailed call data by various filters (/v2/calls/extensive)
85
+ # Lists detailed call data for calls that took place during a specified date range, have specified call IDs or hosted by specified users. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:read:extensive&#x27;. Moreover, clients requesting media download URLs by the contentSelector.exposedFields.media field should also have the scope &#x27;api:calls:read:media-url&#x27;.
86
+ # @param body callsRequest
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Calls]
89
+ describe 'list_calls_extensive_using_post test' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ # unit tests for list_calls_using_get1
96
+ # Retrieve call data by date range (/v2/calls)
97
+ # List calls that took place during a specified date range. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:calls:read:basic&#x27;.
98
+ # @param from_date_time The date from which to list calls, in the ISO-8601 format (e.g., &#x27;2018-02-18T02:30:00-07:00&#x27; or &#x27;2018-02-18T08:00:00Z&#x27;, where Z stands for UTC); if not specified, the calls start with the earliest recorded call. For web-conference calls recorded by Gong, the date denotes its scheduled time, otherwise, it denotes its actual start time.
99
+ # @param to_date_time The date until which to list calls, in the ISO-8601 format (e.g., &#x27;2018-02-18T02:30:00-07:00&#x27; or &#x27;2018-02-18T08:00:00Z&#x27;, where Z stands for UTC); if not specified, the calls end with the latest recorded call. For web-conference calls recorded by Gong, the date denotes its scheduled time, otherwise, it denotes its actual start time.
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [String] :cursor When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
102
+ # @option opts [String] :workspace_id Optional Workspace identifier, if supplied the API will return only the calls belonging to this workspace.
103
+ # @return [CallsResponse]
104
+ describe 'list_calls_using_get1 test' do
105
+ it 'should work' do
106
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
107
+ end
108
+ end
109
+
110
+ # unit tests for list_crm_calls_manual_association_using_get
111
+ # List all calls that were manually associated with CRM objects (/v2/calls/manual-crm-associations) in Beta Phase
112
+ # Returns a list of all calls that were manually associated or re-associated with CRM account and deal/opportunity since a given time. Actions will be listed in the ascending order of their timing. Notice if a call was associated and later re-associated the API will return both events. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:crm-calls:manual-association:read&#x27;.
113
+ # @param [Hash] opts the optional parameters
114
+ # @option opts [String] :cursor When paging is needed, provide the value supplied by the previous API call to bring the following page of records.
115
+ # @option opts [String] :from_date_time Association time filter - only the associations made after that time will be listed. The time is in the ISO-8601 format (e.g., &#x27;2018-02-18T02:30:00-07:00&#x27; or &#x27;2018-02-18T08:00:00Z&#x27;, where Z stands for UTC); if not specified all association events will be listed.
116
+ # @return [ManualAssociationResponse]
117
+ describe 'list_crm_calls_manual_association_using_get test' do
118
+ it 'should work' do
119
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
120
+ end
121
+ end
122
+
123
+ end
@@ -0,0 +1,161 @@
1
+ =begin
2
+ #Gong API
3
+
4
+ #<h2>Overview</h2> <p> The Gong API allows you to: </p> <ol> <li> Receive the following information from Gong: <ol type=\"a\"> <li> Your company's <a href=\"#tag--Calls\">calls</a> in Gong </li> <li> Your company's <a href=\"#tag--Users\">users</a> in Gong </li> <li> Your company's user <a href=\"#tag--Stats\">stats</a> in Gong </li> <li> Your company's user <a href=\"#tag--Settings\">settings</a> in Gong </li> <li> Your company's <a href=\"#tag--Library\">libraries</a> in Gong </li> </ol></li> <li> <a href=\"#post-/v2/calls\">Upload</a> new or <a href=\"#put-/v2/calls/-id-/media\">update</a> call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity. </li> <li> <a href=\"#post-/v2/data-privacy/erase-data-for-email-address\">Data Privacy</a>: Delete users and all their associated elements.</li> <li> Upload <a href=\"#tag--CRM\">CRM</a> data into Gong. </li> </ol> <p>Base URL for all API calls is <a href=\"https://us-55616.api.gong.io\"> https://us-55616.api.gong.io </a> </p> <h2>Authentication</h2> <p> There are two ways to retrieve credentials to the Gong Public API: </p> <ol><li>Retrieve Manually:<br> <p> In the <a href=\"https://app.gong.io/company/api\">Gong API Page</a> (you must be a technical administrator in Gong), click \"Create\" to receive an <b>Access Key</b> and an <b>Access Key Secret</b>.<br> </p> <p> Use the Basic Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc7617.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Basic &lt;token&gt;</code><br> </p> <p> To create the basic token, combine the <b>Access Key</b> and the <b>Access Key Secret</b> with colon (:) and then encode in Base64 as following:<br> <code>Base64(&lt;accessKey&gt; : &lt;accessKeySecret&gt;)</code><br><br> </p></li> <li>Retrieve through OAuth<br> <p> To obtain the Bearer token, follow the steps described in the <a target=\"_blank\" href=\"https://help.gong.io/hc/en-us/articles/360056677792\">Gong OAuth Guide</a>. <br></p> <p> After obtaining the token, use the Bearer Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc6750.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Bearer &lt;token&gt;</code> </p> </li></ol> <h2>Limits</h2> <p> By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day. </p> <p> When the rate of API calls exceeds these limits an HTTP status code <b>429</b> is returned and a <b>Retry-After</b> header indicates how many seconds to wait before making a new request. </p><p> If required, contact help@gong.io to change these limits. </p> <h2>Cursors</h2> <p> Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a <b>records</b> field, which contains the number of records in the current page, the current page number and the total number of records. </p> <p> In cases where the total number of records exceeds the number of records thus far retrieved, the <b>records</b> field will also contain a <b>cursor</b> field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the <b>cursor</b> value as supplied by the previous API call. All other request inputs should remain the same. </p> <h2>Forward Compatibility</h2> <p> When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use. </p><p></p>
5
+
6
+ OpenAPI spec version: V2
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.37
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for GongAPI::CRMApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'CRMApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = GongAPI::CRMApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of CRMApi' do
29
+ it 'should create an instance of CRMApi' do
30
+ expect(@instance).to be_instance_of(GongAPI::CRMApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for delete_generic_crm_integration_using_delete
35
+ # Delete a Generic CRM integration (/v2/crm/integration/delete)
36
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Deletes a Generic CRM integration and all its associated crm objects (Accounts, Contacts, Deals, Leads, and Users).&lt;/p&gt;&lt;p&gt;This API is asynchronous. Call \&quot;/request-status\&quot; API with the clientRequestId sent to this API to track progress of the delete request:&lt;br&gt;Status DONE indicates that the integration and all its associated crm objects have been successfully deleted. Calls associations may take up to 24 hours to be deleted.&lt;/p&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;DELETE https://api.gong.io/v2/crm/integration/delete?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&lt;/code&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:integration:delete&#x27;.&lt;/p&gt;
37
+ # @param client_request_id A unique identifier sent by you to allow troubleshooting requests. Valid characters for this field are letters, numbers, dashes and underscores.
38
+ # @param integration_id Integration ID generated when creating the integration
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [AsyncProcessingResponse]
41
+ describe 'delete_generic_crm_integration_using_delete test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for get_crm_objects_using_get
48
+ # Get CRM objects (/v2/crm/object/list)
49
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;This API is intended to be used in &lt;b&gt;development phase only&lt;/b&gt;, to manually verify that objects are uploaded and processed correctly in Gong.&lt;/p&gt;&lt;p&gt;Returns a JSON object where each key is the object crm id and the corresponding value is a nested JSON object representing the CRM object fields. Each key in the nested JSON is the field name and the corresponding value is the field value.&lt;/p&gt;&lt;p&gt;The objects are fetched from the Gong main DB. If the object is not found, the JSON’s value will be null.&lt;/p&gt;&lt;p&gt;The request body contains an array of objects ids.&lt;/p&gt;&lt;p&gt;The request is limited to 100 objects. If more than 100 objects are requested only the first 100 are returned.&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:get-objects&#x27;.&lt;/p&gt;
50
+ # @param body Requested objects crm ids
51
+ # @param integration_id Integration ID generated when creating the integration
52
+ # @param object_type Requested objects type
53
+ # @param [Hash] opts the optional parameters
54
+ # @return [GetGenericCrmObjectsResponse]
55
+ describe 'get_crm_objects_using_get test' do
56
+ it 'should work' do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ # unit tests for get_request_status_using_get
62
+ # Get Request Status (/v2/crm/request-status)
63
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Returns the current status of the request for \&quot;/map/users\&quot;, \&quot;/object/entities\&quot; or \&quot;/integration/delete\&quot; API.&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:upload&#x27;.&lt;/p&gt;&lt;h3&gt;Status Codes&lt;/h3&gt;&lt;ul&gt; &lt;li&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;PENDING&lt;/span&gt; - File is pending parsing&lt;/li&gt; &lt;li&gt;&lt;span class&#x3D;&#x27;public-api-note&#x27;&gt;IN_PROGRESS&lt;/span&gt; - File is being parsed&lt;/li&gt; &lt;li&gt;&lt;span class&#x3D;&#x27;public-api-info&#x27;&gt;DONE&lt;/span&gt; - All objects in the file were successfully parsed&lt;/li&gt; &lt;li&gt;&lt;span class&#x3D;&#x27;public-api-critical&#x27;&gt;FAILED&lt;/span&gt; - Failed to parse some objects in the file or on a general error when the file was being processed&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Status Indication&lt;/h3&gt;&lt;ul&gt; &lt;li&gt;For \&quot;/object/entities\&quot; API, status &lt;span class&#x3D;&#x27;public-api-info&#x27;&gt;DONE&lt;/span&gt; indicates that all objects in the LDJSON file were successfully parsed and stored in raw storage.&lt;br&gt; Note that it can take up to 1 hour from the time the LDJSON file was uploaded using the \&quot;/object/entities\&quot; API until deals are fully processed and available to the end user on the Deals Board. &lt;/li&gt; &lt;li&gt;For \&quot;/map/users\&quot; API, status &lt;span class&#x3D;&#x27;public-api-info&#x27;&gt;DONE&lt;/span&gt; indicates that the mapping was successfully created and is available in Gong for the processing of other objects.&lt;/li&gt; &lt;li&gt;&lt;span class&#x3D;&#x27;public-api-critical&#x27;&gt;FAILED&lt;/span&gt;: &lt;ul&gt; &lt;li&gt;If you receive a &lt;span class&#x3D;&#x27;public-api-critical&#x27;&gt;FAILED&lt;/span&gt; status with a specific error list there are errors you need to address in the object: &lt;ul&gt; &lt;li&gt;Fix the objects&#x27; JSON.&lt;/li&gt; &lt;li&gt;Resend the entire LDJSON file to \&quot;/object/entities\&quot; or \&quot;/map/users\&quot; API.&lt;br&gt; Note that The returned errors list is &lt;b&gt;limited to the first 20 errors&lt;/b&gt;. To make sure you have corrected all the possible errors you need to upload the entire file repeatedly until you receive a &lt;span class&#x3D;&#x27;public-api-info&#x27;&gt;DONE&lt;/span&gt; status. &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;li&gt;If you received a &lt;span class&#x3D;&#x27;public-api-critical&#x27;&gt;FAILED&lt;/span&gt; status with a single error in the form of&lt;br&gt; {\&quot;line\&quot;:0,\&quot;description\&quot;:\&quot;.....\&quot;} this indicates a general processing error: &lt;ul&gt; &lt;li&gt;Fix the LDJSON file according to the error message.&lt;/li&gt; &lt;li&gt;Upload the entire LDJSON file again.&lt;/li&gt; &lt;/ul&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/li&gt;&lt;/ul&gt;
64
+ # @param client_request_id &lt;span style&#x3D;&#x27;background: rgba(9,30,66,0.08)&#x27;&gt;clientRequestId&lt;/span&gt; sent to \&quot;/map/users\&quot;, \&quot;/object/entities\&quot; or \&quot;/integration/delete\&quot; API
65
+ # @param integration_id Integration ID generated when creating the integration
66
+ # @param [Hash] opts the optional parameters
67
+ # @return [RequestStatusResponse]
68
+ describe 'get_request_status_using_get test' do
69
+ it 'should work' do
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
+ end
72
+ end
73
+
74
+ # unit tests for list_crm_schema_fields_using_get
75
+ # List Schema Fields (/v2/crm/object/schema/list)
76
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Retrieves a list of the object schema fields.&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:schema&#x27;.&lt;/p&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;GET https://api.gong.io/v2/crm/object/schema/list?integrationId&#x3D;6286478263646&amp;objectType&#x3D;ACCOUNT&lt;/code&gt;&lt;h4&gt;Response&lt;/h4&gt;&lt;code&gt;{ \&quot;requestId\&quot;: \&quot;afjkzqkqglog7ueki5\&quot;, \&quot;selectedFields\&quot;: { \&quot;ACCOUNT\&quot;: [ { \&quot;name\&quot;: \&quot;accountTypePicklist\&quot;, \&quot;label\&quot;: \&quot;Account Type\&quot;, \&quot;type\&quot;: \&quot;PICKLIST\&quot;, \&quot;lastModified\&quot;: null, \&quot;isDeleted\&quot;: false, \&quot;referenceTo\&quot;: null, \&quot;orderedValueList\&quot;: null }, { \&quot;name\&quot;: \&quot;accountTypePicklist2\&quot;, \&quot;label\&quot;: \&quot;Account Type2\&quot;, \&quot;type\&quot;: \&quot;PICKLIST\&quot;, \&quot;lastModified\&quot;: null, \&quot;isDeleted\&quot;: false, \&quot;referenceTo\&quot;: null, \&quot;orderedValueList\&quot;: null }, { \&quot;name\&quot;: \&quot;fooBar\&quot;, \&quot;label\&quot;: \&quot;Foo Bar\&quot;, \&quot;type\&quot;: \&quot;STRING\&quot;, \&quot;lastModified\&quot;: null, \&quot;isDeleted\&quot;: false, \&quot;referenceTo\&quot;: null, \&quot;orderedValueList\&quot;: null } ] }}&lt;/code&gt;
77
+ # @param integration_id Integration ID generated when creating the integration
78
+ # @param object_type Type of object to retrieve the schema fields for (case-sensitive). &lt;br&gt;Omitting this parameter returns the schema for all object types.
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [ListSelectedFieldsResponse]
81
+ describe 'list_crm_schema_fields_using_get test' do
82
+ it 'should work' do
83
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
+ end
85
+ end
86
+
87
+ # unit tests for list_generic_crm_integration_using_get
88
+ # Get Generic CRM integration details (/v2/crm/integration/list)
89
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Returns a list of all active Generic CRM integrations of the company. Only integrations created with &#x27;Register a Generic CRM integration&#x27; API are returned.&lt;br&gt;Only one active integration is currently supported.&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:integrations:read&#x27;.&lt;/p&gt;
90
+ # @param [Hash] opts the optional parameters
91
+ # @return [ListGenericCrmIntegrationsResponse]
92
+ describe 'list_generic_crm_integration_using_get test' do
93
+ it 'should work' do
94
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
95
+ end
96
+ end
97
+
98
+ # unit tests for map_crm_users_using_post
99
+ # Map Users (Deprecated)
100
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;This API is &lt;b&gt;Deprecated&lt;/b&gt;. Please use \&quot;/object/entities?objectType&#x3D;BUSINESS_USER\&quot; API instead.&lt;/p&gt;&lt;p&gt;Gong associates users with the CRM &lt;b&gt;User&lt;/b&gt; entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.&lt;/p&gt;&lt;p&gt;This API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.&lt;/p&gt;&lt;br&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt;&lt;b&gt;Important:&lt;/b&gt;&lt;p&gt;User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.&lt;br&gt;&lt;b&gt;Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.&lt;/b&gt;&lt;/p&gt;&lt;p&gt;Each request to this API must include the complete list of users from the CRM system.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;If a user mapping is sent after a deal is uploaded:&lt;/p&gt;&lt;ol&gt; &lt;li&gt;Gong retroactively searches for deals whose ownerId matches the user ID mapping.&lt;/li&gt; &lt;li&gt;Gong starts to reprocess those matched deals from raw storage into Gong’s main database.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Gong matches the user from the uploaded JSON to a user in Gong based on the email address.&lt;/p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;&lt;p&gt;The user mapping will not be created when:&lt;/p&gt;&lt;ul&gt; &lt;li&gt;There is no user in Gong with the supplied email address&lt;/li&gt; &lt;li&gt;Mapping already exists for the supplied email address&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;To update an existing mapping:&lt;/p&gt;&lt;ol&gt; &lt;li&gt;Delete the existing mapping by sending an existing mapping with isDeleted&#x3D;true.&lt;/li&gt; &lt;li&gt;In a separate request send a new mapping for the email address.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;The request body is a file in LDJSON format, meaning the file should contain JSON objects - where each JSON object is on a separate line and represents a single user from the CRM system.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Body Specifications:&lt;/b&gt;&lt;/p&gt;&lt;ul&gt; &lt;li&gt;Content-Type should be multipart/form-data&lt;/li&gt; &lt;li&gt;Maximum payload size: 200 megabytes&lt;/li&gt; &lt;li&gt;The request body should include one parameter named \&quot;&lt;b&gt;dataFile&lt;/b&gt;\&quot; which contains the LDJSON file.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Request parameters (QUERY-STRING parameters)&lt;/h3&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;A unique identifier sent by you to enable troubleshooting communication.&lt;br&gt; Gong uses this identifier to prevent repeated attempts to upload the same users list.&lt;br&gt; Valid characters for this field: Letters, numbers, dashes, and underscores. &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;integrationId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Integration ID generated when creating the integration&lt;/td&gt; &lt;td&gt;long&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;User JSON object requires the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;crmUserId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;User ID in the CRM system&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;emailAddress&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Must match an email address of a user in Gong. Not mandatory when isDeleted &#x3D; true.&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;isDeleted&lt;/span&gt;&lt;/td&gt; &lt;td&gt;\&quot;true\&quot; deletes the user mapping. Default &#x3D; \&quot;false\&quot;&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Response&lt;/h3&gt;&lt;code&gt;201 Created&lt;/code&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;the &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt; sent in the request&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;requestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;A Gong request reference Id, generated for this request&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt;&lt;p&gt;&lt;b&gt;Important:&lt;/b&gt; The users mapping API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt; to troubleshoot failed requests and watch the request status using \&quot;/request-status\&quot; API.&lt;/p&gt;&lt;/div&gt;&lt;h3&gt;Error Codes&lt;/h3&gt;400 - Malformed request&lt;br&gt;401 - Access denied&lt;br&gt;409 Conflict - clientRequestId already exists&lt;br&gt;429 - API request limit exceeded&lt;br&gt;500 - Internal Server Error&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:upload&#x27;.&lt;/p&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/map/users?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;{\&quot;crmUserId\&quot;: \&quot;2356ddfwe32\&quot;, \&quot;emailAddress\&quot;: \&quot;john.doe@acme.com\&quot;}&lt;br&gt;{\&quot;crmUserId\&quot;: \&quot;67534ghf745\&quot;, \&quot;isDeleted\&quot;: true} // remove user mapping for user 67534ghf745&lt;/code&gt;
101
+ # @param [Hash] opts the optional parameters
102
+ # @option opts [String] :data_file
103
+ # @return [AsyncProcessingResponse]
104
+ describe 'map_crm_users_using_post test' do
105
+ it 'should work' do
106
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
107
+ end
108
+ end
109
+
110
+ # unit tests for register_generic_crm_integration_using_put
111
+ # Register a Generic CRM integration (/v2/crm/integration/new)
112
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Register the CRM application in Gong and use the returned integrationId in future requests to the CRM API to correlate the data with the specific CRM.&lt;/p&gt;&lt;p&gt;Multiple CRM integrations are not currently supported. To create a new integration, first delete the old one.&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:integration:register&#x27;.&lt;/p&gt;
113
+ # @param body registrationRequest
114
+ # @param [Hash] opts the optional parameters
115
+ # @return [RegisterGenericCrmResponse]
116
+ describe 'register_generic_crm_integration_using_put test' do
117
+ it 'should work' do
118
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
119
+ end
120
+ end
121
+
122
+ # unit tests for upload_crm_data_using_post
123
+ # Upload CRM objects (/v2/crm/object/entities)
124
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;Inserts, updates, or deletes a CRM object in Gong.&lt;br&gt;If an existing object with the same id is detected it will be updated, otherwise it will be inserted as a new object.&lt;/p&gt;&lt;p&gt;The request body is a file in LDJSON format, meaning the file should contain JSON objects, where each JSON object is in a separate line and represents a single CRM object.&lt;/p&gt;&lt;p&gt;All objects in a single request should be of the same object type. An object cannot be contained more than once in a given list.&lt;/p&gt;&lt;p&gt;&lt;b&gt;Request Body Specifications:&lt;/b&gt;&lt;/p&gt;&lt;ul&gt; &lt;li&gt;Content-Type should be multipart/form-data&lt;/li&gt; &lt;li&gt;Maximum payload size: 200 megabytes&lt;/li&gt; &lt;li&gt;The request body should contain one parameter named \&quot;&lt;b&gt;dataFile&lt;/b&gt;\&quot; which holds the LDJSON file&lt;/li&gt;&lt;/ul&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt;&lt;p&gt;&lt;b&gt;Important:&lt;/b&gt; The list must be sorted by modifiedDate Ascending.&lt;/p&gt;&lt;/div&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;&lt;p&gt;&lt;ul&gt; &lt;li&gt;On initial upload: Only send the items that weren’t deleted&lt;/li&gt; &lt;li&gt;On subsequent (incremental) uploads: Send all items.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;&lt;p&gt;Dates in the uploaded JSON objects are represented in ISO-8601 format without milliseconds (e.g. &#x27;2018-02-18T02:30:00-07:00&#x27; or &#x27;2018-02-18T08:00:00Z&#x27;, where Z stands for UTC).&lt;/p&gt;&lt;/div&gt;&lt;h3&gt;Request parameters (QUERY-STRING parameters)&lt;/h3&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;integrationId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Integration ID generated when creating the integration&lt;/td&gt; &lt;td&gt;long&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;objectType&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Must be one of: \&quot;ACCOUNT\&quot;, \&quot;CONTACT\&quot;, \&quot;DEAL\&quot;, \&quot;LEAD\&quot;, \&quot;BUSINESS_USER\&quot;, or \&quot;STAGE\&quot; (case-sensitive)&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;A unique identifier sent by you to allow troubleshooting communication.&lt;br&gt; Gong also uses this identifier to prevent repeated attempts to upload the same object list.&lt;br&gt; Valid characters for this field are letters, numbers, dashes and underscores. &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Response&lt;/h3&gt;&lt;code&gt;201 Created&lt;/code&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;the &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt; sent in the request&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;requestId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;A Gong request reference Id, generated for this request&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt;&lt;p&gt;&lt;b&gt;Important:&lt;/b&gt; The upload objects API is asynchronous. A 201 response only indicates that the file successfully uploaded to Gong and is pending processing. Use the &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;clientRequestId&lt;/span&gt; to troubleshoot failed requests and watch the request status using \&quot;/request-status\&quot; API.&lt;/p&gt;&lt;/div&gt;&lt;h3&gt;Error Codes&lt;/h3&gt;400 - Malformed request&lt;br&gt;401 - Access denied&lt;br&gt;409 Conflict - clientRequestId already exists&lt;br&gt;429 - API request limit exceeded&lt;br&gt;500 - Internal Server Error&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:upload&#x27;.&lt;/p&gt;&lt;h2&gt;Common CRM object fields&lt;/h2&gt;&lt;p&gt;All uploaded CRM objects should contain the following common JSON fields. In addition, each uploaded object should contain mandatory and optional fields as specified below for each object type.&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;objectId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Each object must have a unique id field provided by the CRM.&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;modifiedDate&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The object’s last modification date and time in the CRM in ISO-8601 datetime format, without milliseconds&lt;/td&gt; &lt;td&gt;datetime&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;lastModified&lt;/span&gt;&lt;b&gt;(Deprecated)&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Deprecated&lt;/b&gt;. Please use &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;modifiedDate&lt;/span&gt;&lt;/td&gt; &lt;td&gt;datetime&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;isDeleted&lt;/span&gt;&lt;/td&gt; &lt;td&gt;\&quot;true\&quot; deletes the object (For objectType&#x3D;BUSINESS_USER deletes also the user mapping. For objectType&#x3D;STAGE sets the stage to inactive). Default &#x3D; \&quot;false\&quot;&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;url&lt;/span&gt;&lt;/td&gt; &lt;td&gt;A full http URL to browse this object in the CRM&lt;/td&gt; &lt;td&gt;string (Qualified URI)&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Business User Object&lt;/h2&gt;&lt;p&gt;Gong associates users with the CRM &lt;b&gt;User&lt;/b&gt; entity. Mapping users accurately is essential for Gong to connect users with all their associated objects in the CRM.&lt;/p&gt;&lt;p&gt;Uploading user objects via this API creates a mapping in Gong between the user ID in the CRM system and the user ID in Gong.&lt;/p&gt;&lt;br&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt; &lt;b&gt;Important:&lt;/b&gt; &lt;p&gt;User mapping is important to ensure deals are processed in Gong correctly. Each uploaded deal contains an ownerId field, which contains a user ID from the CRM system.&lt;br&gt; &lt;b&gt;Gong only processes a deal if this user ID is mapped to a user in Gong who is set to record or import calls.&lt;/b&gt; &lt;/p&gt; &lt;p&gt;On initial upload send the complete list of users from the CRM system. On incremental upload send only users that have changed.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;If a user is uploaded after a deal is uploaded:&lt;/p&gt;&lt;ol&gt; &lt;li&gt;Gong retroactively searches for deals whose ownerId matches the user ID mapping.&lt;/li&gt; &lt;li&gt;Gong starts to reprocess those matched deals from raw storage into Gong’s main database.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Gong matches the user from the uploaded JSON to a user in Gong based on the email address.&lt;/p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt; &lt;p&gt;The user mapping will not be created when:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;There is no user in Gong with the supplied email address&lt;/li&gt; &lt;li&gt;Mapping already exists for the supplied email address&lt;/li&gt; &lt;/ul&gt;&lt;/div&gt;&lt;p&gt;To update an existing mapping:&lt;/p&gt;&lt;ol&gt; &lt;li&gt;Delete the existing mapping by sending the user with isDeleted&#x3D;true.&lt;/li&gt; &lt;li&gt;In a separate request send the user with isDeleted&#x3D;false and a new email address, or send a different user for the same email address.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Business User JSON object requires the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;emailAddress&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Must match an email address of a user in Gong. Not mandatory when isDeleted &#x3D; true.&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;BUSINESS_USER&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt; {\&quot;objectId\&quot;: \&quot;user1_Id_In_The_CRM\&quot;, \&quot;emailAddress\&quot;: \&quot;john.doe@acme.com\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;}&lt;br&gt; {\&quot;objectId\&quot;: \&quot;user2_Id_In_The_CRM\&quot;, \&quot;isDeleted\&quot;: true, \&quot;emailAddress\&quot;: \&quot;john.taylor@acme.com\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;} // remove user mapping for user user2_Id_In_The_CRM&lt;/code&gt;&lt;h2&gt;Stage Object&lt;/h2&gt;&lt;p&gt;Update the list of stages from the CRM system.&lt;/p&gt;&lt;p&gt;Stages must be uploaded via this API before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.&lt;/p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt; &lt;p&gt;The upload stages request should only be sent after:&lt;/p&gt; &lt;ul&gt; &lt;li&gt;You have created a new integration.&lt;/li&gt; &lt;li&gt;There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the &#x27;/object/entities&#x27; API.&lt;/li&gt; &lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Stage JSON object requires the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;internalName&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Unique name or unique identifier that identifies the stage in the CRM.&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;name&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Stage name (for display in Gong UI).&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;isActive&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Indicates if the stage is active in the CRM.&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;sortOrder&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The order of the stage in the sales process (starting from 1).&lt;/td&gt; &lt;td&gt;integer&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;STAGE&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt; {\&quot;objectId\&quot;: \&quot;discovery\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;internalName\&quot;: \&quot;discovery\&quot;, \&quot;name\&quot;: \&quot;Discovery\&quot;, \&quot;isActive\&quot;: true, \&quot;sortOrder\&quot;: 1}&lt;br&gt; {\&quot;objectId\&quot;: \&quot;won\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;internalName\&quot;: \&quot;won\&quot;, \&quot;name\&quot;: \&quot;Closed Won\&quot;, \&quot;isActive\&quot;: true, \&quot;sortOrder\&quot;: 5}&lt;/code&gt;&lt;h2&gt;Account Object&lt;/h2&gt;&lt;ul&gt; &lt;li&gt;The Account object represents an active customer in the CRM system.&lt;/li&gt; &lt;li&gt;The Account object is used by Gong to connect activities such as emails and calls to their associated account.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Deals page displays all the activities in Gong associated with an account as well as account status, contacts, and insights.&lt;/p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;&lt;p&gt;Contacts and Deals are associated with accounts, and their processing in Gong requires the associated account.&lt;/p&gt;&lt;p&gt;In order for Deals to be processed correctly by Gong:&lt;ol&gt; &lt;li&gt;Upload Accounts.&lt;/li&gt; &lt;li&gt;Wait 60 seconds.&lt;/li&gt; &lt;li&gt;Upload Contacts and Deals.&lt;/li&gt;&lt;/ol&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class&#x3D;&#x27;public-api-critical&#x27;&gt;&lt;p&gt;When deals are being processed, the account referenced by Deal.accountId must exist in the Gong database.&lt;br&gt;If it does not exist in the database, the deal will not be processed or displayed in the Deals page and other areas throughout Gong.&lt;/p&gt;&lt;/div&gt;&lt;p&gt;The Account JSON object includes the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;name&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Account name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;domains&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Domain names related to the account&lt;/td&gt; &lt;td&gt;string array&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;ACCOUNT&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;{\&quot;objectId\&quot;: \&quot;5ybyh6n6n65\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;url\&quot;: \&quot;https://crm.com/accounts/5ybyh6n6n65\&quot;, \&quot;name\&quot;: \&quot;PBR\&quot;, \&quot;domains\&quot;: [\&quot;pbr.com\&quot;, \&quot;pbr.gov\&quot;], \&quot;type\&quot;: \&quot;Investor\&quot;} // account with additional field&lt;br&gt;{\&quot;objectId\&quot;: \&quot;gfjhty756th\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T22:45:57Z\&quot;, \&quot;name\&quot;: \&quot;PBR\&quot;, \&quot;domains\&quot;: [\&quot;pbr.com\&quot;, \&quot;pbr.gov\&quot;], \&quot;isDeleted\&quot;: true} // remove account gfjhty756th from Gong&lt;/code&gt;&lt;h2&gt;Contact Object&lt;/h2&gt;&lt;ul&gt; &lt;li&gt;A contact in Gong is a person with contact details associated with the account.&lt;/li&gt; &lt;li&gt;Gong uses a contact to match an activity to the correct account.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Contact JSON object includes the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;accountId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The ID of the contact’s connected account in the CRM&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;emailAddress&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact’s main email address&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;firstName&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact’s first name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;lastName&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact’s last name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;title&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact’s title (if available)&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;phoneNumber&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact’s main phone number.&lt;br&gt; If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y for dialer calls,&lt;br&gt; N otherwise &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;CONTACT&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;{\&quot;objectId\&quot;: \&quot;5zbwd7n5n65\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;url\&quot;: \&quot;https://crm.com/contacts/5zbwd7n5n65\&quot;, \&quot;accountId\&quot;: \&quot;5ybyh6n6n65\&quot;, \&quot;emailAddress\&quot;: \&quot;john.smith@acme.com\&quot;, \&quot;firstName\&quot;: \&quot;john\&quot;, \&quot;lastName\&quot;: \&quot;smith\&quot;, \&quot;phoneNumber\&quot;: \&quot;(912) 507-4395\&quot;}&lt;/code&gt;&lt;h2&gt;Lead Object&lt;/h2&gt;&lt;ul&gt; &lt;li&gt;The Lead object represents a potential customer.&lt;/li&gt; &lt;li&gt;Calls and emails are first associated with contacts based on email addresses.&lt;/li&gt; &lt;li&gt;If there is no matching contact, Gong tries to match calls and emails to a lead.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The Lead JSON object includes the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;emailAddress&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The Lead’s main email address&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;firstName&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The Lead’s first name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;lastName&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The Lead’s last name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;title&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The Lead’s title (if available)&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;phoneNumber&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The Lead’s phone number.&lt;br&gt; If Gong is configured to import dialer calls the phoneNumber parameter is mandatory. &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y for dialer calls,&lt;br&gt; N otherwise &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;convertedToDealId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The deal CRM ID, if the lead was converted to a Deal&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;convertedToContactId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The contact CRM ID if the lead was converted to a Contact&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;convertedToAccountId&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The account CRM ID if the lead was converted to an Account&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;LEAD&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;{\&quot;objectId\&quot;: \&quot;4v5bt54t553\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;url\&quot;: \&quot;https://crm.com/leads/45k4j5j5k44\&quot;, \&quot;emailAddress\&quot;: \&quot;jane.doe@acme.com\&quot;, \&quot;firstName\&quot;: \&quot;Jane\&quot;, \&quot;lastName\&quot;: \&quot;Doe\&quot;, \&quot;title\&quot;: \&quot;VP Special Effects\&quot;, \&quot;phoneNumber\&quot;: \&quot;(912) 507-4395\&quot;}&lt;br&gt;{\&quot;objectId\&quot;: \&quot;gf4543gf6th\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T22:45:57Z\&quot;, \&quot;emailAddress\&quot;: \&quot;john.smith@acme.com\&quot;, \&quot;firstName\&quot;: \&quot;John\&quot;, \&quot;lastName\&quot;: \&quot;Smith\&quot;, \&quot;isDeleted\&quot;: true} // remove lead gf4543gf6th&lt;br&gt;{\&quot;objectId\&quot;: \&quot;63473hjg53h\&quot;, \&quot;modifiedDate\&quot;: \&quot;2019-01-03T23:45:57+01:00\&quot;, \&quot;emailAddress\&quot;: \&quot;bob.smith@acme.com\&quot;, \&quot;firstName\&quot;: \&quot;Bob\&quot;, \&quot;lastName\&quot;: \&quot;Smith\&quot;, \&quot;convertedToDealId\&quot;: \&quot;dkfj8dfgf87\&quot;, \&quot;convertedToContactId\&quot;: \&quot;87grhn74hg6\&quot;, \&quot;convertedToAccountId\&quot;: \&quot;6sjk47jf78d\&quot;} // lead 63473hjg53h converted to account 6sjk47jf78d, contact 87grhn74hg6 and deal dkfj8dfgf87&lt;/code&gt;&lt;h2&gt;Deal Object&lt;/h2&gt;&lt;p&gt;A deal in Gong represents a qualified opportunity or contract in a specific account.&lt;/p&gt;&lt;p&gt;The Deal JSON object includes the following fields:&lt;/p&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;th&gt;Data Type&lt;/th&gt; &lt;th&gt;Mandatory&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;accountId&lt;/span&gt;&lt;/td&gt; &lt;td&gt; &lt;p&gt;The ID of the account the deal is associated with in the CRM&lt;/p&gt; &lt;div class&#x3D;&#x27;public-api-info&#x27;&gt; &lt;p&gt;An account with the same objectId must be uploaded first in order for the deal to be processed. The accountId needs to match an Account with the same value in its objectId.&lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;ownerId&lt;/span&gt;&lt;/td&gt; &lt;td&gt; &lt;p&gt;The ID of the owning User in the CRM&lt;/p&gt; &lt;div class&#x3D;&#x27;public-api-info&#x27;&gt; &lt;p&gt;This field is a reference to a CRM user which must be mapped to a Gong user via \&quot;/map/users\&quot; API and the Gong user must be set to record or import calls, otherwise the deal will not be processed&lt;/p&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;name&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The deal’s name&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;createdDate&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The deal’s creation date and time (ISO-8601 datetime without milliseconds)&lt;/td&gt; &lt;td&gt;datetime&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;estimatedCloseDate&lt;/span&gt;*&lt;b&gt;(Deprecated)&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Deprecated&lt;/b&gt;. Please use &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;closeDate&lt;/span&gt; instead&lt;/td&gt; &lt;td&gt;date&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;actualCloseDate&lt;/span&gt;*&lt;b&gt;(Deprecated)&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Deprecated&lt;/b&gt;. Please use &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;closeDate&lt;/span&gt; instead&lt;/td&gt; &lt;td&gt;date&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;closeDate&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The deal’s close date (ISO-8601), without time e.g. \&quot;2021-05-19\&quot;&lt;/td&gt; &lt;td&gt;date&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;isOpen&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Indicates if the Deal’s status is Open or Closed&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;isWon&lt;/span&gt;&lt;/td&gt; &lt;td&gt;Indicates if the Deal’s status is Won or Lost&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;stage&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The value of this field must be equal to the internalName of one of the stages uploaded via \&quot;/stages\&quot; API&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;estimatedAmount&lt;/span&gt;**&lt;b&gt;(Deprecated)&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Deprecated&lt;/b&gt;. Please use &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;amount&lt;/span&gt; instead&lt;/td&gt; &lt;td&gt;currency&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;actualAmount&lt;/span&gt;**&lt;b&gt;(Deprecated)&lt;/b&gt;&lt;/td&gt; &lt;td&gt;&lt;b&gt;Deprecated&lt;/b&gt;. Please use &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;amount&lt;/span&gt; instead&lt;/td&gt; &lt;td&gt;currency&lt;/td&gt; &lt;td&gt;N&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;amount&lt;/span&gt;&lt;/td&gt; &lt;td&gt;The deal’s amount in the currency unit&lt;/td&gt; &lt;td&gt;currency&lt;/td&gt; &lt;td&gt;Y&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;* Either &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;estimatedCloseDate&lt;/span&gt; or &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;actualCloseDate&lt;/span&gt; (or both) must exist in the JSON&lt;br&gt;** Either &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;estimatedAmount&lt;/span&gt; or &lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;actualAmount&lt;/span&gt; (or both) must exist in the JSON&lt;/p&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/entities?clientRequestId&#x3D;1234&amp;integrationId&#x3D;6286478263646&amp;objectType&#x3D;DEAL&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;{\&quot;objectId\&quot;: \&quot;8608553\&quot;, \&quot;modifiedDate\&quot;: \&quot;2022-02-04T18:24:59Z\&quot;, \&quot;url\&quot;: \&quot;http://crm.com/deals/8608553\&quot;, \&quot;accountId\&quot;: \&quot;5ybyh6n6n65\&quot;, \&quot;ownerId\&quot;: \&quot;5486951\&quot;, \&quot;name\&quot;: \&quot;Deal name\&quot;, \&quot;createdDate\&quot;: \&quot;2022-02-04T17:57:23Z\&quot;, \&quot;closeDate\&quot;: \&quot;2022-09-04\&quot;, \&quot;isOpen\&quot;: true, \&quot;isWon\&quot;: false, \&quot;stage\&quot;: \&quot;discovery\&quot;, \&quot;amount\&quot;: 7000, \&quot;custom_field_1\&quot;: \&quot;2022-02-04T17:57:23.000Z\&quot;, \&quot;custom_field_2\&quot;: null}&lt;/code&gt;&lt;h2&gt;Additional Fields&lt;/h2&gt;&lt;p&gt;In addition to the fields required by Gong, you can also add any other field to each object if the following two conditions are met:&lt;ul&gt; &lt;li&gt;The field name is defined in the object&#x27;s schema and has been uploaded using \&quot;/object/schema\&quot; API&lt;/li&gt; &lt;li&gt;The field value matches the type defined in the schema&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;
125
+ # @param [Hash] opts the optional parameters
126
+ # @option opts [String] :data_file
127
+ # @return [AsyncProcessingResponse]
128
+ describe 'upload_crm_data_using_post test' do
129
+ it 'should work' do
130
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
131
+ end
132
+ end
133
+
134
+ # unit tests for upload_crm_schema_field_using_post
135
+ # Upload Object Schema (/v2/crm/object/schema)
136
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;All CRM object fields in Gong must have a representative schema that describes the field (unique name, type, etc.). &lt;br&gt;Any field uploaded by the \&quot;Upload CRM objects\&quot; API (\&quot;/object/entities\&quot; path) that is not described in the schema will be stored in Gong’s raw data storage. However, it will not be parsed by Gong and it will not be available to the end user.&lt;/p&gt;&lt;p&gt;For new integrations created via \&quot;/integration/new\&quot; API, Gong creates a default schema for each object type (Contact, Account, Deal, Lead) that contains the mandatory and optional fields specified in this guide. See the &lt;b&gt;Upload CRM objects&lt;/b&gt; API section for more information.&lt;br&gt;If there are additional fields for any object type that are needed by the end user, send their schema via this API.&lt;/p&gt;&lt;p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;The schema update request should be sent when:&lt;ul&gt; &lt;li&gt;You have created a new integration.&lt;/li&gt; &lt;li&gt;There are changes to the schema of any object type. You can also send a schema update request before any request to the &#x27;/object/entities&#x27; API.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/p&gt;&lt;p&gt;&lt;div class&#x3D;&#x27;public-api-important&#x27;&gt;Each schema update request must contain the full schema from your CRM. Fields that were sent in previous requests and no longer exist in your CRM, should be sent in the schema request with \&quot;isDeleted&#x3D;true\&quot; (only once).&lt;/div&gt;&lt;/p&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:schema&#x27;.&lt;/p&gt;&lt;h3&gt;Supported Field Types&lt;/h3&gt;&lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field Type&lt;/th&gt; &lt;th&gt;Format in JSON&lt;/th&gt; &lt;th&gt;Sample Values&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;BOOLEAN&lt;/span&gt;&lt;/td&gt; &lt;td&gt;boolean&lt;/td&gt; &lt;td&gt;true, false&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;DATE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string (ISO-8601 date without time)&lt;/td&gt; &lt;td&gt;\&quot;2020-05-31\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;DATETIME&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string (ISO-8601 datetime without milliseconds)&lt;/td&gt; &lt;td&gt;\&quot;2020-12-17T07:37:21+02:00\&quot;&lt;br&gt;\&quot;2020-12-17T05:37:21Z\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;PICKLIST&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string - one of the values in an orderedValueList&lt;/td&gt; &lt;td&gt;\&quot;Analyst\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;NUMBER&lt;/span&gt;&lt;/td&gt; &lt;td&gt;number&lt;/td&gt; &lt;td&gt;45.66, 8453&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;PERCENT&lt;/span&gt;&lt;/td&gt; &lt;td&gt;number (between 0 to 100)&lt;/td&gt; &lt;td&gt;67.3&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;CURRENCY&lt;/span&gt;*&lt;/td&gt; &lt;td&gt;number&lt;/td&gt; &lt;td&gt;34.68&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;PHONENUMBER&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;\&quot;+14055766687\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;EMAILADDRESS&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;\&quot;john.doe@anywhere.com\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;REFERENCE&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string - the id of another object&lt;/td&gt; &lt;td&gt;\&quot;48b009drax\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;ID&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string - the id of the object&lt;/td&gt; &lt;td&gt;\&quot;843hf8484jr84htg\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;STRING&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;\&quot;whatever you want\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;STRINGARRAY&lt;/span&gt;**&lt;/td&gt; &lt;td&gt;array of strings&lt;/td&gt; &lt;td&gt;[\&quot;http://customer.com\&quot;]&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;span class&#x3D;&#x27;public-api-parameter&#x27;&gt;URL&lt;/span&gt;&lt;/td&gt; &lt;td&gt;string&lt;/td&gt; &lt;td&gt;\&quot;https://crm.com/account/6d4r578f\&quot;&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;* In the integration send a number value, and specify the correct currency symbol in the Gong UI. Currently Gong does not support multiple currencies per company.&lt;br&gt;** Can only be used for Gong-defined fields.&lt;/p&gt;&lt;h3&gt;Example&lt;/h3&gt;&lt;h4&gt;Request&lt;/h4&gt;&lt;code&gt;POST https://api.gong.io/v2/crm/object/schema?integrationId&#x3D;6286478263646&amp;objectType&#x3D;ACCOUNT&lt;/code&gt;&lt;br&gt;&lt;br&gt;&lt;code&gt;[{\&quot;uniqueName\&quot;: \&quot;orderId\&quot;, \&quot;label\&quot;: \&quot;ID\&quot;, \&quot;type\&quot;: \&quot;ID\&quot;, \&quot;lastModified\&quot;: \&quot;2020-11-11T08:11:34+01:00\&quot;},&lt;br&gt;{\&quot;uniqueName\&quot;: \&quot;parentAccount\&quot;, \&quot;label\&quot;: \&quot;Main Account\&quot;, \&quot;type\&quot;: \&quot;REFERENCE\&quot;, \&quot;referenceTo\&quot;: \&quot;ACCOUNT\&quot;, \&quot;lastModified\&quot;: \&quot;2020-11-11T08:11:34+01:00\&quot;},&lt;br&gt;{\&quot;uniqueName\&quot;: \&quot;category\&quot;, \&quot;label\&quot;: \&quot;Category\&quot;, \&quot;type\&quot;: \&quot;PICKLIST\&quot;, \&quot;orderedValueList\&quot;: [\&quot;Analyst\&quot;, \&quot;Competitor\&quot;, \&quot;Customer\&quot;, \&quot;Integrator\&quot;, \&quot;Investor\&quot;, \&quot;Partner\&quot;, \&quot;Other\&quot;], \&quot;lastModified\&quot;: \&quot;2020-11-11T08:11:34+01:00\&quot;}, // custom field&lt;br&gt;{\&quot;uniqueName\&quot;: \&quot;industry\&quot;, \&quot;isDeleted\&quot;: true, \&quot;lastModified\&quot;: \&quot;2020-11-21T08:11:34+01:00\&quot;}] // remove custom field&lt;/code&gt;
137
+ # @param body fields
138
+ # @param integration_id Integration ID generated when creating the integration
139
+ # @param object_type Type of object to set the schema for (case-sensitive)
140
+ # @param [Hash] opts the optional parameters
141
+ # @return [SchemaUpdateResponse]
142
+ describe 'upload_crm_schema_field_using_post test' do
143
+ it 'should work' do
144
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
145
+ end
146
+ end
147
+
148
+ # unit tests for upload_stages_using_post
149
+ # Upload Stages (Deprecated)
150
+ # &lt;style&gt;.public-api-info { background: rgb(222, 235, 255);}.public-api-tip { background: rgb(227, 252, 239);}.public-api-parameter { background: rgba(9,30,66,0.08);}.public-api-note { background: rgb(234, 230, 255);}.public-api-important { background: rgb(255, 250, 230);}.public-api-critical { background: rgb(255, 235, 230);}table, th, td { border: 1px solid gray; border-collapse: collapse;}th, td { padding: 5px;}th { text-align: left;}&lt;/style&gt;&lt;p&gt;This API is &lt;b&gt;Deprecated&lt;/b&gt;. Please use \&quot;/object/entities?objectType&#x3D;STAGE\&quot; API instead.&lt;/p&gt;&lt;p&gt;Update the list of stages from the CRM system.&lt;/p&gt;&lt;p&gt;This API must be called before you upload Deal objects. When you upload your Deal object, make sure that the stage field matches one of the stages you’ve uploaded using this API.&lt;/p&gt;&lt;div class&#x3D;&#x27;public-api-info&#x27;&gt;&lt;p&gt;The upload stages request should only be sent after:&lt;/p&gt;&lt;ul&gt; &lt;li&gt;You have created a new integration.&lt;/li&gt; &lt;li&gt;There are any changes to the list of stages in the CRM. You can also send a stages update request before any request to the &#x27;/object/entities&#x27; API.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;When accessed using a bearer token, this endpoint requires the scope &#x27;api:crm:schema&#x27;.&lt;/p&gt;
151
+ # @param body stages
152
+ # @param integration_id Integration ID generated when creating the integration
153
+ # @param [Hash] opts the optional parameters
154
+ # @return [SchemaUpdateResponse]
155
+ describe 'upload_stages_using_post test' do
156
+ it 'should work' do
157
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
158
+ end
159
+ end
160
+
161
+ end
@@ -0,0 +1,82 @@
1
+ =begin
2
+ #Gong API
3
+
4
+ #<h2>Overview</h2> <p> The Gong API allows you to: </p> <ol> <li> Receive the following information from Gong: <ol type=\"a\"> <li> Your company's <a href=\"#tag--Calls\">calls</a> in Gong </li> <li> Your company's <a href=\"#tag--Users\">users</a> in Gong </li> <li> Your company's user <a href=\"#tag--Stats\">stats</a> in Gong </li> <li> Your company's user <a href=\"#tag--Settings\">settings</a> in Gong </li> <li> Your company's <a href=\"#tag--Library\">libraries</a> in Gong </li> </ol></li> <li> <a href=\"#post-/v2/calls\">Upload</a> new or <a href=\"#put-/v2/calls/-id-/media\">update</a> call recordings in Gong, in order to support cases where you have an internal system that records calls or obtains them from a third-party entity. </li> <li> <a href=\"#post-/v2/data-privacy/erase-data-for-email-address\">Data Privacy</a>: Delete users and all their associated elements.</li> <li> Upload <a href=\"#tag--CRM\">CRM</a> data into Gong. </li> </ol> <p>Base URL for all API calls is <a href=\"https://us-55616.api.gong.io\"> https://us-55616.api.gong.io </a> </p> <h2>Authentication</h2> <p> There are two ways to retrieve credentials to the Gong Public API: </p> <ol><li>Retrieve Manually:<br> <p> In the <a href=\"https://app.gong.io/company/api\">Gong API Page</a> (you must be a technical administrator in Gong), click \"Create\" to receive an <b>Access Key</b> and an <b>Access Key Secret</b>.<br> </p> <p> Use the Basic Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc7617.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Basic &lt;token&gt;</code><br> </p> <p> To create the basic token, combine the <b>Access Key</b> and the <b>Access Key Secret</b> with colon (:) and then encode in Base64 as following:<br> <code>Base64(&lt;accessKey&gt; : &lt;accessKeySecret&gt;)</code><br><br> </p></li> <li>Retrieve through OAuth<br> <p> To obtain the Bearer token, follow the steps described in the <a target=\"_blank\" href=\"https://help.gong.io/hc/en-us/articles/360056677792\">Gong OAuth Guide</a>. <br></p> <p> After obtaining the token, use the Bearer Authorization HTTP header (as per <a target=\"_blank\" href=\"https://www.rfc-editor.org/rfc/rfc6750.txt\">RFC</a>) to access the Public API as shown below:<br> <code>Authorization: Bearer &lt;token&gt;</code> </p> </li></ol> <h2>Limits</h2> <p> By default Gong limits your company's access to the service to 3 API calls per second, and 10,000 API calls per day. </p> <p> When the rate of API calls exceeds these limits an HTTP status code <b>429</b> is returned and a <b>Retry-After</b> header indicates how many seconds to wait before making a new request. </p><p> If required, contact help@gong.io to change these limits. </p> <h2>Cursors</h2> <p> Some API calls that return a list are limited in the amount of records they may return, so multiple API calls may be required to bring all records. Such an API call also returns a <b>records</b> field, which contains the number of records in the current page, the current page number and the total number of records. </p> <p> In cases where the total number of records exceeds the number of records thus far retrieved, the <b>records</b> field will also contain a <b>cursor</b> field which can be used to access the next page of records. To retrieve the next page, repeat the API call with the <b>cursor</b> value as supplied by the previous API call. All other request inputs should remain the same. </p> <h2>Forward Compatibility</h2> <p> When coding a system to accept Gong data, take into account that Gong may, without prior warning, add fields to the JSON output. It is recommended to future proof your code so that it disregards all JSON fields you don't actually use. </p><p></p>
5
+
6
+ OpenAPI spec version: V2
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.37
10
+ =end
11
+
12
+ require 'spec_helper'
13
+ require 'json'
14
+
15
+ # Unit tests for GongAPI::DataPrivacyApi
16
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Please update as you see appropriate
18
+ describe 'DataPrivacyApi' do
19
+ before do
20
+ # run before each test
21
+ @instance = GongAPI::DataPrivacyApi.new
22
+ end
23
+
24
+ after do
25
+ # run after each test
26
+ end
27
+
28
+ describe 'test an instance of DataPrivacyApi' do
29
+ it 'should create an instance of DataPrivacyApi' do
30
+ expect(@instance).to be_instance_of(GongAPI::DataPrivacyApi)
31
+ end
32
+ end
33
+
34
+ # unit tests for find_all_references_to_email_address_using_get
35
+ # Retrieve all references to an email address. (/v2/data-privacy/data-for-email-address)
36
+ # Shows the elements in the Gong system that reference the given email address. Given an emails address, this endpoint returns details of all calls and email messages that reference this address, and any leads or contacts with this email address. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:data-privacy:read&#x27;.
37
+ # @param email_address The email address.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [EmailAddressReferences]
40
+ describe 'find_all_references_to_email_address_using_get test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ # unit tests for find_all_references_to_phone_number_using_get
47
+ # Retrieve all references to a phone number. (/v2/data-privacy/data-for-phone-number)
48
+ # Shows the elements in the Gong system that reference the given phone number. Given a phone number, this endpoint returns details of any leads or contacts with this phone number and their associated calls and email messages. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:data-privacy:read&#x27;.
49
+ # @param phone_number The phone number. This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored. The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc. Note: This parameter should be URL-encoded.
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [PhoneNumberReferences]
52
+ describe 'find_all_references_to_phone_number_using_get test' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
55
+ end
56
+ end
57
+
58
+ # unit tests for purge_email_address_using_post
59
+ # Delete the email address, and all associated elements (/v2/data-privacy/erase-data-for-email-address)
60
+ # Given an email address, this endpoint deletes from the Gong system any calls or email messages that reference this address. Email messages sent to or from the address are deleted. Calls where the email address appears (as a lead, contact, attendee or speaker) are deleted. Leads or Contacts with the email address are deleted. The deletion is not immediate, and may take several hours to complete. This endpoint contains a data integrity protection mechanism to prevent the deletion of an abnormal number of objects. If the deletion fails please contact support at help@gong.io Delete the data from your CRM and email system before performing this operation so that private data is not re-imported into Gong. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:data-privacy:delete&#x27;.
61
+ # @param email_address The email address.
62
+ # @param [Hash] opts the optional parameters
63
+ # @return [BaseResponse]
64
+ describe 'purge_email_address_using_post test' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
67
+ end
68
+ end
69
+
70
+ # unit tests for purge_phone_number_using_post
71
+ # Delete the phone number, and all associated elements (/v2/data-privacy/erase-data-for-phone-number)
72
+ # Given a phone number, this endpoint deletes from the Gong system any leads or contacts with a matching phone number or mobile phone number. Email messages sent to or from these leads/contacts are deleted. Calls where the leads/contacts appear are deleted. The deletion is not immediate, and may take several hours to complete. This endpoint contains a data integrity protection mechanism to prevent the deletion of an abnormal number of objects. If the deletion fails please contact support at help@gong.io Delete the data from your CRM and email system before performing this operation so that private data is not re-imported into Gong. When accessed through a Bearer token authorization method, this endpoint requires the scope &#x27;api:data-privacy:delete&#x27;.
73
+ # @param phone_number The phone number. This number must start with a + (plus) sign followed by the country code, area code, and local phone number. All other non-digits are ignored. The following are examples of permitted phone numbers: +1 425 555 2671, +1-425-555-2671, +1 425 5552671, +14255552671, +1 425 555 26 71, +1(425) 555-2671, etc. Note: This parameter should be URL-encoded.
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [BaseResponse]
76
+ describe 'purge_phone_number_using_post test' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
82
+ end