rcs 1.0.17 → 2.0.0.pre.rc.1

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 (321) hide show
  1. checksums.yaml +4 -4
  2. data/lib/environment.rb +1 -1
  3. data/lib/rcs/brands/client.rb +631 -0
  4. data/lib/rcs/brands/types/autofill_brand_schema_options.rb +61 -0
  5. data/lib/rcs/brands/types/brand_contact.rb +84 -0
  6. data/lib/rcs/campaigns/client.rb +44 -0
  7. data/lib/rcs/campaigns/dlc/client.rb +480 -0
  8. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords.rb +99 -0
  9. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_help.rb +74 -0
  10. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_in.rb +74 -0
  11. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_keywords_opt_out.rb +74 -0
  12. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_links.rb +74 -0
  13. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_options.rb +110 -0
  14. data/lib/rcs/campaigns/dlc/types/upsert_dlc_schema_use_case.rb +76 -0
  15. data/lib/rcs/campaigns/rcs/client.rb +457 -0
  16. data/lib/rcs/campaigns/rcs/types/rcs_autofill_response.rb +155 -0
  17. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent.rb +140 -0
  18. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_emails_item.rb +73 -0
  19. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_phones_item.rb +73 -0
  20. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_agent_websites_item.rb +73 -0
  21. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_links.rb +74 -0
  22. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_in.rb +75 -0
  23. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_opt_out.rb +76 -0
  24. data/lib/rcs/campaigns/rcs/types/upsert_rcs_schema_use_case.rb +75 -0
  25. data/lib/rcs/campaigns/toll_free/client.rb +429 -0
  26. data/lib/rcs/campaigns/toll_free/types/toll_free_autofill_response.rb +130 -0
  27. data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_opt_in.rb +86 -0
  28. data/lib/rcs/campaigns/toll_free/types/upsert_toll_free_schema_use_case.rb +75 -0
  29. data/lib/rcs/contacts/client.rb +275 -0
  30. data/lib/rcs/conversations/client.rb +273 -0
  31. data/lib/rcs/message/client.rb +30 -0
  32. data/lib/rcs/message/sms/client.rb +96 -0
  33. data/lib/rcs/messages/client.rb +185 -0
  34. data/lib/rcs/messages/mms/client.rb +98 -0
  35. data/lib/rcs/messages/rcs/client.rb +94 -0
  36. data/lib/rcs/messages/send/client.rb +318 -0
  37. data/lib/rcs/messages/send/types/send_mms_response.rb +60 -0
  38. data/lib/rcs/messages/send/types/send_mms_schema_options.rb +108 -0
  39. data/lib/rcs/messages/send/types/send_rcs_response.rb +60 -0
  40. data/lib/rcs/messages/send/types/send_sms_response.rb +60 -0
  41. data/lib/rcs/messages/send/types/send_sms_schema_options.rb +81 -0
  42. data/lib/rcs/messages/types/message_reaction_schema_options.rb +71 -0
  43. data/lib/rcs/phone_numbers/campaign/client.rb +179 -0
  44. data/lib/rcs/phone_numbers/client.rb +345 -0
  45. data/lib/rcs/phone_numbers/types/phone_details_schema_level.rb +16 -0
  46. data/lib/rcs/phone_numbers/types/phone_details_schema_options.rb +93 -0
  47. data/lib/rcs/phone_numbers/types/phone_details_schema_options_enhanced_contact_info.rb +64 -0
  48. data/lib/rcs/phone_numbers/types/phone_numbers_get_response.rb +58 -0
  49. data/lib/rcs/phone_numbers/types/search_schema_location.rb +96 -0
  50. data/lib/rcs/phone_numbers/types/search_schema_number.rb +81 -0
  51. data/lib/rcs/phone_numbers/types/search_schema_options.rb +62 -0
  52. data/lib/rcs/phone_numbers/webhook/client.rb +191 -0
  53. data/lib/rcs/status/client.rb +30 -0
  54. data/lib/rcs/status/get/client.rb +367 -0
  55. data/lib/rcs/tools/client.rb +32 -199
  56. data/lib/rcs/tools/contact_card/client.rb +285 -0
  57. data/lib/rcs/tools/contact_card/types/get_v_card_schema_options.rb +67 -0
  58. data/lib/rcs/tools/file/client.rb +138 -0
  59. data/lib/rcs/tools/file/types/file_upload_schema_options.rb +70 -0
  60. data/lib/rcs/tools/file/types/file_upload_schema_options_download.rb +66 -0
  61. data/lib/rcs/tools/url/client.rb +245 -0
  62. data/lib/rcs/types/advanced_phone_information.rb +147 -0
  63. data/lib/rcs/types/advanced_phone_information_carrier.rb +90 -0
  64. data/lib/rcs/types/advanced_phone_information_contact.rb +146 -0
  65. data/lib/rcs/types/advanced_phone_information_location.rb +142 -0
  66. data/lib/rcs/types/advanced_phone_information_location_coordinates.rb +73 -0
  67. data/lib/rcs/types/advanced_phone_information_location_country.rb +77 -0
  68. data/lib/rcs/types/advanced_phone_information_type.rb +97 -0
  69. data/lib/rcs/types/advanced_phone_information_type_recommendation.rb +15 -0
  70. data/lib/rcs/types/agent.rb +68 -0
  71. data/lib/rcs/types/attach_webhook_params.rb +60 -0
  72. data/lib/rcs/types/attach_webhook_response_webhook.rb +86 -0
  73. data/lib/rcs/types/attach_webhook_schema_name.rb +88 -0
  74. data/lib/rcs/types/attach_webhook_schema_webhook_id.rb +77 -0
  75. data/lib/rcs/types/attached_phone_number_result.rb +75 -0
  76. data/lib/rcs/types/autofill_campaign_params.rb +69 -0
  77. data/lib/rcs/types/autofill_dlc_campaign_response.rb +169 -0
  78. data/lib/rcs/types/autofill_dlc_response_keywords.rb +95 -0
  79. data/lib/rcs/types/autofill_dlc_response_keywords_help.rb +70 -0
  80. data/lib/rcs/{send/types/send_sms_response.rb → types/autofill_dlc_response_keywords_opt_in.rb} +18 -17
  81. data/lib/rcs/types/autofill_dlc_response_keywords_opt_out.rb +70 -0
  82. data/lib/rcs/types/autofill_dlc_response_links.rb +70 -0
  83. data/lib/rcs/types/autofill_dlc_response_options.rb +106 -0
  84. data/lib/rcs/types/autofill_dlc_response_use_case.rb +72 -0
  85. data/lib/rcs/types/bad_request_error_body.rb +44 -45
  86. data/lib/rcs/types/basic_phone_information.rb +127 -0
  87. data/lib/rcs/{company/types/company_register_response_brand.rb → types/basic_phone_information_contact.rb} +12 -21
  88. data/lib/rcs/types/basic_phone_information_location.rb +74 -0
  89. data/lib/rcs/types/basic_phone_information_location_country.rb +75 -0
  90. data/lib/rcs/types/brand_status.rb +92 -0
  91. data/lib/rcs/types/brand_status_enum.rb +21 -0
  92. data/lib/rcs/types/buy_response_capabilities.rb +77 -0
  93. data/lib/rcs/types/campaign_enum.rb +15 -0
  94. data/lib/rcs/types/campaign_query.rb +69 -0
  95. data/lib/rcs/{company/types/company_register_request_company_id.rb → types/campaign_submission_result.rb} +15 -16
  96. data/lib/rcs/types/campaign_validation_response_errors_item.rb +76 -0
  97. data/lib/rcs/types/campaign_validation_result.rb +71 -0
  98. data/lib/rcs/types/click_action.rb +73 -0
  99. data/lib/rcs/types/click_action_data.rb +56 -0
  100. data/lib/rcs/types/click_action_data_metadata.rb +69 -0
  101. data/lib/rcs/types/company_sector_enum.rb +26 -0
  102. data/lib/rcs/types/company_type_enum.rb +14 -0
  103. data/lib/rcs/types/configured_webhook.rb +85 -0
  104. data/lib/rcs/types/contact.rb +105 -0
  105. data/lib/rcs/types/contact_id.rb +57 -0
  106. data/lib/rcs/types/conversation.rb +146 -0
  107. data/lib/rcs/types/conversation_contact.rb +68 -0
  108. data/lib/rcs/types/conversation_list.rb +79 -0
  109. data/lib/rcs/types/conversation_sender.rb +60 -0
  110. data/lib/rcs/types/create_url_options.rb +61 -0
  111. data/lib/rcs/types/detached_phone_number_result.rb +75 -0
  112. data/lib/rcs/types/detached_webhook_info.rb +74 -0
  113. data/lib/rcs/types/detailed_phone_number_enum.rb +25 -0
  114. data/lib/rcs/types/dlc_assignment_status_enum.rb +19 -0
  115. data/lib/rcs/types/dlc_campaign_status.rb +107 -0
  116. data/lib/rcs/types/dlc_campaign_use_case_enum.rb +35 -0
  117. data/lib/rcs/types/dlc_campaign_with_extended_brand_and_status.rb +194 -0
  118. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords.rb +94 -0
  119. data/lib/rcs/types/dlc_with_extended_brand_and_status_keywords_help.rb +72 -0
  120. data/lib/rcs/{send/types/send_mms_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_in.rb} +20 -17
  121. data/lib/rcs/{send/types/send_rcs_response.rb → types/dlc_with_extended_brand_and_status_keywords_opt_out.rb} +20 -17
  122. data/lib/rcs/types/dlc_with_extended_brand_and_status_links.rb +70 -0
  123. data/lib/rcs/types/dlc_with_extended_brand_and_status_options.rb +106 -0
  124. data/lib/rcs/types/dlc_with_extended_brand_and_status_use_case.rb +72 -0
  125. data/lib/rcs/types/enhanced_contact.rb +9 -0
  126. data/lib/rcs/types/enhanced_contact_item.rb +104 -0
  127. data/lib/rcs/types/error.rb +61 -0
  128. data/lib/rcs/types/extended_brand.rb +194 -0
  129. data/lib/rcs/types/extended_brand_with_vetting.rb +226 -0
  130. data/lib/rcs/types/extended_rcs_campaign.rb +173 -0
  131. data/lib/rcs/{company/types/company_register_request.rb → types/get_conversation_params.rb} +13 -12
  132. data/lib/rcs/types/get_conversation_request_id.rb +58 -0
  133. data/lib/rcs/types/get_conversation_request_recipient.rb +72 -0
  134. data/lib/rcs/types/get_dlc_campaign_status_response_updates.rb +96 -0
  135. data/lib/rcs/types/get_toll_free_campaign_status_response_updates.rb +92 -0
  136. data/lib/rcs/types/inbound_button.rb +56 -0
  137. data/lib/rcs/types/link_click_event.rb +465 -0
  138. data/lib/rcs/{company/types/company_update_response.rb → types/location_share_action.rb} +19 -19
  139. data/lib/rcs/types/location_share_action_data.rb +89 -0
  140. data/lib/rcs/types/message.rb +174 -0
  141. data/lib/rcs/types/message_content.rb +85 -0
  142. data/lib/rcs/types/message_method_enum.rb +12 -0
  143. data/lib/rcs/types/message_protocol_enum.rb +12 -0
  144. data/lib/rcs/types/message_schedule.rb +94 -0
  145. data/lib/rcs/types/message_status_enum.rb +16 -0
  146. data/lib/rcs/types/message_volume_enum.rb +20 -0
  147. data/lib/rcs/types/messaging_profile_enum.rb +11 -0
  148. data/lib/rcs/types/mms_content.rb +74 -0
  149. data/lib/rcs/types/mms_validation_response_segments.rb +85 -0
  150. data/lib/rcs/types/mms_validation_response_segments_value_item.rb +75 -0
  151. data/lib/rcs/types/mms_validation_result.rb +82 -0
  152. data/lib/rcs/types/nullable_contact.rb +84 -0
  153. data/lib/rcs/types/number_format.rb +79 -0
  154. data/lib/rcs/types/opt_in_method_enum.rb +13 -0
  155. data/lib/rcs/types/optional_brand_info.rb +145 -0
  156. data/lib/rcs/types/optional_contact.rb +83 -0
  157. data/lib/rcs/types/optional_contacts.rb +84 -0
  158. data/lib/rcs/types/phone.rb +101 -0
  159. data/lib/rcs/types/phone_capabilities.rb +75 -0
  160. data/lib/rcs/types/phone_enum.rb +13 -0
  161. data/lib/rcs/types/phone_feature_enum.rb +18 -0
  162. data/lib/rcs/types/phone_number_campaign_attach_failed_item.rb +67 -0
  163. data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item.rb +75 -0
  164. data/lib/rcs/types/phone_number_campaign_attach_phone_numbers_item_campaign.rb +78 -0
  165. data/lib/rcs/types/phone_number_campaign_detach_failed_item.rb +67 -0
  166. data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item.rb +75 -0
  167. data/lib/rcs/types/phone_number_campaign_detach_phone_numbers_item_campaign.rb +78 -0
  168. data/lib/rcs/types/phone_number_cost.rb +75 -0
  169. data/lib/rcs/types/phone_number_details.rb +110 -0
  170. data/lib/rcs/types/phone_number_enum.rb +18 -0
  171. data/lib/rcs/types/phone_number_region.rb +91 -0
  172. data/lib/rcs/types/phone_number_status.rb +90 -0
  173. data/lib/rcs/types/phone_number_status_enum.rb +16 -0
  174. data/lib/rcs/types/pinnacle_file_upload_metadata.rb +84 -0
  175. data/lib/rcs/types/pinnacle_url_config.rb +71 -0
  176. data/lib/rcs/types/profile_status_enum.rb +17 -0
  177. data/lib/rcs/types/purchased_number.rb +75 -0
  178. data/lib/rcs/types/rcs.rb +70 -0
  179. data/lib/rcs/types/rcs_base.rb +82 -0
  180. data/lib/rcs/types/rcs_base_options.rb +100 -0
  181. data/lib/rcs/types/rcs_button_call.rb +68 -0
  182. data/lib/rcs/types/rcs_button_content.rb +148 -0
  183. data/lib/rcs/types/rcs_button_open_url.rb +68 -0
  184. data/lib/rcs/types/rcs_button_request_user_location.rb +58 -0
  185. data/lib/rcs/types/rcs_button_schedule_event.rb +98 -0
  186. data/lib/rcs/types/rcs_button_send_location.rb +74 -0
  187. data/lib/rcs/types/rcs_button_send_location_lat_long.rb +68 -0
  188. data/lib/rcs/types/rcs_button_trigger.rb +78 -0
  189. data/lib/rcs/types/rcs_campaign.rb +143 -0
  190. data/lib/rcs/types/rcs_campaign_opt_in_method_enum.rb +15 -0
  191. data/lib/rcs/types/rcs_campaign_schema_agent.rb +134 -0
  192. data/lib/rcs/types/rcs_campaign_schema_agent_emails_item.rb +69 -0
  193. data/lib/rcs/types/rcs_campaign_schema_agent_phones_item.rb +69 -0
  194. data/lib/rcs/types/rcs_campaign_schema_agent_websites_item.rb +69 -0
  195. data/lib/rcs/types/rcs_campaign_schema_extra_agent.rb +134 -0
  196. data/lib/rcs/types/rcs_campaign_schema_extra_agent_emails_item.rb +70 -0
  197. data/lib/rcs/types/rcs_campaign_schema_extra_agent_phones_item.rb +70 -0
  198. data/lib/rcs/types/rcs_campaign_schema_extra_agent_websites_item.rb +71 -0
  199. data/lib/rcs/types/rcs_campaign_schema_extra_links.rb +70 -0
  200. data/lib/rcs/types/rcs_campaign_schema_extra_opt_in.rb +71 -0
  201. data/lib/rcs/types/rcs_campaign_schema_extra_opt_out.rb +70 -0
  202. data/lib/rcs/types/rcs_campaign_schema_extra_use_case.rb +71 -0
  203. data/lib/rcs/types/rcs_campaign_schema_links.rb +70 -0
  204. data/lib/rcs/types/rcs_campaign_schema_opt_in.rb +71 -0
  205. data/lib/rcs/types/rcs_campaign_schema_opt_out.rb +70 -0
  206. data/lib/rcs/types/rcs_campaign_schema_use_case.rb +71 -0
  207. data/lib/rcs/types/rcs_campaign_status.rb +86 -0
  208. data/lib/rcs/types/rcs_campaign_use_case_enum.rb +23 -0
  209. data/lib/rcs/types/rcs_card.rb +110 -0
  210. data/lib/rcs/types/rcs_cards.rb +79 -0
  211. data/lib/rcs/types/rcs_cards_cards_item.rb +88 -0
  212. data/lib/rcs/types/rcs_cards_content.rb +79 -0
  213. data/lib/rcs/types/rcs_cards_content_cards_item.rb +94 -0
  214. data/lib/rcs/types/rcs_content.rb +72 -0
  215. data/lib/rcs/types/rcs_media.rb +110 -0
  216. data/lib/rcs/types/rcs_media_content.rb +81 -0
  217. data/lib/rcs/types/rcs_media_details_content.rb +77 -0
  218. data/lib/rcs/types/rcs_text.rb +106 -0
  219. data/lib/rcs/types/rcs_text_content.rb +72 -0
  220. data/lib/rcs/types/rcs_validate_content.rb +70 -0
  221. data/lib/rcs/{company/types/company_register_response.rb → types/rcs_validate_content_media.rb} +19 -21
  222. data/lib/rcs/types/rcs_validation_result.rb +76 -0
  223. data/lib/rcs/types/reaction_result.rb +67 -0
  224. data/lib/rcs/types/scheduled_messaage.rb +73 -0
  225. data/lib/rcs/types/scheduled_send_response_config.rb +89 -0
  226. data/lib/rcs/types/send_sms_response_segments.rb +69 -0
  227. data/lib/rcs/types/send_sms_response_segments_encoding.rb +11 -0
  228. data/lib/rcs/types/sent_mms_details.rb +102 -0
  229. data/lib/rcs/types/sent_rcs_details.rb +105 -0
  230. data/lib/rcs/types/sent_sms_details.rb +108 -0
  231. data/lib/rcs/types/shortened_url.rb +77 -0
  232. data/lib/rcs/types/shortened_url_with_click_data.rb +90 -0
  233. data/lib/rcs/types/sms_content.rb +58 -0
  234. data/lib/rcs/types/sms_validation_response_segments.rb +80 -0
  235. data/lib/rcs/types/sms_validation_response_segments_gsm_7.rb +75 -0
  236. data/lib/rcs/types/sms_validation_response_segments_utf_16.rb +68 -0
  237. data/lib/rcs/types/sms_validation_response_total.rb +75 -0
  238. data/lib/rcs/types/sms_validation_result.rb +102 -0
  239. data/lib/rcs/types/sub_use_case_enum.rb +19 -0
  240. data/lib/rcs/types/submission_results.rb +57 -0
  241. data/lib/rcs/types/successful_conversation_update.rb +58 -0
  242. data/lib/rcs/types/toll_free_campaign.rb +118 -0
  243. data/lib/rcs/types/toll_free_campaign_schema_opt_in.rb +78 -0
  244. data/lib/rcs/types/toll_free_campaign_schema_use_case.rb +71 -0
  245. data/lib/rcs/types/toll_free_campaign_status.rb +91 -0
  246. data/lib/rcs/types/toll_free_campaign_use_case_enum.rb +52 -0
  247. data/lib/rcs/types/toll_free_campaign_with_extended_brand_and_status.rb +155 -0
  248. data/lib/rcs/types/toll_free_status_enum.rb +20 -0
  249. data/lib/rcs/types/tracking.rb +17 -0
  250. data/lib/rcs/types/updated_contact_id.rb +57 -0
  251. data/lib/rcs/types/upload_results.rb +80 -0
  252. data/lib/rcs/types/v_card_address_schema_type_item.rb +15 -0
  253. data/lib/rcs/types/v_card_data.rb +237 -0
  254. data/lib/rcs/types/v_card_data_file.rb +74 -0
  255. data/lib/rcs/types/v_card_data_file_metadata.rb +62 -0
  256. data/lib/rcs/types/v_card_email_schema_type_item.rb +21 -0
  257. data/lib/rcs/types/v_card_geo.rb +70 -0
  258. data/lib/rcs/types/v_card_name.rb +98 -0
  259. data/lib/rcs/types/v_card_organization.rb +70 -0
  260. data/lib/rcs/types/v_card_phone_schema_type_item.rb +21 -0
  261. data/lib/rcs/types/validate_campaign_params.rb +69 -0
  262. data/lib/rcs/types/validation_error_details.rb +76 -0
  263. data/lib/rcs/types/validation_results.rb +71 -0
  264. data/lib/rcs/types/vcard.rb +215 -0
  265. data/lib/rcs/types/vcard_address.rb +130 -0
  266. data/lib/rcs/types/vcard_content.rb +223 -0
  267. data/lib/rcs/types/vcard_email.rb +70 -0
  268. data/lib/rcs/types/vcard_phone.rb +70 -0
  269. data/lib/rcs/types/vcard_resource.rb +71 -0
  270. data/lib/rcs/types/vetting_feedback.rb +81 -0
  271. data/lib/rcs/types/vetting_history.rb +98 -0
  272. data/lib/rcs/types/vetting_history_vetting_status.rb +13 -0
  273. data/lib/rcs/types/vetting_results.rb +57 -0
  274. data/lib/rcs/types/webhook_event_enum.rb +13 -0
  275. data/lib/rcs/types/webhook_result.rb +64 -0
  276. data/lib/rcs/{company/types/company_update_response_brand.rb → types/webhooks.rb} +25 -17
  277. data/lib/rcs/types/zod_error.rb +73 -0
  278. data/lib/rcs/webhooks/client.rb +93 -0
  279. data/lib/rcs.rb +67 -83
  280. data/lib/requests.rb +4 -4
  281. data/lib/types_export.rb +252 -46
  282. metadata +278 -52
  283. data/lib/rcs/company/client.rb +0 -375
  284. data/lib/rcs/company/types/company_register_request_company.rb +0 -128
  285. data/lib/rcs/send/client.rb +0 -382
  286. data/lib/rcs/send/types/rcs_fallback.rb +0 -84
  287. data/lib/rcs/tools/types/tools_shorten_url_response.rb +0 -70
  288. data/lib/rcs/tools/types/tools_upload_url_response.rb +0 -69
  289. data/lib/rcs/types/action.rb +0 -154
  290. data/lib/rcs/types/action_lat_long.rb +0 -68
  291. data/lib/rcs/types/action_type.rb +0 -16
  292. data/lib/rcs/types/additional_email.rb +0 -65
  293. data/lib/rcs/types/additional_phone_number.rb +0 -65
  294. data/lib/rcs/types/additional_website.rb +0 -65
  295. data/lib/rcs/types/card.rb +0 -90
  296. data/lib/rcs/types/company.rb +0 -319
  297. data/lib/rcs/types/company_additional_emails_item.rb +0 -67
  298. data/lib/rcs/types/company_additional_phone_numbers_item.rb +0 -67
  299. data/lib/rcs/types/company_additional_websites_item.rb +0 -67
  300. data/lib/rcs/types/company_category.rb +0 -20
  301. data/lib/rcs/types/company_contact.rb +0 -117
  302. data/lib/rcs/types/company_details.rb +0 -120
  303. data/lib/rcs/types/forbidden_error_body.rb +0 -57
  304. data/lib/rcs/types/inbound_action_message.rb +0 -117
  305. data/lib/rcs/types/inbound_location_message.rb +0 -106
  306. data/lib/rcs/types/inbound_location_message_coordinates.rb +0 -65
  307. data/lib/rcs/types/inbound_media_message.rb +0 -112
  308. data/lib/rcs/types/inbound_message.rb +0 -88
  309. data/lib/rcs/types/inbound_message_message_type.rb +0 -10
  310. data/lib/rcs/types/inbound_message_metadata.rb +0 -79
  311. data/lib/rcs/types/inbound_text_message.rb +0 -100
  312. data/lib/rcs/types/internal_server_error_body.rb +0 -57
  313. data/lib/rcs/types/media_payload.rb +0 -65
  314. data/lib/rcs/types/message_metadata.rb +0 -56
  315. data/lib/rcs/types/messaging.rb +0 -95
  316. data/lib/rcs/types/optionals.rb +0 -99
  317. data/lib/rcs/types/payment_required_error_body.rb +0 -57
  318. data/lib/rcs/types/point_of_contact.rb +0 -72
  319. data/lib/rcs/types/rcs_functionalities.rb +0 -117
  320. data/lib/rcs/types/sender_metadata.rb +0 -74
  321. data/lib/rcs/types/unauthorized_error_body.rb +0 -57
