constant_contact_client 1.0.0

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 (406) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +56 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +72 -0
  5. data/LICENSE +29 -0
  6. data/README.md +201 -0
  7. data/Rakefile +10 -0
  8. data/constant_contact_client.gemspec +39 -0
  9. data/docs/AccountServicesApi.md +593 -0
  10. data/docs/BulkActivitiesApi.md +1035 -0
  11. data/docs/ContactListsApi.md +461 -0
  12. data/docs/ContactTagsApi.md +382 -0
  13. data/docs/ContactsApi.md +701 -0
  14. data/docs/ContactsCustomFieldsApi.md +375 -0
  15. data/docs/ContactsReportingApi.md +244 -0
  16. data/docs/EmailCampaignsABTestsApi.md +227 -0
  17. data/docs/EmailCampaignsApi.md +826 -0
  18. data/docs/EmailReportingApi.md +925 -0
  19. data/docs/EmailSchedulingApi.md +447 -0
  20. data/docs/LandingPagesReportingApi.md +481 -0
  21. data/docs/SegmentsApi.md +452 -0
  22. data/lib/constant_contact_client/api/account_services_api.rb +546 -0
  23. data/lib/constant_contact_client/api/bulk_activities_api.rb +983 -0
  24. data/lib/constant_contact_client/api/contact_lists_api.rb +449 -0
  25. data/lib/constant_contact_client/api/contact_tags_api.rb +356 -0
  26. data/lib/constant_contact_client/api/contacts_api.rb +676 -0
  27. data/lib/constant_contact_client/api/contacts_custom_fields_api.rb +356 -0
  28. data/lib/constant_contact_client/api/contacts_reporting_api.rb +255 -0
  29. data/lib/constant_contact_client/api/email_campaigns_ab_tests_api.rb +220 -0
  30. data/lib/constant_contact_client/api/email_campaigns_api.rb +766 -0
  31. data/lib/constant_contact_client/api/email_reporting_api.rb +812 -0
  32. data/lib/constant_contact_client/api/email_scheduling_api.rb +418 -0
  33. data/lib/constant_contact_client/api/landing_pages_reporting_api.rb +436 -0
  34. data/lib/constant_contact_client/api/segments_api.rb +425 -0
  35. data/lib/constant_contact_client/api_client.rb +394 -0
  36. data/lib/constant_contact_client/api_error.rb +58 -0
  37. data/lib/constant_contact_client/configuration.rb +305 -0
  38. data/lib/constant_contact_client/models/ab_test_data.rb +256 -0
  39. data/lib/constant_contact_client/models/access_token_response.rb +265 -0
  40. data/lib/constant_contact_client/models/account_cancellation.rb +226 -0
  41. data/lib/constant_contact_client/models/account_email_create_response.rb +273 -0
  42. data/lib/constant_contact_client/models/account_email_input.rb +234 -0
  43. data/lib/constant_contact_client/models/account_physical_address.rb +409 -0
  44. data/lib/constant_contact_client/models/account_suspension.rb +289 -0
  45. data/lib/constant_contact_client/models/activities.rb +226 -0
  46. data/lib/constant_contact_client/models/activity.rb +316 -0
  47. data/lib/constant_contact_client/models/activity_delete_custom_fields.rb +297 -0
  48. data/lib/constant_contact_client/models/activity_delete_list_response.rb +276 -0
  49. data/lib/constant_contact_client/models/activity_delete_lists_response.rb +305 -0
  50. data/lib/constant_contact_client/models/activity_delete_status.rb +306 -0
  51. data/lib/constant_contact_client/models/activity_errors.rb +215 -0
  52. data/lib/constant_contact_client/models/activity_export_status.rb +306 -0
  53. data/lib/constant_contact_client/models/activity_generic.rb +299 -0
  54. data/lib/constant_contact_client/models/activity_generic_status.rb +225 -0
  55. data/lib/constant_contact_client/models/activity_import.rb +316 -0
  56. data/lib/constant_contact_client/models/activity_links.rb +223 -0
  57. data/lib/constant_contact_client/models/activity_lists_membership.rb +305 -0
  58. data/lib/constant_contact_client/models/activity_reference.rb +225 -0
  59. data/lib/constant_contact_client/models/activity_status.rb +275 -0
  60. data/lib/constant_contact_client/models/activity_status_export_link.rb +223 -0
  61. data/lib/constant_contact_client/models/activity_status_link.rb +214 -0
  62. data/lib/constant_contact_client/models/activity_tagging.rb +319 -0
  63. data/lib/constant_contact_client/models/activity_tagging_status.rb +226 -0
  64. data/lib/constant_contact_client/models/add_account_email_address201_response.rb +273 -0
  65. data/lib/constant_contact_client/models/add_account_email_address_request.rb +234 -0
  66. data/lib/constant_contact_client/models/api_error_schema_inner.rb +225 -0
  67. data/lib/constant_contact_client/models/authorization_error_schema.rb +225 -0
  68. data/lib/constant_contact_client/models/bounces_tracking_activities_page.rb +240 -0
  69. data/lib/constant_contact_client/models/bounces_tracking_activity.rb +347 -0
  70. data/lib/constant_contact_client/models/bulk_email_campaign_summaries_page.rb +249 -0
  71. data/lib/constant_contact_client/models/bulk_email_campaign_summaries_percents.rb +255 -0
  72. data/lib/constant_contact_client/models/bulk_email_campaign_summary.rb +272 -0
  73. data/lib/constant_contact_client/models/campaign_activity_stats_query_result_email.rb +229 -0
  74. data/lib/constant_contact_client/models/campaign_activity_stats_result_generic_stats_email_activity.rb +244 -0
  75. data/lib/constant_contact_client/models/campaign_activity_summary.rb +341 -0
  76. data/lib/constant_contact_client/models/campaign_stats_query_result_email.rb +229 -0
  77. data/lib/constant_contact_client/models/campaign_stats_result_generic_stats_email_percents_email.rb +243 -0
  78. data/lib/constant_contact_client/models/clicks_tracking_activities_page.rb +233 -0
  79. data/lib/constant_contact_client/models/clicks_tracking_activity.rb +364 -0
  80. data/lib/constant_contact_client/models/company_logo.rb +235 -0
  81. data/lib/constant_contact_client/models/contact_campaign_activities_summary.rb +250 -0
  82. data/lib/constant_contact_client/models/contact_create_or_update_input.rb +503 -0
  83. data/lib/constant_contact_client/models/contact_create_or_update_response.rb +225 -0
  84. data/lib/constant_contact_client/models/contact_custom_field.rb +259 -0
  85. data/lib/constant_contact_client/models/contact_delete.rb +267 -0
  86. data/lib/constant_contact_client/models/contact_list.rb +301 -0
  87. data/lib/constant_contact_client/models/contact_list_array.rb +235 -0
  88. data/lib/constant_contact_client/models/contact_list_put_post.rb +291 -0
  89. data/lib/constant_contact_client/models/contact_open_and_click_rates.rb +274 -0
  90. data/lib/constant_contact_client/models/contact_post_request.rb +575 -0
  91. data/lib/constant_contact_client/models/contact_put_request.rb +582 -0
  92. data/lib/constant_contact_client/models/contact_resource.rb +635 -0
  93. data/lib/constant_contact_client/models/contact_tracking_activities_page.rb +227 -0
  94. data/lib/constant_contact_client/models/contact_tracking_activity.rb +270 -0
  95. data/lib/constant_contact_client/models/contact_xref.rb +226 -0
  96. data/lib/constant_contact_client/models/contact_xrefs.rb +236 -0
  97. data/lib/constant_contact_client/models/contacts.rb +246 -0
  98. data/lib/constant_contact_client/models/contacts_counts.rb +265 -0
  99. data/lib/constant_contact_client/models/contacts_export.rb +300 -0
  100. data/lib/constant_contact_client/models/contacts_json_import.rb +281 -0
  101. data/lib/constant_contact_client/models/create_contact_request.rb +575 -0
  102. data/lib/constant_contact_client/models/create_contact_request_email_address.rb +252 -0
  103. data/lib/constant_contact_client/models/create_csv_import_activity201_response.rb +316 -0
  104. data/lib/constant_contact_client/models/create_csv_import_activity201_response_links.rb +214 -0
  105. data/lib/constant_contact_client/models/create_csv_import_activity201_response_status.rb +255 -0
  106. data/lib/constant_contact_client/models/create_delete_activity201_response.rb +306 -0
  107. data/lib/constant_contact_client/models/create_delete_activity201_response_links.rb +214 -0
  108. data/lib/constant_contact_client/models/create_delete_activity201_response_links_self.rb +215 -0
  109. data/lib/constant_contact_client/models/create_delete_activity201_response_status.rb +235 -0
  110. data/lib/constant_contact_client/models/create_delete_activity_request.rb +267 -0
  111. data/lib/constant_contact_client/models/create_email_campaign200_response.rb +306 -0
  112. data/lib/constant_contact_client/models/create_email_campaign200_response_campaign_activities_inner.rb +225 -0
  113. data/lib/constant_contact_client/models/create_email_campaign_request.rb +260 -0
  114. data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner.rb +402 -0
  115. data/lib/constant_contact_client/models/create_email_campaign_request_email_campaign_activities_inner_physical_address_in_footer.rb +347 -0
  116. data/lib/constant_contact_client/models/create_export_activity201_response.rb +306 -0
  117. data/lib/constant_contact_client/models/create_export_activity201_response_status.rb +225 -0
  118. data/lib/constant_contact_client/models/create_export_activity_request.rb +300 -0
  119. data/lib/constant_contact_client/models/create_import_json_activity_request.rb +281 -0
  120. data/lib/constant_contact_client/models/create_import_json_activity_request_import_data_inner.rb +1315 -0
  121. data/lib/constant_contact_client/models/create_list_add_activity_request.rb +268 -0
  122. data/lib/constant_contact_client/models/create_list_add_activity_request_exclude.rb +217 -0
  123. data/lib/constant_contact_client/models/create_list_add_activity_request_source.rb +331 -0
  124. data/lib/constant_contact_client/models/create_list_delete_activity201_response.rb +305 -0
  125. data/lib/constant_contact_client/models/create_list_delete_activity201_response_links.rb +214 -0
  126. data/lib/constant_contact_client/models/create_list_delete_activity201_response_links_self.rb +215 -0
  127. data/lib/constant_contact_client/models/create_list_delete_activity201_response_status.rb +215 -0
  128. data/lib/constant_contact_client/models/create_list_delete_activity_request.rb +243 -0
  129. data/lib/constant_contact_client/models/create_list_remove_activity201_response.rb +305 -0
  130. data/lib/constant_contact_client/models/create_list_remove_activity201_response_status.rb +235 -0
  131. data/lib/constant_contact_client/models/create_list_remove_activity_request.rb +268 -0
  132. data/lib/constant_contact_client/models/create_list_remove_activity_request_exclude.rb +217 -0
  133. data/lib/constant_contact_client/models/create_list_remove_activity_request_source.rb +321 -0
  134. data/lib/constant_contact_client/models/create_or_update_contact200_response.rb +225 -0
  135. data/lib/constant_contact_client/models/create_or_update_contact_custom_field.rb +244 -0
  136. data/lib/constant_contact_client/models/create_or_update_contact_request.rb +503 -0
  137. data/lib/constant_contact_client/models/create_or_update_contact_request_custom_fields_inner.rb +244 -0
  138. data/lib/constant_contact_client/models/create_or_update_contact_request_street_address.rb +367 -0
  139. data/lib/constant_contact_client/models/create_resend_email_campaign201_response.rb +255 -0
  140. data/lib/constant_contact_client/models/create_resend_email_campaign_request.rb +242 -0
  141. data/lib/constant_contact_client/models/create_segment201_response.rb +274 -0
  142. data/lib/constant_contact_client/models/create_segment_request.rb +258 -0
  143. data/lib/constant_contact_client/models/create_tag_delete_activity_request.rb +243 -0
  144. data/lib/constant_contact_client/models/create_tag_remove_activity201_response.rb +319 -0
  145. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links.rb +223 -0
  146. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_results.rb +215 -0
  147. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_links_self.rb +214 -0
  148. data/lib/constant_contact_client/models/create_tag_remove_activity201_response_status.rb +226 -0
  149. data/lib/constant_contact_client/models/create_tag_remove_activity_request.rb +268 -0
  150. data/lib/constant_contact_client/models/create_tag_remove_activity_request_exclude.rb +218 -0
  151. data/lib/constant_contact_client/models/create_tag_remove_activity_request_source.rb +319 -0
  152. data/lib/constant_contact_client/models/cross_reference.rb +235 -0
  153. data/lib/constant_contact_client/models/cross_reference_response.rb +217 -0
  154. data/lib/constant_contact_client/models/custom_field_id100.rb +243 -0
  155. data/lib/constant_contact_client/models/custom_field_input.rb +258 -0
  156. data/lib/constant_contact_client/models/custom_field_resource.rb +318 -0
  157. data/lib/constant_contact_client/models/custom_fields.rb +245 -0
  158. data/lib/constant_contact_client/models/customer.rb +352 -0
  159. data/lib/constant_contact_client/models/customer_put.rb +334 -0
  160. data/lib/constant_contact_client/models/delete_list202_response.rb +276 -0
  161. data/lib/constant_contact_client/models/delete_tag202_response.rb +299 -0
  162. data/lib/constant_contact_client/models/delete_tag202_response_activity_errors_inner.rb +215 -0
  163. data/lib/constant_contact_client/models/delete_tag202_response_links.rb +214 -0
  164. data/lib/constant_contact_client/models/delete_tag202_response_links_self.rb +215 -0
  165. data/lib/constant_contact_client/models/delete_tag202_response_status.rb +225 -0
  166. data/lib/constant_contact_client/models/device_flow_response.rb +265 -0
  167. data/lib/constant_contact_client/models/did_not_opens_tracking_activities_page.rb +233 -0
  168. data/lib/constant_contact_client/models/did_not_opens_tracking_activity.rb +320 -0
  169. data/lib/constant_contact_client/models/email_address.rb +351 -0
  170. data/lib/constant_contact_client/models/email_address_post.rb +252 -0
  171. data/lib/constant_contact_client/models/email_address_put.rb +341 -0
  172. data/lib/constant_contact_client/models/email_campaign.rb +306 -0
  173. data/lib/constant_contact_client/models/email_campaign_activity.rb +405 -0
  174. data/lib/constant_contact_client/models/email_campaign_activity_input.rb +402 -0
  175. data/lib/constant_contact_client/models/email_campaign_activity_preview.rb +285 -0
  176. data/lib/constant_contact_client/models/email_campaign_complete.rb +260 -0
  177. data/lib/constant_contact_client/models/email_campaign_name.rb +241 -0
  178. data/lib/constant_contact_client/models/email_campaigns.rb +294 -0
  179. data/lib/constant_contact_client/models/email_link_click_count.rb +265 -0
  180. data/lib/constant_contact_client/models/email_links.rb +227 -0
  181. data/lib/constant_contact_client/models/email_physical_address.rb +346 -0
  182. data/lib/constant_contact_client/models/email_schedule_input.rb +222 -0
  183. data/lib/constant_contact_client/models/email_test_send_input.rb +253 -0
  184. data/lib/constant_contact_client/models/emails_link.rb +214 -0
  185. data/lib/constant_contact_client/models/emails_paging_links.rb +214 -0
  186. data/lib/constant_contact_client/models/file_object.rb +384 -0
  187. data/lib/constant_contact_client/models/file_status_array_inner.rb +235 -0
  188. data/lib/constant_contact_client/models/forwards_tracking_activities_page.rb +233 -0
  189. data/lib/constant_contact_client/models/forwards_tracking_activity.rb +320 -0
  190. data/lib/constant_contact_client/models/get_ab_test_email_campaign200_response.rb +256 -0
  191. data/lib/constant_contact_client/models/get_account_details200_response.rb +352 -0
  192. data/lib/constant_contact_client/models/get_account_details200_response_company_logo.rb +236 -0
  193. data/lib/constant_contact_client/models/get_account_details200_response_physical_address.rb +409 -0
  194. data/lib/constant_contact_client/models/get_activity_by_id200_response.rb +316 -0
  195. data/lib/constant_contact_client/models/get_all_account_email_addresses200_response_inner.rb +317 -0
  196. data/lib/constant_contact_client/models/get_all_activities200_response.rb +226 -0
  197. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner.rb +316 -0
  198. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links.rb +223 -0
  199. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_results.rb +215 -0
  200. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_links_self.rb +215 -0
  201. data/lib/constant_contact_client/models/get_all_activities200_response_activities_inner_status.rb +275 -0
  202. data/lib/constant_contact_client/models/get_all_activities200_response_links.rb +214 -0
  203. data/lib/constant_contact_client/models/get_all_activities200_response_links_next.rb +214 -0
  204. data/lib/constant_contact_client/models/get_all_contacts200_response.rb +246 -0
  205. data/lib/constant_contact_client/models/get_all_custom_fields200_response.rb +245 -0
  206. data/lib/constant_contact_client/models/get_all_email_campaigns200_response.rb +225 -0
  207. data/lib/constant_contact_client/models/get_all_email_campaigns200_response_campaigns_inner.rb +294 -0
  208. data/lib/constant_contact_client/models/get_all_email_campaigns200_response_links.rb +214 -0
  209. data/lib/constant_contact_client/models/get_all_lists200_response.rb +235 -0
  210. data/lib/constant_contact_client/models/get_all_segments200_response.rb +233 -0
  211. data/lib/constant_contact_client/models/get_all_segments200_response_links.rb +222 -0
  212. data/lib/constant_contact_client/models/get_all_segments200_response_links_next.rb +223 -0
  213. data/lib/constant_contact_client/models/get_all_segments200_response_segments_inner.rb +245 -0
  214. data/lib/constant_contact_client/models/get_all_tags200_response.rb +226 -0
  215. data/lib/constant_contact_client/models/get_all_tags200_response_links.rb +215 -0
  216. data/lib/constant_contact_client/models/get_all_tags200_response_links_next.rb +224 -0
  217. data/lib/constant_contact_client/models/get_all_tags200_response_links_next_next.rb +223 -0
  218. data/lib/constant_contact_client/models/get_bounces_report200_response.rb +240 -0
  219. data/lib/constant_contact_client/models/get_bounces_report200_response_links.rb +222 -0
  220. data/lib/constant_contact_client/models/get_bounces_report200_response_tracking_activities_inner.rb +347 -0
  221. data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response.rb +227 -0
  222. data/lib/constant_contact_client/models/get_campaign_activity_link_report200_response_link_click_counts_inner.rb +265 -0
  223. data/lib/constant_contact_client/models/get_clicks_report200_response.rb +233 -0
  224. data/lib/constant_contact_client/models/get_clicks_report200_response_links.rb +222 -0
  225. data/lib/constant_contact_client/models/get_clicks_report200_response_tracking_activities_inner.rb +364 -0
  226. data/lib/constant_contact_client/models/get_contact_adds200_response.rb +240 -0
  227. data/lib/constant_contact_client/models/get_contact_adds200_response_tracking_activities_inner.rb +329 -0
  228. data/lib/constant_contact_client/models/get_contact_by_id200_response.rb +635 -0
  229. data/lib/constant_contact_client/models/get_contact_by_id200_response_custom_fields_inner.rb +259 -0
  230. data/lib/constant_contact_client/models/get_contact_by_id200_response_email_address.rb +351 -0
  231. data/lib/constant_contact_client/models/get_contact_by_id200_response_notes_inner.rb +255 -0
  232. data/lib/constant_contact_client/models/get_contact_by_id200_response_phone_numbers_inner.rb +294 -0
  233. data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel.rb +278 -0
  234. data/lib/constant_contact_client/models/get_contact_by_id200_response_sms_channel_sms_channel_consents_inner.rb +285 -0
  235. data/lib/constant_contact_client/models/get_contact_by_id200_response_street_addresses_inner.rb +397 -0
  236. data/lib/constant_contact_client/models/get_contact_counts200_response.rb +265 -0
  237. data/lib/constant_contact_client/models/get_contact_id_xrefs200_response.rb +236 -0
  238. data/lib/constant_contact_client/models/get_contact_id_xrefs200_response_xrefs_inner.rb +226 -0
  239. data/lib/constant_contact_client/models/get_contact_open_click_rate_report200_response.rb +274 -0
  240. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response.rb +250 -0
  241. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_campaign_activities_inner.rb +341 -0
  242. data/lib/constant_contact_client/models/get_contact_tracking_count_report200_response_links.rb +222 -0
  243. data/lib/constant_contact_client/models/get_contact_tracking_report200_response.rb +227 -0
  244. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links.rb +222 -0
  245. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_links_next.rb +223 -0
  246. data/lib/constant_contact_client/models/get_contact_tracking_report200_response_tracking_activities_inner.rb +270 -0
  247. data/lib/constant_contact_client/models/get_custom_field200_response.rb +318 -0
  248. data/lib/constant_contact_client/models/get_did_not_opens_report200_response.rb +233 -0
  249. data/lib/constant_contact_client/models/get_did_not_opens_report200_response_tracking_activities_inner.rb +320 -0
  250. data/lib/constant_contact_client/models/get_email_campaign_activity200_response.rb +405 -0
  251. data/lib/constant_contact_client/models/get_email_campaign_activity200_response_document_properties.rb +520 -0
  252. data/lib/constant_contact_client/models/get_email_campaign_activity200_response_physical_address_in_footer.rb +347 -0
  253. data/lib/constant_contact_client/models/get_email_campaign_activity_preview200_response.rb +285 -0
  254. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response.rb +229 -0
  255. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner.rb +244 -0
  256. data/lib/constant_contact_client/models/get_email_campaign_activity_report200_response_results_inner_stats.rb +476 -0
  257. data/lib/constant_contact_client/models/get_email_campaign_activity_schedule200_response_inner.rb +215 -0
  258. data/lib/constant_contact_client/models/get_email_campaign_activity_send_history200_response_inner.rb +298 -0
  259. data/lib/constant_contact_client/models/get_email_campaign_report200_response.rb +249 -0
  260. data/lib/constant_contact_client/models/get_email_campaign_report200_response_aggregate_percents.rb +256 -0
  261. data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner.rb +272 -0
  262. data/lib/constant_contact_client/models/get_email_campaign_report200_response_bulk_email_campaign_summaries_inner_unique_counts.rb +342 -0
  263. data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response.rb +217 -0
  264. data/lib/constant_contact_client/models/get_email_campaign_xrefs200_response_xrefs_inner.rb +235 -0
  265. data/lib/constant_contact_client/models/get_email_opens_report200_response.rb +233 -0
  266. data/lib/constant_contact_client/models/get_email_opens_report200_response_tracking_activities_inner.rb +330 -0
  267. data/lib/constant_contact_client/models/get_email_sends_report200_response.rb +233 -0
  268. data/lib/constant_contact_client/models/get_email_sends_report200_response_links.rb +222 -0
  269. data/lib/constant_contact_client/models/get_email_sends_report200_response_tracking_activities_inner.rb +320 -0
  270. data/lib/constant_contact_client/models/get_email_stats_report200_response.rb +229 -0
  271. data/lib/constant_contact_client/models/get_email_stats_report200_response_errors_inner.rb +225 -0
  272. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner.rb +243 -0
  273. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_percents.rb +296 -0
  274. data/lib/constant_contact_client/models/get_email_stats_report200_response_results_inner_stats.rb +396 -0
  275. data/lib/constant_contact_client/models/get_forwards_report200_response.rb +233 -0
  276. data/lib/constant_contact_client/models/get_forwards_report200_response_tracking_activities_inner.rb +320 -0
  277. data/lib/constant_contact_client/models/get_list200_response.rb +301 -0
  278. data/lib/constant_contact_client/models/get_list_id_xrefs200_response.rb +236 -0
  279. data/lib/constant_contact_client/models/get_list_id_xrefs200_response_xrefs_inner.rb +226 -0
  280. data/lib/constant_contact_client/models/get_optouts_report200_response.rb +240 -0
  281. data/lib/constant_contact_client/models/get_optouts_report200_response_tracking_activities_inner.rb +330 -0
  282. data/lib/constant_contact_client/models/get_resend_email_campaign200_response_inner.rb +265 -0
  283. data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner.rb +255 -0
  284. data/lib/constant_contact_client/models/get_sms_engagement_history200_response_inner_history_details.rb +316 -0
  285. data/lib/constant_contact_client/models/get_tag200_response.rb +265 -0
  286. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response.rb +240 -0
  287. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links.rb +222 -0
  288. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_links_next.rb +223 -0
  289. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner.rb +366 -0
  290. data/lib/constant_contact_client/models/get_unique_contact_clicks200_response_tracking_activities_inner_sms_channel.rb +246 -0
  291. data/lib/constant_contact_client/models/get_unique_contact_opens200_response.rb +240 -0
  292. data/lib/constant_contact_client/models/get_unique_contact_opens200_response_tracking_activities_inner.rb +339 -0
  293. data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response.rb +240 -0
  294. data/lib/constant_contact_client/models/get_unique_contact_sms_opt_ins200_response_tracking_activities_inner.rb +329 -0
  295. data/lib/constant_contact_client/models/get_unique_contact_updates200_response.rb +240 -0
  296. data/lib/constant_contact_client/models/get_unique_contact_updates200_response_tracking_activities_inner.rb +329 -0
  297. data/lib/constant_contact_client/models/get_user_privileges200_response_inner.rb +225 -0
  298. data/lib/constant_contact_client/models/headers_object.rb +225 -0
  299. data/lib/constant_contact_client/models/history_details.rb +316 -0
  300. data/lib/constant_contact_client/models/json_import_contact.rb +1315 -0
  301. data/lib/constant_contact_client/models/link.rb +214 -0
  302. data/lib/constant_contact_client/models/links.rb +221 -0
  303. data/lib/constant_contact_client/models/list_activity_add_contacts.rb +268 -0
  304. data/lib/constant_contact_client/models/list_activity_remove_contacts.rb +268 -0
  305. data/lib/constant_contact_client/models/list_id_list100.rb +243 -0
  306. data/lib/constant_contact_client/models/list_input.rb +263 -0
  307. data/lib/constant_contact_client/models/list_xref.rb +226 -0
  308. data/lib/constant_contact_client/models/list_xrefs.rb +236 -0
  309. data/lib/constant_contact_client/models/lpreporting_links.rb +221 -0
  310. data/lib/constant_contact_client/models/lpreporting_next.rb +222 -0
  311. data/lib/constant_contact_client/models/model_next.rb +222 -0
  312. data/lib/constant_contact_client/models/my_library_file_collection_inner.rb +384 -0
  313. data/lib/constant_contact_client/models/my_library_file_collection_inner_thumbnail.rb +235 -0
  314. data/lib/constant_contact_client/models/note.rb +255 -0
  315. data/lib/constant_contact_client/models/o_auth_error.rb +223 -0
  316. data/lib/constant_contact_client/models/opens_tracking_activities_page.rb +233 -0
  317. data/lib/constant_contact_client/models/opens_tracking_activity.rb +330 -0
  318. data/lib/constant_contact_client/models/optouts_tracking_activities_page.rb +240 -0
  319. data/lib/constant_contact_client/models/optouts_tracking_activity.rb +330 -0
  320. data/lib/constant_contact_client/models/p_contact_add_tracking_activities_page.rb +240 -0
  321. data/lib/constant_contact_client/models/p_contact_add_tracking_activity.rb +329 -0
  322. data/lib/constant_contact_client/models/p_contact_click_tracking_activities_page.rb +240 -0
  323. data/lib/constant_contact_client/models/p_contact_click_tracking_activity.rb +366 -0
  324. data/lib/constant_contact_client/models/p_contact_open_tracking_activity.rb +339 -0
  325. data/lib/constant_contact_client/models/p_contact_opens_tracking_activities_page.rb +240 -0
  326. data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activities_page.rb +240 -0
  327. data/lib/constant_contact_client/models/p_contact_sms_opt_in_tracking_activity.rb +329 -0
  328. data/lib/constant_contact_client/models/p_contact_update_tracking_activities_page.rb +240 -0
  329. data/lib/constant_contact_client/models/p_contact_update_tracking_activity.rb +329 -0
  330. data/lib/constant_contact_client/models/paged_email_campaign_response.rb +225 -0
  331. data/lib/constant_contact_client/models/pagination_links.rb +214 -0
  332. data/lib/constant_contact_client/models/pagination_links_next.rb +215 -0
  333. data/lib/constant_contact_client/models/paging_links.rb +214 -0
  334. data/lib/constant_contact_client/models/partner_account.rb +233 -0
  335. data/lib/constant_contact_client/models/partner_account_links.rb +215 -0
  336. data/lib/constant_contact_client/models/partner_account_operations_request.rb +286 -0
  337. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_headers_inner.rb +225 -0
  338. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_path_parameters_inner.rb +225 -0
  339. data/lib/constant_contact_client/models/partner_account_operations_request_account_operation_query_parameters_inner.rb +225 -0
  340. data/lib/constant_contact_client/models/partner_account_site_owner_list_inner.rb +265 -0
  341. data/lib/constant_contact_client/models/partners_link.rb +214 -0
  342. data/lib/constant_contact_client/models/patch_email_campaign_name_request.rb +241 -0
  343. data/lib/constant_contact_client/models/path_param_object.rb +225 -0
  344. data/lib/constant_contact_client/models/percents_email.rb +295 -0
  345. data/lib/constant_contact_client/models/phone_number.rb +294 -0
  346. data/lib/constant_contact_client/models/phone_number_put.rb +244 -0
  347. data/lib/constant_contact_client/models/plan_info.rb +236 -0
  348. data/lib/constant_contact_client/models/plan_tiers_object.rb +248 -0
  349. data/lib/constant_contact_client/models/plan_tiers_object_current_tiers_inner.rb +278 -0
  350. data/lib/constant_contact_client/models/post_custom_field_delete201_response.rb +297 -0
  351. data/lib/constant_contact_client/models/post_custom_field_delete_request.rb +243 -0
  352. data/lib/constant_contact_client/models/post_tag_request.rb +260 -0
  353. data/lib/constant_contact_client/models/provision.rb +723 -0
  354. data/lib/constant_contact_client/models/provision_response.rb +225 -0
  355. data/lib/constant_contact_client/models/put_tag_request.rb +250 -0
  356. data/lib/constant_contact_client/models/query_param_object.rb +225 -0
  357. data/lib/constant_contact_client/models/reporting_links.rb +221 -0
  358. data/lib/constant_contact_client/models/reporting_next.rb +222 -0
  359. data/lib/constant_contact_client/models/resend_to_non_openers_input.rb +242 -0
  360. data/lib/constant_contact_client/models/resend_to_non_openers_object.rb +255 -0
  361. data/lib/constant_contact_client/models/schedule_email_campaign_activity_request.rb +222 -0
  362. data/lib/constant_contact_client/models/segment_data.rb +258 -0
  363. data/lib/constant_contact_client/models/segment_detail.rb +274 -0
  364. data/lib/constant_contact_client/models/segment_master.rb +245 -0
  365. data/lib/constant_contact_client/models/segment_name.rb +222 -0
  366. data/lib/constant_contact_client/models/segments_dto.rb +233 -0
  367. data/lib/constant_contact_client/models/sends_tracking_activities_page.rb +233 -0
  368. data/lib/constant_contact_client/models/sends_tracking_activity.rb +320 -0
  369. data/lib/constant_contact_client/models/sms_channel_consent_details.rb +285 -0
  370. data/lib/constant_contact_client/models/sso_user.rb +439 -0
  371. data/lib/constant_contact_client/models/stats_email.rb +395 -0
  372. data/lib/constant_contact_client/models/stats_email_activity.rb +475 -0
  373. data/lib/constant_contact_client/models/stats_error.rb +225 -0
  374. data/lib/constant_contact_client/models/street_address.rb +397 -0
  375. data/lib/constant_contact_client/models/street_address_put.rb +367 -0
  376. data/lib/constant_contact_client/models/tag.rb +265 -0
  377. data/lib/constant_contact_client/models/tag_add_remove_contacts.rb +268 -0
  378. data/lib/constant_contact_client/models/tag_id_list500_limit.rb +243 -0
  379. data/lib/constant_contact_client/models/tag_post.rb +260 -0
  380. data/lib/constant_contact_client/models/tag_put.rb +250 -0
  381. data/lib/constant_contact_client/models/tags.rb +226 -0
  382. data/lib/constant_contact_client/models/tags_activity_links.rb +214 -0
  383. data/lib/constant_contact_client/models/tags_links.rb +223 -0
  384. data/lib/constant_contact_client/models/tags_paging_links.rb +214 -0
  385. data/lib/constant_contact_client/models/test_send_email_campaign_activity_request.rb +253 -0
  386. data/lib/constant_contact_client/models/tier_object.rb +278 -0
  387. data/lib/constant_contact_client/models/tracking_activity_sms_channel_dto.rb +245 -0
  388. data/lib/constant_contact_client/models/unique_email_counts.rb +341 -0
  389. data/lib/constant_contact_client/models/update_account_request.rb +334 -0
  390. data/lib/constant_contact_client/models/update_contact_request.rb +582 -0
  391. data/lib/constant_contact_client/models/update_contact_request_email_address.rb +341 -0
  392. data/lib/constant_contact_client/models/update_contact_request_phone_numbers_inner.rb +244 -0
  393. data/lib/constant_contact_client/models/update_contact_request_street_addresses_inner.rb +367 -0
  394. data/lib/constant_contact_client/models/update_custom_field_request.rb +258 -0
  395. data/lib/constant_contact_client/models/update_list200_response.rb +291 -0
  396. data/lib/constant_contact_client/models/update_list_request.rb +263 -0
  397. data/lib/constant_contact_client/models/update_segment_name_request.rb +222 -0
  398. data/lib/constant_contact_client/models/webhooks_subscription_body.rb +215 -0
  399. data/lib/constant_contact_client/models/webhooks_subscription_collection_inner.rb +245 -0
  400. data/lib/constant_contact_client/models/webhooks_subscription_put_resp.rb +225 -0
  401. data/lib/constant_contact_client/models/webhooks_subscription_response.rb +245 -0
  402. data/lib/constant_contact_client/models/webhooks_test_send.rb +245 -0
  403. data/lib/constant_contact_client/version.rb +15 -0
  404. data/lib/constant_contact_client.rb +417 -0
  405. data/spec/spec_helper.rb +111 -0
  406. metadata +488 -0
