pipedrive-openapi-client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1052) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +68 -0
  4. data/LICENSE +201 -0
  5. data/README.md +669 -0
  6. data/Rakefile +10 -0
  7. data/docs/ActivitiesApi.md +372 -0
  8. data/docs/Activity.md +47 -0
  9. data/docs/ActivityFieldsApi.md +61 -0
  10. data/docs/ActivityTypesApi.md +305 -0
  11. data/docs/AddFile.md +19 -0
  12. data/docs/AddNewPipeline.md +19 -0
  13. data/docs/AddNewPipelineAllOf.md +17 -0
  14. data/docs/AddedDealFollower.md +19 -0
  15. data/docs/AddedDealFollowerData.md +23 -0
  16. data/docs/AdditionalData.md +21 -0
  17. data/docs/AdditionalDataWithPaginationDetails.md +17 -0
  18. data/docs/BaseCurrency.md +29 -0
  19. data/docs/BaseDeal.md +119 -0
  20. data/docs/BaseMailThread.md +89 -0
  21. data/docs/BaseMailThreadAllOf.md +59 -0
  22. data/docs/BaseMailThreadAllOfParties.md +19 -0
  23. data/docs/BaseMailThreadMessages.md +71 -0
  24. data/docs/BaseMailThreadMessagesAllOf.md +41 -0
  25. data/docs/BaseNote.md +49 -0
  26. data/docs/BaseNoteDealTitle.md +17 -0
  27. data/docs/BaseNoteOrganization.md +17 -0
  28. data/docs/BaseNotePerson.md +17 -0
  29. data/docs/BaseResponse.md +17 -0
  30. data/docs/BaseRole.md +19 -0
  31. data/docs/BaseStage.md +35 -0
  32. data/docs/BaseTeam.md +33 -0
  33. data/docs/BaseTeamAllOf.md +17 -0
  34. data/docs/BaseTeamAllOf1.md +19 -0
  35. data/docs/BaseUser.md +55 -0
  36. data/docs/BaseUserMe.md +67 -0
  37. data/docs/BaseUserMeAllOf.md +27 -0
  38. data/docs/BaseUserMeAllOfLanguage.md +19 -0
  39. data/docs/BasicDeal.md +37 -0
  40. data/docs/BasicDealProduct.md +29 -0
  41. data/docs/BasicGoal.md +27 -0
  42. data/docs/BasicOrganization.md +21 -0
  43. data/docs/BasicPerson.md +27 -0
  44. data/docs/BasicPersonField.md +19 -0
  45. data/docs/BasicProductField.md +19 -0
  46. data/docs/CallLogsApi.md +296 -0
  47. data/docs/CommonMailThread.md +45 -0
  48. data/docs/CreateRemoteFileAndLinkItToItem.md +19 -0
  49. data/docs/CreateTeam.md +23 -0
  50. data/docs/Currencies.md +19 -0
  51. data/docs/CurrenciesApi.md +68 -0
  52. data/docs/DealFieldsApi.md +356 -0
  53. data/docs/DealNonStrictModeFields.md +25 -0
  54. data/docs/DealNonStrictModeFieldsCreatorUserId.md +29 -0
  55. data/docs/DealOrganizationData.md +27 -0
  56. data/docs/DealPersonData.md +23 -0
  57. data/docs/DealPersonDataEmail.md +21 -0
  58. data/docs/DealPersonDataPhone.md +21 -0
  59. data/docs/DealStrictModeFields.md +25 -0
  60. data/docs/DealSummary.md +23 -0
  61. data/docs/DealSummaryPerCurrency.md +17 -0
  62. data/docs/DealSummaryPerCurrencyFull.md +17 -0
  63. data/docs/DealSummaryPerCurrencyFullCURRENCYID.md +19 -0
  64. data/docs/DealSummaryPerStages.md +17 -0
  65. data/docs/DealSummaryPerStagesSTAGEID.md +17 -0
  66. data/docs/DealSummaryPerStagesSTAGEIDCURRENCYID.md +25 -0
  67. data/docs/DealUserData.md +27 -0
  68. data/docs/DealsApi.md +1777 -0
  69. data/docs/DeleteDeal.md +19 -0
  70. data/docs/DeleteDealData.md +17 -0
  71. data/docs/DeleteDealFollower.md +19 -0
  72. data/docs/DeleteDealFollowerData.md +17 -0
  73. data/docs/DeleteDealParticipant.md +19 -0
  74. data/docs/DeleteDealParticipantData.md +17 -0
  75. data/docs/DeleteDealProduct.md +19 -0
  76. data/docs/DeleteDealProductData.md +19 -0
  77. data/docs/DeleteFile.md +19 -0
  78. data/docs/DeleteFileData.md +17 -0
  79. data/docs/DeleteMultipleDeals.md +16 -0
  80. data/docs/DeleteMultipleDealsAllOf.md +19 -0
  81. data/docs/DeleteMultipleDealsAllOfData.md +17 -0
  82. data/docs/DeleteMultipleProductFieldsResponse.md +19 -0
  83. data/docs/DeleteMultipleProductFieldsResponseData.md +17 -0
  84. data/docs/DeleteNote.md +19 -0
  85. data/docs/DeleteProductFieldResponse.md +19 -0
  86. data/docs/DeleteProductFieldResponseData.md +17 -0
  87. data/docs/DeleteProductFollowerResponse.md +19 -0
  88. data/docs/DeleteProductFollowerResponseData.md +17 -0
  89. data/docs/DeleteRole.md +19 -0
  90. data/docs/DeleteRoleAllOf.md +17 -0
  91. data/docs/DeleteRoleAllOfData.md +17 -0
  92. data/docs/DeleteRoleAssignment.md +19 -0
  93. data/docs/DeleteRoleAssignmentAllOf.md +17 -0
  94. data/docs/DeleteRoleAssignmentAllOfData.md +17 -0
  95. data/docs/EditPipeline.md +19 -0
  96. data/docs/EditPipelineAllOf.md +17 -0
  97. data/docs/FailResponse.md +19 -0
  98. data/docs/FieldType.md +17 -0
  99. data/docs/FileData.md +67 -0
  100. data/docs/FilesApi.md +509 -0
  101. data/docs/FilterType.md +16 -0
  102. data/docs/FiltersApi.md +408 -0
  103. data/docs/FindProductsByNameResponse.md +21 -0
  104. data/docs/FindProductsByNameResponseData.md +29 -0
  105. data/docs/FullRole.md +29 -0
  106. data/docs/FullRoleAllOf.md +17 -0
  107. data/docs/GetAddProductAttachementDetails.md +19 -0
  108. data/docs/GetAddUpdateStage.md +19 -0
  109. data/docs/GetAddedDeal.md +23 -0
  110. data/docs/GetAddedDealAdditionalData.md +17 -0
  111. data/docs/GetAddedDealRelatedObjects.md +21 -0
  112. data/docs/GetAllFiles.md +21 -0
  113. data/docs/GetAllPipelines.md +19 -0
  114. data/docs/GetAllPipelinesAllOf.md +17 -0
  115. data/docs/GetAllProductFieldsResponse.md +21 -0
  116. data/docs/GetDeal.md +23 -0
  117. data/docs/GetDealAdditionalData.md +17 -0
  118. data/docs/GetDeals.md +23 -0
  119. data/docs/GetDealsByName.md +21 -0
  120. data/docs/GetDealsByNameAdditionalData.md +17 -0
  121. data/docs/GetDealsByNameData.md +41 -0
  122. data/docs/GetDealsConversionRatesInPipeline.md +19 -0
  123. data/docs/GetDealsConversionRatesInPipelineAllOf.md +17 -0
  124. data/docs/GetDealsConversionRatesInPipelineAllOfData.md +21 -0
  125. data/docs/GetDealsConversionRatesInPipelineAllOfDataStageConversions.md +21 -0
  126. data/docs/GetDealsMovementsInPipeline.md +19 -0
  127. data/docs/GetDealsMovementsInPipelineAllOf.md +17 -0
  128. data/docs/GetDealsMovementsInPipelineAllOfData.md +27 -0
  129. data/docs/GetDealsMovementsInPipelineAllOfDataAverageAgeInDays.md +19 -0
  130. data/docs/GetDealsMovementsInPipelineAllOfDataAverageAgeInDaysByStages.md +19 -0
  131. data/docs/GetDealsMovementsInPipelineAllOfDataMovementsBetweenStages.md +17 -0
  132. data/docs/GetDealsMovementsInPipelineAllOfDataNewDeals.md +23 -0
  133. data/docs/GetDealsMovementsInPipelineAllOfDataNewDealsFormattedValues.md +17 -0
  134. data/docs/GetDealsMovementsInPipelineAllOfDataNewDealsValues.md +17 -0
  135. data/docs/GetDealsSummary.md +19 -0
  136. data/docs/GetDealsSummaryData.md +29 -0
  137. data/docs/GetDealsSummaryDataValuesTotal.md +25 -0
  138. data/docs/GetDealsSummaryDataWeightedValuesTotal.md +21 -0
  139. data/docs/GetDealsTimeline.md +19 -0
  140. data/docs/GetDealsTimelineData.md +23 -0
  141. data/docs/GetDealsTimelineDataTotals.md +31 -0
  142. data/docs/GetDuplicatedDeal.md +19 -0
  143. data/docs/GetMergedDeal.md +19 -0
  144. data/docs/GetNotes.md +21 -0
  145. data/docs/GetOneFile.md +19 -0
  146. data/docs/GetOnePipeline.md +19 -0
  147. data/docs/GetOnePipelineAllOf.md +17 -0
  148. data/docs/GetOneStage.md +19 -0
  149. data/docs/GetProductAttachementDetails.md +19 -0
  150. data/docs/GetProductFieldResponse.md +19 -0
  151. data/docs/GetRole.md +21 -0
  152. data/docs/GetRoleAllOf.md +19 -0
  153. data/docs/GetRoleAllOfAdditionalData.md +17 -0
  154. data/docs/GetRoleAssignments.md +21 -0
  155. data/docs/GetRoleAssignmentsAllOf.md +19 -0
  156. data/docs/GetRoleSettings.md +19 -0
  157. data/docs/GetRoleSettingsAllOf.md +17 -0
  158. data/docs/GetRoleSubroles.md +21 -0
  159. data/docs/GetRoleSubrolesAllOf.md +19 -0
  160. data/docs/GetRoles.md +21 -0
  161. data/docs/GetRolesAllOf.md +19 -0
  162. data/docs/GetStageDeals.md +21 -0
  163. data/docs/GetStages.md +19 -0
  164. data/docs/GlobalMessageBaseResponse.md +17 -0
  165. data/docs/GlobalMessageData.md +27 -0
  166. data/docs/GlobalMessageDelete.md +23 -0
  167. data/docs/GlobalMessageDeleteAllOf.md +21 -0
  168. data/docs/GlobalMessageGet.md +23 -0
  169. data/docs/GlobalMessageGetAllOf.md +21 -0
  170. data/docs/GlobalMessageUserData.md +21 -0
  171. data/docs/GlobalMessagesApi.md +120 -0
  172. data/docs/GoalsApi.md +318 -0
  173. data/docs/IconKey.md +16 -0
  174. data/docs/InlineObject.md +21 -0
  175. data/docs/InlineObject1.md +23 -0
  176. data/docs/InlineObject10.md +23 -0
  177. data/docs/InlineObject11.md +19 -0
  178. data/docs/InlineObject12.md +21 -0
  179. data/docs/InlineObject13.md +19 -0
  180. data/docs/InlineObject14.md +31 -0
  181. data/docs/InlineObject15.md +33 -0
  182. data/docs/InlineObject16.md +19 -0
  183. data/docs/InlineObject17.md +19 -0
  184. data/docs/InlineObject18.md +23 -0
  185. data/docs/InlineObject19.md +17 -0
  186. data/docs/InlineObject2.md +37 -0
  187. data/docs/InlineObject20.md +17 -0
  188. data/docs/InlineObject21.md +17 -0
  189. data/docs/InlineObject22.md +17 -0
  190. data/docs/InlineObject23.md +25 -0
  191. data/docs/InlineObject24.md +17 -0
  192. data/docs/InlineObject25.md +17 -0
  193. data/docs/InlineObject26.md +19 -0
  194. data/docs/InlineObject27.md +17 -0
  195. data/docs/InlineObject28.md +17 -0
  196. data/docs/InlineObject29.md +21 -0
  197. data/docs/InlineObject3.md +17 -0
  198. data/docs/InlineObject30.md +17 -0
  199. data/docs/InlineObject31.md +17 -0
  200. data/docs/InlineObject32.md +17 -0
  201. data/docs/InlineObject33.md +27 -0
  202. data/docs/InlineObject4.md +17 -0
  203. data/docs/InlineObject5.md +17 -0
  204. data/docs/InlineObject6.md +17 -0
  205. data/docs/InlineObject7.md +19 -0
  206. data/docs/InlineObject8.md +27 -0
  207. data/docs/InlineObject9.md +25 -0
  208. data/docs/InlineResponse200.md +21 -0
  209. data/docs/InlineResponse2001.md +19 -0
  210. data/docs/InlineResponse20010.md +19 -0
  211. data/docs/InlineResponse20010Data.md +17 -0
  212. data/docs/InlineResponse20011.md +19 -0
  213. data/docs/InlineResponse20011Data.md +17 -0
  214. data/docs/InlineResponse2002.md +19 -0
  215. data/docs/InlineResponse2003.md +17 -0
  216. data/docs/InlineResponse2004.md +21 -0
  217. data/docs/InlineResponse2005.md +17 -0
  218. data/docs/InlineResponse2006.md +19 -0
  219. data/docs/InlineResponse2007.md +19 -0
  220. data/docs/InlineResponse2007Data.md +25 -0
  221. data/docs/InlineResponse2008.md +19 -0
  222. data/docs/InlineResponse2008Data.md +17 -0
  223. data/docs/InlineResponse2009.md +19 -0
  224. data/docs/InlineResponse2009Data.md +17 -0
  225. data/docs/InlineResponse200AdditionalData.md +21 -0
  226. data/docs/InlineResponse201.md +19 -0
  227. data/docs/InlineResponse201Data.md +47 -0
  228. data/docs/InlineResponse400.md +25 -0
  229. data/docs/InlineResponse403.md +25 -0
  230. data/docs/InlineResponse404.md +25 -0
  231. data/docs/InlineResponse4041.md +25 -0
  232. data/docs/InlineResponse409.md +25 -0
  233. data/docs/InlineResponse410.md +25 -0
  234. data/docs/InlineResponse500.md +25 -0
  235. data/docs/ItemSearchApi.md +154 -0
  236. data/docs/LeadsApi.md +651 -0
  237. data/docs/LeadsValue.md +19 -0
  238. data/docs/LinkRemoteFileToItem.md +19 -0
  239. data/docs/MailMessage.md +25 -0
  240. data/docs/MailMessageAllOf.md +17 -0
  241. data/docs/MailMessageData.md +73 -0
  242. data/docs/MailMessagesApi.md +70 -0
  243. data/docs/MailParticipant.md +27 -0
  244. data/docs/MailServiceBaseResponse.md +23 -0
  245. data/docs/MailThread.md +19 -0
  246. data/docs/MailThreadAllOf.md +17 -0
  247. data/docs/MailThreadDelete.md +19 -0
  248. data/docs/MailThreadDeleteAllOf.md +17 -0
  249. data/docs/MailThreadMessages.md +19 -0
  250. data/docs/MailThreadMessagesAllOf.md +17 -0
  251. data/docs/MailThreadOne.md +19 -0
  252. data/docs/MailThreadOneAllOf.md +17 -0
  253. data/docs/MailThreadParticipant.md +33 -0
  254. data/docs/MailThreadPut.md +19 -0
  255. data/docs/MailThreadsApi.md +314 -0
  256. data/docs/NewDeal.md +39 -0
  257. data/docs/NewDealAllOf.md +17 -0
  258. data/docs/NewDealProduct.md +31 -0
  259. data/docs/NewDealProductAllOf.md +17 -0
  260. data/docs/NewFollowerResponse.md +19 -0
  261. data/docs/NewFollowerResponseData.md +23 -0
  262. data/docs/NewGoal.md +16 -0
  263. data/docs/NewOrganization.md +23 -0
  264. data/docs/NewOrganizationAllOf.md +17 -0
  265. data/docs/NewOrganizationField.md +21 -0
  266. data/docs/NewPerson.md +29 -0
  267. data/docs/NewPersonAllOf.md +17 -0
  268. data/docs/NewPersonField.md +21 -0
  269. data/docs/NewProductField.md +21 -0
  270. data/docs/NewProductFieldAllOf.md +21 -0
  271. data/docs/Note.md +33 -0
  272. data/docs/NoteCreatorUser.md +23 -0
  273. data/docs/NoteFieldsApi.md +61 -0
  274. data/docs/NotesApi.md +360 -0
  275. data/docs/NumberBoolean.md +16 -0
  276. data/docs/NumberBooleanDefault0.md +16 -0
  277. data/docs/NumberBooleanDefault1.md +16 -0
  278. data/docs/OrganizationFieldsApi.md +348 -0
  279. data/docs/OrganizationRelationship.md +23 -0
  280. data/docs/OrganizationRelationshipsApi.md +303 -0
  281. data/docs/OrganizationsApi.md +1178 -0
  282. data/docs/PermissionSets.md +19 -0
  283. data/docs/PermissionSetsAllOf.md +17 -0
  284. data/docs/PermissionSetsApi.md +171 -0
  285. data/docs/PermissionSetsItem.md +21 -0
  286. data/docs/PersonFieldsApi.md +348 -0
  287. data/docs/PersonsApi.md +1311 -0
  288. data/docs/Pipeline.md +23 -0
  289. data/docs/PipelinesApi.md +524 -0
  290. data/docs/PostNote.md +19 -0
  291. data/docs/PostRoleAssignment.md +19 -0
  292. data/docs/PostRoleAssignmentAllOf.md +17 -0
  293. data/docs/PostRoleAssignmentAllOfData.md +19 -0
  294. data/docs/PostRoleSettings.md +19 -0
  295. data/docs/PostRoleSettingsAllOf.md +17 -0
  296. data/docs/PostRoleSettingsAllOfData.md +19 -0
  297. data/docs/PostRoles.md +19 -0
  298. data/docs/PostRolesAllOf.md +17 -0
  299. data/docs/PostRolesAllOfData.md +17 -0
  300. data/docs/Product.md +31 -0
  301. data/docs/ProductAttachementFields.md +41 -0
  302. data/docs/ProductField.md +51 -0
  303. data/docs/ProductFieldAllOf.md +45 -0
  304. data/docs/ProductFieldsApi.md +358 -0
  305. data/docs/ProductsApi.md +809 -0
  306. data/docs/PutRole.md +19 -0
  307. data/docs/PutRoleAllOf.md +17 -0
  308. data/docs/PutRoleAllOfData.md +17 -0
  309. data/docs/RecentsApi.md +73 -0
  310. data/docs/RoleAssignment.md +27 -0
  311. data/docs/RoleAssignmentAllOf.md +23 -0
  312. data/docs/RoleSettings.md +31 -0
  313. data/docs/RolesAdditionalData.md +17 -0
  314. data/docs/RolesAdditionalDataPagination.md +21 -0
  315. data/docs/RolesApi.md +623 -0
  316. data/docs/SearchResultsApi.md +148 -0
  317. data/docs/SinglePermissionSetsItem.md +23 -0
  318. data/docs/SinglePermissionSetsItemAllOf.md +17 -0
  319. data/docs/Stage.md +25 -0
  320. data/docs/StagesApi.md +424 -0
  321. data/docs/SubRole.md +27 -0
  322. data/docs/SubRoleAllOf.md +23 -0
  323. data/docs/Teams.md +19 -0
  324. data/docs/TeamsAllOf.md +17 -0
  325. data/docs/TeamsApi.md +498 -0
  326. data/docs/Unauthorized.md +21 -0
  327. data/docs/UpdateFile.md +19 -0
  328. data/docs/UpdateTeam.md +27 -0
  329. data/docs/UpdateTeamAllOf.md +19 -0
  330. data/docs/User.md +19 -0
  331. data/docs/UserAllOf.md +17 -0
  332. data/docs/UserAssignmentToPermissionSet.md +23 -0
  333. data/docs/UserAssignmentsToPermissionSet.md +19 -0
  334. data/docs/UserAssignmentsToPermissionSetAllOf.md +17 -0
  335. data/docs/UserConnections.md +19 -0
  336. data/docs/UserConnectionsAllOf.md +17 -0
  337. data/docs/UserConnectionsAllOfData.md +17 -0
  338. data/docs/UserConnectionsApi.md +62 -0
  339. data/docs/UserIDs.md +19 -0
  340. data/docs/UserIDsAllOf.md +17 -0
  341. data/docs/UserMe.md +19 -0
  342. data/docs/UserMeAllOf.md +17 -0
  343. data/docs/UserSettings.md +19 -0
  344. data/docs/UserSettingsAllOf.md +17 -0
  345. data/docs/UserSettingsApi.md +62 -0
  346. data/docs/UserSettingsItem.md +35 -0
  347. data/docs/Users.md +19 -0
  348. data/docs/UsersAllOf.md +17 -0
  349. data/docs/UsersApi.md +818 -0
  350. data/docs/VisibleTo.md +16 -0
  351. data/docs/WebhooksApi.md +190 -0
  352. data/git_push.sh +58 -0
  353. data/lib/pipedrive-openapi-client.rb +384 -0
  354. data/lib/pipedrive-openapi-client/api/activities_api.rb +403 -0
  355. data/lib/pipedrive-openapi-client/api/activity_fields_api.rb +76 -0
  356. data/lib/pipedrive-openapi-client/api/activity_types_api.rb +344 -0
  357. data/lib/pipedrive-openapi-client/api/call_logs_api.rb +339 -0
  358. data/lib/pipedrive-openapi-client/api/currencies_api.rb +81 -0
  359. data/lib/pipedrive-openapi-client/api/deal_fields_api.rb +391 -0
  360. data/lib/pipedrive-openapi-client/api/deals_api.rb +2018 -0
  361. data/lib/pipedrive-openapi-client/api/files_api.rb +630 -0
  362. data/lib/pipedrive-openapi-client/api/filters_api.rb +436 -0
  363. data/lib/pipedrive-openapi-client/api/global_messages_api.rb +143 -0
  364. data/lib/pipedrive-openapi-client/api/goals_api.rb +405 -0
  365. data/lib/pipedrive-openapi-client/api/item_search_api.rb +228 -0
  366. data/lib/pipedrive-openapi-client/api/leads_api.rb +697 -0
  367. data/lib/pipedrive-openapi-client/api/mail_messages_api.rb +87 -0
  368. data/lib/pipedrive-openapi-client/api/mail_threads_api.rb +358 -0
  369. data/lib/pipedrive-openapi-client/api/note_fields_api.rb +76 -0
  370. data/lib/pipedrive-openapi-client/api/notes_api.rb +422 -0
  371. data/lib/pipedrive-openapi-client/api/organization_fields_api.rb +385 -0
  372. data/lib/pipedrive-openapi-client/api/organization_relationships_api.rb +340 -0
  373. data/lib/pipedrive-openapi-client/api/organizations_api.rb +1303 -0
  374. data/lib/pipedrive-openapi-client/api/permission_sets_api.rb +204 -0
  375. data/lib/pipedrive-openapi-client/api/person_fields_api.rb +385 -0
  376. data/lib/pipedrive-openapi-client/api/persons_api.rb +1448 -0
  377. data/lib/pipedrive-openapi-client/api/pipelines_api.rb +595 -0
  378. data/lib/pipedrive-openapi-client/api/product_fields_api.rb +391 -0
  379. data/lib/pipedrive-openapi-client/api/products_api.rb +904 -0
  380. data/lib/pipedrive-openapi-client/api/recents_api.rb +96 -0
  381. data/lib/pipedrive-openapi-client/api/roles_api.rb +741 -0
  382. data/lib/pipedrive-openapi-client/api/search_results_api.rb +194 -0
  383. data/lib/pipedrive-openapi-client/api/stages_api.rb +467 -0
  384. data/lib/pipedrive-openapi-client/api/teams_api.rb +571 -0
  385. data/lib/pipedrive-openapi-client/api/user_connections_api.rb +78 -0
  386. data/lib/pipedrive-openapi-client/api/user_settings_api.rb +78 -0
  387. data/lib/pipedrive-openapi-client/api/users_api.rb +925 -0
  388. data/lib/pipedrive-openapi-client/api/webhooks_api.rb +238 -0
  389. data/lib/pipedrive-openapi-client/api_client.rb +404 -0
  390. data/lib/pipedrive-openapi-client/api_error.rb +57 -0
  391. data/lib/pipedrive-openapi-client/configuration.rb +250 -0
  392. data/lib/pipedrive-openapi-client/models/activity.rb +404 -0
  393. data/lib/pipedrive-openapi-client/models/add_file.rb +216 -0
  394. data/lib/pipedrive-openapi-client/models/add_new_pipeline.rb +224 -0
  395. data/lib/pipedrive-openapi-client/models/add_new_pipeline_all_of.rb +206 -0
  396. data/lib/pipedrive-openapi-client/models/added_deal_follower.rb +216 -0
  397. data/lib/pipedrive-openapi-client/models/added_deal_follower_data.rb +237 -0
  398. data/lib/pipedrive-openapi-client/models/additional_data.rb +228 -0
  399. data/lib/pipedrive-openapi-client/models/additional_data_with_pagination_details.rb +207 -0
  400. data/lib/pipedrive-openapi-client/models/base_currency.rb +267 -0
  401. data/lib/pipedrive-openapi-client/models/base_deal.rb +724 -0
  402. data/lib/pipedrive-openapi-client/models/base_mail_thread.rb +582 -0
  403. data/lib/pipedrive-openapi-client/models/base_mail_thread_all_of.rb +423 -0
  404. data/lib/pipedrive-openapi-client/models/base_mail_thread_all_of_parties.rb +222 -0
  405. data/lib/pipedrive-openapi-client/models/base_mail_thread_messages.rb +495 -0
  406. data/lib/pipedrive-openapi-client/models/base_mail_thread_messages_all_of.rb +336 -0
  407. data/lib/pipedrive-openapi-client/models/base_note.rb +363 -0
  408. data/lib/pipedrive-openapi-client/models/base_note_deal_title.rb +208 -0
  409. data/lib/pipedrive-openapi-client/models/base_note_organization.rb +208 -0
  410. data/lib/pipedrive-openapi-client/models/base_note_person.rb +208 -0
  411. data/lib/pipedrive-openapi-client/models/base_response.rb +207 -0
  412. data/lib/pipedrive-openapi-client/models/base_role.rb +218 -0
  413. data/lib/pipedrive-openapi-client/models/base_stage.rb +331 -0
  414. data/lib/pipedrive-openapi-client/models/base_team.rb +306 -0
  415. data/lib/pipedrive-openapi-client/models/base_team_all_of.rb +207 -0
  416. data/lib/pipedrive-openapi-client/models/base_team_all_of1.rb +217 -0
  417. data/lib/pipedrive-openapi-client/models/base_user.rb +399 -0
  418. data/lib/pipedrive-openapi-client/models/base_user_me.rb +466 -0
  419. data/lib/pipedrive-openapi-client/models/base_user_me_all_of.rb +256 -0
  420. data/lib/pipedrive-openapi-client/models/base_user_me_all_of_language.rb +218 -0
  421. data/lib/pipedrive-openapi-client/models/basic_deal.rb +341 -0
  422. data/lib/pipedrive-openapi-client/models/basic_deal_product.rb +271 -0
  423. data/lib/pipedrive-openapi-client/models/basic_goal.rb +291 -0
  424. data/lib/pipedrive-openapi-client/models/basic_organization.rb +227 -0
  425. data/lib/pipedrive-openapi-client/models/basic_person.rb +261 -0
  426. data/lib/pipedrive-openapi-client/models/basic_person_field.rb +222 -0
  427. data/lib/pipedrive-openapi-client/models/basic_product_field.rb +224 -0
  428. data/lib/pipedrive-openapi-client/models/common_mail_thread.rb +348 -0
  429. data/lib/pipedrive-openapi-client/models/create_remote_file_and_link_it_to_item.rb +216 -0
  430. data/lib/pipedrive-openapi-client/models/create_team.rb +247 -0
  431. data/lib/pipedrive-openapi-client/models/currencies.rb +219 -0
  432. data/lib/pipedrive-openapi-client/models/deal_non_strict_mode_fields.rb +243 -0
  433. data/lib/pipedrive-openapi-client/models/deal_non_strict_mode_fields_creator_user_id.rb +269 -0
  434. data/lib/pipedrive-openapi-client/models/deal_organization_data.rb +258 -0
  435. data/lib/pipedrive-openapi-client/models/deal_person_data.rb +242 -0
  436. data/lib/pipedrive-openapi-client/models/deal_person_data_email.rb +227 -0
  437. data/lib/pipedrive-openapi-client/models/deal_person_data_phone.rb +227 -0
  438. data/lib/pipedrive-openapi-client/models/deal_strict_mode_fields.rb +247 -0
  439. data/lib/pipedrive-openapi-client/models/deal_summary.rb +235 -0
  440. data/lib/pipedrive-openapi-client/models/deal_summary_per_currency.rb +208 -0
  441. data/lib/pipedrive-openapi-client/models/deal_summary_per_currency_full.rb +207 -0
  442. data/lib/pipedrive-openapi-client/models/deal_summary_per_currency_full_currencyid.rb +218 -0
  443. data/lib/pipedrive-openapi-client/models/deal_summary_per_stages.rb +207 -0
  444. data/lib/pipedrive-openapi-client/models/deal_summary_per_stages_stageid.rb +207 -0
  445. data/lib/pipedrive-openapi-client/models/deal_summary_per_stages_stageidcurrencyid.rb +248 -0
  446. data/lib/pipedrive-openapi-client/models/deal_user_data.rb +259 -0
  447. data/lib/pipedrive-openapi-client/models/delete_deal.rb +216 -0
  448. data/lib/pipedrive-openapi-client/models/delete_deal_data.rb +207 -0
  449. data/lib/pipedrive-openapi-client/models/delete_deal_follower.rb +216 -0
  450. data/lib/pipedrive-openapi-client/models/delete_deal_follower_data.rb +207 -0
  451. data/lib/pipedrive-openapi-client/models/delete_deal_participant.rb +216 -0
  452. data/lib/pipedrive-openapi-client/models/delete_deal_participant_data.rb +207 -0
  453. data/lib/pipedrive-openapi-client/models/delete_deal_product.rb +216 -0
  454. data/lib/pipedrive-openapi-client/models/delete_deal_product_data.rb +217 -0
  455. data/lib/pipedrive-openapi-client/models/delete_file.rb +216 -0
  456. data/lib/pipedrive-openapi-client/models/delete_file_data.rb +207 -0
  457. data/lib/pipedrive-openapi-client/models/delete_multiple_deals.rb +208 -0
  458. data/lib/pipedrive-openapi-client/models/delete_multiple_deals_all_of.rb +216 -0
  459. data/lib/pipedrive-openapi-client/models/delete_multiple_deals_all_of_data.rb +209 -0
  460. data/lib/pipedrive-openapi-client/models/delete_multiple_product_fields_response.rb +216 -0
  461. data/lib/pipedrive-openapi-client/models/delete_multiple_product_fields_response_data.rb +209 -0
  462. data/lib/pipedrive-openapi-client/models/delete_note.rb +217 -0
  463. data/lib/pipedrive-openapi-client/models/delete_product_field_response.rb +216 -0
  464. data/lib/pipedrive-openapi-client/models/delete_product_field_response_data.rb +207 -0
  465. data/lib/pipedrive-openapi-client/models/delete_product_follower_response.rb +216 -0
  466. data/lib/pipedrive-openapi-client/models/delete_product_follower_response_data.rb +207 -0
  467. data/lib/pipedrive-openapi-client/models/delete_role.rb +224 -0
  468. data/lib/pipedrive-openapi-client/models/delete_role_all_of.rb +206 -0
  469. data/lib/pipedrive-openapi-client/models/delete_role_all_of_data.rb +208 -0
  470. data/lib/pipedrive-openapi-client/models/delete_role_assignment.rb +224 -0
  471. data/lib/pipedrive-openapi-client/models/delete_role_assignment_all_of.rb +206 -0
  472. data/lib/pipedrive-openapi-client/models/delete_role_assignment_all_of_data.rb +208 -0
  473. data/lib/pipedrive-openapi-client/models/edit_pipeline.rb +225 -0
  474. data/lib/pipedrive-openapi-client/models/edit_pipeline_all_of.rb +207 -0
  475. data/lib/pipedrive-openapi-client/models/fail_response.rb +217 -0
  476. data/lib/pipedrive-openapi-client/models/field_type.rb +246 -0
  477. data/lib/pipedrive-openapi-client/models/file_data.rb +458 -0
  478. data/lib/pipedrive-openapi-client/models/filter_type.rb +39 -0
  479. data/lib/pipedrive-openapi-client/models/find_products_by_name_response.rb +226 -0
  480. data/lib/pipedrive-openapi-client/models/find_products_by_name_response_data.rb +267 -0
  481. data/lib/pipedrive-openapi-client/models/full_role.rb +275 -0
  482. data/lib/pipedrive-openapi-client/models/full_role_all_of.rb +207 -0
  483. data/lib/pipedrive-openapi-client/models/get_add_product_attachement_details.rb +217 -0
  484. data/lib/pipedrive-openapi-client/models/get_add_update_stage.rb +216 -0
  485. data/lib/pipedrive-openapi-client/models/get_added_deal.rb +235 -0
  486. data/lib/pipedrive-openapi-client/models/get_added_deal_additional_data.rb +209 -0
  487. data/lib/pipedrive-openapi-client/models/get_added_deal_related_objects.rb +224 -0
  488. data/lib/pipedrive-openapi-client/models/get_all_files.rb +228 -0
  489. data/lib/pipedrive-openapi-client/models/get_all_pipelines.rb +227 -0
  490. data/lib/pipedrive-openapi-client/models/get_all_pipelines_all_of.rb +209 -0
  491. data/lib/pipedrive-openapi-client/models/get_all_product_fields_response.rb +229 -0
  492. data/lib/pipedrive-openapi-client/models/get_deal.rb +234 -0
  493. data/lib/pipedrive-openapi-client/models/get_deal_additional_data.rb +207 -0
  494. data/lib/pipedrive-openapi-client/models/get_deals.rb +237 -0
  495. data/lib/pipedrive-openapi-client/models/get_deals_by_name.rb +227 -0
  496. data/lib/pipedrive-openapi-client/models/get_deals_by_name_additional_data.rb +206 -0
  497. data/lib/pipedrive-openapi-client/models/get_deals_by_name_data.rb +328 -0
  498. data/lib/pipedrive-openapi-client/models/get_deals_conversion_rates_in_pipeline.rb +224 -0
  499. data/lib/pipedrive-openapi-client/models/get_deals_conversion_rates_in_pipeline_all_of.rb +206 -0
  500. data/lib/pipedrive-openapi-client/models/get_deals_conversion_rates_in_pipeline_all_of_data.rb +230 -0
  501. data/lib/pipedrive-openapi-client/models/get_deals_conversion_rates_in_pipeline_all_of_data_stage_conversions.rb +227 -0
  502. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline.rb +224 -0
  503. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of.rb +206 -0
  504. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data.rb +252 -0
  505. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_average_age_in_days.rb +220 -0
  506. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_average_age_in_days_by_stages.rb +218 -0
  507. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_movements_between_stages.rb +208 -0
  508. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_new_deals.rb +238 -0
  509. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_new_deals_formatted_values.rb +208 -0
  510. data/lib/pipedrive-openapi-client/models/get_deals_movements_in_pipeline_all_of_data_new_deals_values.rb +208 -0
  511. data/lib/pipedrive-openapi-client/models/get_deals_summary.rb +216 -0
  512. data/lib/pipedrive-openapi-client/models/get_deals_summary_data.rb +266 -0
  513. data/lib/pipedrive-openapi-client/models/get_deals_summary_data_values_total.rb +248 -0
  514. data/lib/pipedrive-openapi-client/models/get_deals_summary_data_weighted_values_total.rb +228 -0
  515. data/lib/pipedrive-openapi-client/models/get_deals_timeline.rb +216 -0
  516. data/lib/pipedrive-openapi-client/models/get_deals_timeline_data.rb +238 -0
  517. data/lib/pipedrive-openapi-client/models/get_deals_timeline_data_totals.rb +278 -0
  518. data/lib/pipedrive-openapi-client/models/get_duplicated_deal.rb +217 -0
  519. data/lib/pipedrive-openapi-client/models/get_merged_deal.rb +216 -0
  520. data/lib/pipedrive-openapi-client/models/get_notes.rb +228 -0
  521. data/lib/pipedrive-openapi-client/models/get_one_file.rb +216 -0
  522. data/lib/pipedrive-openapi-client/models/get_one_pipeline.rb +225 -0
  523. data/lib/pipedrive-openapi-client/models/get_one_pipeline_all_of.rb +207 -0
  524. data/lib/pipedrive-openapi-client/models/get_one_stage.rb +217 -0
  525. data/lib/pipedrive-openapi-client/models/get_product_attachement_details.rb +217 -0
  526. data/lib/pipedrive-openapi-client/models/get_product_field_response.rb +216 -0
  527. data/lib/pipedrive-openapi-client/models/get_role.rb +233 -0
  528. data/lib/pipedrive-openapi-client/models/get_role_all_of.rb +215 -0
  529. data/lib/pipedrive-openapi-client/models/get_role_all_of_additional_data.rb +207 -0
  530. data/lib/pipedrive-openapi-client/models/get_role_assignments.rb +236 -0
  531. data/lib/pipedrive-openapi-client/models/get_role_assignments_all_of.rb +218 -0
  532. data/lib/pipedrive-openapi-client/models/get_role_settings.rb +224 -0
  533. data/lib/pipedrive-openapi-client/models/get_role_settings_all_of.rb +206 -0
  534. data/lib/pipedrive-openapi-client/models/get_role_subroles.rb +236 -0
  535. data/lib/pipedrive-openapi-client/models/get_role_subroles_all_of.rb +218 -0
  536. data/lib/pipedrive-openapi-client/models/get_roles.rb +236 -0
  537. data/lib/pipedrive-openapi-client/models/get_roles_all_of.rb +218 -0
  538. data/lib/pipedrive-openapi-client/models/get_stage_deals.rb +228 -0
  539. data/lib/pipedrive-openapi-client/models/get_stages.rb +219 -0
  540. data/lib/pipedrive-openapi-client/models/global_message_base_response.rb +207 -0
  541. data/lib/pipedrive-openapi-client/models/global_message_data.rb +257 -0
  542. data/lib/pipedrive-openapi-client/models/global_message_delete.rb +244 -0
  543. data/lib/pipedrive-openapi-client/models/global_message_delete_all_of.rb +226 -0
  544. data/lib/pipedrive-openapi-client/models/global_message_get.rb +247 -0
  545. data/lib/pipedrive-openapi-client/models/global_message_get_all_of.rb +229 -0
  546. data/lib/pipedrive-openapi-client/models/global_message_user_data.rb +228 -0
  547. data/lib/pipedrive-openapi-client/models/icon_key.rb +74 -0
  548. data/lib/pipedrive-openapi-client/models/inline_object.rb +236 -0
  549. data/lib/pipedrive-openapi-client/models/inline_object1.rb +236 -0
  550. data/lib/pipedrive-openapi-client/models/inline_object10.rb +303 -0
  551. data/lib/pipedrive-openapi-client/models/inline_object11.rb +217 -0
  552. data/lib/pipedrive-openapi-client/models/inline_object12.rb +242 -0
  553. data/lib/pipedrive-openapi-client/models/inline_object13.rb +222 -0
  554. data/lib/pipedrive-openapi-client/models/inline_object14.rb +283 -0
  555. data/lib/pipedrive-openapi-client/models/inline_object15.rb +293 -0
  556. data/lib/pipedrive-openapi-client/models/inline_object16.rb +261 -0
  557. data/lib/pipedrive-openapi-client/models/inline_object17.rb +216 -0
  558. data/lib/pipedrive-openapi-client/models/inline_object18.rb +234 -0
  559. data/lib/pipedrive-openapi-client/models/inline_object19.rb +212 -0
  560. data/lib/pipedrive-openapi-client/models/inline_object2.rb +361 -0
  561. data/lib/pipedrive-openapi-client/models/inline_object20.rb +212 -0
  562. data/lib/pipedrive-openapi-client/models/inline_object21.rb +212 -0
  563. data/lib/pipedrive-openapi-client/models/inline_object22.rb +212 -0
  564. data/lib/pipedrive-openapi-client/models/inline_object23.rb +252 -0
  565. data/lib/pipedrive-openapi-client/models/inline_object24.rb +212 -0
  566. data/lib/pipedrive-openapi-client/models/inline_object25.rb +212 -0
  567. data/lib/pipedrive-openapi-client/models/inline_object26.rb +260 -0
  568. data/lib/pipedrive-openapi-client/models/inline_object27.rb +214 -0
  569. data/lib/pipedrive-openapi-client/models/inline_object28.rb +214 -0
  570. data/lib/pipedrive-openapi-client/models/inline_object29.rb +244 -0
  571. data/lib/pipedrive-openapi-client/models/inline_object3.rb +212 -0
  572. data/lib/pipedrive-openapi-client/models/inline_object30.rb +214 -0
  573. data/lib/pipedrive-openapi-client/models/inline_object31.rb +212 -0
  574. data/lib/pipedrive-openapi-client/models/inline_object32.rb +212 -0
  575. data/lib/pipedrive-openapi-client/models/inline_object33.rb +318 -0
  576. data/lib/pipedrive-openapi-client/models/inline_object4.rb +212 -0
  577. data/lib/pipedrive-openapi-client/models/inline_object5.rb +212 -0
  578. data/lib/pipedrive-openapi-client/models/inline_object6.rb +212 -0
  579. data/lib/pipedrive-openapi-client/models/inline_object7.rb +222 -0
  580. data/lib/pipedrive-openapi-client/models/inline_object8.rb +262 -0
  581. data/lib/pipedrive-openapi-client/models/inline_object9.rb +330 -0
  582. data/lib/pipedrive-openapi-client/models/inline_response200.rb +226 -0
  583. data/lib/pipedrive-openapi-client/models/inline_response2001.rb +215 -0
  584. data/lib/pipedrive-openapi-client/models/inline_response20010.rb +216 -0
  585. data/lib/pipedrive-openapi-client/models/inline_response20010_data.rb +209 -0
  586. data/lib/pipedrive-openapi-client/models/inline_response20011.rb +216 -0
  587. data/lib/pipedrive-openapi-client/models/inline_response20011_data.rb +207 -0
  588. data/lib/pipedrive-openapi-client/models/inline_response2002.rb +215 -0
  589. data/lib/pipedrive-openapi-client/models/inline_response2003.rb +206 -0
  590. data/lib/pipedrive-openapi-client/models/inline_response2004.rb +226 -0
  591. data/lib/pipedrive-openapi-client/models/inline_response2005.rb +206 -0
  592. data/lib/pipedrive-openapi-client/models/inline_response2006.rb +217 -0
  593. data/lib/pipedrive-openapi-client/models/inline_response2007.rb +215 -0
  594. data/lib/pipedrive-openapi-client/models/inline_response2007_data.rb +246 -0
  595. data/lib/pipedrive-openapi-client/models/inline_response2008.rb +217 -0
  596. data/lib/pipedrive-openapi-client/models/inline_response2008_data.rb +207 -0
  597. data/lib/pipedrive-openapi-client/models/inline_response2009.rb +216 -0
  598. data/lib/pipedrive-openapi-client/models/inline_response2009_data.rb +207 -0
  599. data/lib/pipedrive-openapi-client/models/inline_response200_additional_data.rb +227 -0
  600. data/lib/pipedrive-openapi-client/models/inline_response201.rb +215 -0
  601. data/lib/pipedrive-openapi-client/models/inline_response201_data.rb +362 -0
  602. data/lib/pipedrive-openapi-client/models/inline_response400.rb +244 -0
  603. data/lib/pipedrive-openapi-client/models/inline_response403.rb +244 -0
  604. data/lib/pipedrive-openapi-client/models/inline_response404.rb +244 -0
  605. data/lib/pipedrive-openapi-client/models/inline_response4041.rb +244 -0
  606. data/lib/pipedrive-openapi-client/models/inline_response409.rb +244 -0
  607. data/lib/pipedrive-openapi-client/models/inline_response410.rb +244 -0
  608. data/lib/pipedrive-openapi-client/models/inline_response500.rb +244 -0
  609. data/lib/pipedrive-openapi-client/models/leads_value.rb +226 -0
  610. data/lib/pipedrive-openapi-client/models/link_remote_file_to_item.rb +216 -0
  611. data/lib/pipedrive-openapi-client/models/mail_message.rb +254 -0
  612. data/lib/pipedrive-openapi-client/models/mail_message_all_of.rb +206 -0
  613. data/lib/pipedrive-openapi-client/models/mail_message_data.rb +530 -0
  614. data/lib/pipedrive-openapi-client/models/mail_participant.rb +257 -0
  615. data/lib/pipedrive-openapi-client/models/mail_service_base_response.rb +237 -0
  616. data/lib/pipedrive-openapi-client/models/mail_thread.rb +227 -0
  617. data/lib/pipedrive-openapi-client/models/mail_thread_all_of.rb +209 -0
  618. data/lib/pipedrive-openapi-client/models/mail_thread_delete.rb +227 -0
  619. data/lib/pipedrive-openapi-client/models/mail_thread_delete_all_of.rb +209 -0
  620. data/lib/pipedrive-openapi-client/models/mail_thread_messages.rb +227 -0
  621. data/lib/pipedrive-openapi-client/models/mail_thread_messages_all_of.rb +209 -0
  622. data/lib/pipedrive-openapi-client/models/mail_thread_one.rb +225 -0
  623. data/lib/pipedrive-openapi-client/models/mail_thread_one_all_of.rb +207 -0
  624. data/lib/pipedrive-openapi-client/models/mail_thread_participant.rb +289 -0
  625. data/lib/pipedrive-openapi-client/models/mail_thread_put.rb +227 -0
  626. data/lib/pipedrive-openapi-client/models/new_deal.rb +364 -0
  627. data/lib/pipedrive-openapi-client/models/new_deal_all_of.rb +207 -0
  628. data/lib/pipedrive-openapi-client/models/new_deal_product.rb +304 -0
  629. data/lib/pipedrive-openapi-client/models/new_deal_product_all_of.rb +212 -0
  630. data/lib/pipedrive-openapi-client/models/new_follower_response.rb +216 -0
  631. data/lib/pipedrive-openapi-client/models/new_follower_response_data.rb +237 -0
  632. data/lib/pipedrive-openapi-client/models/new_goal.rb +230 -0
  633. data/lib/pipedrive-openapi-client/models/new_organization.rb +250 -0
  634. data/lib/pipedrive-openapi-client/models/new_organization_all_of.rb +207 -0
  635. data/lib/pipedrive-openapi-client/models/new_organization_field.rb +279 -0
  636. data/lib/pipedrive-openapi-client/models/new_person.rb +284 -0
  637. data/lib/pipedrive-openapi-client/models/new_person_all_of.rb +207 -0
  638. data/lib/pipedrive-openapi-client/models/new_person_field.rb +279 -0
  639. data/lib/pipedrive-openapi-client/models/new_product_field.rb +281 -0
  640. data/lib/pipedrive-openapi-client/models/new_product_field_all_of.rb +273 -0
  641. data/lib/pipedrive-openapi-client/models/note.rb +292 -0
  642. data/lib/pipedrive-openapi-client/models/note_creator_user.rb +238 -0
  643. data/lib/pipedrive-openapi-client/models/number_boolean.rb +36 -0
  644. data/lib/pipedrive-openapi-client/models/number_boolean_default0.rb +208 -0
  645. data/lib/pipedrive-openapi-client/models/number_boolean_default1.rb +208 -0
  646. data/lib/pipedrive-openapi-client/models/organization_relationship.rb +271 -0
  647. data/lib/pipedrive-openapi-client/models/permission_sets.rb +227 -0
  648. data/lib/pipedrive-openapi-client/models/permission_sets_all_of.rb +209 -0
  649. data/lib/pipedrive-openapi-client/models/permission_sets_item.rb +227 -0
  650. data/lib/pipedrive-openapi-client/models/pipeline.rb +235 -0
  651. data/lib/pipedrive-openapi-client/models/post_note.rb +216 -0
  652. data/lib/pipedrive-openapi-client/models/post_role_assignment.rb +224 -0
  653. data/lib/pipedrive-openapi-client/models/post_role_assignment_all_of.rb +206 -0
  654. data/lib/pipedrive-openapi-client/models/post_role_assignment_all_of_data.rb +218 -0
  655. data/lib/pipedrive-openapi-client/models/post_role_settings.rb +224 -0
  656. data/lib/pipedrive-openapi-client/models/post_role_settings_all_of.rb +206 -0
  657. data/lib/pipedrive-openapi-client/models/post_role_settings_all_of_data.rb +252 -0
  658. data/lib/pipedrive-openapi-client/models/post_roles.rb +224 -0
  659. data/lib/pipedrive-openapi-client/models/post_roles_all_of.rb +206 -0
  660. data/lib/pipedrive-openapi-client/models/post_roles_all_of_data.rb +208 -0
  661. data/lib/pipedrive-openapi-client/models/product.rb +281 -0
  662. data/lib/pipedrive-openapi-client/models/product_attachement_fields.rb +327 -0
  663. data/lib/pipedrive-openapi-client/models/product_field.rb +431 -0
  664. data/lib/pipedrive-openapi-client/models/product_field_all_of.rb +347 -0
  665. data/lib/pipedrive-openapi-client/models/put_role.rb +224 -0
  666. data/lib/pipedrive-openapi-client/models/put_role_all_of.rb +206 -0
  667. data/lib/pipedrive-openapi-client/models/put_role_all_of_data.rb +208 -0
  668. data/lib/pipedrive-openapi-client/models/role_assignment.rb +266 -0
  669. data/lib/pipedrive-openapi-client/models/role_assignment_all_of.rb +237 -0
  670. data/lib/pipedrive-openapi-client/models/role_settings.rb +278 -0
  671. data/lib/pipedrive-openapi-client/models/roles_additional_data.rb +207 -0
  672. data/lib/pipedrive-openapi-client/models/roles_additional_data_pagination.rb +228 -0
  673. data/lib/pipedrive-openapi-client/models/single_permission_sets_item.rb +247 -0
  674. data/lib/pipedrive-openapi-client/models/single_permission_sets_item_all_of.rb +209 -0
  675. data/lib/pipedrive-openapi-client/models/stage.rb +281 -0
  676. data/lib/pipedrive-openapi-client/models/sub_role.rb +266 -0
  677. data/lib/pipedrive-openapi-client/models/sub_role_all_of.rb +237 -0
  678. data/lib/pipedrive-openapi-client/models/teams.rb +226 -0
  679. data/lib/pipedrive-openapi-client/models/teams_all_of.rb +208 -0
  680. data/lib/pipedrive-openapi-client/models/unauthorized.rb +227 -0
  681. data/lib/pipedrive-openapi-client/models/update_file.rb +216 -0
  682. data/lib/pipedrive-openapi-client/models/update_team.rb +275 -0
  683. data/lib/pipedrive-openapi-client/models/update_team_all_of.rb +217 -0
  684. data/lib/pipedrive-openapi-client/models/user.rb +224 -0
  685. data/lib/pipedrive-openapi-client/models/user_all_of.rb +206 -0
  686. data/lib/pipedrive-openapi-client/models/user_assignment_to_permission_set.rb +237 -0
  687. data/lib/pipedrive-openapi-client/models/user_assignments_to_permission_set.rb +227 -0
  688. data/lib/pipedrive-openapi-client/models/user_assignments_to_permission_set_all_of.rb +209 -0
  689. data/lib/pipedrive-openapi-client/models/user_connections.rb +224 -0
  690. data/lib/pipedrive-openapi-client/models/user_connections_all_of.rb +206 -0
  691. data/lib/pipedrive-openapi-client/models/user_connections_all_of_data.rb +208 -0
  692. data/lib/pipedrive-openapi-client/models/user_i_ds.rb +227 -0
  693. data/lib/pipedrive-openapi-client/models/user_i_ds_all_of.rb +209 -0
  694. data/lib/pipedrive-openapi-client/models/user_me.rb +224 -0
  695. data/lib/pipedrive-openapi-client/models/user_me_all_of.rb +206 -0
  696. data/lib/pipedrive-openapi-client/models/user_settings.rb +224 -0
  697. data/lib/pipedrive-openapi-client/models/user_settings_all_of.rb +206 -0
  698. data/lib/pipedrive-openapi-client/models/user_settings_item.rb +297 -0
  699. data/lib/pipedrive-openapi-client/models/users.rb +226 -0
  700. data/lib/pipedrive-openapi-client/models/users_all_of.rb +208 -0
  701. data/lib/pipedrive-openapi-client/models/visible_to.rb +36 -0
  702. data/lib/pipedrive-openapi-client/version.rb +15 -0
  703. data/pipedrive-openapi-client.gemspec +39 -0
  704. data/spec/api/activities_api_spec.rb +115 -0
  705. data/spec/api/activity_fields_api_spec.rb +46 -0
  706. data/spec/api/activity_types_api_spec.rb +100 -0
  707. data/spec/api/call_logs_api_spec.rb +97 -0
  708. data/spec/api/currencies_api_spec.rb +47 -0
  709. data/spec/api/deal_fields_api_spec.rb +109 -0
  710. data/spec/api/deals_api_spec.rb +439 -0
  711. data/spec/api/files_api_spec.rb +148 -0
  712. data/spec/api/filters_api_spec.rb +117 -0
  713. data/spec/api/global_messages_api_spec.rb +59 -0
  714. data/spec/api/goals_api_spec.rb +114 -0
  715. data/spec/api/item_search_api_spec.rb +72 -0
  716. data/spec/api/leads_api_spec.rb +169 -0
  717. data/spec/api/mail_messages_api_spec.rb +48 -0
  718. data/spec/api/mail_threads_api_spec.rb +101 -0
  719. data/spec/api/note_fields_api_spec.rb +46 -0
  720. data/spec/api/notes_api_spec.rb +123 -0
  721. data/spec/api/organization_fields_api_spec.rb +107 -0
  722. data/spec/api/organization_relationships_api_spec.rb +99 -0
  723. data/spec/api/organizations_api_spec.rb +300 -0
  724. data/spec/api/permission_sets_api_spec.rb +70 -0
  725. data/spec/api/person_fields_api_spec.rb +107 -0
  726. data/spec/api/persons_api_spec.rb +331 -0
  727. data/spec/api/pipelines_api_spec.rb +152 -0
  728. data/spec/api/product_fields_api_spec.rb +107 -0
  729. data/spec/api/products_api_spec.rb +213 -0
  730. data/spec/api/recents_api_spec.rb +50 -0
  731. data/spec/api/roles_api_spec.rb +169 -0
  732. data/spec/api/search_results_api_spec.rb +70 -0
  733. data/spec/api/stages_api_spec.rb +123 -0
  734. data/spec/api/teams_api_spec.rb +140 -0
  735. data/spec/api/user_connections_api_spec.rb +46 -0
  736. data/spec/api/user_settings_api_spec.rb +46 -0
  737. data/spec/api/users_api_spec.rb +210 -0
  738. data/spec/api/webhooks_api_spec.rb +75 -0
  739. data/spec/api_client_spec.rb +188 -0
  740. data/spec/configuration_spec.rb +42 -0
  741. data/spec/models/activity_spec.rb +135 -0
  742. data/spec/models/add_file_spec.rb +47 -0
  743. data/spec/models/add_new_pipeline_all_of_spec.rb +41 -0
  744. data/spec/models/add_new_pipeline_spec.rb +47 -0
  745. data/spec/models/added_deal_follower_data_spec.rb +59 -0
  746. data/spec/models/added_deal_follower_spec.rb +47 -0
  747. data/spec/models/additional_data_spec.rb +53 -0
  748. data/spec/models/additional_data_with_pagination_details_spec.rb +41 -0
  749. data/spec/models/base_currency_spec.rb +77 -0
  750. data/spec/models/base_deal_spec.rb +347 -0
  751. data/spec/models/base_mail_thread_all_of_parties_spec.rb +47 -0
  752. data/spec/models/base_mail_thread_all_of_spec.rb +167 -0
  753. data/spec/models/base_mail_thread_messages_all_of_spec.rb +113 -0
  754. data/spec/models/base_mail_thread_messages_spec.rb +203 -0
  755. data/spec/models/base_mail_thread_spec.rb +257 -0
  756. data/spec/models/base_note_deal_title_spec.rb +41 -0
  757. data/spec/models/base_note_organization_spec.rb +41 -0
  758. data/spec/models/base_note_person_spec.rb +41 -0
  759. data/spec/models/base_note_spec.rb +137 -0
  760. data/spec/models/base_response_spec.rb +41 -0
  761. data/spec/models/base_role_spec.rb +47 -0
  762. data/spec/models/base_stage_spec.rb +99 -0
  763. data/spec/models/base_team_all_of1_spec.rb +47 -0
  764. data/spec/models/base_team_all_of_spec.rb +41 -0
  765. data/spec/models/base_team_spec.rb +89 -0
  766. data/spec/models/base_user_me_all_of_language_spec.rb +47 -0
  767. data/spec/models/base_user_me_all_of_spec.rb +71 -0
  768. data/spec/models/base_user_me_spec.rb +191 -0
  769. data/spec/models/base_user_spec.rb +155 -0
  770. data/spec/models/basic_deal_product_spec.rb +77 -0
  771. data/spec/models/basic_deal_spec.rb +105 -0
  772. data/spec/models/basic_goal_spec.rb +75 -0
  773. data/spec/models/basic_organization_spec.rb +53 -0
  774. data/spec/models/basic_person_field_spec.rb +47 -0
  775. data/spec/models/basic_person_spec.rb +71 -0
  776. data/spec/models/basic_product_field_spec.rb +47 -0
  777. data/spec/models/common_mail_thread_spec.rb +125 -0
  778. data/spec/models/create_remote_file_and_link_it_to_item_spec.rb +47 -0
  779. data/spec/models/create_team_spec.rb +59 -0
  780. data/spec/models/currencies_spec.rb +47 -0
  781. data/spec/models/deal_non_strict_mode_fields_creator_user_id_spec.rb +77 -0
  782. data/spec/models/deal_non_strict_mode_fields_spec.rb +65 -0
  783. data/spec/models/deal_organization_data_spec.rb +71 -0
  784. data/spec/models/deal_person_data_email_spec.rb +53 -0
  785. data/spec/models/deal_person_data_phone_spec.rb +53 -0
  786. data/spec/models/deal_person_data_spec.rb +59 -0
  787. data/spec/models/deal_strict_mode_fields_spec.rb +65 -0
  788. data/spec/models/deal_summary_per_currency_full_currencyid_spec.rb +47 -0
  789. data/spec/models/deal_summary_per_currency_full_spec.rb +41 -0
  790. data/spec/models/deal_summary_per_currency_spec.rb +41 -0
  791. data/spec/models/deal_summary_per_stages_spec.rb +41 -0
  792. data/spec/models/deal_summary_per_stages_stageid_spec.rb +41 -0
  793. data/spec/models/deal_summary_per_stages_stageidcurrencyid_spec.rb +65 -0
  794. data/spec/models/deal_summary_spec.rb +59 -0
  795. data/spec/models/deal_user_data_spec.rb +71 -0
  796. data/spec/models/delete_deal_data_spec.rb +41 -0
  797. data/spec/models/delete_deal_follower_data_spec.rb +41 -0
  798. data/spec/models/delete_deal_follower_spec.rb +47 -0
  799. data/spec/models/delete_deal_participant_data_spec.rb +41 -0
  800. data/spec/models/delete_deal_participant_spec.rb +47 -0
  801. data/spec/models/delete_deal_product_data_spec.rb +47 -0
  802. data/spec/models/delete_deal_product_spec.rb +47 -0
  803. data/spec/models/delete_deal_spec.rb +47 -0
  804. data/spec/models/delete_file_data_spec.rb +41 -0
  805. data/spec/models/delete_file_spec.rb +47 -0
  806. data/spec/models/delete_multiple_deals_all_of_data_spec.rb +41 -0
  807. data/spec/models/delete_multiple_deals_all_of_spec.rb +47 -0
  808. data/spec/models/delete_multiple_deals_spec.rb +35 -0
  809. data/spec/models/delete_multiple_product_fields_response_data_spec.rb +41 -0
  810. data/spec/models/delete_multiple_product_fields_response_spec.rb +47 -0
  811. data/spec/models/delete_note_spec.rb +47 -0
  812. data/spec/models/delete_product_field_response_data_spec.rb +41 -0
  813. data/spec/models/delete_product_field_response_spec.rb +47 -0
  814. data/spec/models/delete_product_follower_response_data_spec.rb +41 -0
  815. data/spec/models/delete_product_follower_response_spec.rb +47 -0
  816. data/spec/models/delete_role_all_of_data_spec.rb +41 -0
  817. data/spec/models/delete_role_all_of_spec.rb +41 -0
  818. data/spec/models/delete_role_assignment_all_of_data_spec.rb +41 -0
  819. data/spec/models/delete_role_assignment_all_of_spec.rb +41 -0
  820. data/spec/models/delete_role_assignment_spec.rb +47 -0
  821. data/spec/models/delete_role_spec.rb +47 -0
  822. data/spec/models/edit_pipeline_all_of_spec.rb +41 -0
  823. data/spec/models/edit_pipeline_spec.rb +47 -0
  824. data/spec/models/fail_response_spec.rb +47 -0
  825. data/spec/models/field_type_spec.rb +45 -0
  826. data/spec/models/file_data_spec.rb +191 -0
  827. data/spec/models/filter_type_spec.rb +35 -0
  828. data/spec/models/find_products_by_name_response_data_spec.rb +77 -0
  829. data/spec/models/find_products_by_name_response_spec.rb +53 -0
  830. data/spec/models/full_role_all_of_spec.rb +41 -0
  831. data/spec/models/full_role_spec.rb +77 -0
  832. data/spec/models/get_add_product_attachement_details_spec.rb +47 -0
  833. data/spec/models/get_add_update_stage_spec.rb +47 -0
  834. data/spec/models/get_added_deal_additional_data_spec.rb +41 -0
  835. data/spec/models/get_added_deal_related_objects_spec.rb +53 -0
  836. data/spec/models/get_added_deal_spec.rb +59 -0
  837. data/spec/models/get_all_files_spec.rb +53 -0
  838. data/spec/models/get_all_pipelines_all_of_spec.rb +41 -0
  839. data/spec/models/get_all_pipelines_spec.rb +47 -0
  840. data/spec/models/get_all_product_fields_response_spec.rb +53 -0
  841. data/spec/models/get_deal_additional_data_spec.rb +41 -0
  842. data/spec/models/get_deal_spec.rb +59 -0
  843. data/spec/models/get_deals_by_name_additional_data_spec.rb +41 -0
  844. data/spec/models/get_deals_by_name_data_spec.rb +113 -0
  845. data/spec/models/get_deals_by_name_spec.rb +53 -0
  846. data/spec/models/get_deals_conversion_rates_in_pipeline_all_of_data_spec.rb +53 -0
  847. data/spec/models/get_deals_conversion_rates_in_pipeline_all_of_data_stage_conversions_spec.rb +53 -0
  848. data/spec/models/get_deals_conversion_rates_in_pipeline_all_of_spec.rb +41 -0
  849. data/spec/models/get_deals_conversion_rates_in_pipeline_spec.rb +47 -0
  850. data/spec/models/get_deals_movements_in_pipeline_all_of_data_average_age_in_days_by_stages_spec.rb +47 -0
  851. data/spec/models/get_deals_movements_in_pipeline_all_of_data_average_age_in_days_spec.rb +47 -0
  852. data/spec/models/get_deals_movements_in_pipeline_all_of_data_movements_between_stages_spec.rb +41 -0
  853. data/spec/models/get_deals_movements_in_pipeline_all_of_data_new_deals_formatted_values_spec.rb +41 -0
  854. data/spec/models/get_deals_movements_in_pipeline_all_of_data_new_deals_spec.rb +59 -0
  855. data/spec/models/get_deals_movements_in_pipeline_all_of_data_new_deals_values_spec.rb +41 -0
  856. data/spec/models/get_deals_movements_in_pipeline_all_of_data_spec.rb +71 -0
  857. data/spec/models/get_deals_movements_in_pipeline_all_of_spec.rb +41 -0
  858. data/spec/models/get_deals_movements_in_pipeline_spec.rb +47 -0
  859. data/spec/models/get_deals_spec.rb +59 -0
  860. data/spec/models/get_deals_summary_data_spec.rb +77 -0
  861. data/spec/models/get_deals_summary_data_values_total_spec.rb +65 -0
  862. data/spec/models/get_deals_summary_data_weighted_values_total_spec.rb +53 -0
  863. data/spec/models/get_deals_summary_spec.rb +47 -0
  864. data/spec/models/get_deals_timeline_data_spec.rb +59 -0
  865. data/spec/models/get_deals_timeline_data_totals_spec.rb +83 -0
  866. data/spec/models/get_deals_timeline_spec.rb +47 -0
  867. data/spec/models/get_duplicated_deal_spec.rb +47 -0
  868. data/spec/models/get_merged_deal_spec.rb +47 -0
  869. data/spec/models/get_notes_spec.rb +53 -0
  870. data/spec/models/get_one_file_spec.rb +47 -0
  871. data/spec/models/get_one_pipeline_all_of_spec.rb +41 -0
  872. data/spec/models/get_one_pipeline_spec.rb +47 -0
  873. data/spec/models/get_one_stage_spec.rb +47 -0
  874. data/spec/models/get_product_attachement_details_spec.rb +47 -0
  875. data/spec/models/get_product_field_response_spec.rb +47 -0
  876. data/spec/models/get_role_all_of_additional_data_spec.rb +41 -0
  877. data/spec/models/get_role_all_of_spec.rb +47 -0
  878. data/spec/models/get_role_assignments_all_of_spec.rb +47 -0
  879. data/spec/models/get_role_assignments_spec.rb +53 -0
  880. data/spec/models/get_role_settings_all_of_spec.rb +41 -0
  881. data/spec/models/get_role_settings_spec.rb +47 -0
  882. data/spec/models/get_role_spec.rb +53 -0
  883. data/spec/models/get_role_subroles_all_of_spec.rb +47 -0
  884. data/spec/models/get_role_subroles_spec.rb +53 -0
  885. data/spec/models/get_roles_all_of_spec.rb +47 -0
  886. data/spec/models/get_roles_spec.rb +53 -0
  887. data/spec/models/get_stage_deals_spec.rb +53 -0
  888. data/spec/models/get_stages_spec.rb +47 -0
  889. data/spec/models/global_message_base_response_spec.rb +41 -0
  890. data/spec/models/global_message_data_spec.rb +71 -0
  891. data/spec/models/global_message_delete_all_of_spec.rb +53 -0
  892. data/spec/models/global_message_delete_spec.rb +59 -0
  893. data/spec/models/global_message_get_all_of_spec.rb +53 -0
  894. data/spec/models/global_message_get_spec.rb +59 -0
  895. data/spec/models/global_message_user_data_spec.rb +53 -0
  896. data/spec/models/icon_key_spec.rb +35 -0
  897. data/spec/models/inline_object10_spec.rb +67 -0
  898. data/spec/models/inline_object11_spec.rb +47 -0
  899. data/spec/models/inline_object12_spec.rb +53 -0
  900. data/spec/models/inline_object13_spec.rb +47 -0
  901. data/spec/models/inline_object14_spec.rb +83 -0
  902. data/spec/models/inline_object15_spec.rb +89 -0
  903. data/spec/models/inline_object16_spec.rb +51 -0
  904. data/spec/models/inline_object17_spec.rb +47 -0
  905. data/spec/models/inline_object18_spec.rb +59 -0
  906. data/spec/models/inline_object19_spec.rb +41 -0
  907. data/spec/models/inline_object1_spec.rb +59 -0
  908. data/spec/models/inline_object20_spec.rb +41 -0
  909. data/spec/models/inline_object21_spec.rb +41 -0
  910. data/spec/models/inline_object22_spec.rb +41 -0
  911. data/spec/models/inline_object23_spec.rb +65 -0
  912. data/spec/models/inline_object24_spec.rb +41 -0
  913. data/spec/models/inline_object25_spec.rb +41 -0
  914. data/spec/models/inline_object26_spec.rb +51 -0
  915. data/spec/models/inline_object27_spec.rb +41 -0
  916. data/spec/models/inline_object28_spec.rb +41 -0
  917. data/spec/models/inline_object29_spec.rb +53 -0
  918. data/spec/models/inline_object2_spec.rb +105 -0
  919. data/spec/models/inline_object30_spec.rb +41 -0
  920. data/spec/models/inline_object31_spec.rb +41 -0
  921. data/spec/models/inline_object32_spec.rb +41 -0
  922. data/spec/models/inline_object33_spec.rb +79 -0
  923. data/spec/models/inline_object3_spec.rb +41 -0
  924. data/spec/models/inline_object4_spec.rb +41 -0
  925. data/spec/models/inline_object5_spec.rb +41 -0
  926. data/spec/models/inline_object6_spec.rb +41 -0
  927. data/spec/models/inline_object7_spec.rb +47 -0
  928. data/spec/models/inline_object8_spec.rb +71 -0
  929. data/spec/models/inline_object9_spec.rb +77 -0
  930. data/spec/models/inline_object_spec.rb +53 -0
  931. data/spec/models/inline_response20010_data_spec.rb +41 -0
  932. data/spec/models/inline_response20010_spec.rb +47 -0
  933. data/spec/models/inline_response20011_data_spec.rb +41 -0
  934. data/spec/models/inline_response20011_spec.rb +47 -0
  935. data/spec/models/inline_response2001_spec.rb +47 -0
  936. data/spec/models/inline_response2002_spec.rb +47 -0
  937. data/spec/models/inline_response2003_spec.rb +41 -0
  938. data/spec/models/inline_response2004_spec.rb +53 -0
  939. data/spec/models/inline_response2005_spec.rb +41 -0
  940. data/spec/models/inline_response2006_spec.rb +47 -0
  941. data/spec/models/inline_response2007_data_spec.rb +65 -0
  942. data/spec/models/inline_response2007_spec.rb +47 -0
  943. data/spec/models/inline_response2008_data_spec.rb +41 -0
  944. data/spec/models/inline_response2008_spec.rb +47 -0
  945. data/spec/models/inline_response2009_data_spec.rb +41 -0
  946. data/spec/models/inline_response2009_spec.rb +47 -0
  947. data/spec/models/inline_response200_additional_data_spec.rb +53 -0
  948. data/spec/models/inline_response200_spec.rb +53 -0
  949. data/spec/models/inline_response201_data_spec.rb +131 -0
  950. data/spec/models/inline_response201_spec.rb +47 -0
  951. data/spec/models/inline_response400_spec.rb +65 -0
  952. data/spec/models/inline_response403_spec.rb +65 -0
  953. data/spec/models/inline_response4041_spec.rb +65 -0
  954. data/spec/models/inline_response404_spec.rb +65 -0
  955. data/spec/models/inline_response409_spec.rb +65 -0
  956. data/spec/models/inline_response410_spec.rb +65 -0
  957. data/spec/models/inline_response500_spec.rb +65 -0
  958. data/spec/models/leads_value_spec.rb +47 -0
  959. data/spec/models/link_remote_file_to_item_spec.rb +47 -0
  960. data/spec/models/mail_message_all_of_spec.rb +41 -0
  961. data/spec/models/mail_message_data_spec.rb +213 -0
  962. data/spec/models/mail_message_spec.rb +65 -0
  963. data/spec/models/mail_participant_spec.rb +71 -0
  964. data/spec/models/mail_service_base_response_spec.rb +59 -0
  965. data/spec/models/mail_thread_all_of_spec.rb +41 -0
  966. data/spec/models/mail_thread_delete_all_of_spec.rb +41 -0
  967. data/spec/models/mail_thread_delete_spec.rb +47 -0
  968. data/spec/models/mail_thread_messages_all_of_spec.rb +41 -0
  969. data/spec/models/mail_thread_messages_spec.rb +47 -0
  970. data/spec/models/mail_thread_one_all_of_spec.rb +41 -0
  971. data/spec/models/mail_thread_one_spec.rb +47 -0
  972. data/spec/models/mail_thread_participant_spec.rb +89 -0
  973. data/spec/models/mail_thread_put_spec.rb +47 -0
  974. data/spec/models/mail_thread_spec.rb +47 -0
  975. data/spec/models/new_deal_all_of_spec.rb +41 -0
  976. data/spec/models/new_deal_product_all_of_spec.rb +41 -0
  977. data/spec/models/new_deal_product_spec.rb +83 -0
  978. data/spec/models/new_deal_spec.rb +111 -0
  979. data/spec/models/new_follower_response_data_spec.rb +59 -0
  980. data/spec/models/new_follower_response_spec.rb +47 -0
  981. data/spec/models/new_goal_spec.rb +35 -0
  982. data/spec/models/new_organization_all_of_spec.rb +41 -0
  983. data/spec/models/new_organization_field_spec.rb +57 -0
  984. data/spec/models/new_organization_spec.rb +59 -0
  985. data/spec/models/new_person_all_of_spec.rb +41 -0
  986. data/spec/models/new_person_field_spec.rb +57 -0
  987. data/spec/models/new_person_spec.rb +77 -0
  988. data/spec/models/new_product_field_all_of_spec.rb +57 -0
  989. data/spec/models/new_product_field_spec.rb +57 -0
  990. data/spec/models/note_creator_user_spec.rb +59 -0
  991. data/spec/models/note_spec.rb +89 -0
  992. data/spec/models/number_boolean_default0_spec.rb +35 -0
  993. data/spec/models/number_boolean_default1_spec.rb +35 -0
  994. data/spec/models/number_boolean_spec.rb +35 -0
  995. data/spec/models/organization_relationship_spec.rb +63 -0
  996. data/spec/models/permission_sets_all_of_spec.rb +41 -0
  997. data/spec/models/permission_sets_item_spec.rb +53 -0
  998. data/spec/models/permission_sets_spec.rb +47 -0
  999. data/spec/models/pipeline_spec.rb +59 -0
  1000. data/spec/models/post_note_spec.rb +47 -0
  1001. data/spec/models/post_role_assignment_all_of_data_spec.rb +47 -0
  1002. data/spec/models/post_role_assignment_all_of_spec.rb +41 -0
  1003. data/spec/models/post_role_assignment_spec.rb +47 -0
  1004. data/spec/models/post_role_settings_all_of_data_spec.rb +51 -0
  1005. data/spec/models/post_role_settings_all_of_spec.rb +41 -0
  1006. data/spec/models/post_role_settings_spec.rb +47 -0
  1007. data/spec/models/post_roles_all_of_data_spec.rb +41 -0
  1008. data/spec/models/post_roles_all_of_spec.rb +41 -0
  1009. data/spec/models/post_roles_spec.rb +47 -0
  1010. data/spec/models/product_attachement_fields_spec.rb +113 -0
  1011. data/spec/models/product_field_all_of_spec.rb +125 -0
  1012. data/spec/models/product_field_spec.rb +147 -0
  1013. data/spec/models/product_spec.rb +83 -0
  1014. data/spec/models/put_role_all_of_data_spec.rb +41 -0
  1015. data/spec/models/put_role_all_of_spec.rb +41 -0
  1016. data/spec/models/put_role_spec.rb +47 -0
  1017. data/spec/models/role_assignment_all_of_spec.rb +59 -0
  1018. data/spec/models/role_assignment_spec.rb +71 -0
  1019. data/spec/models/role_settings_spec.rb +83 -0
  1020. data/spec/models/roles_additional_data_pagination_spec.rb +53 -0
  1021. data/spec/models/roles_additional_data_spec.rb +41 -0
  1022. data/spec/models/single_permission_sets_item_all_of_spec.rb +41 -0
  1023. data/spec/models/single_permission_sets_item_spec.rb +59 -0
  1024. data/spec/models/stage_spec.rb +69 -0
  1025. data/spec/models/sub_role_all_of_spec.rb +59 -0
  1026. data/spec/models/sub_role_spec.rb +71 -0
  1027. data/spec/models/teams_all_of_spec.rb +41 -0
  1028. data/spec/models/teams_spec.rb +47 -0
  1029. data/spec/models/unauthorized_spec.rb +53 -0
  1030. data/spec/models/update_file_spec.rb +47 -0
  1031. data/spec/models/update_team_all_of_spec.rb +47 -0
  1032. data/spec/models/update_team_spec.rb +71 -0
  1033. data/spec/models/user_all_of_spec.rb +41 -0
  1034. data/spec/models/user_assignment_to_permission_set_spec.rb +59 -0
  1035. data/spec/models/user_assignments_to_permission_set_all_of_spec.rb +41 -0
  1036. data/spec/models/user_assignments_to_permission_set_spec.rb +47 -0
  1037. data/spec/models/user_connections_all_of_data_spec.rb +41 -0
  1038. data/spec/models/user_connections_all_of_spec.rb +41 -0
  1039. data/spec/models/user_connections_spec.rb +47 -0
  1040. data/spec/models/user_i_ds_all_of_spec.rb +41 -0
  1041. data/spec/models/user_i_ds_spec.rb +47 -0
  1042. data/spec/models/user_me_all_of_spec.rb +41 -0
  1043. data/spec/models/user_me_spec.rb +47 -0
  1044. data/spec/models/user_settings_all_of_spec.rb +41 -0
  1045. data/spec/models/user_settings_item_spec.rb +95 -0
  1046. data/spec/models/user_settings_spec.rb +47 -0
  1047. data/spec/models/user_spec.rb +47 -0
  1048. data/spec/models/users_all_of_spec.rb +41 -0
  1049. data/spec/models/users_spec.rb +47 -0
  1050. data/spec/models/visible_to_spec.rb +35 -0
  1051. data/spec/spec_helper.rb +111 -0
  1052. metadata +1495 -0