@@ -0,0 +1,245 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "../../../requests"
4
+ require_relative "../../types/create_url_options"
5
+ require_relative "../../types/shortened_url"
6
+ require_relative "../../types/shortened_url_with_click_data"
7
+ require "async"
8
+
9
+ module Pinnacle
10
+ module Tools
11
+ class UrlClient
12
+ # @return [Pinnacle::RequestClient]
13
+ attr_reader :request_client
14
+
15
+ # @param request_client [Pinnacle::RequestClient]
16
+ # @return [Pinnacle::Tools::UrlClient]
17
+ def initialize(request_client:)
18
+ @request_client = request_client
19
+ end
20
+
21
+ # Create a shortened URL that redirects visitors to the provided destination URL.
22
+ #
23
+ # @param url [String] Destination URL for the shortened link that visitors will be redirected to when
24
+ # clicked.
25
+ # @param options [Hash] Request of type Pinnacle::Types::CreateUrlOptions, as a Hash
26
+ # * :expires_at (String)
27
+ # @param request_options [Pinnacle::RequestOptions]
28
+ # @return [Pinnacle::Types::ShortenedUrl]
29
+ # @example
30
+ # api = Pinnacle::Client.new(
31
+ # base_url: "https://api.example.com",
32
+ # environment: Pinnacle::Environment::DEFAULT,
33
+ # api_key: "YOUR_API_KEY"
34
+ # )
35
+ # api.tools.url.create(url: "https://www.pinnacle.sh/", options: { expires_at: "2025-06-23T16:18:25.000Z" })
36
+ def create(url:, options: nil, request_options: nil)
37
+ response = @request_client.conn.post do |req|
38
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
39
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
40
+ req.headers = {
41
+ **(req.headers || {}),
42
+ **@request_client.get_headers,
43
+ **(request_options&.additional_headers || {})
44
+ }.compact
45
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
46
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
47
+ end
48
+ req.body = { **(request_options&.additional_body_parameters || {}), url: url, options: options }.compact
49
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url"
50
+ end
51
+ Pinnacle::Types::ShortenedUrl.from_json(json_object: response.body)
52
+ end
53
+
54
+ # Retrieve configuration and details for your shortened URL using its unique
55
+ # identifier.
56
+ #
57
+ # @param link_id [String] Unique identifier from your shortened URL. For example, for
58
+ # `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
59
+ # See the response of [Create Shortened URL](./create-url) for more information.
60
+ # @param request_options [Pinnacle::RequestOptions]
61
+ # @return [Pinnacle::Types::ShortenedUrlWithClickData]
62
+ # @example
63
+ # api = Pinnacle::Client.new(
64
+ # base_url: "https://api.example.com",
65
+ # environment: Pinnacle::Environment::DEFAULT,
66
+ # api_key: "YOUR_API_KEY"
67
+ # )
68
+ # api.tools.url.get(link_id: "ePzVxILF")
69
+ def get(link_id:, request_options: nil)
70
+ response = @request_client.conn.get do |req|
71
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
72
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
73
+ req.headers = {
74
+ **(req.headers || {}),
75
+ **@request_client.get_headers,
76
+ **(request_options&.additional_headers || {})
77
+ }.compact
78
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
79
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
80
+ end
81
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
82
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
83
+ end
84
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url/#{link_id}"
85
+ end
86
+ Pinnacle::Types::ShortenedUrlWithClickData.from_json(json_object: response.body)
87
+ end
88
+
89
+ # Update the destination or configuration of an existing shortened URL.
90
+ #
91
+ # @param link_id [String] Unique identifier from your shortened URL. For example, for
92
+ # `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
93
+ # See the response of [Create Shortened URL](./create-url) for more information.
94
+ # @param url [String] New destination URL where your visitors will be redirected.
95
+ # @param options [Hash] Request of type Pinnacle::Types::CreateUrlOptions, as a Hash
96
+ # * :expires_at (String)
97
+ # @param request_options [Pinnacle::RequestOptions]
98
+ # @return [Pinnacle::Types::ShortenedUrl]
99
+ # @example
100
+ # api = Pinnacle::Client.new(
101
+ # base_url: "https://api.example.com",
102
+ # environment: Pinnacle::Environment::DEFAULT,
103
+ # api_key: "YOUR_API_KEY"
104
+ # )
105
+ # api.tools.url.update(link_id: "ePzVxILF", url: "https://www.pinnacle.sh/")
106
+ def update(link_id:, url: nil, options: nil, request_options: nil)
107
+ response = @request_client.conn.put do |req|
108
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
109
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
110
+ req.headers = {
111
+ **(req.headers || {}),
112
+ **@request_client.get_headers,
113
+ **(request_options&.additional_headers || {})
114
+ }.compact
115
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
116
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
117
+ end
118
+ req.body = { **(request_options&.additional_body_parameters || {}), url: url, options: options }.compact
119
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url/#{link_id}"
120
+ end
121
+ Pinnacle::Types::ShortenedUrl.from_json(json_object: response.body)
122
+ end
123
+ end
124
+
125
+ class AsyncUrlClient
126
+ # @return [Pinnacle::AsyncRequestClient]
127
+ attr_reader :request_client
128
+
129
+ # @param request_client [Pinnacle::AsyncRequestClient]
130
+ # @return [Pinnacle::Tools::AsyncUrlClient]
131
+ def initialize(request_client:)
132
+ @request_client = request_client
133
+ end
134
+
135
+ # Create a shortened URL that redirects visitors to the provided destination URL.
136
+ #
137
+ # @param url [String] Destination URL for the shortened link that visitors will be redirected to when
138
+ # clicked.
139
+ # @param options [Hash] Request of type Pinnacle::Types::CreateUrlOptions, as a Hash
140
+ # * :expires_at (String)
141
+ # @param request_options [Pinnacle::RequestOptions]
142
+ # @return [Pinnacle::Types::ShortenedUrl]
143
+ # @example
144
+ # api = Pinnacle::Client.new(
145
+ # base_url: "https://api.example.com",
146
+ # environment: Pinnacle::Environment::DEFAULT,
147
+ # api_key: "YOUR_API_KEY"
148
+ # )
149
+ # api.tools.url.create(url: "https://www.pinnacle.sh/", options: { expires_at: "2025-06-23T16:18:25.000Z" })
150
+ def create(url:, options: nil, request_options: nil)
151
+ Async do
152
+ response = @request_client.conn.post do |req|
153
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
154
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
155
+ req.headers = {
156
+ **(req.headers || {}),
157
+ **@request_client.get_headers,
158
+ **(request_options&.additional_headers || {})
159
+ }.compact
160
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
161
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
162
+ end
163
+ req.body = { **(request_options&.additional_body_parameters || {}), url: url, options: options }.compact
164
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url"
165
+ end
166
+ Pinnacle::Types::ShortenedUrl.from_json(json_object: response.body)
167
+ end
168
+ end
169
+
170
+ # Retrieve configuration and details for your shortened URL using its unique
171
+ # identifier.
172
+ #
173
+ # @param link_id [String] Unique identifier from your shortened URL. For example, for
174
+ # `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
175
+ # See the response of [Create Shortened URL](./create-url) for more information.
176
+ # @param request_options [Pinnacle::RequestOptions]
177
+ # @return [Pinnacle::Types::ShortenedUrlWithClickData]
178
+ # @example
179
+ # api = Pinnacle::Client.new(
180
+ # base_url: "https://api.example.com",
181
+ # environment: Pinnacle::Environment::DEFAULT,
182
+ # api_key: "YOUR_API_KEY"
183
+ # )
184
+ # api.tools.url.get(link_id: "ePzVxILF")
185
+ def get(link_id:, request_options: nil)
186
+ Async do
187
+ response = @request_client.conn.get do |req|
188
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
189
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
190
+ req.headers = {
191
+ **(req.headers || {}),
192
+ **@request_client.get_headers,
193
+ **(request_options&.additional_headers || {})
194
+ }.compact
195
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
196
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
197
+ end
198
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
199
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
200
+ end
201
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url/#{link_id}"
202
+ end
203
+ Pinnacle::Types::ShortenedUrlWithClickData.from_json(json_object: response.body)
204
+ end
205
+ end
206
+
207
+ # Update the destination or configuration of an existing shortened URL.
208
+ #
209
+ # @param link_id [String] Unique identifier from your shortened URL. For example, for
210
+ # `https://pncl.to/ePzVxILF`, the `linkId` is `ePzVxILF`. <br>
211
+ # See the response of [Create Shortened URL](./create-url) for more information.
212
+ # @param url [String] New destination URL where your visitors will be redirected.
213
+ # @param options [Hash] Request of type Pinnacle::Types::CreateUrlOptions, as a Hash
214
+ # * :expires_at (String)
215
+ # @param request_options [Pinnacle::RequestOptions]
216
+ # @return [Pinnacle::Types::ShortenedUrl]
217
+ # @example
218
+ # api = Pinnacle::Client.new(
219
+ # base_url: "https://api.example.com",
220
+ # environment: Pinnacle::Environment::DEFAULT,
221
+ # api_key: "YOUR_API_KEY"
222
+ # )
223
+ # api.tools.url.update(link_id: "ePzVxILF", url: "https://www.pinnacle.sh/")
224
+ def update(link_id:, url: nil, options: nil, request_options: nil)
225
+ Async do
226
+ response = @request_client.conn.put do |req|
227
+ req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
228
+ req.headers["PINNACLE-API-KEY"] = request_options.api_key unless request_options&.api_key.nil?
229
+ req.headers = {
230
+ **(req.headers || {}),
231
+ **@request_client.get_headers,
232
+ **(request_options&.additional_headers || {})
233
+ }.compact
234
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
235
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
236
+ end
237
+ req.body = { **(request_options&.additional_body_parameters || {}), url: url, options: options }.compact
238
+ req.url "#{@request_client.get_url(request_options: request_options)}/tools/url/#{link_id}"
239
+ end
240
+ Pinnacle::Types::ShortenedUrl.from_json(json_object: response.body)
241
+ end
242
+ end
243
+ end
244
+ end
245
+ end
@@ -0,0 +1,147 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "advanced_phone_information_type"
4
+ require_relative "number_format"
5
+ require_relative "advanced_phone_information_location"
6
+ require_relative "advanced_phone_information_carrier"
7
+ require_relative "advanced_phone_information_contact"
8
+ require "ostruct"
9
+ require "json"
10
+
11
+ module Pinnacle
12
+ module Types
13
+ # Detailed phone number analysis including validation status, classification with
14
+ # fraud risk,
15
+ # precise geographic data, carrier intelligence, and enhanced contact information.
16
+ # Provides comprehensive insights for risk assessment, compliance, and advanced
17
+ # usage scenarios.
18
+ class AdvancedPhoneInformation
19
+ # @return [Boolean] Indicates whether the phone number is valid and capable of receiving
20
+ # communications.
21
+ attr_reader :is_valid
22
+ # @return [Pinnacle::Types::AdvancedPhoneInformationType] Detailed classification including fraud risk and security recommendations.
23
+ attr_reader :type
24
+ # @return [Pinnacle::Types::NumberFormat] Different standardized ways the phone number can be formatted for display or
25
+ # dialing.
26
+ attr_reader :formats
27
+ # @return [Pinnacle::Types::AdvancedPhoneInformationLocation] Comprehensive geographic and administrative location data with precise
28
+ # coordinates
29
+ # and timezone information for accurate localization.
30
+ attr_reader :location
31
+ # @return [Pinnacle::Types::AdvancedPhoneInformationCarrier] Detailed carrier information.
32
+ attr_reader :carrier
33
+ # @return [Pinnacle::Types::AdvancedPhoneInformationContact] Enhanced contact information associated with the phone number.
34
+ attr_reader :contact
35
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
36
+ attr_reader :additional_properties
37
+ # @return [Object]
38
+ attr_reader :_field_set
39
+ protected :_field_set
40
+
41
+ OMIT = Object.new
42
+
43
+ # @param is_valid [Boolean] Indicates whether the phone number is valid and capable of receiving
44
+ # communications.
45
+ # @param type [Pinnacle::Types::AdvancedPhoneInformationType] Detailed classification including fraud risk and security recommendations.
46
+ # @param formats [Pinnacle::Types::NumberFormat] Different standardized ways the phone number can be formatted for display or
47
+ # dialing.
48
+ # @param location [Pinnacle::Types::AdvancedPhoneInformationLocation] Comprehensive geographic and administrative location data with precise
49
+ # coordinates
50
+ # and timezone information for accurate localization.
51
+ # @param carrier [Pinnacle::Types::AdvancedPhoneInformationCarrier] Detailed carrier information.
52
+ # @param contact [Pinnacle::Types::AdvancedPhoneInformationContact] Enhanced contact information associated with the phone number.
53
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
54
+ # @return [Pinnacle::Types::AdvancedPhoneInformation]
55
+ def initialize(is_valid:, type:, formats:, location:, carrier:, contact: OMIT, additional_properties: nil)
56
+ @is_valid = is_valid
57
+ @type = type
58
+ @formats = formats
59
+ @location = location
60
+ @carrier = carrier
61
+ @contact = contact if contact != OMIT
62
+ @additional_properties = additional_properties
63
+ @_field_set = {
64
+ "isValid": is_valid,
65
+ "type": type,
66
+ "formats": formats,
67
+ "location": location,
68
+ "carrier": carrier,
69
+ "contact": contact
70
+ }.reject do |_k, v|
71
+ v == OMIT
72
+ end
73
+ end
74
+
75
+ # Deserialize a JSON object to an instance of AdvancedPhoneInformation
76
+ #
77
+ # @param json_object [String]
78
+ # @return [Pinnacle::Types::AdvancedPhoneInformation]
79
+ def self.from_json(json_object:)
80
+ struct = JSON.parse(json_object, object_class: OpenStruct)
81
+ parsed_json = JSON.parse(json_object)
82
+ is_valid = parsed_json["isValid"]
83
+ if parsed_json["type"].nil?
84
+ type = nil
85
+ else
86
+ type = parsed_json["type"].to_json
87
+ type = Pinnacle::Types::AdvancedPhoneInformationType.from_json(json_object: type)
88
+ end
89
+ if parsed_json["formats"].nil?
90
+ formats = nil
91
+ else
92
+ formats = parsed_json["formats"].to_json
93
+ formats = Pinnacle::Types::NumberFormat.from_json(json_object: formats)
94
+ end
95
+ if parsed_json["location"].nil?
96
+ location = nil
97
+ else
98
+ location = parsed_json["location"].to_json
99
+ location = Pinnacle::Types::AdvancedPhoneInformationLocation.from_json(json_object: location)
100
+ end
101
+ if parsed_json["carrier"].nil?
102
+ carrier = nil
103
+ else
104
+ carrier = parsed_json["carrier"].to_json
105
+ carrier = Pinnacle::Types::AdvancedPhoneInformationCarrier.from_json(json_object: carrier)
106
+ end
107
+ if parsed_json["contact"].nil?
108
+ contact = nil
109
+ else
110
+ contact = parsed_json["contact"].to_json
111
+ contact = Pinnacle::Types::AdvancedPhoneInformationContact.from_json(json_object: contact)
112
+ end
113
+ new(
114
+ is_valid: is_valid,
115
+ type: type,
116
+ formats: formats,
117
+ location: location,
118
+ carrier: carrier,
119
+ contact: contact,
120
+ additional_properties: struct
121
+ )
122
+ end
123
+
124
+ # Serialize an instance of AdvancedPhoneInformation to a JSON object
125
+ #
126
+ # @return [String]
127
+ def to_json(*_args)
128
+ @_field_set&.to_json
129
+ end
130
+
131
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
132
+ # hash and check each fields type against the current object's property
133
+ # definitions.
134
+ #
135
+ # @param obj [Object]
136
+ # @return [Void]
137
+ def self.validate_raw(obj:)
138
+ obj.is_valid.is_a?(Boolean) != false || raise("Passed value for field obj.is_valid is not the expected type, validation failed.")
139
+ Pinnacle::Types::AdvancedPhoneInformationType.validate_raw(obj: obj.type)
140
+ Pinnacle::Types::NumberFormat.validate_raw(obj: obj.formats)
141
+ Pinnacle::Types::AdvancedPhoneInformationLocation.validate_raw(obj: obj.location)
142
+ Pinnacle::Types::AdvancedPhoneInformationCarrier.validate_raw(obj: obj.carrier)
143
+ obj.contact.nil? || Pinnacle::Types::AdvancedPhoneInformationContact.validate_raw(obj: obj.contact)
144
+ end
145
+ end
146
+ end
147
+ end
@@ -0,0 +1,90 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "ostruct"
4
+ require "json"
5
+
6
+ module Pinnacle
7
+ module Types
8
+ # Detailed carrier information.
9
+ class AdvancedPhoneInformationCarrier
10
+ # @return [String] Carrier or service provider name as registered with telecom authorities.
11
+ attr_reader :name
12
+ # @return [String] Standardized carrier name used across data sources.
13
+ attr_reader :normalized_carrier
14
+ # @return [String] Mobile Country Code - 3-digit identifier assigned by ITU-T for the country.
15
+ # Used in GSM, UMTS, and LTE networks for international roaming and
16
+ # identification.
17
+ attr_reader :mcc
18
+ # @return [String] Mobile Network Code - 2 or 3-digit identifier for the specific carrier within
19
+ # the country.
20
+ # Combined with MCC provides unique global identification of the mobile network.
21
+ attr_reader :mnc
22
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
23
+ attr_reader :additional_properties
24
+ # @return [Object]
25
+ attr_reader :_field_set
26
+ protected :_field_set
27
+
28
+ OMIT = Object.new
29
+
30
+ # @param name [String] Carrier or service provider name as registered with telecom authorities.
31
+ # @param normalized_carrier [String] Standardized carrier name used across data sources.
32
+ # @param mcc [String] Mobile Country Code - 3-digit identifier assigned by ITU-T for the country.
33
+ # Used in GSM, UMTS, and LTE networks for international roaming and
34
+ # identification.
35
+ # @param mnc [String] Mobile Network Code - 2 or 3-digit identifier for the specific carrier within
36
+ # the country.
37
+ # Combined with MCC provides unique global identification of the mobile network.
38
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
39
+ # @return [Pinnacle::Types::AdvancedPhoneInformationCarrier]
40
+ def initialize(name:, normalized_carrier:, mcc:, mnc:, additional_properties: nil)
41
+ @name = name
42
+ @normalized_carrier = normalized_carrier
43
+ @mcc = mcc
44
+ @mnc = mnc
45
+ @additional_properties = additional_properties
46
+ @_field_set = { "name": name, "normalizedCarrier": normalized_carrier, "mcc": mcc, "mnc": mnc }
47
+ end
48
+
49
+ # Deserialize a JSON object to an instance of AdvancedPhoneInformationCarrier
50
+ #
51
+ # @param json_object [String]
52
+ # @return [Pinnacle::Types::AdvancedPhoneInformationCarrier]
53
+ def self.from_json(json_object:)
54
+ struct = JSON.parse(json_object, object_class: OpenStruct)
55
+ parsed_json = JSON.parse(json_object)
56
+ name = parsed_json["name"]
57
+ normalized_carrier = parsed_json["normalizedCarrier"]
58
+ mcc = parsed_json["mcc"]
59
+ mnc = parsed_json["mnc"]
60
+ new(
61
+ name: name,
62
+ normalized_carrier: normalized_carrier,
63
+ mcc: mcc,
64
+ mnc: mnc,
65
+ additional_properties: struct
66
+ )
67
+ end
68
+
69
+ # Serialize an instance of AdvancedPhoneInformationCarrier to a JSON object
70
+ #
71
+ # @return [String]
72
+ def to_json(*_args)
73
+ @_field_set&.to_json
74
+ end
75
+
76
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
77
+ # hash and check each fields type against the current object's property
78
+ # definitions.
79
+ #
80
+ # @param obj [Object]
81
+ # @return [Void]
82
+ def self.validate_raw(obj:)
83
+ obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.")
84
+ obj.normalized_carrier.is_a?(String) != false || raise("Passed value for field obj.normalized_carrier is not the expected type, validation failed.")
85
+ obj.mcc.is_a?(String) != false || raise("Passed value for field obj.mcc is not the expected type, validation failed.")
86
+ obj.mnc.is_a?(String) != false || raise("Passed value for field obj.mnc is not the expected type, validation failed.")
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,146 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "enhanced_contact"
4
+ require "ostruct"
5
+ require "json"
6
+
7
+ module Pinnacle
8
+ module Types
9
+ # Enhanced contact information associated with the phone number.
10
+ class AdvancedPhoneInformationContact
11
+ # @return [String] Given name of the primary contact.
12
+ attr_reader :first_name
13
+ # @return [String] Family name of the primary contact.
14
+ attr_reader :last_name
15
+ # @return [String] Primary email associated with the number’s registration.
16
+ attr_reader :email_address
17
+ # @return [String] Street address including number and street name.
18
+ attr_reader :street
19
+ # @return [String] Secondary address info like suite or apartment number.
20
+ attr_reader :unit
21
+ # @return [String] Combined city, state, and postal info in a human-readable format.
22
+ attr_reader :place
23
+ # @return [String] Postal or ZIP code of the contact’s address.
24
+ attr_reader :zip
25
+ # @return [String] Full state or province name of the contact’s address.
26
+ attr_reader :state
27
+ # @return [String] Full country name of the contact’s registered address.
28
+ attr_reader :country
29
+ # @return [Pinnacle::Types::ENHANCED_CONTACT] Collection of online profiles and social media accounts associated with the
30
+ # contact. <br>
31
+ # These are potential candidates and may be inaccurate. Always double check.
32
+ attr_reader :profiles
33
+ # @return [OpenStruct] Additional properties unmapped to the current class definition
34
+ attr_reader :additional_properties
35
+ # @return [Object]
36
+ attr_reader :_field_set
37
+ protected :_field_set
38
+
39
+ OMIT = Object.new
40
+
41
+ # @param first_name [String] Given name of the primary contact.
42
+ # @param last_name [String] Family name of the primary contact.
43
+ # @param email_address [String] Primary email associated with the number’s registration.
44
+ # @param street [String] Street address including number and street name.
45
+ # @param unit [String] Secondary address info like suite or apartment number.
46
+ # @param place [String] Combined city, state, and postal info in a human-readable format.
47
+ # @param zip [String] Postal or ZIP code of the contact’s address.
48
+ # @param state [String] Full state or province name of the contact’s address.
49
+ # @param country [String] Full country name of the contact’s registered address.
50
+ # @param profiles [Pinnacle::Types::ENHANCED_CONTACT] Collection of online profiles and social media accounts associated with the
51
+ # contact. <br>
52
+ # These are potential candidates and may be inaccurate. Always double check.
53
+ # @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
54
+ # @return [Pinnacle::Types::AdvancedPhoneInformationContact]
55
+ def initialize(first_name: OMIT, last_name: OMIT, email_address: OMIT, street: OMIT, unit: OMIT, place: OMIT,
56
+ zip: OMIT, state: OMIT, country: OMIT, profiles: OMIT, additional_properties: nil)
57
+ @first_name = first_name if first_name != OMIT
58
+ @last_name = last_name if last_name != OMIT
59
+ @email_address = email_address if email_address != OMIT
60
+ @street = street if street != OMIT
61
+ @unit = unit if unit != OMIT
62
+ @place = place if place != OMIT
63
+ @zip = zip if zip != OMIT
64
+ @state = state if state != OMIT
65
+ @country = country if country != OMIT
66
+ @profiles = profiles if profiles != OMIT
67
+ @additional_properties = additional_properties
68
+ @_field_set = {
69
+ "firstName": first_name,
70
+ "lastName": last_name,
71
+ "emailAddress": email_address,
72
+ "street": street,
73
+ "unit": unit,
74
+ "place": place,
75
+ "zip": zip,
76
+ "state": state,
77
+ "country": country,
78
+ "profiles": profiles
79
+ }.reject do |_k, v|
80
+ v == OMIT
81
+ end
82
+ end
83
+
84
+ # Deserialize a JSON object to an instance of AdvancedPhoneInformationContact
85
+ #
86
+ # @param json_object [String]
87
+ # @return [Pinnacle::Types::AdvancedPhoneInformationContact]
88
+ def self.from_json(json_object:)
89
+ struct = JSON.parse(json_object, object_class: OpenStruct)
90
+ parsed_json = JSON.parse(json_object)
91
+ first_name = parsed_json["firstName"]
92
+ last_name = parsed_json["lastName"]
93
+ email_address = parsed_json["emailAddress"]
94
+ street = parsed_json["street"]
95
+ unit = parsed_json["unit"]
96
+ place = parsed_json["place"]
97
+ zip = parsed_json["zip"]
98
+ state = parsed_json["state"]
99
+ country = parsed_json["country"]
100
+ profiles = parsed_json["profiles"]&.map do |item|
101
+ item = item.to_json
102
+ Pinnacle::Types::EnhancedContactItem.from_json(json_object: item)
103
+ end
104
+ new(
105
+ first_name: first_name,
106
+ last_name: last_name,
107
+ email_address: email_address,
108
+ street: street,
109
+ unit: unit,
110
+ place: place,
111
+ zip: zip,
112
+ state: state,
113
+ country: country,
114
+ profiles: profiles,
115
+ additional_properties: struct
116
+ )
117
+ end
118
+
119
+ # Serialize an instance of AdvancedPhoneInformationContact to a JSON object
120
+ #
121
+ # @return [String]
122
+ def to_json(*_args)
123
+ @_field_set&.to_json
124
+ end
125
+
126
+ # Leveraged for Union-type generation, validate_raw attempts to parse the given
127
+ # hash and check each fields type against the current object's property
128
+ # definitions.
129
+ #
130
+ # @param obj [Object]
131
+ # @return [Void]
132
+ def self.validate_raw(obj:)
133
+ obj.first_name&.is_a?(String) != false || raise("Passed value for field obj.first_name is not the expected type, validation failed.")
134
+ obj.last_name&.is_a?(String) != false || raise("Passed value for field obj.last_name is not the expected type, validation failed.")
135
+ obj.email_address&.is_a?(String) != false || raise("Passed value for field obj.email_address is not the expected type, validation failed.")
136
+ obj.street&.is_a?(String) != false || raise("Passed value for field obj.street is not the expected type, validation failed.")
137
+ obj.unit&.is_a?(String) != false || raise("Passed value for field obj.unit is not the expected type, validation failed.")
138
+ obj.place&.is_a?(String) != false || raise("Passed value for field obj.place is not the expected type, validation failed.")
139
+ obj.zip&.is_a?(String) != false || raise("Passed value for field obj.zip is not the expected type, validation failed.")
140
+ obj.state&.is_a?(String) != false || raise("Passed value for field obj.state is not the expected type, validation failed.")
141
+ obj.country&.is_a?(String) != false || raise("Passed value for field obj.country is not the expected type, validation failed.")
142
+ obj.profiles&.is_a?(Array) != false || raise("Passed value for field obj.profiles is not the expected type, validation failed.")
143
+ end
144
+ end
145
+ end
146
+ end