late-sdk 0.0.43 → 0.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +124 -0
  3. data/docs/AddWhatsAppBroadcastRecipients200Response.md +24 -0
  4. data/docs/AddWhatsAppBroadcastRecipientsRequest.md +18 -0
  5. data/docs/AddWhatsAppBroadcastRecipientsRequestRecipientsInner.md +22 -0
  6. data/docs/BulkDeleteWhatsAppContacts200Response.md +20 -0
  7. data/docs/BulkDeleteWhatsAppContactsRequest.md +18 -0
  8. data/docs/BulkUpdateWhatsAppContacts200Response.md +24 -0
  9. data/docs/BulkUpdateWhatsAppContactsRequest.md +24 -0
  10. data/docs/CancelWhatsAppBroadcastSchedule200Response.md +22 -0
  11. data/docs/CancelWhatsAppBroadcastSchedule200ResponseBroadcast.md +20 -0
  12. data/docs/CreateWhatsAppBroadcast200Response.md +20 -0
  13. data/docs/CreateWhatsAppBroadcast200ResponseBroadcast.md +30 -0
  14. data/docs/CreateWhatsAppBroadcastRequest.md +26 -0
  15. data/docs/CreateWhatsAppBroadcastRequestRecipientsInner.md +22 -0
  16. data/docs/CreateWhatsAppContact200Response.md +20 -0
  17. data/docs/CreateWhatsAppContact200ResponseContact.md +34 -0
  18. data/docs/CreateWhatsAppContactRequest.md +36 -0
  19. data/docs/CreateWhatsAppTemplate200Response.md +20 -0
  20. data/docs/CreateWhatsAppTemplate200ResponseTemplate.md +26 -0
  21. data/docs/CreateWhatsAppTemplateRequest.md +26 -0
  22. data/docs/DeleteWhatsAppGroupRequest.md +20 -0
  23. data/docs/GetPreverifiedWhatsAppNumbers200Response.md +20 -0
  24. data/docs/GetPreverifiedWhatsAppNumbers200ResponseNumbersInner.md +26 -0
  25. data/docs/GetWhatsAppBroadcast200Response.md +20 -0
  26. data/docs/GetWhatsAppBroadcast200ResponseBroadcast.md +46 -0
  27. data/docs/GetWhatsAppBroadcastRecipients200Response.md +24 -0
  28. data/docs/GetWhatsAppBroadcastRecipients200ResponseRecipientsInner.md +34 -0
  29. data/docs/GetWhatsAppBroadcastRecipients200ResponseSummary.md +28 -0
  30. data/docs/GetWhatsAppBroadcasts200Response.md +22 -0
  31. data/docs/GetWhatsAppBroadcasts200ResponseBroadcastsInner.md +44 -0
  32. data/docs/GetWhatsAppBroadcasts200ResponseBroadcastsInnerTemplate.md +20 -0
  33. data/docs/GetWhatsAppBusinessProfile200Response.md +20 -0
  34. data/docs/GetWhatsAppBusinessProfile200ResponseBusinessProfile.md +30 -0
  35. data/docs/GetWhatsAppContact200Response.md +20 -0
  36. data/docs/GetWhatsAppContact200ResponseContact.md +56 -0
  37. data/docs/GetWhatsAppContacts200Response.md +24 -0
  38. data/docs/GetWhatsAppContacts200ResponseContactsInner.md +48 -0
  39. data/docs/GetWhatsAppContacts200ResponseFilters.md +20 -0
  40. data/docs/GetWhatsAppContacts200ResponsePagination.md +24 -0
  41. data/docs/GetWhatsAppGroups200Response.md +22 -0
  42. data/docs/GetWhatsAppGroups200ResponseGroupsInner.md +22 -0
  43. data/docs/GetWhatsAppGroups200ResponseSummary.md +22 -0
  44. data/docs/GetWhatsAppPhoneNumber200Response.md +18 -0
  45. data/docs/GetWhatsAppPhoneNumber200ResponsePhoneNumber.md +30 -0
  46. data/docs/GetWhatsAppPhoneNumbers200Response.md +18 -0
  47. data/docs/GetWhatsAppPhoneNumbers200ResponseNumbersInner.md +34 -0
  48. data/docs/GetWhatsAppTemplate200Response.md +20 -0
  49. data/docs/GetWhatsAppTemplate200ResponseTemplate.md +28 -0
  50. data/docs/GetWhatsAppTemplates200Response.md +20 -0
  51. data/docs/GetWhatsAppTemplates200ResponseTemplatesInner.md +28 -0
  52. data/docs/ImportWhatsAppContacts200Response.md +22 -0
  53. data/docs/ImportWhatsAppContacts200ResponseResultsInner.md +26 -0
  54. data/docs/ImportWhatsAppContacts200ResponseSummary.md +24 -0
  55. data/docs/ImportWhatsAppContactsRequest.md +26 -0
  56. data/docs/ImportWhatsAppContactsRequestContactsInner.md +32 -0
  57. data/docs/PurchaseWhatsAppPhoneNumber200Response.md +49 -0
  58. data/docs/PurchaseWhatsAppPhoneNumber200ResponseOneOf.md +20 -0
  59. data/docs/PurchaseWhatsAppPhoneNumber200ResponseOneOf1.md +20 -0
  60. data/docs/PurchaseWhatsAppPhoneNumber200ResponseOneOf1PhoneNumber.md +30 -0
  61. data/docs/PurchaseWhatsAppPhoneNumberRequest.md +18 -0
  62. data/docs/ReleaseWhatsAppPhoneNumber200Response.md +20 -0
  63. data/docs/ReleaseWhatsAppPhoneNumber200ResponsePhoneNumber.md +24 -0
  64. data/docs/RemoveWhatsAppBroadcastRecipients200Response.md +22 -0
  65. data/docs/RemoveWhatsAppBroadcastRecipientsRequest.md +18 -0
  66. data/docs/RenameWhatsAppGroup200Response.md +22 -0
  67. data/docs/RenameWhatsAppGroupRequest.md +22 -0
  68. data/docs/RequestWhatsAppVerificationCode200Response.md +20 -0
  69. data/docs/RequestWhatsAppVerificationCodeRequest.md +18 -0
  70. data/docs/ScheduleWhatsAppBroadcast200Response.md +20 -0
  71. data/docs/ScheduleWhatsAppBroadcast200ResponseBroadcast.md +22 -0
  72. data/docs/ScheduleWhatsAppBroadcastRequest.md +18 -0
  73. data/docs/SearchAvailableWhatsAppNumbers200Response.md +18 -0
  74. data/docs/SendWhatsAppBroadcast200Response.md +26 -0
  75. data/docs/SendWhatsAppBulk200Response.md +22 -0
  76. data/docs/SendWhatsAppBulk200ResponseResultsInner.md +24 -0
  77. data/docs/SendWhatsAppBulk200ResponseSummary.md +22 -0
  78. data/docs/SendWhatsAppBulkRequest.md +22 -0
  79. data/docs/SendWhatsAppBulkRequestRecipientsInner.md +20 -0
  80. data/docs/SendWhatsAppBulkRequestTemplate.md +22 -0
  81. data/docs/UpdateWhatsAppBusinessProfileRequest.md +32 -0
  82. data/docs/UpdateWhatsAppContact200Response.md +20 -0
  83. data/docs/UpdateWhatsAppContact200ResponseContact.md +40 -0
  84. data/docs/UpdateWhatsAppContactRequest.md +34 -0
  85. data/docs/UpdateWhatsAppTemplate200Response.md +20 -0
  86. data/docs/UpdateWhatsAppTemplate200ResponseTemplate.md +22 -0
  87. data/docs/UpdateWhatsAppTemplateRequest.md +20 -0
  88. data/docs/VerifyWhatsAppPhoneNumber200Response.md +22 -0
  89. data/docs/VerifyWhatsAppPhoneNumberRequest.md +18 -0
  90. data/docs/WhatsAppApi.md +2081 -0
  91. data/docs/WhatsAppPhoneNumbersApi.md +585 -0
  92. data/lib/late-sdk/api/whats_app_api.rb +2021 -0
  93. data/lib/late-sdk/api/whats_app_phone_numbers_api.rb +564 -0
  94. data/lib/late-sdk/models/add_whats_app_broadcast_recipients200_response.rb +177 -0
  95. data/lib/late-sdk/models/add_whats_app_broadcast_recipients_request.rb +176 -0
  96. data/lib/late-sdk/models/add_whats_app_broadcast_recipients_request_recipients_inner.rb +185 -0
  97. data/lib/late-sdk/models/bulk_delete_whats_app_contacts200_response.rb +157 -0
  98. data/lib/late-sdk/models/bulk_delete_whats_app_contacts_request.rb +176 -0
  99. data/lib/late-sdk/models/bulk_update_whats_app_contacts200_response.rb +176 -0
  100. data/lib/late-sdk/models/bulk_update_whats_app_contacts_request.rb +251 -0
  101. data/lib/late-sdk/models/cancel_whats_app_broadcast_schedule200_response.rb +165 -0
  102. data/lib/late-sdk/models/cancel_whats_app_broadcast_schedule200_response_broadcast.rb +157 -0
  103. data/lib/late-sdk/models/create_whats_app_broadcast200_response.rb +156 -0
  104. data/lib/late-sdk/models/create_whats_app_broadcast200_response_broadcast.rb +202 -0
  105. data/lib/late-sdk/models/create_whats_app_broadcast_request.rb +240 -0
  106. data/lib/late-sdk/models/create_whats_app_broadcast_request_recipients_inner.rb +186 -0
  107. data/lib/late-sdk/models/create_whats_app_contact200_response.rb +156 -0
  108. data/lib/late-sdk/models/create_whats_app_contact200_response_contact.rb +223 -0
  109. data/lib/late-sdk/models/create_whats_app_contact_request.rb +297 -0
  110. data/lib/late-sdk/models/create_whats_app_template200_response.rb +156 -0
  111. data/lib/late-sdk/models/create_whats_app_template200_response_template.rb +183 -0
  112. data/lib/late-sdk/models/create_whats_app_template_request.rb +310 -0
  113. data/lib/late-sdk/models/delete_whats_app_group_request.rb +192 -0
  114. data/lib/late-sdk/models/get_preverified_whats_app_numbers200_response.rb +161 -0
  115. data/lib/late-sdk/models/get_preverified_whats_app_numbers200_response_numbers_inner.rb +183 -0
  116. data/lib/late-sdk/models/get_whats_app_broadcast200_response.rb +156 -0
  117. data/lib/late-sdk/models/get_whats_app_broadcast200_response_broadcast.rb +307 -0
  118. data/lib/late-sdk/models/get_whats_app_broadcast_recipients200_response.rb +176 -0
  119. data/lib/late-sdk/models/get_whats_app_broadcast_recipients200_response_recipients_inner.rb +253 -0
  120. data/lib/late-sdk/models/get_whats_app_broadcast_recipients200_response_summary.rb +192 -0
  121. data/lib/late-sdk/models/get_whats_app_broadcasts200_response.rb +167 -0
  122. data/lib/late-sdk/models/get_whats_app_broadcasts200_response_broadcasts_inner.rb +298 -0
  123. data/lib/late-sdk/models/get_whats_app_broadcasts200_response_broadcasts_inner_template.rb +156 -0
  124. data/lib/late-sdk/models/get_whats_app_business_profile200_response.rb +156 -0
  125. data/lib/late-sdk/models/get_whats_app_business_profile200_response_business_profile.rb +225 -0
  126. data/lib/late-sdk/models/get_whats_app_contact200_response.rb +156 -0
  127. data/lib/late-sdk/models/get_whats_app_contact200_response_contact.rb +322 -0
  128. data/lib/late-sdk/models/get_whats_app_contacts200_response.rb +176 -0
  129. data/lib/late-sdk/models/get_whats_app_contacts200_response_contacts_inner.rb +286 -0
  130. data/lib/late-sdk/models/get_whats_app_contacts200_response_filters.rb +160 -0
  131. data/lib/late-sdk/models/get_whats_app_contacts200_response_pagination.rb +174 -0
  132. data/lib/late-sdk/models/get_whats_app_groups200_response.rb +167 -0
  133. data/lib/late-sdk/models/get_whats_app_groups200_response_groups_inner.rb +167 -0
  134. data/lib/late-sdk/models/get_whats_app_groups200_response_summary.rb +165 -0
  135. data/lib/late-sdk/models/get_whats_app_phone_number200_response.rb +147 -0
  136. data/lib/late-sdk/models/get_whats_app_phone_number200_response_phone_number.rb +235 -0
  137. data/lib/late-sdk/models/get_whats_app_phone_numbers200_response.rb +149 -0
  138. data/lib/late-sdk/models/get_whats_app_phone_numbers200_response_numbers_inner.rb +253 -0
  139. data/lib/late-sdk/models/get_whats_app_template200_response.rb +156 -0
  140. data/lib/late-sdk/models/get_whats_app_template200_response_template.rb +194 -0
  141. data/lib/late-sdk/models/get_whats_app_templates200_response.rb +158 -0
  142. data/lib/late-sdk/models/get_whats_app_templates200_response_templates_inner.rb +241 -0
  143. data/lib/late-sdk/models/import_whats_app_contacts200_response.rb +167 -0
  144. data/lib/late-sdk/models/import_whats_app_contacts200_response_results_inner.rb +183 -0
  145. data/lib/late-sdk/models/import_whats_app_contacts200_response_summary.rb +174 -0
  146. data/lib/late-sdk/models/import_whats_app_contacts_request.rb +239 -0
  147. data/lib/late-sdk/models/import_whats_app_contacts_request_contacts_inner.rb +252 -0
  148. data/lib/late-sdk/models/purchase_whats_app_phone_number200_response.rb +104 -0
  149. data/lib/late-sdk/models/purchase_whats_app_phone_number200_response_one_of.rb +157 -0
  150. data/lib/late-sdk/models/purchase_whats_app_phone_number200_response_one_of1.rb +157 -0
  151. data/lib/late-sdk/models/purchase_whats_app_phone_number200_response_one_of1_phone_number.rb +201 -0
  152. data/lib/late-sdk/models/purchase_whats_app_phone_number_request.rb +165 -0
  153. data/lib/late-sdk/models/release_whats_app_phone_number200_response.rb +156 -0
  154. data/lib/late-sdk/models/release_whats_app_phone_number200_response_phone_number.rb +175 -0
  155. data/lib/late-sdk/models/remove_whats_app_broadcast_recipients200_response.rb +167 -0
  156. data/lib/late-sdk/models/remove_whats_app_broadcast_recipients_request.rb +167 -0
  157. data/lib/late-sdk/models/rename_whats_app_group200_response.rb +166 -0
  158. data/lib/late-sdk/models/rename_whats_app_group_request.rb +219 -0
  159. data/lib/late-sdk/models/request_whats_app_verification_code200_response.rb +190 -0
  160. data/lib/late-sdk/models/request_whats_app_verification_code_request.rb +184 -0
  161. data/lib/late-sdk/models/schedule_whats_app_broadcast200_response.rb +156 -0
  162. data/lib/late-sdk/models/schedule_whats_app_broadcast200_response_broadcast.rb +166 -0
  163. data/lib/late-sdk/models/schedule_whats_app_broadcast_request.rb +165 -0
  164. data/lib/late-sdk/models/search_available_whats_app_numbers200_response.rb +149 -0
  165. data/lib/late-sdk/models/send_whats_app_broadcast200_response.rb +221 -0
  166. data/lib/late-sdk/models/send_whats_app_bulk200_response.rb +167 -0
  167. data/lib/late-sdk/models/send_whats_app_bulk200_response_results_inner.rb +174 -0
  168. data/lib/late-sdk/models/send_whats_app_bulk200_response_summary.rb +165 -0
  169. data/lib/late-sdk/models/send_whats_app_bulk_request.rb +229 -0
  170. data/lib/late-sdk/models/send_whats_app_bulk_request_recipients_inner.rb +177 -0
  171. data/lib/late-sdk/models/send_whats_app_bulk_request_template.rb +204 -0
  172. data/lib/late-sdk/models/update_whats_app_business_profile_request.rb +294 -0
  173. data/lib/late-sdk/models/update_whats_app_contact200_response.rb +156 -0
  174. data/lib/late-sdk/models/update_whats_app_contact200_response_contact.rb +250 -0
  175. data/lib/late-sdk/models/update_whats_app_contact_request.rb +234 -0
  176. data/lib/late-sdk/models/update_whats_app_template200_response.rb +156 -0
  177. data/lib/late-sdk/models/update_whats_app_template200_response_template.rb +165 -0
  178. data/lib/late-sdk/models/update_whats_app_template_request.rb +194 -0
  179. data/lib/late-sdk/models/verify_whats_app_phone_number200_response.rb +165 -0
  180. data/lib/late-sdk/models/verify_whats_app_phone_number_request.rb +165 -0
  181. data/lib/late-sdk/version.rb +1 -1
  182. data/lib/late-sdk.rb +89 -0
  183. data/openapi.yaml +2144 -0
  184. data/spec/api/whats_app_api_spec.rb +402 -0
  185. data/spec/api/whats_app_phone_numbers_api_spec.rb +137 -0
  186. data/spec/models/add_whats_app_broadcast_recipients200_response_spec.rb +54 -0
  187. data/spec/models/add_whats_app_broadcast_recipients_request_recipients_inner_spec.rb +48 -0
  188. data/spec/models/add_whats_app_broadcast_recipients_request_spec.rb +36 -0
  189. data/spec/models/bulk_delete_whats_app_contacts200_response_spec.rb +42 -0
  190. data/spec/models/bulk_delete_whats_app_contacts_request_spec.rb +36 -0
  191. data/spec/models/bulk_update_whats_app_contacts200_response_spec.rb +54 -0
  192. data/spec/models/bulk_update_whats_app_contacts_request_spec.rb +58 -0
  193. data/spec/models/cancel_whats_app_broadcast_schedule200_response_broadcast_spec.rb +42 -0
  194. data/spec/models/cancel_whats_app_broadcast_schedule200_response_spec.rb +48 -0
  195. data/spec/models/create_whats_app_broadcast200_response_broadcast_spec.rb +72 -0
  196. data/spec/models/create_whats_app_broadcast200_response_spec.rb +42 -0
  197. data/spec/models/create_whats_app_broadcast_request_recipients_inner_spec.rb +48 -0
  198. data/spec/models/create_whats_app_broadcast_request_spec.rb +60 -0
  199. data/spec/models/create_whats_app_contact200_response_contact_spec.rb +84 -0
  200. data/spec/models/create_whats_app_contact200_response_spec.rb +42 -0
  201. data/spec/models/create_whats_app_contact_request_spec.rb +90 -0
  202. data/spec/models/create_whats_app_template200_response_spec.rb +42 -0
  203. data/spec/models/create_whats_app_template200_response_template_spec.rb +60 -0
  204. data/spec/models/create_whats_app_template_request_spec.rb +64 -0
  205. data/spec/models/delete_whats_app_group_request_spec.rb +42 -0
  206. data/spec/models/get_preverified_whats_app_numbers200_response_numbers_inner_spec.rb +60 -0
  207. data/spec/models/get_preverified_whats_app_numbers200_response_spec.rb +42 -0
  208. data/spec/models/get_whats_app_broadcast200_response_broadcast_spec.rb +124 -0
  209. data/spec/models/get_whats_app_broadcast200_response_spec.rb +42 -0
  210. data/spec/models/get_whats_app_broadcast_recipients200_response_recipients_inner_spec.rb +88 -0
  211. data/spec/models/get_whats_app_broadcast_recipients200_response_spec.rb +54 -0
  212. data/spec/models/get_whats_app_broadcast_recipients200_response_summary_spec.rb +66 -0
  213. data/spec/models/get_whats_app_broadcasts200_response_broadcasts_inner_spec.rb +118 -0
  214. data/spec/models/get_whats_app_broadcasts200_response_broadcasts_inner_template_spec.rb +42 -0
  215. data/spec/models/get_whats_app_broadcasts200_response_spec.rb +48 -0
  216. data/spec/models/get_whats_app_business_profile200_response_business_profile_spec.rb +72 -0
  217. data/spec/models/get_whats_app_business_profile200_response_spec.rb +42 -0
  218. data/spec/models/get_whats_app_contact200_response_contact_spec.rb +150 -0
  219. data/spec/models/get_whats_app_contact200_response_spec.rb +42 -0
  220. data/spec/models/get_whats_app_contacts200_response_contacts_inner_spec.rb +126 -0
  221. data/spec/models/get_whats_app_contacts200_response_filters_spec.rb +42 -0
  222. data/spec/models/get_whats_app_contacts200_response_pagination_spec.rb +54 -0
  223. data/spec/models/get_whats_app_contacts200_response_spec.rb +54 -0
  224. data/spec/models/get_whats_app_groups200_response_groups_inner_spec.rb +48 -0
  225. data/spec/models/get_whats_app_groups200_response_spec.rb +48 -0
  226. data/spec/models/get_whats_app_groups200_response_summary_spec.rb +48 -0
  227. data/spec/models/get_whats_app_phone_number200_response_phone_number_spec.rb +76 -0
  228. data/spec/models/get_whats_app_phone_number200_response_spec.rb +36 -0
  229. data/spec/models/get_whats_app_phone_numbers200_response_numbers_inner_spec.rb +88 -0
  230. data/spec/models/get_whats_app_phone_numbers200_response_spec.rb +36 -0
  231. data/spec/models/get_whats_app_template200_response_spec.rb +42 -0
  232. data/spec/models/get_whats_app_template200_response_template_spec.rb +66 -0
  233. data/spec/models/get_whats_app_templates200_response_spec.rb +42 -0
  234. data/spec/models/get_whats_app_templates200_response_templates_inner_spec.rb +74 -0
  235. data/spec/models/import_whats_app_contacts200_response_results_inner_spec.rb +60 -0
  236. data/spec/models/import_whats_app_contacts200_response_spec.rb +48 -0
  237. data/spec/models/import_whats_app_contacts200_response_summary_spec.rb +54 -0
  238. data/spec/models/import_whats_app_contacts_request_contacts_inner_spec.rb +78 -0
  239. data/spec/models/import_whats_app_contacts_request_spec.rb +60 -0
  240. data/spec/models/purchase_whats_app_phone_number200_response_one_of1_phone_number_spec.rb +72 -0
  241. data/spec/models/purchase_whats_app_phone_number200_response_one_of1_spec.rb +42 -0
  242. data/spec/models/purchase_whats_app_phone_number200_response_one_of_spec.rb +42 -0
  243. data/spec/models/purchase_whats_app_phone_number200_response_spec.rb +32 -0
  244. data/spec/models/purchase_whats_app_phone_number_request_spec.rb +36 -0
  245. data/spec/models/release_whats_app_phone_number200_response_phone_number_spec.rb +54 -0
  246. data/spec/models/release_whats_app_phone_number200_response_spec.rb +42 -0
  247. data/spec/models/remove_whats_app_broadcast_recipients200_response_spec.rb +48 -0
  248. data/spec/models/remove_whats_app_broadcast_recipients_request_spec.rb +36 -0
  249. data/spec/models/rename_whats_app_group200_response_spec.rb +48 -0
  250. data/spec/models/rename_whats_app_group_request_spec.rb +48 -0
  251. data/spec/models/request_whats_app_verification_code200_response_spec.rb +46 -0
  252. data/spec/models/request_whats_app_verification_code_request_spec.rb +40 -0
  253. data/spec/models/schedule_whats_app_broadcast200_response_broadcast_spec.rb +48 -0
  254. data/spec/models/schedule_whats_app_broadcast200_response_spec.rb +42 -0
  255. data/spec/models/schedule_whats_app_broadcast_request_spec.rb +36 -0
  256. data/spec/models/search_available_whats_app_numbers200_response_spec.rb +36 -0
  257. data/spec/models/send_whats_app_broadcast200_response_spec.rb +64 -0
  258. data/spec/models/send_whats_app_bulk200_response_results_inner_spec.rb +54 -0
  259. data/spec/models/send_whats_app_bulk200_response_spec.rb +48 -0
  260. data/spec/models/send_whats_app_bulk200_response_summary_spec.rb +48 -0
  261. data/spec/models/send_whats_app_bulk_request_recipients_inner_spec.rb +42 -0
  262. data/spec/models/send_whats_app_bulk_request_spec.rb +48 -0
  263. data/spec/models/send_whats_app_bulk_request_template_spec.rb +48 -0
  264. data/spec/models/update_whats_app_business_profile_request_spec.rb +78 -0
  265. data/spec/models/update_whats_app_contact200_response_contact_spec.rb +102 -0
  266. data/spec/models/update_whats_app_contact200_response_spec.rb +42 -0
  267. data/spec/models/update_whats_app_contact_request_spec.rb +84 -0
  268. data/spec/models/update_whats_app_template200_response_spec.rb +42 -0
  269. data/spec/models/update_whats_app_template200_response_template_spec.rb +48 -0
  270. data/spec/models/update_whats_app_template_request_spec.rb +42 -0
  271. data/spec/models/verify_whats_app_phone_number200_response_spec.rb +48 -0
  272. data/spec/models/verify_whats_app_phone_number_request_spec.rb +36 -0
  273. metadata +357 -1
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class PurchaseWhatsAppPhoneNumber200ResponseOneOf1PhoneNumber < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :phone_number
21
+
22
+ attr_accessor :status
23
+
24
+ attr_accessor :country
25
+
26
+ attr_accessor :provisioned_at
27
+
28
+ attr_accessor :meta_preverified_id
29
+
30
+ attr_accessor :meta_verification_status
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'id' => :'id',
36
+ :'phone_number' => :'phoneNumber',
37
+ :'status' => :'status',
38
+ :'country' => :'country',
39
+ :'provisioned_at' => :'provisionedAt',
40
+ :'meta_preverified_id' => :'metaPreverifiedId',
41
+ :'meta_verification_status' => :'metaVerificationStatus'
42
+ }
43
+ end
44
+
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ acceptable_attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.openapi_types
57
+ {
58
+ :'id' => :'String',
59
+ :'phone_number' => :'String',
60
+ :'status' => :'String',
61
+ :'country' => :'String',
62
+ :'provisioned_at' => :'Time',
63
+ :'meta_preverified_id' => :'String',
64
+ :'meta_verification_status' => :'String'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.openapi_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::PurchaseWhatsAppPhoneNumber200ResponseOneOf1PhoneNumber` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ acceptable_attribute_map = self.class.acceptable_attribute_map
83
+ attributes = attributes.each_with_object({}) { |(k, v), h|
84
+ if (!acceptable_attribute_map.key?(k.to_sym))
85
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::PurchaseWhatsAppPhoneNumber200ResponseOneOf1PhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
86
+ end
87
+ h[k.to_sym] = v
88
+ }
89
+
90
+ if attributes.key?(:'id')
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes.key?(:'phone_number')
95
+ self.phone_number = attributes[:'phone_number']
96
+ end
97
+
98
+ if attributes.key?(:'status')
99
+ self.status = attributes[:'status']
100
+ end
101
+
102
+ if attributes.key?(:'country')
103
+ self.country = attributes[:'country']
104
+ end
105
+
106
+ if attributes.key?(:'provisioned_at')
107
+ self.provisioned_at = attributes[:'provisioned_at']
108
+ end
109
+
110
+ if attributes.key?(:'meta_preverified_id')
111
+ self.meta_preverified_id = attributes[:'meta_preverified_id']
112
+ end
113
+
114
+ if attributes.key?(:'meta_verification_status')
115
+ self.meta_verification_status = attributes[:'meta_verification_status']
116
+ end
117
+ end
118
+
119
+ # Show invalid properties with the reasons. Usually used together with valid?
120
+ # @return Array for valid properties with the reasons
121
+ def list_invalid_properties
122
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ id == o.id &&
140
+ phone_number == o.phone_number &&
141
+ status == o.status &&
142
+ country == o.country &&
143
+ provisioned_at == o.provisioned_at &&
144
+ meta_preverified_id == o.meta_preverified_id &&
145
+ meta_verification_status == o.meta_verification_status
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [id, phone_number, status, country, provisioned_at, meta_preverified_id, meta_verification_status].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class PurchaseWhatsAppPhoneNumberRequest < ApiModelBase
18
+ # Profile to associate the number with
19
+ attr_accessor :profile_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'profile_id' => :'profileId'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'profile_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::PurchaseWhatsAppPhoneNumberRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::PurchaseWhatsAppPhoneNumberRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'profile_id')
68
+ self.profile_id = attributes[:'profile_id']
69
+ else
70
+ self.profile_id = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @profile_id.nil?
80
+ invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @profile_id.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] profile_id Value to be assigned
96
+ def profile_id=(profile_id)
97
+ if profile_id.nil?
98
+ fail ArgumentError, 'profile_id cannot be nil'
99
+ end
100
+
101
+ @profile_id = profile_id
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ profile_id == o.profile_id
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [profile_id].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,156 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class ReleaseWhatsAppPhoneNumber200Response < ApiModelBase
18
+ attr_accessor :message
19
+
20
+ attr_accessor :phone_number
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'message' => :'message',
26
+ :'phone_number' => :'phoneNumber'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'message' => :'String',
44
+ :'phone_number' => :'ReleaseWhatsAppPhoneNumber200ResponsePhoneNumber'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ReleaseWhatsAppPhoneNumber200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ReleaseWhatsAppPhoneNumber200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'message')
71
+ self.message = attributes[:'message']
72
+ end
73
+
74
+ if attributes.key?(:'phone_number')
75
+ self.phone_number = attributes[:'phone_number']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ message == o.message &&
100
+ phone_number == o.phone_number
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [message, phone_number].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end
@@ -0,0 +1,175 @@
1
+ =begin
2
+ #Late API
3
+
4
+ #API reference for Late. Authenticate with a Bearer API key. Base URL: https://getlate.dev/api
5
+
6
+ The version of the OpenAPI document: 1.0.1
7
+ Contact: support@getlate.dev
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Late
17
+ class ReleaseWhatsAppPhoneNumber200ResponsePhoneNumber < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :phone_number
21
+
22
+ # \"released\"
23
+ attr_accessor :status
24
+
25
+ attr_accessor :released_at
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'id' => :'id',
31
+ :'phone_number' => :'phoneNumber',
32
+ :'status' => :'status',
33
+ :'released_at' => :'releasedAt'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'id' => :'String',
51
+ :'phone_number' => :'String',
52
+ :'status' => :'String',
53
+ :'released_at' => :'Time'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::ReleaseWhatsAppPhoneNumber200ResponsePhoneNumber` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ acceptable_attribute_map = self.class.acceptable_attribute_map
72
+ attributes = attributes.each_with_object({}) { |(k, v), h|
73
+ if (!acceptable_attribute_map.key?(k.to_sym))
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::ReleaseWhatsAppPhoneNumber200ResponsePhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
75
+ end
76
+ h[k.to_sym] = v
77
+ }
78
+
79
+ if attributes.key?(:'id')
80
+ self.id = attributes[:'id']
81
+ end
82
+
83
+ if attributes.key?(:'phone_number')
84
+ self.phone_number = attributes[:'phone_number']
85
+ end
86
+
87
+ if attributes.key?(:'status')
88
+ self.status = attributes[:'status']
89
+ end
90
+
91
+ if attributes.key?(:'released_at')
92
+ self.released_at = attributes[:'released_at']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ warn '[DEPRECATED] the `valid?` method is obsolete'
108
+ true
109
+ end
110
+
111
+ # Checks equality by comparing each attribute.
112
+ # @param [Object] Object to be compared
113
+ def ==(o)
114
+ return true if self.equal?(o)
115
+ self.class == o.class &&
116
+ id == o.id &&
117
+ phone_number == o.phone_number &&
118
+ status == o.status &&
119
+ released_at == o.released_at
120
+ end
121
+
122
+ # @see the `==` method
123
+ # @param [Object] Object to be compared
124
+ def eql?(o)
125
+ self == o
126
+ end
127
+
128
+ # Calculates hash code according to all attributes.
129
+ # @return [Integer] Hash code
130
+ def hash
131
+ [id, phone_number, status, released_at].hash
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def self.build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ attributes = attributes.transform_keys(&:to_sym)
140
+ transformed_hash = {}
141
+ openapi_types.each_pair do |key, type|
142
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
143
+ transformed_hash["#{key}"] = nil
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[attribute_map[key]].is_a?(Array)
148
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
149
+ end
150
+ elsif !attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
152
+ end
153
+ end
154
+ new(transformed_hash)
155
+ end
156
+
157
+ # Returns the object in the form of hash
158
+ # @return [Hash] Returns the object in the form of hash
159
+ def to_hash
160
+ hash = {}
161
+ self.class.attribute_map.each_pair do |attr, param|
162
+ value = self.send(attr)
163
+ if value.nil?
164
+ is_nullable = self.class.openapi_nullable.include?(attr)
165
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
166
+ end
167
+
168
+ hash[param] = _to_hash(value)
169
+ end
170
+ hash
171
+ end
172
+
173
+ end
174
+
175
+ end