@@ -0,0 +1,2018 @@
1
+ =begin
2
+ #Pipedrive API v1
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Pipedrive
16
+ class DealsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete multiple deals in bulk
23
+ # Marks multiple deals as deleted.
24
+ # @param ids [String] Comma-separated IDs that will be deleted
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [DeleteMultipleDeals]
27
+ def deals_delete(ids, opts = {})
28
+ data, _status_code, _headers = deals_delete_with_http_info(ids, opts)
29
+ data
30
+ end
31
+
32
+ # Delete multiple deals in bulk
33
+ # Marks multiple deals as deleted.
34
+ # @param ids [String] Comma-separated IDs that will be deleted
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(DeleteMultipleDeals, Integer, Hash)>] DeleteMultipleDeals data, response status code and response headers
37
+ def deals_delete_with_http_info(ids, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_delete ...'
40
+ end
41
+ # verify the required parameter 'ids' is set
42
+ if @api_client.config.client_side_validation && ids.nil?
43
+ fail ArgumentError, "Missing the required parameter 'ids' when calling DealsApi.deals_delete"
44
+ end
45
+ # resource path
46
+ local_var_path = '/deals'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+ query_params[:'ids'] = ids
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
56
+
57
+ # form parameters
58
+ form_params = opts[:form_params] || {}
59
+
60
+ # http body (model)
61
+ post_body = opts[:body]
62
+
63
+ # return_type
64
+ return_type = opts[:return_type] || 'DeleteMultipleDeals'
65
+
66
+ # auth_names
67
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
68
+
69
+ new_options = opts.merge(
70
+ :header_params => header_params,
71
+ :query_params => query_params,
72
+ :form_params => form_params,
73
+ :body => post_body,
74
+ :auth_names => auth_names,
75
+ :return_type => return_type
76
+ )
77
+
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
79
+ if @api_client.config.debugging
80
+ @api_client.config.logger.debug "API called: DealsApi#deals_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
81
+ end
82
+ return data, status_code, headers
83
+ end
84
+
85
+ # Find deals by name
86
+ # <strong>This endpoint is deprecated. Please use <a href=\"https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals_search\">/v1/deals/search</a> or <a href=\"https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\">/v1/itemSearch</a> instead</strong>. <br> Searches all deals by their title.
87
+ # @param term [String] Search term to look for
88
+ # @param [Hash] opts the optional parameters
89
+ # @option opts [Integer] :person_id ID of the person the Deal is associated with.
90
+ # @option opts [Integer] :org_id ID of the organization the Deal is associated with.
91
+ # @return [GetDealsByName]
92
+ def deals_find_get(term, opts = {})
93
+ data, _status_code, _headers = deals_find_get_with_http_info(term, opts)
94
+ data
95
+ end
96
+
97
+ # Find deals by name
98
+ # &lt;strong&gt;This endpoint is deprecated. Please use &lt;a href&#x3D;\&quot;https://developers.pipedrive.com/docs/api/v1/#!/Deals/get_deals_search\&quot;&gt;/v1/deals/search&lt;/a&gt; or &lt;a href&#x3D;\&quot;https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\&quot;&gt;/v1/itemSearch&lt;/a&gt; instead&lt;/strong&gt;. &lt;br&gt; Searches all deals by their title.
99
+ # @param term [String] Search term to look for
100
+ # @param [Hash] opts the optional parameters
101
+ # @option opts [Integer] :person_id ID of the person the Deal is associated with.
102
+ # @option opts [Integer] :org_id ID of the organization the Deal is associated with.
103
+ # @return [Array<(GetDealsByName, Integer, Hash)>] GetDealsByName data, response status code and response headers
104
+ def deals_find_get_with_http_info(term, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_find_get ...'
107
+ end
108
+ # verify the required parameter 'term' is set
109
+ if @api_client.config.client_side_validation && term.nil?
110
+ fail ArgumentError, "Missing the required parameter 'term' when calling DealsApi.deals_find_get"
111
+ end
112
+ # resource path
113
+ local_var_path = '/deals/find'
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+ query_params[:'term'] = term
118
+ query_params[:'person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
119
+ query_params[:'org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil?
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = opts[:form_params] || {}
128
+
129
+ # http body (model)
130
+ post_body = opts[:body]
131
+
132
+ # return_type
133
+ return_type = opts[:return_type] || 'GetDealsByName'
134
+
135
+ # auth_names
136
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
137
+
138
+ new_options = opts.merge(
139
+ :header_params => header_params,
140
+ :query_params => query_params,
141
+ :form_params => form_params,
142
+ :body => post_body,
143
+ :auth_names => auth_names,
144
+ :return_type => return_type
145
+ )
146
+
147
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: DealsApi#deals_find_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
153
+
154
+ # Get all deals
155
+ # Returns all deals. For more information on how to get all deals, see <a href=\"https://pipedrive.readme.io/docs/getting-all-deals\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.
156
+ # @param [Hash] opts the optional parameters
157
+ # @option opts [Integer] :user_id If supplied, only deals matching the given user will be returned.
158
+ # @option opts [Integer] :filter_id ID of the filter to use
159
+ # @option opts [Integer] :stage_id If supplied, only deals within the given stage will be returned.
160
+ # @option opts [String] :status Only fetch deals with specific status. If omitted, all not deleted deals are fetched. (default to 'all_not_deleted')
161
+ # @option opts [Integer] :start Pagination start (default to 0)
162
+ # @option opts [Integer] :limit Items shown per page
163
+ # @option opts [String] :sort Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys).
164
+ # @option opts [NumberBoolean] :owned_by_you When supplied, only deals owned by you are returned. However filter_id takes precedence over owned_by_you when both are supplied.
165
+ # @return [GetDeals]
166
+ def deals_get(opts = {})
167
+ data, _status_code, _headers = deals_get_with_http_info(opts)
168
+ data
169
+ end
170
+
171
+ # Get all deals
172
+ # Returns all deals. For more information on how to get all deals, see &lt;a href&#x3D;\&quot;https://pipedrive.readme.io/docs/getting-all-deals\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;this tutorial&lt;/a&gt;.
173
+ # @param [Hash] opts the optional parameters
174
+ # @option opts [Integer] :user_id If supplied, only deals matching the given user will be returned.
175
+ # @option opts [Integer] :filter_id ID of the filter to use
176
+ # @option opts [Integer] :stage_id If supplied, only deals within the given stage will be returned.
177
+ # @option opts [String] :status Only fetch deals with specific status. If omitted, all not deleted deals are fetched.
178
+ # @option opts [Integer] :start Pagination start
179
+ # @option opts [Integer] :limit Items shown per page
180
+ # @option opts [String] :sort Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys).
181
+ # @option opts [NumberBoolean] :owned_by_you When supplied, only deals owned by you are returned. However filter_id takes precedence over owned_by_you when both are supplied.
182
+ # @return [Array<(GetDeals, Integer, Hash)>] GetDeals data, response status code and response headers
183
+ def deals_get_with_http_info(opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_get ...'
186
+ end
187
+ allowable_values = ["open", "won", "lost", "deleted", "all_not_deleted"]
188
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
189
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
190
+ end
191
+ # resource path
192
+ local_var_path = '/deals'
193
+
194
+ # query parameters
195
+ query_params = opts[:query_params] || {}
196
+ query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
197
+ query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
198
+ query_params[:'stage_id'] = opts[:'stage_id'] if !opts[:'stage_id'].nil?
199
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
200
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
201
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
202
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
203
+ query_params[:'owned_by_you'] = opts[:'owned_by_you'] if !opts[:'owned_by_you'].nil?
204
+
205
+ # header parameters
206
+ header_params = opts[:header_params] || {}
207
+ # HTTP header 'Accept' (if needed)
208
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
209
+
210
+ # form parameters
211
+ form_params = opts[:form_params] || {}
212
+
213
+ # http body (model)
214
+ post_body = opts[:body]
215
+
216
+ # return_type
217
+ return_type = opts[:return_type] || 'GetDeals'
218
+
219
+ # auth_names
220
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
221
+
222
+ new_options = opts.merge(
223
+ :header_params => header_params,
224
+ :query_params => query_params,
225
+ :form_params => form_params,
226
+ :body => post_body,
227
+ :auth_names => auth_names,
228
+ :return_type => return_type
229
+ )
230
+
231
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
+ if @api_client.config.debugging
233
+ @api_client.config.logger.debug "API called: DealsApi#deals_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
+ end
235
+ return data, status_code, headers
236
+ end
237
+
238
+ # List activities associated with a deal
239
+ # Lists activities associated with a deal.
240
+ # @param id [Integer] ID of the deal
241
+ # @param [Hash] opts the optional parameters
242
+ # @option opts [Integer] :start Pagination start (default to 0)
243
+ # @option opts [Integer] :limit Items shown per page
244
+ # @option opts [NumberBoolean] :done Whether the activity is done or not. 0 &#x3D; Not done, 1 &#x3D; Done. If omitted returns both Done and Not done activities.
245
+ # @option opts [String] :exclude A comma-separated string of activity IDs to exclude from result
246
+ # @return [nil]
247
+ def deals_id_activities_get(id, opts = {})
248
+ deals_id_activities_get_with_http_info(id, opts)
249
+ nil
250
+ end
251
+
252
+ # List activities associated with a deal
253
+ # Lists activities associated with a deal.
254
+ # @param id [Integer] ID of the deal
255
+ # @param [Hash] opts the optional parameters
256
+ # @option opts [Integer] :start Pagination start
257
+ # @option opts [Integer] :limit Items shown per page
258
+ # @option opts [NumberBoolean] :done Whether the activity is done or not. 0 &#x3D; Not done, 1 &#x3D; Done. If omitted returns both Done and Not done activities.
259
+ # @option opts [String] :exclude A comma-separated string of activity IDs to exclude from result
260
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
261
+ def deals_id_activities_get_with_http_info(id, opts = {})
262
+ if @api_client.config.debugging
263
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_activities_get ...'
264
+ end
265
+ # verify the required parameter 'id' is set
266
+ if @api_client.config.client_side_validation && id.nil?
267
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_activities_get"
268
+ end
269
+ # resource path
270
+ local_var_path = '/deals/{id}/activities'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
271
+
272
+ # query parameters
273
+ query_params = opts[:query_params] || {}
274
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
275
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
276
+ query_params[:'done'] = opts[:'done'] if !opts[:'done'].nil?
277
+ query_params[:'exclude'] = opts[:'exclude'] if !opts[:'exclude'].nil?
278
+
279
+ # header parameters
280
+ header_params = opts[:header_params] || {}
281
+
282
+ # form parameters
283
+ form_params = opts[:form_params] || {}
284
+
285
+ # http body (model)
286
+ post_body = opts[:body]
287
+
288
+ # return_type
289
+ return_type = opts[:return_type]
290
+
291
+ # auth_names
292
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
293
+
294
+ new_options = opts.merge(
295
+ :header_params => header_params,
296
+ :query_params => query_params,
297
+ :form_params => form_params,
298
+ :body => post_body,
299
+ :auth_names => auth_names,
300
+ :return_type => return_type
301
+ )
302
+
303
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
304
+ if @api_client.config.debugging
305
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_activities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
306
+ end
307
+ return data, status_code, headers
308
+ end
309
+
310
+ # Delete a deal
311
+ # Marks a deal as deleted.
312
+ # @param id [Integer] ID of the deal
313
+ # @param [Hash] opts the optional parameters
314
+ # @return [DeleteDeal]
315
+ def deals_id_delete(id, opts = {})
316
+ data, _status_code, _headers = deals_id_delete_with_http_info(id, opts)
317
+ data
318
+ end
319
+
320
+ # Delete a deal
321
+ # Marks a deal as deleted.
322
+ # @param id [Integer] ID of the deal
323
+ # @param [Hash] opts the optional parameters
324
+ # @return [Array<(DeleteDeal, Integer, Hash)>] DeleteDeal data, response status code and response headers
325
+ def deals_id_delete_with_http_info(id, opts = {})
326
+ if @api_client.config.debugging
327
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_delete ...'
328
+ end
329
+ # verify the required parameter 'id' is set
330
+ if @api_client.config.client_side_validation && id.nil?
331
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_delete"
332
+ end
333
+ # resource path
334
+ local_var_path = '/deals/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
335
+
336
+ # query parameters
337
+ query_params = opts[:query_params] || {}
338
+
339
+ # header parameters
340
+ header_params = opts[:header_params] || {}
341
+ # HTTP header 'Accept' (if needed)
342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
343
+
344
+ # form parameters
345
+ form_params = opts[:form_params] || {}
346
+
347
+ # http body (model)
348
+ post_body = opts[:body]
349
+
350
+ # return_type
351
+ return_type = opts[:return_type] || 'DeleteDeal'
352
+
353
+ # auth_names
354
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
355
+
356
+ new_options = opts.merge(
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => return_type
363
+ )
364
+
365
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # Duplicate deal
373
+ # Duplicate a deal
374
+ # @param id [Integer] ID of the deal
375
+ # @param [Hash] opts the optional parameters
376
+ # @return [GetDuplicatedDeal]
377
+ def deals_id_duplicate_post(id, opts = {})
378
+ data, _status_code, _headers = deals_id_duplicate_post_with_http_info(id, opts)
379
+ data
380
+ end
381
+
382
+ # Duplicate deal
383
+ # Duplicate a deal
384
+ # @param id [Integer] ID of the deal
385
+ # @param [Hash] opts the optional parameters
386
+ # @return [Array<(GetDuplicatedDeal, Integer, Hash)>] GetDuplicatedDeal data, response status code and response headers
387
+ def deals_id_duplicate_post_with_http_info(id, opts = {})
388
+ if @api_client.config.debugging
389
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_duplicate_post ...'
390
+ end
391
+ # verify the required parameter 'id' is set
392
+ if @api_client.config.client_side_validation && id.nil?
393
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_duplicate_post"
394
+ end
395
+ # resource path
396
+ local_var_path = '/deals/{id}/duplicate'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
397
+
398
+ # query parameters
399
+ query_params = opts[:query_params] || {}
400
+
401
+ # header parameters
402
+ header_params = opts[:header_params] || {}
403
+ # HTTP header 'Accept' (if needed)
404
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
405
+
406
+ # form parameters
407
+ form_params = opts[:form_params] || {}
408
+
409
+ # http body (model)
410
+ post_body = opts[:body]
411
+
412
+ # return_type
413
+ return_type = opts[:return_type] || 'GetDuplicatedDeal'
414
+
415
+ # auth_names
416
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
417
+
418
+ new_options = opts.merge(
419
+ :header_params => header_params,
420
+ :query_params => query_params,
421
+ :form_params => form_params,
422
+ :body => post_body,
423
+ :auth_names => auth_names,
424
+ :return_type => return_type
425
+ )
426
+
427
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_duplicate_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
430
+ end
431
+ return data, status_code, headers
432
+ end
433
+
434
+ # List files attached to a deal
435
+ # Lists files associated with a deal.
436
+ # @param id [Integer] ID of the deal
437
+ # @param [Hash] opts the optional parameters
438
+ # @option opts [Integer] :start Pagination start (default to 0)
439
+ # @option opts [Integer] :limit Items shown per page
440
+ # @option opts [NumberBoolean] :include_deleted_files When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work.
441
+ # @option opts [String] :sort Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment.
442
+ # @return [nil]
443
+ def deals_id_files_get(id, opts = {})
444
+ deals_id_files_get_with_http_info(id, opts)
445
+ nil
446
+ end
447
+
448
+ # List files attached to a deal
449
+ # Lists files associated with a deal.
450
+ # @param id [Integer] ID of the deal
451
+ # @param [Hash] opts the optional parameters
452
+ # @option opts [Integer] :start Pagination start
453
+ # @option opts [Integer] :limit Items shown per page
454
+ # @option opts [NumberBoolean] :include_deleted_files When enabled, the list of files will also include deleted files. Please note that trying to download these files will not work.
455
+ # @option opts [String] :sort Field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Supported fields: id, user_id, deal_id, person_id, org_id, product_id, add_time, update_time, file_name, file_type, file_size, comment.
456
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
457
+ def deals_id_files_get_with_http_info(id, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_files_get ...'
460
+ end
461
+ # verify the required parameter 'id' is set
462
+ if @api_client.config.client_side_validation && id.nil?
463
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_files_get"
464
+ end
465
+ # resource path
466
+ local_var_path = '/deals/{id}/files'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
467
+
468
+ # query parameters
469
+ query_params = opts[:query_params] || {}
470
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
471
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
472
+ query_params[:'include_deleted_files'] = opts[:'include_deleted_files'] if !opts[:'include_deleted_files'].nil?
473
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
474
+
475
+ # header parameters
476
+ header_params = opts[:header_params] || {}
477
+
478
+ # form parameters
479
+ form_params = opts[:form_params] || {}
480
+
481
+ # http body (model)
482
+ post_body = opts[:body]
483
+
484
+ # return_type
485
+ return_type = opts[:return_type]
486
+
487
+ # auth_names
488
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
489
+
490
+ new_options = opts.merge(
491
+ :header_params => header_params,
492
+ :query_params => query_params,
493
+ :form_params => form_params,
494
+ :body => post_body,
495
+ :auth_names => auth_names,
496
+ :return_type => return_type
497
+ )
498
+
499
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
500
+ if @api_client.config.debugging
501
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_files_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
502
+ end
503
+ return data, status_code, headers
504
+ end
505
+
506
+ # List updates about a deal
507
+ # Lists updates about a deal.
508
+ # @param id [Integer] ID of the deal
509
+ # @param [Hash] opts the optional parameters
510
+ # @option opts [Integer] :start Pagination start (default to 0)
511
+ # @option opts [Integer] :limit Items shown per page
512
+ # @option opts [String] :all_changes Whether to show custom field updates or not. 1 &#x3D; Include custom field changes. If omitted returns changes without custom field updates.
513
+ # @option opts [String] :items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document)
514
+ # @return [nil]
515
+ def deals_id_flow_get(id, opts = {})
516
+ deals_id_flow_get_with_http_info(id, opts)
517
+ nil
518
+ end
519
+
520
+ # List updates about a deal
521
+ # Lists updates about a deal.
522
+ # @param id [Integer] ID of the deal
523
+ # @param [Hash] opts the optional parameters
524
+ # @option opts [Integer] :start Pagination start
525
+ # @option opts [Integer] :limit Items shown per page
526
+ # @option opts [String] :all_changes Whether to show custom field updates or not. 1 &#x3D; Include custom field changes. If omitted returns changes without custom field updates.
527
+ # @option opts [String] :items A comma-separated string for filtering out item specific updates. (Possible values - activity, plannedActivity, note, file, change, deal, follower, participant, mailMessage, mailMessageWithAttachment, invoice, activityFile, document)
528
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
529
+ def deals_id_flow_get_with_http_info(id, opts = {})
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_flow_get ...'
532
+ end
533
+ # verify the required parameter 'id' is set
534
+ if @api_client.config.client_side_validation && id.nil?
535
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_flow_get"
536
+ end
537
+ # resource path
538
+ local_var_path = '/deals/{id}/flow'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
539
+
540
+ # query parameters
541
+ query_params = opts[:query_params] || {}
542
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
543
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
544
+ query_params[:'all_changes'] = opts[:'all_changes'] if !opts[:'all_changes'].nil?
545
+ query_params[:'items'] = opts[:'items'] if !opts[:'items'].nil?
546
+
547
+ # header parameters
548
+ header_params = opts[:header_params] || {}
549
+
550
+ # form parameters
551
+ form_params = opts[:form_params] || {}
552
+
553
+ # http body (model)
554
+ post_body = opts[:body]
555
+
556
+ # return_type
557
+ return_type = opts[:return_type]
558
+
559
+ # auth_names
560
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
561
+
562
+ new_options = opts.merge(
563
+ :header_params => header_params,
564
+ :query_params => query_params,
565
+ :form_params => form_params,
566
+ :body => post_body,
567
+ :auth_names => auth_names,
568
+ :return_type => return_type
569
+ )
570
+
571
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
572
+ if @api_client.config.debugging
573
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_flow_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
574
+ end
575
+ return data, status_code, headers
576
+ end
577
+
578
+ # Delete a follower from a deal
579
+ # Deletes a follower from a deal.
580
+ # @param id [Integer] ID of the deal
581
+ # @param follower_id [Integer] ID of the follower
582
+ # @param [Hash] opts the optional parameters
583
+ # @return [DeleteDealFollower]
584
+ def deals_id_followers_follower_id_delete(id, follower_id, opts = {})
585
+ data, _status_code, _headers = deals_id_followers_follower_id_delete_with_http_info(id, follower_id, opts)
586
+ data
587
+ end
588
+
589
+ # Delete a follower from a deal
590
+ # Deletes a follower from a deal.
591
+ # @param id [Integer] ID of the deal
592
+ # @param follower_id [Integer] ID of the follower
593
+ # @param [Hash] opts the optional parameters
594
+ # @return [Array<(DeleteDealFollower, Integer, Hash)>] DeleteDealFollower data, response status code and response headers
595
+ def deals_id_followers_follower_id_delete_with_http_info(id, follower_id, opts = {})
596
+ if @api_client.config.debugging
597
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_followers_follower_id_delete ...'
598
+ end
599
+ # verify the required parameter 'id' is set
600
+ if @api_client.config.client_side_validation && id.nil?
601
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_followers_follower_id_delete"
602
+ end
603
+ # verify the required parameter 'follower_id' is set
604
+ if @api_client.config.client_side_validation && follower_id.nil?
605
+ fail ArgumentError, "Missing the required parameter 'follower_id' when calling DealsApi.deals_id_followers_follower_id_delete"
606
+ end
607
+ # resource path
608
+ local_var_path = '/deals/{id}/followers/{follower_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'follower_id' + '}', CGI.escape(follower_id.to_s))
609
+
610
+ # query parameters
611
+ query_params = opts[:query_params] || {}
612
+
613
+ # header parameters
614
+ header_params = opts[:header_params] || {}
615
+ # HTTP header 'Accept' (if needed)
616
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
617
+
618
+ # form parameters
619
+ form_params = opts[:form_params] || {}
620
+
621
+ # http body (model)
622
+ post_body = opts[:body]
623
+
624
+ # return_type
625
+ return_type = opts[:return_type] || 'DeleteDealFollower'
626
+
627
+ # auth_names
628
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
629
+
630
+ new_options = opts.merge(
631
+ :header_params => header_params,
632
+ :query_params => query_params,
633
+ :form_params => form_params,
634
+ :body => post_body,
635
+ :auth_names => auth_names,
636
+ :return_type => return_type
637
+ )
638
+
639
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
640
+ if @api_client.config.debugging
641
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_followers_follower_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
642
+ end
643
+ return data, status_code, headers
644
+ end
645
+
646
+ # List followers of a deal
647
+ # Lists the followers of a deal.
648
+ # @param id [Integer] ID of the deal
649
+ # @param [Hash] opts the optional parameters
650
+ # @return [nil]
651
+ def deals_id_followers_get(id, opts = {})
652
+ deals_id_followers_get_with_http_info(id, opts)
653
+ nil
654
+ end
655
+
656
+ # List followers of a deal
657
+ # Lists the followers of a deal.
658
+ # @param id [Integer] ID of the deal
659
+ # @param [Hash] opts the optional parameters
660
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
661
+ def deals_id_followers_get_with_http_info(id, opts = {})
662
+ if @api_client.config.debugging
663
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_followers_get ...'
664
+ end
665
+ # verify the required parameter 'id' is set
666
+ if @api_client.config.client_side_validation && id.nil?
667
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_followers_get"
668
+ end
669
+ # resource path
670
+ local_var_path = '/deals/{id}/followers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
671
+
672
+ # query parameters
673
+ query_params = opts[:query_params] || {}
674
+
675
+ # header parameters
676
+ header_params = opts[:header_params] || {}
677
+
678
+ # form parameters
679
+ form_params = opts[:form_params] || {}
680
+
681
+ # http body (model)
682
+ post_body = opts[:body]
683
+
684
+ # return_type
685
+ return_type = opts[:return_type]
686
+
687
+ # auth_names
688
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
689
+
690
+ new_options = opts.merge(
691
+ :header_params => header_params,
692
+ :query_params => query_params,
693
+ :form_params => form_params,
694
+ :body => post_body,
695
+ :auth_names => auth_names,
696
+ :return_type => return_type
697
+ )
698
+
699
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
700
+ if @api_client.config.debugging
701
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_followers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
702
+ end
703
+ return data, status_code, headers
704
+ end
705
+
706
+ # Add a follower to a deal
707
+ # Adds a follower to a deal.
708
+ # @param id [Integer] ID of the deal
709
+ # @param user_id [Integer] ID of the user
710
+ # @param [Hash] opts the optional parameters
711
+ # @return [AddedDealFollower]
712
+ def deals_id_followers_post(id, user_id, opts = {})
713
+ data, _status_code, _headers = deals_id_followers_post_with_http_info(id, user_id, opts)
714
+ data
715
+ end
716
+
717
+ # Add a follower to a deal
718
+ # Adds a follower to a deal.
719
+ # @param id [Integer] ID of the deal
720
+ # @param user_id [Integer] ID of the user
721
+ # @param [Hash] opts the optional parameters
722
+ # @return [Array<(AddedDealFollower, Integer, Hash)>] AddedDealFollower data, response status code and response headers
723
+ def deals_id_followers_post_with_http_info(id, user_id, opts = {})
724
+ if @api_client.config.debugging
725
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_followers_post ...'
726
+ end
727
+ # verify the required parameter 'id' is set
728
+ if @api_client.config.client_side_validation && id.nil?
729
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_followers_post"
730
+ end
731
+ # verify the required parameter 'user_id' is set
732
+ if @api_client.config.client_side_validation && user_id.nil?
733
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling DealsApi.deals_id_followers_post"
734
+ end
735
+ # resource path
736
+ local_var_path = '/deals/{id}/followers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
737
+
738
+ # query parameters
739
+ query_params = opts[:query_params] || {}
740
+
741
+ # header parameters
742
+ header_params = opts[:header_params] || {}
743
+ # HTTP header 'Accept' (if needed)
744
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
745
+ # HTTP header 'Content-Type'
746
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
747
+
748
+ # form parameters
749
+ form_params = opts[:form_params] || {}
750
+ form_params['user_id'] = user_id
751
+
752
+ # http body (model)
753
+ post_body = opts[:body]
754
+
755
+ # return_type
756
+ return_type = opts[:return_type] || 'AddedDealFollower'
757
+
758
+ # auth_names
759
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
760
+
761
+ new_options = opts.merge(
762
+ :header_params => header_params,
763
+ :query_params => query_params,
764
+ :form_params => form_params,
765
+ :body => post_body,
766
+ :auth_names => auth_names,
767
+ :return_type => return_type
768
+ )
769
+
770
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
771
+ if @api_client.config.debugging
772
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_followers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
773
+ end
774
+ return data, status_code, headers
775
+ end
776
+
777
+ # Get details of a deal
778
+ # Returns details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the 'key' value of dealFields. For more information on how to get all details of a deal, see <a href=\"https://pipedrive.readme.io/docs/getting-details-of-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.
779
+ # @param id [Integer] ID of the deal
780
+ # @param [Hash] opts the optional parameters
781
+ # @return [GetDeal]
782
+ def deals_id_get(id, opts = {})
783
+ data, _status_code, _headers = deals_id_get_with_http_info(id, opts)
784
+ data
785
+ end
786
+
787
+ # Get details of a deal
788
+ # Returns details of a specific deal. Note that this also returns some additional fields which are not present when asking for all deals – such as deal age and stay in pipeline stages. Also note that custom fields appear as long hashes in the resulting data. These hashes can be mapped against the &#39;key&#39; value of dealFields. For more information on how to get all details of a deal, see &lt;a href&#x3D;\&quot;https://pipedrive.readme.io/docs/getting-details-of-a-deal\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;this tutorial&lt;/a&gt;.
789
+ # @param id [Integer] ID of the deal
790
+ # @param [Hash] opts the optional parameters
791
+ # @return [Array<(GetDeal, Integer, Hash)>] GetDeal data, response status code and response headers
792
+ def deals_id_get_with_http_info(id, opts = {})
793
+ if @api_client.config.debugging
794
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_get ...'
795
+ end
796
+ # verify the required parameter 'id' is set
797
+ if @api_client.config.client_side_validation && id.nil?
798
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_get"
799
+ end
800
+ # resource path
801
+ local_var_path = '/deals/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
802
+
803
+ # query parameters
804
+ query_params = opts[:query_params] || {}
805
+
806
+ # header parameters
807
+ header_params = opts[:header_params] || {}
808
+ # HTTP header 'Accept' (if needed)
809
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
810
+
811
+ # form parameters
812
+ form_params = opts[:form_params] || {}
813
+
814
+ # http body (model)
815
+ post_body = opts[:body]
816
+
817
+ # return_type
818
+ return_type = opts[:return_type] || 'GetDeal'
819
+
820
+ # auth_names
821
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
822
+
823
+ new_options = opts.merge(
824
+ :header_params => header_params,
825
+ :query_params => query_params,
826
+ :form_params => form_params,
827
+ :body => post_body,
828
+ :auth_names => auth_names,
829
+ :return_type => return_type
830
+ )
831
+
832
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
833
+ if @api_client.config.debugging
834
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
835
+ end
836
+ return data, status_code, headers
837
+ end
838
+
839
+ # List mail messages associated with a deal
840
+ # Lists mail messages associated with a deal.
841
+ # @param id [Integer] ID of the deal
842
+ # @param [Hash] opts the optional parameters
843
+ # @option opts [Integer] :start Pagination start (default to 0)
844
+ # @option opts [Integer] :limit Items shown per page
845
+ # @return [nil]
846
+ def deals_id_mail_messages_get(id, opts = {})
847
+ deals_id_mail_messages_get_with_http_info(id, opts)
848
+ nil
849
+ end
850
+
851
+ # List mail messages associated with a deal
852
+ # Lists mail messages associated with a deal.
853
+ # @param id [Integer] ID of the deal
854
+ # @param [Hash] opts the optional parameters
855
+ # @option opts [Integer] :start Pagination start
856
+ # @option opts [Integer] :limit Items shown per page
857
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
858
+ def deals_id_mail_messages_get_with_http_info(id, opts = {})
859
+ if @api_client.config.debugging
860
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_mail_messages_get ...'
861
+ end
862
+ # verify the required parameter 'id' is set
863
+ if @api_client.config.client_side_validation && id.nil?
864
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_mail_messages_get"
865
+ end
866
+ # resource path
867
+ local_var_path = '/deals/{id}/mailMessages'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
868
+
869
+ # query parameters
870
+ query_params = opts[:query_params] || {}
871
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
872
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
873
+
874
+ # header parameters
875
+ header_params = opts[:header_params] || {}
876
+
877
+ # form parameters
878
+ form_params = opts[:form_params] || {}
879
+
880
+ # http body (model)
881
+ post_body = opts[:body]
882
+
883
+ # return_type
884
+ return_type = opts[:return_type]
885
+
886
+ # auth_names
887
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
888
+
889
+ new_options = opts.merge(
890
+ :header_params => header_params,
891
+ :query_params => query_params,
892
+ :form_params => form_params,
893
+ :body => post_body,
894
+ :auth_names => auth_names,
895
+ :return_type => return_type
896
+ )
897
+
898
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
899
+ if @api_client.config.debugging
900
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_mail_messages_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
901
+ end
902
+ return data, status_code, headers
903
+ end
904
+
905
+ # Merge two deals
906
+ # Merges a deal with another deal. For more information on how to merge two deals, see <a href=\"https://pipedrive.readme.io/docs/merging-two-deals\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.
907
+ # @param id [Integer] ID of the deal
908
+ # @param merge_with_id [Integer] ID of the deal that the deal will be merged with
909
+ # @param [Hash] opts the optional parameters
910
+ # @return [GetMergedDeal]
911
+ def deals_id_merge_put(id, merge_with_id, opts = {})
912
+ data, _status_code, _headers = deals_id_merge_put_with_http_info(id, merge_with_id, opts)
913
+ data
914
+ end
915
+
916
+ # Merge two deals
917
+ # Merges a deal with another deal. For more information on how to merge two deals, see &lt;a href&#x3D;\&quot;https://pipedrive.readme.io/docs/merging-two-deals\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;this tutorial&lt;/a&gt;.
918
+ # @param id [Integer] ID of the deal
919
+ # @param merge_with_id [Integer] ID of the deal that the deal will be merged with
920
+ # @param [Hash] opts the optional parameters
921
+ # @return [Array<(GetMergedDeal, Integer, Hash)>] GetMergedDeal data, response status code and response headers
922
+ def deals_id_merge_put_with_http_info(id, merge_with_id, opts = {})
923
+ if @api_client.config.debugging
924
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_merge_put ...'
925
+ end
926
+ # verify the required parameter 'id' is set
927
+ if @api_client.config.client_side_validation && id.nil?
928
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_merge_put"
929
+ end
930
+ # verify the required parameter 'merge_with_id' is set
931
+ if @api_client.config.client_side_validation && merge_with_id.nil?
932
+ fail ArgumentError, "Missing the required parameter 'merge_with_id' when calling DealsApi.deals_id_merge_put"
933
+ end
934
+ # resource path
935
+ local_var_path = '/deals/{id}/merge'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
936
+
937
+ # query parameters
938
+ query_params = opts[:query_params] || {}
939
+
940
+ # header parameters
941
+ header_params = opts[:header_params] || {}
942
+ # HTTP header 'Accept' (if needed)
943
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
944
+ # HTTP header 'Content-Type'
945
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
946
+
947
+ # form parameters
948
+ form_params = opts[:form_params] || {}
949
+ form_params['merge_with_id'] = merge_with_id
950
+
951
+ # http body (model)
952
+ post_body = opts[:body]
953
+
954
+ # return_type
955
+ return_type = opts[:return_type] || 'GetMergedDeal'
956
+
957
+ # auth_names
958
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
959
+
960
+ new_options = opts.merge(
961
+ :header_params => header_params,
962
+ :query_params => query_params,
963
+ :form_params => form_params,
964
+ :body => post_body,
965
+ :auth_names => auth_names,
966
+ :return_type => return_type
967
+ )
968
+
969
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
970
+ if @api_client.config.debugging
971
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_merge_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
972
+ end
973
+ return data, status_code, headers
974
+ end
975
+
976
+ # Delete a participant from a deal
977
+ # Deletes a participant from a deal.
978
+ # @param id [Integer] ID of the deal
979
+ # @param deal_participant_id [Integer] ID of the deal participant
980
+ # @param [Hash] opts the optional parameters
981
+ # @return [DeleteDealParticipant]
982
+ def deals_id_participants_deal_participant_id_delete(id, deal_participant_id, opts = {})
983
+ data, _status_code, _headers = deals_id_participants_deal_participant_id_delete_with_http_info(id, deal_participant_id, opts)
984
+ data
985
+ end
986
+
987
+ # Delete a participant from a deal
988
+ # Deletes a participant from a deal.
989
+ # @param id [Integer] ID of the deal
990
+ # @param deal_participant_id [Integer] ID of the deal participant
991
+ # @param [Hash] opts the optional parameters
992
+ # @return [Array<(DeleteDealParticipant, Integer, Hash)>] DeleteDealParticipant data, response status code and response headers
993
+ def deals_id_participants_deal_participant_id_delete_with_http_info(id, deal_participant_id, opts = {})
994
+ if @api_client.config.debugging
995
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_participants_deal_participant_id_delete ...'
996
+ end
997
+ # verify the required parameter 'id' is set
998
+ if @api_client.config.client_side_validation && id.nil?
999
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_participants_deal_participant_id_delete"
1000
+ end
1001
+ # verify the required parameter 'deal_participant_id' is set
1002
+ if @api_client.config.client_side_validation && deal_participant_id.nil?
1003
+ fail ArgumentError, "Missing the required parameter 'deal_participant_id' when calling DealsApi.deals_id_participants_deal_participant_id_delete"
1004
+ end
1005
+ # resource path
1006
+ local_var_path = '/deals/{id}/participants/{deal_participant_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'deal_participant_id' + '}', CGI.escape(deal_participant_id.to_s))
1007
+
1008
+ # query parameters
1009
+ query_params = opts[:query_params] || {}
1010
+
1011
+ # header parameters
1012
+ header_params = opts[:header_params] || {}
1013
+ # HTTP header 'Accept' (if needed)
1014
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1015
+
1016
+ # form parameters
1017
+ form_params = opts[:form_params] || {}
1018
+
1019
+ # http body (model)
1020
+ post_body = opts[:body]
1021
+
1022
+ # return_type
1023
+ return_type = opts[:return_type] || 'DeleteDealParticipant'
1024
+
1025
+ # auth_names
1026
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1027
+
1028
+ new_options = opts.merge(
1029
+ :header_params => header_params,
1030
+ :query_params => query_params,
1031
+ :form_params => form_params,
1032
+ :body => post_body,
1033
+ :auth_names => auth_names,
1034
+ :return_type => return_type
1035
+ )
1036
+
1037
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1038
+ if @api_client.config.debugging
1039
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_participants_deal_participant_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1040
+ end
1041
+ return data, status_code, headers
1042
+ end
1043
+
1044
+ # List participants of a deal
1045
+ # Lists participants associated with a deal.
1046
+ # @param id [Integer] ID of the deal
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @option opts [Integer] :start Pagination start (default to 0)
1049
+ # @option opts [Integer] :limit Items shown per page
1050
+ # @return [nil]
1051
+ def deals_id_participants_get(id, opts = {})
1052
+ deals_id_participants_get_with_http_info(id, opts)
1053
+ nil
1054
+ end
1055
+
1056
+ # List participants of a deal
1057
+ # Lists participants associated with a deal.
1058
+ # @param id [Integer] ID of the deal
1059
+ # @param [Hash] opts the optional parameters
1060
+ # @option opts [Integer] :start Pagination start
1061
+ # @option opts [Integer] :limit Items shown per page
1062
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1063
+ def deals_id_participants_get_with_http_info(id, opts = {})
1064
+ if @api_client.config.debugging
1065
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_participants_get ...'
1066
+ end
1067
+ # verify the required parameter 'id' is set
1068
+ if @api_client.config.client_side_validation && id.nil?
1069
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_participants_get"
1070
+ end
1071
+ # resource path
1072
+ local_var_path = '/deals/{id}/participants'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1073
+
1074
+ # query parameters
1075
+ query_params = opts[:query_params] || {}
1076
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
1077
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1078
+
1079
+ # header parameters
1080
+ header_params = opts[:header_params] || {}
1081
+
1082
+ # form parameters
1083
+ form_params = opts[:form_params] || {}
1084
+
1085
+ # http body (model)
1086
+ post_body = opts[:body]
1087
+
1088
+ # return_type
1089
+ return_type = opts[:return_type]
1090
+
1091
+ # auth_names
1092
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1093
+
1094
+ new_options = opts.merge(
1095
+ :header_params => header_params,
1096
+ :query_params => query_params,
1097
+ :form_params => form_params,
1098
+ :body => post_body,
1099
+ :auth_names => auth_names,
1100
+ :return_type => return_type
1101
+ )
1102
+
1103
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1104
+ if @api_client.config.debugging
1105
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_participants_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1106
+ end
1107
+ return data, status_code, headers
1108
+ end
1109
+
1110
+ # Add a participant to a deal
1111
+ # Adds a participant to a deal.
1112
+ # @param id [Integer] ID of the deal
1113
+ # @param person_id [Integer] ID of the person
1114
+ # @param [Hash] opts the optional parameters
1115
+ # @return [nil]
1116
+ def deals_id_participants_post(id, person_id, opts = {})
1117
+ deals_id_participants_post_with_http_info(id, person_id, opts)
1118
+ nil
1119
+ end
1120
+
1121
+ # Add a participant to a deal
1122
+ # Adds a participant to a deal.
1123
+ # @param id [Integer] ID of the deal
1124
+ # @param person_id [Integer] ID of the person
1125
+ # @param [Hash] opts the optional parameters
1126
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1127
+ def deals_id_participants_post_with_http_info(id, person_id, opts = {})
1128
+ if @api_client.config.debugging
1129
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_participants_post ...'
1130
+ end
1131
+ # verify the required parameter 'id' is set
1132
+ if @api_client.config.client_side_validation && id.nil?
1133
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_participants_post"
1134
+ end
1135
+ # verify the required parameter 'person_id' is set
1136
+ if @api_client.config.client_side_validation && person_id.nil?
1137
+ fail ArgumentError, "Missing the required parameter 'person_id' when calling DealsApi.deals_id_participants_post"
1138
+ end
1139
+ # resource path
1140
+ local_var_path = '/deals/{id}/participants'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1141
+
1142
+ # query parameters
1143
+ query_params = opts[:query_params] || {}
1144
+
1145
+ # header parameters
1146
+ header_params = opts[:header_params] || {}
1147
+ # HTTP header 'Content-Type'
1148
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1149
+
1150
+ # form parameters
1151
+ form_params = opts[:form_params] || {}
1152
+ form_params['person_id'] = person_id
1153
+
1154
+ # http body (model)
1155
+ post_body = opts[:body]
1156
+
1157
+ # return_type
1158
+ return_type = opts[:return_type]
1159
+
1160
+ # auth_names
1161
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1162
+
1163
+ new_options = opts.merge(
1164
+ :header_params => header_params,
1165
+ :query_params => query_params,
1166
+ :form_params => form_params,
1167
+ :body => post_body,
1168
+ :auth_names => auth_names,
1169
+ :return_type => return_type
1170
+ )
1171
+
1172
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1173
+ if @api_client.config.debugging
1174
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_participants_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1175
+ end
1176
+ return data, status_code, headers
1177
+ end
1178
+
1179
+ # List permitted users
1180
+ # List users permitted to access a deal
1181
+ # @param id [Integer] ID of the deal
1182
+ # @param [Hash] opts the optional parameters
1183
+ # @return [nil]
1184
+ def deals_id_permitted_users_get(id, opts = {})
1185
+ deals_id_permitted_users_get_with_http_info(id, opts)
1186
+ nil
1187
+ end
1188
+
1189
+ # List permitted users
1190
+ # List users permitted to access a deal
1191
+ # @param id [Integer] ID of the deal
1192
+ # @param [Hash] opts the optional parameters
1193
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1194
+ def deals_id_permitted_users_get_with_http_info(id, opts = {})
1195
+ if @api_client.config.debugging
1196
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_permitted_users_get ...'
1197
+ end
1198
+ # verify the required parameter 'id' is set
1199
+ if @api_client.config.client_side_validation && id.nil?
1200
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_permitted_users_get"
1201
+ end
1202
+ # resource path
1203
+ local_var_path = '/deals/{id}/permittedUsers'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1204
+
1205
+ # query parameters
1206
+ query_params = opts[:query_params] || {}
1207
+
1208
+ # header parameters
1209
+ header_params = opts[:header_params] || {}
1210
+
1211
+ # form parameters
1212
+ form_params = opts[:form_params] || {}
1213
+
1214
+ # http body (model)
1215
+ post_body = opts[:body]
1216
+
1217
+ # return_type
1218
+ return_type = opts[:return_type]
1219
+
1220
+ # auth_names
1221
+ auth_names = opts[:auth_names] || ['api_key']
1222
+
1223
+ new_options = opts.merge(
1224
+ :header_params => header_params,
1225
+ :query_params => query_params,
1226
+ :form_params => form_params,
1227
+ :body => post_body,
1228
+ :auth_names => auth_names,
1229
+ :return_type => return_type
1230
+ )
1231
+
1232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1233
+ if @api_client.config.debugging
1234
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_permitted_users_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1235
+ end
1236
+ return data, status_code, headers
1237
+ end
1238
+
1239
+ # List all persons associated with a deal
1240
+ # Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
1241
+ # @param id [Integer] ID of the deal
1242
+ # @param [Hash] opts the optional parameters
1243
+ # @option opts [Integer] :start Pagination start (default to 0)
1244
+ # @option opts [Integer] :limit Items shown per page
1245
+ # @return [nil]
1246
+ def deals_id_persons_get(id, opts = {})
1247
+ deals_id_persons_get_with_http_info(id, opts)
1248
+ nil
1249
+ end
1250
+
1251
+ # List all persons associated with a deal
1252
+ # Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
1253
+ # @param id [Integer] ID of the deal
1254
+ # @param [Hash] opts the optional parameters
1255
+ # @option opts [Integer] :start Pagination start
1256
+ # @option opts [Integer] :limit Items shown per page
1257
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1258
+ def deals_id_persons_get_with_http_info(id, opts = {})
1259
+ if @api_client.config.debugging
1260
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_persons_get ...'
1261
+ end
1262
+ # verify the required parameter 'id' is set
1263
+ if @api_client.config.client_side_validation && id.nil?
1264
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_persons_get"
1265
+ end
1266
+ # resource path
1267
+ local_var_path = '/deals/{id}/persons'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1268
+
1269
+ # query parameters
1270
+ query_params = opts[:query_params] || {}
1271
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
1272
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1273
+
1274
+ # header parameters
1275
+ header_params = opts[:header_params] || {}
1276
+
1277
+ # form parameters
1278
+ form_params = opts[:form_params] || {}
1279
+
1280
+ # http body (model)
1281
+ post_body = opts[:body]
1282
+
1283
+ # return_type
1284
+ return_type = opts[:return_type]
1285
+
1286
+ # auth_names
1287
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1288
+
1289
+ new_options = opts.merge(
1290
+ :header_params => header_params,
1291
+ :query_params => query_params,
1292
+ :form_params => form_params,
1293
+ :body => post_body,
1294
+ :auth_names => auth_names,
1295
+ :return_type => return_type
1296
+ )
1297
+
1298
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1299
+ if @api_client.config.debugging
1300
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_persons_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1301
+ end
1302
+ return data, status_code, headers
1303
+ end
1304
+
1305
+ # List products attached to a deal
1306
+ # Lists products attached to a deal.
1307
+ # @param id [Integer] ID of the deal
1308
+ # @param [Hash] opts the optional parameters
1309
+ # @option opts [Integer] :start Pagination start (default to 0)
1310
+ # @option opts [Integer] :limit Items shown per page
1311
+ # @option opts [NumberBoolean] :include_product_data Whether to fetch product data along with each attached product (1) or not (0, default).
1312
+ # @return [nil]
1313
+ def deals_id_products_get(id, opts = {})
1314
+ deals_id_products_get_with_http_info(id, opts)
1315
+ nil
1316
+ end
1317
+
1318
+ # List products attached to a deal
1319
+ # Lists products attached to a deal.
1320
+ # @param id [Integer] ID of the deal
1321
+ # @param [Hash] opts the optional parameters
1322
+ # @option opts [Integer] :start Pagination start
1323
+ # @option opts [Integer] :limit Items shown per page
1324
+ # @option opts [NumberBoolean] :include_product_data Whether to fetch product data along with each attached product (1) or not (0, default).
1325
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1326
+ def deals_id_products_get_with_http_info(id, opts = {})
1327
+ if @api_client.config.debugging
1328
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_products_get ...'
1329
+ end
1330
+ # verify the required parameter 'id' is set
1331
+ if @api_client.config.client_side_validation && id.nil?
1332
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_products_get"
1333
+ end
1334
+ # resource path
1335
+ local_var_path = '/deals/{id}/products'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1336
+
1337
+ # query parameters
1338
+ query_params = opts[:query_params] || {}
1339
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
1340
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1341
+ query_params[:'include_product_data'] = opts[:'include_product_data'] if !opts[:'include_product_data'].nil?
1342
+
1343
+ # header parameters
1344
+ header_params = opts[:header_params] || {}
1345
+
1346
+ # form parameters
1347
+ form_params = opts[:form_params] || {}
1348
+
1349
+ # http body (model)
1350
+ post_body = opts[:body]
1351
+
1352
+ # return_type
1353
+ return_type = opts[:return_type]
1354
+
1355
+ # auth_names
1356
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1357
+
1358
+ new_options = opts.merge(
1359
+ :header_params => header_params,
1360
+ :query_params => query_params,
1361
+ :form_params => form_params,
1362
+ :body => post_body,
1363
+ :auth_names => auth_names,
1364
+ :return_type => return_type
1365
+ )
1366
+
1367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1368
+ if @api_client.config.debugging
1369
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_products_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1370
+ end
1371
+ return data, status_code, headers
1372
+ end
1373
+
1374
+ # Add a product to the deal, eventually creating a new item called a deal-product
1375
+ # Adds a product to the deal.
1376
+ # @param id [Integer] ID of the deal
1377
+ # @param [Hash] opts the optional parameters
1378
+ # @option opts [NewDealProduct] :new_deal_product
1379
+ # @return [GetAddProductAttachementDetails]
1380
+ def deals_id_products_post(id, opts = {})
1381
+ data, _status_code, _headers = deals_id_products_post_with_http_info(id, opts)
1382
+ data
1383
+ end
1384
+
1385
+ # Add a product to the deal, eventually creating a new item called a deal-product
1386
+ # Adds a product to the deal.
1387
+ # @param id [Integer] ID of the deal
1388
+ # @param [Hash] opts the optional parameters
1389
+ # @option opts [NewDealProduct] :new_deal_product
1390
+ # @return [Array<(GetAddProductAttachementDetails, Integer, Hash)>] GetAddProductAttachementDetails data, response status code and response headers
1391
+ def deals_id_products_post_with_http_info(id, opts = {})
1392
+ if @api_client.config.debugging
1393
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_products_post ...'
1394
+ end
1395
+ # verify the required parameter 'id' is set
1396
+ if @api_client.config.client_side_validation && id.nil?
1397
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_products_post"
1398
+ end
1399
+ # resource path
1400
+ local_var_path = '/deals/{id}/products'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1401
+
1402
+ # query parameters
1403
+ query_params = opts[:query_params] || {}
1404
+
1405
+ # header parameters
1406
+ header_params = opts[:header_params] || {}
1407
+ # HTTP header 'Accept' (if needed)
1408
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1409
+ # HTTP header 'Content-Type'
1410
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1411
+
1412
+ # form parameters
1413
+ form_params = opts[:form_params] || {}
1414
+
1415
+ # http body (model)
1416
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'new_deal_product'])
1417
+
1418
+ # return_type
1419
+ return_type = opts[:return_type] || 'GetAddProductAttachementDetails'
1420
+
1421
+ # auth_names
1422
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1423
+
1424
+ new_options = opts.merge(
1425
+ :header_params => header_params,
1426
+ :query_params => query_params,
1427
+ :form_params => form_params,
1428
+ :body => post_body,
1429
+ :auth_names => auth_names,
1430
+ :return_type => return_type
1431
+ )
1432
+
1433
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1434
+ if @api_client.config.debugging
1435
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_products_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1436
+ end
1437
+ return data, status_code, headers
1438
+ end
1439
+
1440
+ # Delete an attached product from a deal
1441
+ # Deletes a product attachment from a deal, using the product_attachment_id.
1442
+ # @param id [Integer] ID of the deal
1443
+ # @param product_attachment_id [Integer] Product attachment ID. This is returned as product_attachment_id after attaching a product to a deal or as id when listing the products attached to a deal.
1444
+ # @param [Hash] opts the optional parameters
1445
+ # @return [DeleteDealProduct]
1446
+ def deals_id_products_product_attachment_id_delete(id, product_attachment_id, opts = {})
1447
+ data, _status_code, _headers = deals_id_products_product_attachment_id_delete_with_http_info(id, product_attachment_id, opts)
1448
+ data
1449
+ end
1450
+
1451
+ # Delete an attached product from a deal
1452
+ # Deletes a product attachment from a deal, using the product_attachment_id.
1453
+ # @param id [Integer] ID of the deal
1454
+ # @param product_attachment_id [Integer] Product attachment ID. This is returned as product_attachment_id after attaching a product to a deal or as id when listing the products attached to a deal.
1455
+ # @param [Hash] opts the optional parameters
1456
+ # @return [Array<(DeleteDealProduct, Integer, Hash)>] DeleteDealProduct data, response status code and response headers
1457
+ def deals_id_products_product_attachment_id_delete_with_http_info(id, product_attachment_id, opts = {})
1458
+ if @api_client.config.debugging
1459
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_products_product_attachment_id_delete ...'
1460
+ end
1461
+ # verify the required parameter 'id' is set
1462
+ if @api_client.config.client_side_validation && id.nil?
1463
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_products_product_attachment_id_delete"
1464
+ end
1465
+ # verify the required parameter 'product_attachment_id' is set
1466
+ if @api_client.config.client_side_validation && product_attachment_id.nil?
1467
+ fail ArgumentError, "Missing the required parameter 'product_attachment_id' when calling DealsApi.deals_id_products_product_attachment_id_delete"
1468
+ end
1469
+ # resource path
1470
+ local_var_path = '/deals/{id}/products/{product_attachment_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'product_attachment_id' + '}', CGI.escape(product_attachment_id.to_s))
1471
+
1472
+ # query parameters
1473
+ query_params = opts[:query_params] || {}
1474
+
1475
+ # header parameters
1476
+ header_params = opts[:header_params] || {}
1477
+ # HTTP header 'Accept' (if needed)
1478
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1479
+
1480
+ # form parameters
1481
+ form_params = opts[:form_params] || {}
1482
+
1483
+ # http body (model)
1484
+ post_body = opts[:body]
1485
+
1486
+ # return_type
1487
+ return_type = opts[:return_type] || 'DeleteDealProduct'
1488
+
1489
+ # auth_names
1490
+ auth_names = opts[:auth_names] || ['api_key']
1491
+
1492
+ new_options = opts.merge(
1493
+ :header_params => header_params,
1494
+ :query_params => query_params,
1495
+ :form_params => form_params,
1496
+ :body => post_body,
1497
+ :auth_names => auth_names,
1498
+ :return_type => return_type
1499
+ )
1500
+
1501
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1502
+ if @api_client.config.debugging
1503
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_products_product_attachment_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1504
+ end
1505
+ return data, status_code, headers
1506
+ end
1507
+
1508
+ # Update product attachment details of the deal-product (a product already attached to a deal)
1509
+ # Updates product attachment details.
1510
+ # @param id [Integer] ID of the deal
1511
+ # @param product_attachment_id [Integer] ID of the deal-product (the ID of the product attached to the deal)
1512
+ # @param [Hash] opts the optional parameters
1513
+ # @option opts [BasicDealProduct] :basic_deal_product
1514
+ # @return [GetProductAttachementDetails]
1515
+ def deals_id_products_product_attachment_id_put(id, product_attachment_id, opts = {})
1516
+ data, _status_code, _headers = deals_id_products_product_attachment_id_put_with_http_info(id, product_attachment_id, opts)
1517
+ data
1518
+ end
1519
+
1520
+ # Update product attachment details of the deal-product (a product already attached to a deal)
1521
+ # Updates product attachment details.
1522
+ # @param id [Integer] ID of the deal
1523
+ # @param product_attachment_id [Integer] ID of the deal-product (the ID of the product attached to the deal)
1524
+ # @param [Hash] opts the optional parameters
1525
+ # @option opts [BasicDealProduct] :basic_deal_product
1526
+ # @return [Array<(GetProductAttachementDetails, Integer, Hash)>] GetProductAttachementDetails data, response status code and response headers
1527
+ def deals_id_products_product_attachment_id_put_with_http_info(id, product_attachment_id, opts = {})
1528
+ if @api_client.config.debugging
1529
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_products_product_attachment_id_put ...'
1530
+ end
1531
+ # verify the required parameter 'id' is set
1532
+ if @api_client.config.client_side_validation && id.nil?
1533
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_products_product_attachment_id_put"
1534
+ end
1535
+ # verify the required parameter 'product_attachment_id' is set
1536
+ if @api_client.config.client_side_validation && product_attachment_id.nil?
1537
+ fail ArgumentError, "Missing the required parameter 'product_attachment_id' when calling DealsApi.deals_id_products_product_attachment_id_put"
1538
+ end
1539
+ # resource path
1540
+ local_var_path = '/deals/{id}/products/{product_attachment_id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)).sub('{' + 'product_attachment_id' + '}', CGI.escape(product_attachment_id.to_s))
1541
+
1542
+ # query parameters
1543
+ query_params = opts[:query_params] || {}
1544
+
1545
+ # header parameters
1546
+ header_params = opts[:header_params] || {}
1547
+ # HTTP header 'Accept' (if needed)
1548
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1549
+ # HTTP header 'Content-Type'
1550
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1551
+
1552
+ # form parameters
1553
+ form_params = opts[:form_params] || {}
1554
+
1555
+ # http body (model)
1556
+ post_body = opts[:body] || @api_client.object_to_http_body(opts[:'basic_deal_product'])
1557
+
1558
+ # return_type
1559
+ return_type = opts[:return_type] || 'GetProductAttachementDetails'
1560
+
1561
+ # auth_names
1562
+ auth_names = opts[:auth_names] || ['api_key']
1563
+
1564
+ new_options = opts.merge(
1565
+ :header_params => header_params,
1566
+ :query_params => query_params,
1567
+ :form_params => form_params,
1568
+ :body => post_body,
1569
+ :auth_names => auth_names,
1570
+ :return_type => return_type
1571
+ )
1572
+
1573
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1574
+ if @api_client.config.debugging
1575
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_products_product_attachment_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1576
+ end
1577
+ return data, status_code, headers
1578
+ end
1579
+
1580
+ # Update a deal
1581
+ # Updates the properties of a deal. For more information on how to update a deal, see <a href=\"https://pipedrive.readme.io/docs/updating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.
1582
+ # @param id [Integer] ID of the deal
1583
+ # @param [Hash] opts the optional parameters
1584
+ # @option opts [String] :title Deal title
1585
+ # @option opts [String] :value Value of the deal. If omitted, value will be set to 0.
1586
+ # @option opts [String] :currency Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.
1587
+ # @option opts [Integer] :user_id ID of the user who will be marked as the owner of this deal. If omitted, the authorized user ID will be used.
1588
+ # @option opts [Integer] :person_id ID of the person this deal will be associated with
1589
+ # @option opts [Integer] :org_id ID of the organization this deal will be associated with
1590
+ # @option opts [Integer] :stage_id ID of the stage this deal will be placed in a pipeline (note that you can&#39;t supply the ID of the pipeline as this will be assigned automatically based on stage_id). If omitted, the deal will be placed in the first stage of the default pipeline.
1591
+ # @option opts [String] :status open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost, deleted &#x3D; Deleted. If omitted, status will be set to open.
1592
+ # @option opts [Float] :probability Deal success probability percentage. Used/shown only when deal_probability for the pipeline of the deal is enabled.
1593
+ # @option opts [String] :lost_reason Optional message about why the deal was lost (to be used when status&#x3D;lost)
1594
+ # @option opts [VisibleTo] :visible_to Visibility of the deal. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.&lt;dl class&#x3D;\\\&quot;fields-list\\\&quot;&gt;&lt;dt&gt;1&lt;/dt&gt;&lt;dd&gt;Owner &amp;amp; followers (private)&lt;/dd&gt;&lt;dt&gt;3&lt;/dt&gt;&lt;dd&gt;Entire company (shared)&lt;/dd&gt;&lt;/dl&gt;
1595
+ # @return [GetAddedDeal]
1596
+ def deals_id_put(id, opts = {})
1597
+ data, _status_code, _headers = deals_id_put_with_http_info(id, opts)
1598
+ data
1599
+ end
1600
+
1601
+ # Update a deal
1602
+ # Updates the properties of a deal. For more information on how to update a deal, see &lt;a href&#x3D;\&quot;https://pipedrive.readme.io/docs/updating-a-deal\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;this tutorial&lt;/a&gt;.
1603
+ # @param id [Integer] ID of the deal
1604
+ # @param [Hash] opts the optional parameters
1605
+ # @option opts [String] :title Deal title
1606
+ # @option opts [String] :value Value of the deal. If omitted, value will be set to 0.
1607
+ # @option opts [String] :currency Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.
1608
+ # @option opts [Integer] :user_id ID of the user who will be marked as the owner of this deal. If omitted, the authorized user ID will be used.
1609
+ # @option opts [Integer] :person_id ID of the person this deal will be associated with
1610
+ # @option opts [Integer] :org_id ID of the organization this deal will be associated with
1611
+ # @option opts [Integer] :stage_id ID of the stage this deal will be placed in a pipeline (note that you can&#39;t supply the ID of the pipeline as this will be assigned automatically based on stage_id). If omitted, the deal will be placed in the first stage of the default pipeline.
1612
+ # @option opts [String] :status open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost, deleted &#x3D; Deleted. If omitted, status will be set to open.
1613
+ # @option opts [Float] :probability Deal success probability percentage. Used/shown only when deal_probability for the pipeline of the deal is enabled.
1614
+ # @option opts [String] :lost_reason Optional message about why the deal was lost (to be used when status&#x3D;lost)
1615
+ # @option opts [VisibleTo] :visible_to Visibility of the deal. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.&lt;dl class&#x3D;\\\&quot;fields-list\\\&quot;&gt;&lt;dt&gt;1&lt;/dt&gt;&lt;dd&gt;Owner &amp;amp; followers (private)&lt;/dd&gt;&lt;dt&gt;3&lt;/dt&gt;&lt;dd&gt;Entire company (shared)&lt;/dd&gt;&lt;/dl&gt;
1616
+ # @return [Array<(GetAddedDeal, Integer, Hash)>] GetAddedDeal data, response status code and response headers
1617
+ def deals_id_put_with_http_info(id, opts = {})
1618
+ if @api_client.config.debugging
1619
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_id_put ...'
1620
+ end
1621
+ # verify the required parameter 'id' is set
1622
+ if @api_client.config.client_side_validation && id.nil?
1623
+ fail ArgumentError, "Missing the required parameter 'id' when calling DealsApi.deals_id_put"
1624
+ end
1625
+ allowable_values = ["open", "won", "lost", "deleted"]
1626
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
1627
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1628
+ end
1629
+ # resource path
1630
+ local_var_path = '/deals/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1631
+
1632
+ # query parameters
1633
+ query_params = opts[:query_params] || {}
1634
+
1635
+ # header parameters
1636
+ header_params = opts[:header_params] || {}
1637
+ # HTTP header 'Accept' (if needed)
1638
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1639
+ # HTTP header 'Content-Type'
1640
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1641
+
1642
+ # form parameters
1643
+ form_params = opts[:form_params] || {}
1644
+ form_params['title'] = opts[:'title'] if !opts[:'title'].nil?
1645
+ form_params['value'] = opts[:'value'] if !opts[:'value'].nil?
1646
+ form_params['currency'] = opts[:'currency'] if !opts[:'currency'].nil?
1647
+ form_params['user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
1648
+ form_params['person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
1649
+ form_params['org_id'] = opts[:'org_id'] if !opts[:'org_id'].nil?
1650
+ form_params['stage_id'] = opts[:'stage_id'] if !opts[:'stage_id'].nil?
1651
+ form_params['status'] = opts[:'status'] if !opts[:'status'].nil?
1652
+ form_params['probability'] = opts[:'probability'] if !opts[:'probability'].nil?
1653
+ form_params['lost_reason'] = opts[:'lost_reason'] if !opts[:'lost_reason'].nil?
1654
+ form_params['visible_to'] = opts[:'visible_to'] if !opts[:'visible_to'].nil?
1655
+
1656
+ # http body (model)
1657
+ post_body = opts[:body]
1658
+
1659
+ # return_type
1660
+ return_type = opts[:return_type] || 'GetAddedDeal'
1661
+
1662
+ # auth_names
1663
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1664
+
1665
+ new_options = opts.merge(
1666
+ :header_params => header_params,
1667
+ :query_params => query_params,
1668
+ :form_params => form_params,
1669
+ :body => post_body,
1670
+ :auth_names => auth_names,
1671
+ :return_type => return_type
1672
+ )
1673
+
1674
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1675
+ if @api_client.config.debugging
1676
+ @api_client.config.logger.debug "API called: DealsApi#deals_id_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1677
+ end
1678
+ return data, status_code, headers
1679
+ end
1680
+
1681
+ # Add a deal
1682
+ # Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for 'key' values. For more information on how to add a deal, see <a href=\"https://pipedrive.readme.io/docs/creating-a-deal\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial</a>.
1683
+ # @param [Hash] opts the optional parameters
1684
+ # @return [GetAddedDeal]
1685
+ def deals_post(opts = {})
1686
+ data, _status_code, _headers = deals_post_with_http_info(opts)
1687
+ data
1688
+ end
1689
+
1690
+ # Add a deal
1691
+ # Adds a new deal. Note that you can supply additional custom fields along with the request that are not described here. These custom fields are different for each Pipedrive account and can be recognized by long hashes as keys. To determine which custom fields exists, fetch the dealFields and look for &#39;key&#39; values. For more information on how to add a deal, see &lt;a href&#x3D;\&quot;https://pipedrive.readme.io/docs/creating-a-deal\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;this tutorial&lt;/a&gt;.
1692
+ # @param [Hash] opts the optional parameters
1693
+ # @return [Array<(GetAddedDeal, Integer, Hash)>] GetAddedDeal data, response status code and response headers
1694
+ def deals_post_with_http_info(opts = {})
1695
+ if @api_client.config.debugging
1696
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_post ...'
1697
+ end
1698
+ # resource path
1699
+ local_var_path = '/deals'
1700
+
1701
+ # query parameters
1702
+ query_params = opts[:query_params] || {}
1703
+
1704
+ # header parameters
1705
+ header_params = opts[:header_params] || {}
1706
+ # HTTP header 'Accept' (if needed)
1707
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1708
+ # HTTP header 'Content-Type'
1709
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1710
+
1711
+ # form parameters
1712
+ form_params = opts[:form_params] || {}
1713
+
1714
+ # http body (model)
1715
+ post_body = opts[:body]
1716
+
1717
+ # return_type
1718
+ return_type = opts[:return_type] || 'GetAddedDeal'
1719
+
1720
+ # auth_names
1721
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1722
+
1723
+ new_options = opts.merge(
1724
+ :header_params => header_params,
1725
+ :query_params => query_params,
1726
+ :form_params => form_params,
1727
+ :body => post_body,
1728
+ :auth_names => auth_names,
1729
+ :return_type => return_type
1730
+ )
1731
+
1732
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1733
+ if @api_client.config.debugging
1734
+ @api_client.config.logger.debug "API called: DealsApi#deals_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1735
+ end
1736
+ return data, status_code, headers
1737
+ end
1738
+
1739
+ # Search deals
1740
+ # Searches all Deals by title, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\">/v1/itemSearch</a> with a narrower OAuth scope. Found Deals can be filtered by Person ID and Organization ID.
1741
+ # @param term [String] The search term to look for. Minimum 2 characters (or 1 if using exact_match).
1742
+ # @param [Hash] opts the optional parameters
1743
+ # @option opts [String] :fields A comma-separated string array. The fields to perform the search from. Defaults to all of them.
1744
+ # @option opts [Boolean] :exact_match When enabled, only full exact matches against the given term are returned. It is &lt;b&gt;not&lt;/b&gt; case sensitive.
1745
+ # @option opts [Integer] :person_id Will filter Deals by the provided Person ID. The upper limit of found Deals associated with the Person is 2000.
1746
+ # @option opts [Integer] :organization_id Will filter Deals by the provided Organization ID. The upper limit of found Deals associated with the Organization is 2000.
1747
+ # @option opts [String] :status Will filter Deals by the provided specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost. The upper limit of found Deals associated with the status is 2000.
1748
+ # @option opts [String] :include_fields Supports including optional fields in the results which are not provided by default.
1749
+ # @option opts [Integer] :start Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter. (default to 0)
1750
+ # @option opts [Integer] :limit Items shown per page
1751
+ # @return [BaseResponse]
1752
+ def deals_search_get(term, opts = {})
1753
+ data, _status_code, _headers = deals_search_get_with_http_info(term, opts)
1754
+ data
1755
+ end
1756
+
1757
+ # Search deals
1758
+ # Searches all Deals by title, notes and/or custom fields. This endpoint is a wrapper of &lt;a href&#x3D;\&quot;https://developers.pipedrive.com/docs/api/v1/#!/ItemSearch/get_itemSearch\&quot;&gt;/v1/itemSearch&lt;/a&gt; with a narrower OAuth scope. Found Deals can be filtered by Person ID and Organization ID.
1759
+ # @param term [String] The search term to look for. Minimum 2 characters (or 1 if using exact_match).
1760
+ # @param [Hash] opts the optional parameters
1761
+ # @option opts [String] :fields A comma-separated string array. The fields to perform the search from. Defaults to all of them.
1762
+ # @option opts [Boolean] :exact_match When enabled, only full exact matches against the given term are returned. It is &lt;b&gt;not&lt;/b&gt; case sensitive.
1763
+ # @option opts [Integer] :person_id Will filter Deals by the provided Person ID. The upper limit of found Deals associated with the Person is 2000.
1764
+ # @option opts [Integer] :organization_id Will filter Deals by the provided Organization ID. The upper limit of found Deals associated with the Organization is 2000.
1765
+ # @option opts [String] :status Will filter Deals by the provided specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost. The upper limit of found Deals associated with the status is 2000.
1766
+ # @option opts [String] :include_fields Supports including optional fields in the results which are not provided by default.
1767
+ # @option opts [Integer] :start Pagination start. Note that the pagination is based on main results and does not include related items when using search_for_related_items parameter.
1768
+ # @option opts [Integer] :limit Items shown per page
1769
+ # @return [Array<(BaseResponse, Integer, Hash)>] BaseResponse data, response status code and response headers
1770
+ def deals_search_get_with_http_info(term, opts = {})
1771
+ if @api_client.config.debugging
1772
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_search_get ...'
1773
+ end
1774
+ # verify the required parameter 'term' is set
1775
+ if @api_client.config.client_side_validation && term.nil?
1776
+ fail ArgumentError, "Missing the required parameter 'term' when calling DealsApi.deals_search_get"
1777
+ end
1778
+ allowable_values = ["custom_fields", "notes", "title"]
1779
+ if @api_client.config.client_side_validation && opts[:'fields'] && !allowable_values.include?(opts[:'fields'])
1780
+ fail ArgumentError, "invalid value for \"fields\", must be one of #{allowable_values}"
1781
+ end
1782
+ allowable_values = ["true", "false"]
1783
+ if @api_client.config.client_side_validation && opts[:'exact_match'] && !allowable_values.include?(opts[:'exact_match'])
1784
+ fail ArgumentError, "invalid value for \"exact_match\", must be one of #{allowable_values}"
1785
+ end
1786
+ allowable_values = ["open", "won", "lost"]
1787
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
1788
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1789
+ end
1790
+ allowable_values = ["deal.cc_email"]
1791
+ if @api_client.config.client_side_validation && opts[:'include_fields'] && !allowable_values.include?(opts[:'include_fields'])
1792
+ fail ArgumentError, "invalid value for \"include_fields\", must be one of #{allowable_values}"
1793
+ end
1794
+ # resource path
1795
+ local_var_path = '/deals/search'
1796
+
1797
+ # query parameters
1798
+ query_params = opts[:query_params] || {}
1799
+ query_params[:'term'] = term
1800
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
1801
+ query_params[:'exact_match'] = opts[:'exact_match'] if !opts[:'exact_match'].nil?
1802
+ query_params[:'person_id'] = opts[:'person_id'] if !opts[:'person_id'].nil?
1803
+ query_params[:'organization_id'] = opts[:'organization_id'] if !opts[:'organization_id'].nil?
1804
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1805
+ query_params[:'include_fields'] = opts[:'include_fields'] if !opts[:'include_fields'].nil?
1806
+ query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil?
1807
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1808
+
1809
+ # header parameters
1810
+ header_params = opts[:header_params] || {}
1811
+ # HTTP header 'Accept' (if needed)
1812
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1813
+
1814
+ # form parameters
1815
+ form_params = opts[:form_params] || {}
1816
+
1817
+ # http body (model)
1818
+ post_body = opts[:body]
1819
+
1820
+ # return_type
1821
+ return_type = opts[:return_type] || 'BaseResponse'
1822
+
1823
+ # auth_names
1824
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1825
+
1826
+ new_options = opts.merge(
1827
+ :header_params => header_params,
1828
+ :query_params => query_params,
1829
+ :form_params => form_params,
1830
+ :body => post_body,
1831
+ :auth_names => auth_names,
1832
+ :return_type => return_type
1833
+ )
1834
+
1835
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1836
+ if @api_client.config.debugging
1837
+ @api_client.config.logger.debug "API called: DealsApi#deals_search_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1838
+ end
1839
+ return data, status_code, headers
1840
+ end
1841
+
1842
+ # Get deals summary
1843
+ # Returns summary of all the deals.
1844
+ # @param [Hash] opts the optional parameters
1845
+ # @option opts [String] :status Only fetch deals with specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost
1846
+ # @option opts [Integer] :filter_id user_id will not be considered. Only deals matching the given filter will be returned.
1847
+ # @option opts [Integer] :user_id Only deals matching the given user will be returned. user_id will not be considered if you use filter_id.
1848
+ # @option opts [Integer] :stage_id Only deals within the given stage will be returned.
1849
+ # @return [GetDealsSummary]
1850
+ def deals_summary_get(opts = {})
1851
+ data, _status_code, _headers = deals_summary_get_with_http_info(opts)
1852
+ data
1853
+ end
1854
+
1855
+ # Get deals summary
1856
+ # Returns summary of all the deals.
1857
+ # @param [Hash] opts the optional parameters
1858
+ # @option opts [String] :status Only fetch deals with specific status. open &#x3D; Open, won &#x3D; Won, lost &#x3D; Lost
1859
+ # @option opts [Integer] :filter_id user_id will not be considered. Only deals matching the given filter will be returned.
1860
+ # @option opts [Integer] :user_id Only deals matching the given user will be returned. user_id will not be considered if you use filter_id.
1861
+ # @option opts [Integer] :stage_id Only deals within the given stage will be returned.
1862
+ # @return [Array<(GetDealsSummary, Integer, Hash)>] GetDealsSummary data, response status code and response headers
1863
+ def deals_summary_get_with_http_info(opts = {})
1864
+ if @api_client.config.debugging
1865
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_summary_get ...'
1866
+ end
1867
+ allowable_values = ["open", "won", "lost"]
1868
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
1869
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
1870
+ end
1871
+ # resource path
1872
+ local_var_path = '/deals/summary'
1873
+
1874
+ # query parameters
1875
+ query_params = opts[:query_params] || {}
1876
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
1877
+ query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
1878
+ query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
1879
+ query_params[:'stage_id'] = opts[:'stage_id'] if !opts[:'stage_id'].nil?
1880
+
1881
+ # header parameters
1882
+ header_params = opts[:header_params] || {}
1883
+ # HTTP header 'Accept' (if needed)
1884
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1885
+
1886
+ # form parameters
1887
+ form_params = opts[:form_params] || {}
1888
+
1889
+ # http body (model)
1890
+ post_body = opts[:body]
1891
+
1892
+ # return_type
1893
+ return_type = opts[:return_type] || 'GetDealsSummary'
1894
+
1895
+ # auth_names
1896
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
1897
+
1898
+ new_options = opts.merge(
1899
+ :header_params => header_params,
1900
+ :query_params => query_params,
1901
+ :form_params => form_params,
1902
+ :body => post_body,
1903
+ :auth_names => auth_names,
1904
+ :return_type => return_type
1905
+ )
1906
+
1907
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1908
+ if @api_client.config.debugging
1909
+ @api_client.config.logger.debug "API called: DealsApi#deals_summary_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1910
+ end
1911
+ return data, status_code, headers
1912
+ end
1913
+
1914
+ # Get deals timeline
1915
+ # Returns open and won deals, grouped by defined interval of time set in a date-type dealField (field_key) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given field_key.
1916
+ # @param start_date [Date] Date where the first interval starts. Format: YYYY-MM-DD
1917
+ # @param interval [String] The type of interval&lt;dl class&#x3D;\&quot;fields-list\&quot;&gt;&lt;dt&gt;day&lt;/dt&gt;&lt;dd&gt;Day&lt;/dd&gt;&lt;dt&gt;week&lt;/dt&gt;&lt;dd&gt;A full week (7 days) starting from start_date&lt;/dd&gt;&lt;dt&gt;month&lt;/dt&gt;&lt;dd&gt;A full month (depending on the number of days in given month) starting from start_date&lt;/dd&gt;&lt;dt&gt;quarter&lt;/dt&gt;&lt;dd&gt;A full quarter (3 months) starting from start_date&lt;/dd&gt;&lt;/dl&gt;
1918
+ # @param amount [Integer] The number of given intervals, starting from start_date, to fetch. E.g. 3 (months).
1919
+ # @param field_key [String] The date field key which deals will be retrieved from
1920
+ # @param [Hash] opts the optional parameters
1921
+ # @option opts [Integer] :user_id If supplied, only deals matching the given user will be returned.
1922
+ # @option opts [Integer] :pipeline_id If supplied, only deals matching the given pipeline will be returned
1923
+ # @option opts [Integer] :filter_id If supplied, only deals matching the given filter will be returned
1924
+ # @option opts [NumberBoolean] :exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
1925
+ # @option opts [String] :totals_convert_currency 3-letter currency code of any of the supported currencies. When supplied, totals_converted is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to &#39;default_currency&#39; in which case users default currency is used.
1926
+ # @return [GetDealsTimeline]
1927
+ def deals_timeline_get(start_date, interval, amount, field_key, opts = {})
1928
+ data, _status_code, _headers = deals_timeline_get_with_http_info(start_date, interval, amount, field_key, opts)
1929
+ data
1930
+ end
1931
+
1932
+ # Get deals timeline
1933
+ # Returns open and won deals, grouped by defined interval of time set in a date-type dealField (field_key) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given field_key.
1934
+ # @param start_date [Date] Date where the first interval starts. Format: YYYY-MM-DD
1935
+ # @param interval [String] The type of interval&lt;dl class&#x3D;\&quot;fields-list\&quot;&gt;&lt;dt&gt;day&lt;/dt&gt;&lt;dd&gt;Day&lt;/dd&gt;&lt;dt&gt;week&lt;/dt&gt;&lt;dd&gt;A full week (7 days) starting from start_date&lt;/dd&gt;&lt;dt&gt;month&lt;/dt&gt;&lt;dd&gt;A full month (depending on the number of days in given month) starting from start_date&lt;/dd&gt;&lt;dt&gt;quarter&lt;/dt&gt;&lt;dd&gt;A full quarter (3 months) starting from start_date&lt;/dd&gt;&lt;/dl&gt;
1936
+ # @param amount [Integer] The number of given intervals, starting from start_date, to fetch. E.g. 3 (months).
1937
+ # @param field_key [String] The date field key which deals will be retrieved from
1938
+ # @param [Hash] opts the optional parameters
1939
+ # @option opts [Integer] :user_id If supplied, only deals matching the given user will be returned.
1940
+ # @option opts [Integer] :pipeline_id If supplied, only deals matching the given pipeline will be returned
1941
+ # @option opts [Integer] :filter_id If supplied, only deals matching the given filter will be returned
1942
+ # @option opts [NumberBoolean] :exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
1943
+ # @option opts [String] :totals_convert_currency 3-letter currency code of any of the supported currencies. When supplied, totals_converted is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to &#39;default_currency&#39; in which case users default currency is used.
1944
+ # @return [Array<(GetDealsTimeline, Integer, Hash)>] GetDealsTimeline data, response status code and response headers
1945
+ def deals_timeline_get_with_http_info(start_date, interval, amount, field_key, opts = {})
1946
+ if @api_client.config.debugging
1947
+ @api_client.config.logger.debug 'Calling API: DealsApi.deals_timeline_get ...'
1948
+ end
1949
+ # verify the required parameter 'start_date' is set
1950
+ if @api_client.config.client_side_validation && start_date.nil?
1951
+ fail ArgumentError, "Missing the required parameter 'start_date' when calling DealsApi.deals_timeline_get"
1952
+ end
1953
+ # verify the required parameter 'interval' is set
1954
+ if @api_client.config.client_side_validation && interval.nil?
1955
+ fail ArgumentError, "Missing the required parameter 'interval' when calling DealsApi.deals_timeline_get"
1956
+ end
1957
+ # verify enum value
1958
+ allowable_values = ["day", "week", "month", "quarter"]
1959
+ if @api_client.config.client_side_validation && !allowable_values.include?(interval)
1960
+ fail ArgumentError, "invalid value for \"interval\", must be one of #{allowable_values}"
1961
+ end
1962
+ # verify the required parameter 'amount' is set
1963
+ if @api_client.config.client_side_validation && amount.nil?
1964
+ fail ArgumentError, "Missing the required parameter 'amount' when calling DealsApi.deals_timeline_get"
1965
+ end
1966
+ # verify the required parameter 'field_key' is set
1967
+ if @api_client.config.client_side_validation && field_key.nil?
1968
+ fail ArgumentError, "Missing the required parameter 'field_key' when calling DealsApi.deals_timeline_get"
1969
+ end
1970
+ # resource path
1971
+ local_var_path = '/deals/timeline'
1972
+
1973
+ # query parameters
1974
+ query_params = opts[:query_params] || {}
1975
+ query_params[:'start_date'] = start_date
1976
+ query_params[:'interval'] = interval
1977
+ query_params[:'amount'] = amount
1978
+ query_params[:'field_key'] = field_key
1979
+ query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
1980
+ query_params[:'pipeline_id'] = opts[:'pipeline_id'] if !opts[:'pipeline_id'].nil?
1981
+ query_params[:'filter_id'] = opts[:'filter_id'] if !opts[:'filter_id'].nil?
1982
+ query_params[:'exclude_deals'] = opts[:'exclude_deals'] if !opts[:'exclude_deals'].nil?
1983
+ query_params[:'totals_convert_currency'] = opts[:'totals_convert_currency'] if !opts[:'totals_convert_currency'].nil?
1984
+
1985
+ # header parameters
1986
+ header_params = opts[:header_params] || {}
1987
+ # HTTP header 'Accept' (if needed)
1988
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1989
+
1990
+ # form parameters
1991
+ form_params = opts[:form_params] || {}
1992
+
1993
+ # http body (model)
1994
+ post_body = opts[:body]
1995
+
1996
+ # return_type
1997
+ return_type = opts[:return_type] || 'GetDealsTimeline'
1998
+
1999
+ # auth_names
2000
+ auth_names = opts[:auth_names] || ['api_key', 'oauth2']
2001
+
2002
+ new_options = opts.merge(
2003
+ :header_params => header_params,
2004
+ :query_params => query_params,
2005
+ :form_params => form_params,
2006
+ :body => post_body,
2007
+ :auth_names => auth_names,
2008
+ :return_type => return_type
2009
+ )
2010
+
2011
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2012
+ if @api_client.config.debugging
2013
+ @api_client.config.logger.debug "API called: DealsApi#deals_timeline_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2014
+ end
2015
+ return data, status_code, headers
2016
+ end
2017
+ end
2018
+ end