@@ -0,0 +1,635 @@
1
+ =begin
2
+ #Constant Contact API v3
3
+
4
+ #Swagger build version 3.0.2475
5
+
6
+ The version of the OpenAPI document: 1.0.101
7
+ Contact: webservices@constantcontact.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.2.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ConstantContactClient
17
+ # Use this endpoint to retrieve (GET), update (PUT), or DELETE an existing contact resource specified using the <code>contact_id</code> path parameter.
18
+ class GetContactById200Response
19
+ # Unique ID for each contact resource
20
+ attr_accessor :contact_id
21
+
22
+ attr_accessor :email_address
23
+
24
+ # The first name of the contact.
25
+ attr_accessor :first_name
26
+
27
+ # The last name of the contact.
28
+ attr_accessor :last_name
29
+
30
+ # The job title of the contact.
31
+ attr_accessor :job_title
32
+
33
+ # The name of the company where the contact works.
34
+ attr_accessor :company_name
35
+
36
+ # The month value for the contact's birthday. Valid values are from 1 through 12. You must use this property with <code>birthday_month</code>.
37
+ attr_accessor :birthday_month
38
+
39
+ # The day value for the contact's birthday. Valid values are from 1 through 12. You must use this property with <code>birthday_day</code>.
40
+ attr_accessor :birthday_day
41
+
42
+ # The anniversary date for the contact. For example, this value could be the date when the contact first became a customer of an organization in Constant Contact. Valid date formats are MM/DD/YYYY, M/D/YYYY, YYYY/MM/DD, YYYY/M/D, YYYY-MM-DD, YYYY-M-D,M-D-YYYY, or M-DD-YYYY.
43
+ attr_accessor :anniversary
44
+
45
+ # Identifies who last updated the contact; valid values are <code>Contact</code> or <code>Account</code>.
46
+ attr_accessor :update_source
47
+
48
+ # Describes who added the contact; valid values are <code>Contact</code> or <code>Account</code>. Your integration must accurately identify <code>create_source</code> for compliance reasons; value is set when contact is created.
49
+ attr_accessor :create_source
50
+
51
+ # System generated date and time that the resource was created, in ISO-8601 format.
52
+ attr_accessor :created_at
53
+
54
+ # System generated date and time that the contact was last updated, in ISO-8601 format.
55
+ attr_accessor :updated_at
56
+
57
+ # For deleted contacts (<code>email_address</code> contains <code>opt_out_source</code> and <code>opt_out_date</code>), shows the date of deletion.
58
+ attr_accessor :deleted_at
59
+
60
+ # Array of up to 25 <code>custom_field</code> subresources.
61
+ attr_accessor :custom_fields
62
+
63
+ # Array of up to 3 <code>phone_numbers</code> subresources.
64
+ attr_accessor :phone_numbers
65
+
66
+ # Array of up to 3 <code>street_addresses</code> subresources.
67
+ attr_accessor :street_addresses
68
+
69
+ # Array of up to 50 <code>list_ids</code> to which the contact is subscribed.
70
+ attr_accessor :list_memberships
71
+
72
+ # Array of tags (<code>tag_id</code>) assigned to the contact, up to a maximum of 50.
73
+ attr_accessor :taggings
74
+
75
+ # An array of notes about the contact listed by most recent note first.
76
+ attr_accessor :notes
77
+
78
+ attr_accessor :sms_channel
79
+
80
+ # Attribute mapping from ruby-style variable name to JSON key.
81
+ def self.attribute_map
82
+ {
83
+ :'contact_id' => :'contact_id',
84
+ :'email_address' => :'email_address',
85
+ :'first_name' => :'first_name',
86
+ :'last_name' => :'last_name',
87
+ :'job_title' => :'job_title',
88
+ :'company_name' => :'company_name',
89
+ :'birthday_month' => :'birthday_month',
90
+ :'birthday_day' => :'birthday_day',
91
+ :'anniversary' => :'anniversary',
92
+ :'update_source' => :'update_source',
93
+ :'create_source' => :'create_source',
94
+ :'created_at' => :'created_at',
95
+ :'updated_at' => :'updated_at',
96
+ :'deleted_at' => :'deleted_at',
97
+ :'custom_fields' => :'custom_fields',
98
+ :'phone_numbers' => :'phone_numbers',
99
+ :'street_addresses' => :'street_addresses',
100
+ :'list_memberships' => :'list_memberships',
101
+ :'taggings' => :'taggings',
102
+ :'notes' => :'notes',
103
+ :'sms_channel' => :'sms_channel'
104
+ }
105
+ end
106
+
107
+ # Returns all the JSON keys this model knows about
108
+ def self.acceptable_attributes
109
+ attribute_map.values
110
+ end
111
+
112
+ # Attribute type mapping.
113
+ def self.openapi_types
114
+ {
115
+ :'contact_id' => :'String',
116
+ :'email_address' => :'GetContactById200ResponseEmailAddress',
117
+ :'first_name' => :'String',
118
+ :'last_name' => :'String',
119
+ :'job_title' => :'String',
120
+ :'company_name' => :'String',
121
+ :'birthday_month' => :'Integer',
122
+ :'birthday_day' => :'Integer',
123
+ :'anniversary' => :'String',
124
+ :'update_source' => :'String',
125
+ :'create_source' => :'String',
126
+ :'created_at' => :'Time',
127
+ :'updated_at' => :'Time',
128
+ :'deleted_at' => :'Date',
129
+ :'custom_fields' => :'Array<GetContactById200ResponseCustomFieldsInner>',
130
+ :'phone_numbers' => :'Array<GetContactById200ResponsePhoneNumbersInner>',
131
+ :'street_addresses' => :'Array<GetContactById200ResponseStreetAddressesInner>',
132
+ :'list_memberships' => :'Array<String>',
133
+ :'taggings' => :'Array<String>',
134
+ :'notes' => :'Array<GetContactById200ResponseNotesInner>',
135
+ :'sms_channel' => :'GetContactById200ResponseSmsChannel'
136
+ }
137
+ end
138
+
139
+ # List of attributes with nullable: true
140
+ def self.openapi_nullable
141
+ Set.new([
142
+ ])
143
+ end
144
+
145
+ # Initializes the object
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ def initialize(attributes = {})
148
+ if (!attributes.is_a?(Hash))
149
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ConstantContactClient::GetContactById200Response` initialize method"
150
+ end
151
+
152
+ # check to see if the attribute exists and convert string to symbol for hash key
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!self.class.attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ConstantContactClient::GetContactById200Response`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'contact_id')
161
+ self.contact_id = attributes[:'contact_id']
162
+ end
163
+
164
+ if attributes.key?(:'email_address')
165
+ self.email_address = attributes[:'email_address']
166
+ end
167
+
168
+ if attributes.key?(:'first_name')
169
+ self.first_name = attributes[:'first_name']
170
+ end
171
+
172
+ if attributes.key?(:'last_name')
173
+ self.last_name = attributes[:'last_name']
174
+ end
175
+
176
+ if attributes.key?(:'job_title')
177
+ self.job_title = attributes[:'job_title']
178
+ end
179
+
180
+ if attributes.key?(:'company_name')
181
+ self.company_name = attributes[:'company_name']
182
+ end
183
+
184
+ if attributes.key?(:'birthday_month')
185
+ self.birthday_month = attributes[:'birthday_month']
186
+ end
187
+
188
+ if attributes.key?(:'birthday_day')
189
+ self.birthday_day = attributes[:'birthday_day']
190
+ end
191
+
192
+ if attributes.key?(:'anniversary')
193
+ self.anniversary = attributes[:'anniversary']
194
+ end
195
+
196
+ if attributes.key?(:'update_source')
197
+ self.update_source = attributes[:'update_source']
198
+ end
199
+
200
+ if attributes.key?(:'create_source')
201
+ self.create_source = attributes[:'create_source']
202
+ end
203
+
204
+ if attributes.key?(:'created_at')
205
+ self.created_at = attributes[:'created_at']
206
+ end
207
+
208
+ if attributes.key?(:'updated_at')
209
+ self.updated_at = attributes[:'updated_at']
210
+ end
211
+
212
+ if attributes.key?(:'deleted_at')
213
+ self.deleted_at = attributes[:'deleted_at']
214
+ end
215
+
216
+ if attributes.key?(:'custom_fields')
217
+ if (value = attributes[:'custom_fields']).is_a?(Array)
218
+ self.custom_fields = value
219
+ end
220
+ end
221
+
222
+ if attributes.key?(:'phone_numbers')
223
+ if (value = attributes[:'phone_numbers']).is_a?(Array)
224
+ self.phone_numbers = value
225
+ end
226
+ end
227
+
228
+ if attributes.key?(:'street_addresses')
229
+ if (value = attributes[:'street_addresses']).is_a?(Array)
230
+ self.street_addresses = value
231
+ end
232
+ end
233
+
234
+ if attributes.key?(:'list_memberships')
235
+ if (value = attributes[:'list_memberships']).is_a?(Array)
236
+ self.list_memberships = value
237
+ end
238
+ end
239
+
240
+ if attributes.key?(:'taggings')
241
+ if (value = attributes[:'taggings']).is_a?(Array)
242
+ self.taggings = value
243
+ end
244
+ end
245
+
246
+ if attributes.key?(:'notes')
247
+ if (value = attributes[:'notes']).is_a?(Array)
248
+ self.notes = value
249
+ end
250
+ end
251
+
252
+ if attributes.key?(:'sms_channel')
253
+ self.sms_channel = attributes[:'sms_channel']
254
+ end
255
+ end
256
+
257
+ # Show invalid properties with the reasons. Usually used together with valid?
258
+ # @return Array for valid properties with the reasons
259
+ def list_invalid_properties
260
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
261
+ invalid_properties = Array.new
262
+ if !@first_name.nil? && @first_name.to_s.length > 50
263
+ invalid_properties.push('invalid value for "first_name", the character length must be smaller than or equal to 50.')
264
+ end
265
+
266
+ if !@last_name.nil? && @last_name.to_s.length > 50
267
+ invalid_properties.push('invalid value for "last_name", the character length must be smaller than or equal to 50.')
268
+ end
269
+
270
+ if !@job_title.nil? && @job_title.to_s.length > 50
271
+ invalid_properties.push('invalid value for "job_title", the character length must be smaller than or equal to 50.')
272
+ end
273
+
274
+ if !@company_name.nil? && @company_name.to_s.length > 50
275
+ invalid_properties.push('invalid value for "company_name", the character length must be smaller than or equal to 50.')
276
+ end
277
+
278
+ if !@anniversary.nil? && @anniversary.to_s.length > 10
279
+ invalid_properties.push('invalid value for "anniversary", the character length must be smaller than or equal to 10.')
280
+ end
281
+
282
+ if !@custom_fields.nil? && @custom_fields.length > 25
283
+ invalid_properties.push('invalid value for "custom_fields", number of items must be less than or equal to 25.')
284
+ end
285
+
286
+ if !@phone_numbers.nil? && @phone_numbers.length > 3
287
+ invalid_properties.push('invalid value for "phone_numbers", number of items must be less than or equal to 3.')
288
+ end
289
+
290
+ if !@street_addresses.nil? && @street_addresses.length > 3
291
+ invalid_properties.push('invalid value for "street_addresses", number of items must be less than or equal to 3.')
292
+ end
293
+
294
+ if !@list_memberships.nil? && @list_memberships.length > 50
295
+ invalid_properties.push('invalid value for "list_memberships", number of items must be less than or equal to 50.')
296
+ end
297
+
298
+ if !@taggings.nil? && @taggings.length > 50
299
+ invalid_properties.push('invalid value for "taggings", number of items must be less than or equal to 50.')
300
+ end
301
+
302
+ if !@notes.nil? && @notes.length > 150
303
+ invalid_properties.push('invalid value for "notes", number of items must be less than or equal to 150.')
304
+ end
305
+
306
+ invalid_properties
307
+ end
308
+
309
+ # Check to see if the all the properties in the model are valid
310
+ # @return true if the model is valid
311
+ def valid?
312
+ warn '[DEPRECATED] the `valid?` method is obsolete'
313
+ return false if !@first_name.nil? && @first_name.to_s.length > 50
314
+ return false if !@last_name.nil? && @last_name.to_s.length > 50
315
+ return false if !@job_title.nil? && @job_title.to_s.length > 50
316
+ return false if !@company_name.nil? && @company_name.to_s.length > 50
317
+ return false if !@anniversary.nil? && @anniversary.to_s.length > 10
318
+ return false if !@custom_fields.nil? && @custom_fields.length > 25
319
+ return false if !@phone_numbers.nil? && @phone_numbers.length > 3
320
+ return false if !@street_addresses.nil? && @street_addresses.length > 3
321
+ return false if !@list_memberships.nil? && @list_memberships.length > 50
322
+ return false if !@taggings.nil? && @taggings.length > 50
323
+ return false if !@notes.nil? && @notes.length > 150
324
+ true
325
+ end
326
+
327
+ # Custom attribute writer method with validation
328
+ # @param [Object] first_name Value to be assigned
329
+ def first_name=(first_name)
330
+ if first_name.nil?
331
+ fail ArgumentError, 'first_name cannot be nil'
332
+ end
333
+
334
+ if first_name.to_s.length > 50
335
+ fail ArgumentError, 'invalid value for "first_name", the character length must be smaller than or equal to 50.'
336
+ end
337
+
338
+ @first_name = first_name
339
+ end
340
+
341
+ # Custom attribute writer method with validation
342
+ # @param [Object] last_name Value to be assigned
343
+ def last_name=(last_name)
344
+ if last_name.nil?
345
+ fail ArgumentError, 'last_name cannot be nil'
346
+ end
347
+
348
+ if last_name.to_s.length > 50
349
+ fail ArgumentError, 'invalid value for "last_name", the character length must be smaller than or equal to 50.'
350
+ end
351
+
352
+ @last_name = last_name
353
+ end
354
+
355
+ # Custom attribute writer method with validation
356
+ # @param [Object] job_title Value to be assigned
357
+ def job_title=(job_title)
358
+ if job_title.nil?
359
+ fail ArgumentError, 'job_title cannot be nil'
360
+ end
361
+
362
+ if job_title.to_s.length > 50
363
+ fail ArgumentError, 'invalid value for "job_title", the character length must be smaller than or equal to 50.'
364
+ end
365
+
366
+ @job_title = job_title
367
+ end
368
+
369
+ # Custom attribute writer method with validation
370
+ # @param [Object] company_name Value to be assigned
371
+ def company_name=(company_name)
372
+ if company_name.nil?
373
+ fail ArgumentError, 'company_name cannot be nil'
374
+ end
375
+
376
+ if company_name.to_s.length > 50
377
+ fail ArgumentError, 'invalid value for "company_name", the character length must be smaller than or equal to 50.'
378
+ end
379
+
380
+ @company_name = company_name
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] anniversary Value to be assigned
385
+ def anniversary=(anniversary)
386
+ if anniversary.nil?
387
+ fail ArgumentError, 'anniversary cannot be nil'
388
+ end
389
+
390
+ if anniversary.to_s.length > 10
391
+ fail ArgumentError, 'invalid value for "anniversary", the character length must be smaller than or equal to 10.'
392
+ end
393
+
394
+ @anniversary = anniversary
395
+ end
396
+
397
+ # Custom attribute writer method with validation
398
+ # @param [Object] custom_fields Value to be assigned
399
+ def custom_fields=(custom_fields)
400
+ if custom_fields.nil?
401
+ fail ArgumentError, 'custom_fields cannot be nil'
402
+ end
403
+
404
+ if custom_fields.length > 25
405
+ fail ArgumentError, 'invalid value for "custom_fields", number of items must be less than or equal to 25.'
406
+ end
407
+
408
+ @custom_fields = custom_fields
409
+ end
410
+
411
+ # Custom attribute writer method with validation
412
+ # @param [Object] phone_numbers Value to be assigned
413
+ def phone_numbers=(phone_numbers)
414
+ if phone_numbers.nil?
415
+ fail ArgumentError, 'phone_numbers cannot be nil'
416
+ end
417
+
418
+ if phone_numbers.length > 3
419
+ fail ArgumentError, 'invalid value for "phone_numbers", number of items must be less than or equal to 3.'
420
+ end
421
+
422
+ @phone_numbers = phone_numbers
423
+ end
424
+
425
+ # Custom attribute writer method with validation
426
+ # @param [Object] street_addresses Value to be assigned
427
+ def street_addresses=(street_addresses)
428
+ if street_addresses.nil?
429
+ fail ArgumentError, 'street_addresses cannot be nil'
430
+ end
431
+
432
+ if street_addresses.length > 3
433
+ fail ArgumentError, 'invalid value for "street_addresses", number of items must be less than or equal to 3.'
434
+ end
435
+
436
+ @street_addresses = street_addresses
437
+ end
438
+
439
+ # Custom attribute writer method with validation
440
+ # @param [Object] list_memberships Value to be assigned
441
+ def list_memberships=(list_memberships)
442
+ if list_memberships.nil?
443
+ fail ArgumentError, 'list_memberships cannot be nil'
444
+ end
445
+
446
+ if list_memberships.length > 50
447
+ fail ArgumentError, 'invalid value for "list_memberships", number of items must be less than or equal to 50.'
448
+ end
449
+
450
+ @list_memberships = list_memberships
451
+ end
452
+
453
+ # Custom attribute writer method with validation
454
+ # @param [Object] taggings Value to be assigned
455
+ def taggings=(taggings)
456
+ if taggings.nil?
457
+ fail ArgumentError, 'taggings cannot be nil'
458
+ end
459
+
460
+ if taggings.length > 50
461
+ fail ArgumentError, 'invalid value for "taggings", number of items must be less than or equal to 50.'
462
+ end
463
+
464
+ @taggings = taggings
465
+ end
466
+
467
+ # Custom attribute writer method with validation
468
+ # @param [Object] notes Value to be assigned
469
+ def notes=(notes)
470
+ if notes.nil?
471
+ fail ArgumentError, 'notes cannot be nil'
472
+ end
473
+
474
+ if notes.length > 150
475
+ fail ArgumentError, 'invalid value for "notes", number of items must be less than or equal to 150.'
476
+ end
477
+
478
+ @notes = notes
479
+ end
480
+
481
+ # Checks equality by comparing each attribute.
482
+ # @param [Object] Object to be compared
483
+ def ==(o)
484
+ return true if self.equal?(o)
485
+ self.class == o.class &&
486
+ contact_id == o.contact_id &&
487
+ email_address == o.email_address &&
488
+ first_name == o.first_name &&
489
+ last_name == o.last_name &&
490
+ job_title == o.job_title &&
491
+ company_name == o.company_name &&
492
+ birthday_month == o.birthday_month &&
493
+ birthday_day == o.birthday_day &&
494
+ anniversary == o.anniversary &&
495
+ update_source == o.update_source &&
496
+ create_source == o.create_source &&
497
+ created_at == o.created_at &&
498
+ updated_at == o.updated_at &&
499
+ deleted_at == o.deleted_at &&
500
+ custom_fields == o.custom_fields &&
501
+ phone_numbers == o.phone_numbers &&
502
+ street_addresses == o.street_addresses &&
503
+ list_memberships == o.list_memberships &&
504
+ taggings == o.taggings &&
505
+ notes == o.notes &&
506
+ sms_channel == o.sms_channel
507
+ end
508
+
509
+ # @see the `==` method
510
+ # @param [Object] Object to be compared
511
+ def eql?(o)
512
+ self == o
513
+ end
514
+
515
+ # Calculates hash code according to all attributes.
516
+ # @return [Integer] Hash code
517
+ def hash
518
+ [contact_id, email_address, first_name, last_name, job_title, company_name, birthday_month, birthday_day, anniversary, update_source, create_source, created_at, updated_at, deleted_at, custom_fields, phone_numbers, street_addresses, list_memberships, taggings, notes, sms_channel].hash
519
+ end
520
+
521
+ # Builds the object from hash
522
+ # @param [Hash] attributes Model attributes in the form of hash
523
+ # @return [Object] Returns the model itself
524
+ def self.build_from_hash(attributes)
525
+ return nil unless attributes.is_a?(Hash)
526
+ attributes = attributes.transform_keys(&:to_sym)
527
+ transformed_hash = {}
528
+ openapi_types.each_pair do |key, type|
529
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
530
+ transformed_hash["#{key}"] = nil
531
+ elsif type =~ /\AArray<(.*)>/i
532
+ # check to ensure the input is an array given that the attribute
533
+ # is documented as an array but the input is not
534
+ if attributes[attribute_map[key]].is_a?(Array)
535
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
536
+ end
537
+ elsif !attributes[attribute_map[key]].nil?
538
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
539
+ end
540
+ end
541
+ new(transformed_hash)
542
+ end
543
+
544
+ # Deserializes the data based on type
545
+ # @param string type Data type
546
+ # @param string value Value to be deserialized
547
+ # @return [Object] Deserialized data
548
+ def self._deserialize(type, value)
549
+ case type.to_sym
550
+ when :Time
551
+ Time.parse(value)
552
+ when :Date
553
+ Date.parse(value)
554
+ when :String
555
+ value.to_s
556
+ when :Integer
557
+ value.to_i
558
+ when :Float
559
+ value.to_f
560
+ when :Boolean
561
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
562
+ true
563
+ else
564
+ false
565
+ end
566
+ when :Object
567
+ # generic object (usually a Hash), return directly
568
+ value
569
+ when /\AArray<(?<inner_type>.+)>\z/
570
+ inner_type = Regexp.last_match[:inner_type]
571
+ value.map { |v| _deserialize(inner_type, v) }
572
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
573
+ k_type = Regexp.last_match[:k_type]
574
+ v_type = Regexp.last_match[:v_type]
575
+ {}.tap do |hash|
576
+ value.each do |k, v|
577
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
578
+ end
579
+ end
580
+ else # model
581
+ # models (e.g. Pet) or oneOf
582
+ klass = ConstantContactClient.const_get(type)
583
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
584
+ end
585
+ end
586
+
587
+ # Returns the string representation of the object
588
+ # @return [String] String presentation of the object
589
+ def to_s
590
+ to_hash.to_s
591
+ end
592
+
593
+ # to_body is an alias to to_hash (backward compatibility)
594
+ # @return [Hash] Returns the object in the form of hash
595
+ def to_body
596
+ to_hash
597
+ end
598
+
599
+ # Returns the object in the form of hash
600
+ # @return [Hash] Returns the object in the form of hash
601
+ def to_hash
602
+ hash = {}
603
+ self.class.attribute_map.each_pair do |attr, param|
604
+ value = self.send(attr)
605
+ if value.nil?
606
+ is_nullable = self.class.openapi_nullable.include?(attr)
607
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
608
+ end
609
+
610
+ hash[param] = _to_hash(value)
611
+ end
612
+ hash
613
+ end
614
+
615
+ # Outputs non-array value in the form of hash
616
+ # For object, use to_hash. Otherwise, just return the value
617
+ # @param [Object] value Any valid value
618
+ # @return [Hash] Returns the value in the form of hash
619
+ def _to_hash(value)
620
+ if value.is_a?(Array)
621
+ value.compact.map { |v| _to_hash(v) }
622
+ elsif value.is_a?(Hash)
623
+ {}.tap do |hash|
624
+ value.each { |k, v| hash[k] = _to_hash(v) }
625
+ end
626
+ elsif value.respond_to? :to_hash
627
+ value.to_hash
628
+ else
629
+ value
630
+ end
631
+ end
632
+
633
+ end
634
+
635
+ end