mailchimp_transactional 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +395 -0
- data/Rakefile +8 -0
- data/docs/Body.md +9 -0
- data/docs/Body1.md +8 -0
- data/docs/Body10.md +11 -0
- data/docs/Body11.md +11 -0
- data/docs/Body12.md +9 -0
- data/docs/Body13.md +13 -0
- data/docs/Body14.md +8 -0
- data/docs/Body15.md +9 -0
- data/docs/Body16.md +10 -0
- data/docs/Body17.md +9 -0
- data/docs/Body18.md +9 -0
- data/docs/Body19.md +11 -0
- data/docs/Body2.md +9 -0
- data/docs/Body20.md +9 -0
- data/docs/Body21.md +8 -0
- data/docs/Body22.md +9 -0
- data/docs/Body23.md +9 -0
- data/docs/Body24.md +9 -0
- data/docs/Body25.md +10 -0
- data/docs/Body26.md +10 -0
- data/docs/Body27.md +12 -0
- data/docs/Body28.md +14 -0
- data/docs/Body29.md +15 -0
- data/docs/Body3.md +9 -0
- data/docs/Body30.md +13 -0
- data/docs/Body31.md +9 -0
- data/docs/Body32.md +9 -0
- data/docs/Body33.md +9 -0
- data/docs/Body34.md +16 -0
- data/docs/Body35.md +9 -0
- data/docs/Body36.md +9 -0
- data/docs/Body37.md +10 -0
- data/docs/Body38.md +8 -0
- data/docs/Body39.md +10 -0
- data/docs/Body4.md +15 -0
- data/docs/Body40.md +10 -0
- data/docs/Body41.md +9 -0
- data/docs/Body42.md +11 -0
- data/docs/Body43.md +11 -0
- data/docs/Body44.md +10 -0
- data/docs/Body45.md +8 -0
- data/docs/Body46.md +8 -0
- data/docs/Body47.md +9 -0
- data/docs/Body48.md +9 -0
- data/docs/Body49.md +10 -0
- data/docs/Body5.md +8 -0
- data/docs/Body50.md +9 -0
- data/docs/Body51.md +9 -0
- data/docs/Body52.md +9 -0
- data/docs/Body53.md +12 -0
- data/docs/Body54.md +9 -0
- data/docs/Body55.md +12 -0
- data/docs/Body56.md +9 -0
- data/docs/Body57.md +9 -0
- data/docs/Body58.md +9 -0
- data/docs/Body59.md +8 -0
- data/docs/Body6.md +9 -0
- data/docs/Body60.md +9 -0
- data/docs/Body61.md +9 -0
- data/docs/Body62.md +9 -0
- data/docs/Body63.md +8 -0
- data/docs/Body64.md +16 -0
- data/docs/Body65.md +9 -0
- data/docs/Body66.md +16 -0
- data/docs/Body67.md +9 -0
- data/docs/Body68.md +9 -0
- data/docs/Body69.md +9 -0
- data/docs/Body7.md +9 -0
- data/docs/Body70.md +9 -0
- data/docs/Body71.md +11 -0
- data/docs/Body72.md +8 -0
- data/docs/Body73.md +9 -0
- data/docs/Body74.md +9 -0
- data/docs/Body75.md +8 -0
- data/docs/Body76.md +9 -0
- data/docs/Body77.md +9 -0
- data/docs/Body78.md +8 -0
- data/docs/Body79.md +8 -0
- data/docs/Body8.md +9 -0
- data/docs/Body80.md +8 -0
- data/docs/Body81.md +8 -0
- data/docs/Body82.md +8 -0
- data/docs/Body83.md +11 -0
- data/docs/Body84.md +9 -0
- data/docs/Body85.md +12 -0
- data/docs/Body86.md +9 -0
- data/docs/Body87.md +10 -0
- data/docs/Body88.md +9 -0
- data/docs/Body89.md +9 -0
- data/docs/Body9.md +9 -0
- data/docs/InlineResponse200.md +13 -0
- data/docs/InlineResponse2001.md +13 -0
- data/docs/InlineResponse20010.md +10 -0
- data/docs/InlineResponse20011.md +10 -0
- data/docs/InlineResponse20012.md +10 -0
- data/docs/InlineResponse20013.md +10 -0
- data/docs/InlineResponse20014.md +13 -0
- data/docs/InlineResponse20015.md +13 -0
- data/docs/InlineResponse20016.md +8 -0
- data/docs/InlineResponse20017.md +13 -0
- data/docs/InlineResponse20018.md +13 -0
- data/docs/InlineResponse20019.md +9 -0
- data/docs/InlineResponse2002.md +13 -0
- data/docs/InlineResponse20020.md +10 -0
- data/docs/InlineResponse20021.md +10 -0
- data/docs/InlineResponse20022.md +9 -0
- data/docs/InlineResponse20023.md +9 -0
- data/docs/InlineResponse20024.md +13 -0
- data/docs/InlineResponse20025.md +11 -0
- data/docs/InlineResponse20026.md +11 -0
- data/docs/InlineResponse20027.md +20 -0
- data/docs/InlineResponse20028.md +18 -0
- data/docs/InlineResponse20029.md +21 -0
- data/docs/InlineResponse20029SmtpEvents.md +10 -0
- data/docs/InlineResponse2003.md +13 -0
- data/docs/InlineResponse20030.md +18 -0
- data/docs/InlineResponse20030Attachments.md +10 -0
- data/docs/InlineResponse20030To.md +9 -0
- data/docs/InlineResponse20031.md +16 -0
- data/docs/InlineResponse20031Attachments.md +11 -0
- data/docs/InlineResponse20031Images.md +10 -0
- data/docs/InlineResponse20031To.md +9 -0
- data/docs/InlineResponse20032.md +13 -0
- data/docs/InlineResponse20033.md +10 -0
- data/docs/InlineResponse20034.md +10 -0
- data/docs/InlineResponse20035.md +10 -0
- data/docs/InlineResponse20036.md +10 -0
- data/docs/InlineResponse20037.md +9 -0
- data/docs/InlineResponse20038.md +16 -0
- data/docs/InlineResponse20039.md +10 -0
- data/docs/InlineResponse2004.md +13 -0
- data/docs/InlineResponse20040.md +19 -0
- data/docs/InlineResponse20041.md +14 -0
- data/docs/InlineResponse20042.md +14 -0
- data/docs/InlineResponse20043.md +14 -0
- data/docs/InlineResponse20044.md +10 -0
- data/docs/InlineResponse20045.md +18 -0
- data/docs/InlineResponse20045Stats.md +12 -0
- data/docs/InlineResponse20045StatsLast30Days.md +17 -0
- data/docs/InlineResponse20045StatsLast60Days.md +17 -0
- data/docs/InlineResponse20045StatsLast7Days.md +17 -0
- data/docs/InlineResponse20045StatsLast90Days.md +17 -0
- data/docs/InlineResponse20045StatsToday.md +17 -0
- data/docs/InlineResponse20046.md +17 -0
- data/docs/InlineResponse20047.md +17 -0
- data/docs/InlineResponse20048.md +17 -0
- data/docs/InlineResponse20049.md +21 -0
- data/docs/InlineResponse20049Last30Days.md +17 -0
- data/docs/InlineResponse2005.md +10 -0
- data/docs/InlineResponse20050.md +17 -0
- data/docs/InlineResponse20051.md +17 -0
- data/docs/InlineResponse20052.md +17 -0
- data/docs/InlineResponse20053.md +17 -0
- data/docs/InlineResponse20054.md +19 -0
- data/docs/InlineResponse20055.md +19 -0
- data/docs/InlineResponse20056.md +17 -0
- data/docs/InlineResponse20056Stats.md +12 -0
- data/docs/InlineResponse20056StatsLast30Days.md +17 -0
- data/docs/InlineResponse20056StatsLast60Days.md +17 -0
- data/docs/InlineResponse20056StatsLast7Days.md +17 -0
- data/docs/InlineResponse20056StatsLast90Days.md +17 -0
- data/docs/InlineResponse20056StatsToday.md +17 -0
- data/docs/InlineResponse20057.md +24 -0
- data/docs/InlineResponse20058.md +24 -0
- data/docs/InlineResponse20059.md +24 -0
- data/docs/InlineResponse2006.md +10 -0
- data/docs/InlineResponse20060.md +24 -0
- data/docs/InlineResponse20061.md +24 -0
- data/docs/InlineResponse20062.md +24 -0
- data/docs/InlineResponse20063.md +8 -0
- data/docs/InlineResponse20064.md +11 -0
- data/docs/InlineResponse20065.md +11 -0
- data/docs/InlineResponse20066.md +11 -0
- data/docs/InlineResponse20067.md +12 -0
- data/docs/InlineResponse20068.md +12 -0
- data/docs/InlineResponse20069.md +14 -0
- data/docs/InlineResponse20069Stats.md +13 -0
- data/docs/InlineResponse20069StatsAllTime.md +17 -0
- data/docs/InlineResponse20069StatsLast30Days.md +17 -0
- data/docs/InlineResponse20069StatsLast60Days.md +17 -0
- data/docs/InlineResponse20069StatsLast7Days.md +17 -0
- data/docs/InlineResponse20069StatsLast90Days.md +17 -0
- data/docs/InlineResponse20069StatsToday.md +17 -0
- data/docs/InlineResponse2007.md +10 -0
- data/docs/InlineResponse20070.md +8 -0
- data/docs/InlineResponse20071.md +17 -0
- data/docs/InlineResponse20072.md +17 -0
- data/docs/InlineResponse20073.md +17 -0
- data/docs/InlineResponse20074.md +17 -0
- data/docs/InlineResponse20075.md +17 -0
- data/docs/InlineResponse20076.md +9 -0
- data/docs/InlineResponse20077.md +10 -0
- data/docs/InlineResponse20078.md +9 -0
- data/docs/InlineResponse2008.md +10 -0
- data/docs/InlineResponse2009.md +10 -0
- data/docs/IpslistCustomDns.md +10 -0
- data/docs/IpslistWarmup.md +10 -0
- data/docs/IpslistpoolsIps.md +13 -0
- data/docs/MessagessearchClicksDetail.md +12 -0
- data/docs/MessagessearchOpensDetail.md +11 -0
- data/docs/MessagessendMessage.md +39 -0
- data/docs/MessagessendMessageAttachments.md +10 -0
- data/docs/MessagessendMessageGlobalMergeVars.md +9 -0
- data/docs/MessagessendMessageImages.md +10 -0
- data/docs/MessagessendMessageMergeVars.md +9 -0
- data/docs/MessagessendMessageMetadata.md +8 -0
- data/docs/MessagessendMessageRecipientMetadata.md +9 -0
- data/docs/MessagessendMessageTo.md +10 -0
- data/docs/MessagessendMessageValues.md +8 -0
- data/docs/MessagessendMessageVars.md +9 -0
- data/docs/MessagessendtemplateMessage.md +39 -0
- data/docs/MessagessendtemplateTemplateContent.md +9 -0
- data/docs/RejectslistSender.md +19 -0
- data/docs/SendersdomainsDkim.md +10 -0
- data/docs/SendersdomainsSpf.md +10 -0
- data/docs/TemplatesrenderMergeVars.md +9 -0
- data/docs/TemplatesrenderTemplateContent.md +9 -0
- data/docs/TransactionalApi.md +4328 -0
- data/docs/UrlstrackingdomainsCname.md +10 -0
- data/git_push.sh +55 -0
- data/lib/mailchimp_transactional/api/transactional_api.rb +4883 -0
- data/lib/mailchimp_transactional/api_client.rb +390 -0
- data/lib/mailchimp_transactional/api_error.rb +38 -0
- data/lib/mailchimp_transactional/configuration.rb +202 -0
- data/lib/mailchimp_transactional/models/body.rb +205 -0
- data/lib/mailchimp_transactional/models/body_1.rb +190 -0
- data/lib/mailchimp_transactional/models/body_10.rb +235 -0
- data/lib/mailchimp_transactional/models/body_11.rb +225 -0
- data/lib/mailchimp_transactional/models/body_12.rb +205 -0
- data/lib/mailchimp_transactional/models/body_13.rb +247 -0
- data/lib/mailchimp_transactional/models/body_14.rb +190 -0
- data/lib/mailchimp_transactional/models/body_15.rb +200 -0
- data/lib/mailchimp_transactional/models/body_16.rb +210 -0
- data/lib/mailchimp_transactional/models/body_17.rb +205 -0
- data/lib/mailchimp_transactional/models/body_18.rb +205 -0
- data/lib/mailchimp_transactional/models/body_19.rb +230 -0
- data/lib/mailchimp_transactional/models/body_2.rb +200 -0
- data/lib/mailchimp_transactional/models/body_20.rb +205 -0
- data/lib/mailchimp_transactional/models/body_21.rb +190 -0
- data/lib/mailchimp_transactional/models/body_22.rb +205 -0
- data/lib/mailchimp_transactional/models/body_23.rb +205 -0
- data/lib/mailchimp_transactional/models/body_24.rb +205 -0
- data/lib/mailchimp_transactional/models/body_25.rb +220 -0
- data/lib/mailchimp_transactional/models/body_26.rb +220 -0
- data/lib/mailchimp_transactional/models/body_27.rb +234 -0
- data/lib/mailchimp_transactional/models/body_28.rb +266 -0
- data/lib/mailchimp_transactional/models/body_29.rb +290 -0
- data/lib/mailchimp_transactional/models/body_3.rb +200 -0
- data/lib/mailchimp_transactional/models/body_30.rb +244 -0
- data/lib/mailchimp_transactional/models/body_31.rb +205 -0
- data/lib/mailchimp_transactional/models/body_32.rb +205 -0
- data/lib/mailchimp_transactional/models/body_33.rb +205 -0
- data/lib/mailchimp_transactional/models/body_34.rb +277 -0
- data/lib/mailchimp_transactional/models/body_35.rb +200 -0
- data/lib/mailchimp_transactional/models/body_36.rb +205 -0
- data/lib/mailchimp_transactional/models/body_37.rb +220 -0
- data/lib/mailchimp_transactional/models/body_38.rb +190 -0
- data/lib/mailchimp_transactional/models/body_39.rb +249 -0
- data/lib/mailchimp_transactional/models/body_4.rb +290 -0
- data/lib/mailchimp_transactional/models/body_40.rb +239 -0
- data/lib/mailchimp_transactional/models/body_41.rb +205 -0
- data/lib/mailchimp_transactional/models/body_42.rb +240 -0
- data/lib/mailchimp_transactional/models/body_43.rb +235 -0
- data/lib/mailchimp_transactional/models/body_44.rb +230 -0
- data/lib/mailchimp_transactional/models/body_45.rb +190 -0
- data/lib/mailchimp_transactional/models/body_46.rb +190 -0
- data/lib/mailchimp_transactional/models/body_47.rb +205 -0
- data/lib/mailchimp_transactional/models/body_48.rb +205 -0
- data/lib/mailchimp_transactional/models/body_49.rb +220 -0
- data/lib/mailchimp_transactional/models/body_5.rb +190 -0
- data/lib/mailchimp_transactional/models/body_50.rb +205 -0
- data/lib/mailchimp_transactional/models/body_51.rb +205 -0
- data/lib/mailchimp_transactional/models/body_52.rb +200 -0
- data/lib/mailchimp_transactional/models/body_53.rb +284 -0
- data/lib/mailchimp_transactional/models/body_54.rb +205 -0
- data/lib/mailchimp_transactional/models/body_55.rb +265 -0
- data/lib/mailchimp_transactional/models/body_56.rb +205 -0
- data/lib/mailchimp_transactional/models/body_57.rb +205 -0
- data/lib/mailchimp_transactional/models/body_58.rb +205 -0
- data/lib/mailchimp_transactional/models/body_59.rb +190 -0
- data/lib/mailchimp_transactional/models/body_6.rb +205 -0
- data/lib/mailchimp_transactional/models/body_60.rb +205 -0
- data/lib/mailchimp_transactional/models/body_61.rb +205 -0
- data/lib/mailchimp_transactional/models/body_62.rb +205 -0
- data/lib/mailchimp_transactional/models/body_63.rb +190 -0
- data/lib/mailchimp_transactional/models/body_64.rb +277 -0
- data/lib/mailchimp_transactional/models/body_65.rb +205 -0
- data/lib/mailchimp_transactional/models/body_66.rb +277 -0
- data/lib/mailchimp_transactional/models/body_67.rb +205 -0
- data/lib/mailchimp_transactional/models/body_68.rb +205 -0
- data/lib/mailchimp_transactional/models/body_69.rb +200 -0
- data/lib/mailchimp_transactional/models/body_7.rb +205 -0
- data/lib/mailchimp_transactional/models/body_70.rb +205 -0
- data/lib/mailchimp_transactional/models/body_71.rb +234 -0
- data/lib/mailchimp_transactional/models/body_72.rb +190 -0
- data/lib/mailchimp_transactional/models/body_73.rb +205 -0
- data/lib/mailchimp_transactional/models/body_74.rb +205 -0
- data/lib/mailchimp_transactional/models/body_75.rb +190 -0
- data/lib/mailchimp_transactional/models/body_76.rb +205 -0
- data/lib/mailchimp_transactional/models/body_77.rb +205 -0
- data/lib/mailchimp_transactional/models/body_78.rb +190 -0
- data/lib/mailchimp_transactional/models/body_79.rb +190 -0
- data/lib/mailchimp_transactional/models/body_8.rb +205 -0
- data/lib/mailchimp_transactional/models/body_80.rb +190 -0
- data/lib/mailchimp_transactional/models/body_81.rb +190 -0
- data/lib/mailchimp_transactional/models/body_82.rb +190 -0
- data/lib/mailchimp_transactional/models/body_83.rb +249 -0
- data/lib/mailchimp_transactional/models/body_84.rb +205 -0
- data/lib/mailchimp_transactional/models/body_85.rb +264 -0
- data/lib/mailchimp_transactional/models/body_86.rb +205 -0
- data/lib/mailchimp_transactional/models/body_87.rb +230 -0
- data/lib/mailchimp_transactional/models/body_88.rb +200 -0
- data/lib/mailchimp_transactional/models/body_89.rb +205 -0
- data/lib/mailchimp_transactional/models/body_9.rb +205 -0
- data/lib/mailchimp_transactional/models/inline_response_200.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_1.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_10.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_11.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_12.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_13.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_14.rb +234 -0
- data/lib/mailchimp_transactional/models/inline_response_200_15.rb +234 -0
- data/lib/mailchimp_transactional/models/inline_response_200_16.rb +186 -0
- data/lib/mailchimp_transactional/models/inline_response_200_17.rb +234 -0
- data/lib/mailchimp_transactional/models/inline_response_200_18.rb +234 -0
- data/lib/mailchimp_transactional/models/inline_response_200_19.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_2.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_20.rb +208 -0
- data/lib/mailchimp_transactional/models/inline_response_200_21.rb +208 -0
- data/lib/mailchimp_transactional/models/inline_response_200_22.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_23.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_24.rb +234 -0
- data/lib/mailchimp_transactional/models/inline_response_200_25.rb +262 -0
- data/lib/mailchimp_transactional/models/inline_response_200_26.rb +262 -0
- data/lib/mailchimp_transactional/models/inline_response_200_27.rb +346 -0
- data/lib/mailchimp_transactional/models/inline_response_200_28.rb +286 -0
- data/lib/mailchimp_transactional/models/inline_response_200_29.rb +358 -0
- data/lib/mailchimp_transactional/models/inline_response_200_29_smtp_events.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_3.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_30.rb +289 -0
- data/lib/mailchimp_transactional/models/inline_response_200_30_attachments.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_30_to.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_31.rb +272 -0
- data/lib/mailchimp_transactional/models/inline_response_200_31_attachments.rb +216 -0
- data/lib/mailchimp_transactional/models/inline_response_200_31_images.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_31_to.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_32.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_33.rb +240 -0
- data/lib/mailchimp_transactional/models/inline_response_200_34.rb +240 -0
- data/lib/mailchimp_transactional/models/inline_response_200_35.rb +240 -0
- data/lib/mailchimp_transactional/models/inline_response_200_36.rb +240 -0
- data/lib/mailchimp_transactional/models/inline_response_200_37.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_38.rb +265 -0
- data/lib/mailchimp_transactional/models/inline_response_200_39.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_4.rb +236 -0
- data/lib/mailchimp_transactional/models/inline_response_200_40.rb +296 -0
- data/lib/mailchimp_transactional/models/inline_response_200_41.rb +244 -0
- data/lib/mailchimp_transactional/models/inline_response_200_42.rb +244 -0
- data/lib/mailchimp_transactional/models/inline_response_200_43.rb +244 -0
- data/lib/mailchimp_transactional/models/inline_response_200_44.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45.rb +285 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats.rb +221 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats_last_30_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats_last_60_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats_last_7_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats_last_90_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_45_stats_today.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_46.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_47.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_48.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_49.rb +373 -0
- data/lib/mailchimp_transactional/models/inline_response_200_49_last_30_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_5.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_50.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_51.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_52.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_53.rb +334 -0
- data/lib/mailchimp_transactional/models/inline_response_200_54.rb +320 -0
- data/lib/mailchimp_transactional/models/inline_response_200_55.rb +320 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56.rb +275 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats.rb +221 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats_last_30_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats_last_60_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats_last_7_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats_last_90_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_56_stats_today.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_57.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_58.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_59.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_6.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_60.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_61.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_62.rb +348 -0
- data/lib/mailchimp_transactional/models/inline_response_200_63.rb +186 -0
- data/lib/mailchimp_transactional/models/inline_response_200_64.rb +216 -0
- data/lib/mailchimp_transactional/models/inline_response_200_65.rb +216 -0
- data/lib/mailchimp_transactional/models/inline_response_200_66.rb +216 -0
- data/lib/mailchimp_transactional/models/inline_response_200_67.rb +225 -0
- data/lib/mailchimp_transactional/models/inline_response_200_68.rb +225 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69.rb +245 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats.rb +230 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_all_time.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_last_30_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_last_60_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_last_7_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_last_90_days.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_69_stats_today.rb +276 -0
- data/lib/mailchimp_transactional/models/inline_response_200_7.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_70.rb +186 -0
- data/lib/mailchimp_transactional/models/inline_response_200_71.rb +300 -0
- data/lib/mailchimp_transactional/models/inline_response_200_72.rb +300 -0
- data/lib/mailchimp_transactional/models/inline_response_200_73.rb +300 -0
- data/lib/mailchimp_transactional/models/inline_response_200_74.rb +300 -0
- data/lib/mailchimp_transactional/models/inline_response_200_75.rb +300 -0
- data/lib/mailchimp_transactional/models/inline_response_200_76.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_77.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_78.rb +196 -0
- data/lib/mailchimp_transactional/models/inline_response_200_8.rb +206 -0
- data/lib/mailchimp_transactional/models/inline_response_200_9.rb +206 -0
- data/lib/mailchimp_transactional/models/ipslist_custom_dns.rb +206 -0
- data/lib/mailchimp_transactional/models/ipslist_warmup.rb +206 -0
- data/lib/mailchimp_transactional/models/ipslistpools_ips.rb +234 -0
- data/lib/mailchimp_transactional/models/messagessearch_clicks_detail.rb +226 -0
- data/lib/mailchimp_transactional/models/messagessearch_opens_detail.rb +216 -0
- data/lib/mailchimp_transactional/models/messagessend_message.rb +545 -0
- data/lib/mailchimp_transactional/models/messagessend_message_attachments.rb +206 -0
- data/lib/mailchimp_transactional/models/messagessend_message_global_merge_vars.rb +196 -0
- data/lib/mailchimp_transactional/models/messagessend_message_images.rb +206 -0
- data/lib/mailchimp_transactional/models/messagessend_message_merge_vars.rb +203 -0
- data/lib/mailchimp_transactional/models/messagessend_message_metadata.rb +186 -0
- data/lib/mailchimp_transactional/models/messagessend_message_recipient_metadata.rb +195 -0
- data/lib/mailchimp_transactional/models/messagessend_message_to.rb +245 -0
- data/lib/mailchimp_transactional/models/messagessend_message_values.rb +186 -0
- data/lib/mailchimp_transactional/models/messagessend_message_vars.rb +195 -0
- data/lib/mailchimp_transactional/models/messagessendtemplate_message.rb +545 -0
- data/lib/mailchimp_transactional/models/messagessendtemplate_template_content.rb +196 -0
- data/lib/mailchimp_transactional/models/rejectslist_sender.rb +296 -0
- data/lib/mailchimp_transactional/models/sendersdomains_dkim.rb +206 -0
- data/lib/mailchimp_transactional/models/sendersdomains_spf.rb +206 -0
- data/lib/mailchimp_transactional/models/templatesrender_merge_vars.rb +196 -0
- data/lib/mailchimp_transactional/models/templatesrender_template_content.rb +206 -0
- data/lib/mailchimp_transactional/models/urlstrackingdomains_cname.rb +206 -0
- data/lib/mailchimp_transactional/version.rb +15 -0
- data/lib/mailchimp_transactional.rb +258 -0
- data/mailchimp_transactional.gemspec +45 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/body_10_spec.rb +59 -0
- data/spec/models/body_11_spec.rb +59 -0
- data/spec/models/body_12_spec.rb +47 -0
- data/spec/models/body_13_spec.rb +71 -0
- data/spec/models/body_14_spec.rb +41 -0
- data/spec/models/body_15_spec.rb +47 -0
- data/spec/models/body_16_spec.rb +53 -0
- data/spec/models/body_17_spec.rb +47 -0
- data/spec/models/body_18_spec.rb +47 -0
- data/spec/models/body_19_spec.rb +59 -0
- data/spec/models/body_1_spec.rb +41 -0
- data/spec/models/body_20_spec.rb +47 -0
- data/spec/models/body_21_spec.rb +41 -0
- data/spec/models/body_22_spec.rb +47 -0
- data/spec/models/body_23_spec.rb +47 -0
- data/spec/models/body_24_spec.rb +47 -0
- data/spec/models/body_25_spec.rb +53 -0
- data/spec/models/body_26_spec.rb +53 -0
- data/spec/models/body_27_spec.rb +65 -0
- data/spec/models/body_28_spec.rb +77 -0
- data/spec/models/body_29_spec.rb +83 -0
- data/spec/models/body_2_spec.rb +47 -0
- data/spec/models/body_30_spec.rb +71 -0
- data/spec/models/body_31_spec.rb +47 -0
- data/spec/models/body_32_spec.rb +47 -0
- data/spec/models/body_33_spec.rb +47 -0
- data/spec/models/body_34_spec.rb +89 -0
- data/spec/models/body_35_spec.rb +47 -0
- data/spec/models/body_36_spec.rb +47 -0
- data/spec/models/body_37_spec.rb +53 -0
- data/spec/models/body_38_spec.rb +41 -0
- data/spec/models/body_39_spec.rb +53 -0
- data/spec/models/body_3_spec.rb +47 -0
- data/spec/models/body_40_spec.rb +53 -0
- data/spec/models/body_41_spec.rb +47 -0
- data/spec/models/body_42_spec.rb +59 -0
- data/spec/models/body_43_spec.rb +59 -0
- data/spec/models/body_44_spec.rb +53 -0
- data/spec/models/body_45_spec.rb +41 -0
- data/spec/models/body_46_spec.rb +41 -0
- data/spec/models/body_47_spec.rb +47 -0
- data/spec/models/body_48_spec.rb +47 -0
- data/spec/models/body_49_spec.rb +53 -0
- data/spec/models/body_4_spec.rb +87 -0
- data/spec/models/body_50_spec.rb +47 -0
- data/spec/models/body_51_spec.rb +47 -0
- data/spec/models/body_52_spec.rb +47 -0
- data/spec/models/body_53_spec.rb +65 -0
- data/spec/models/body_54_spec.rb +47 -0
- data/spec/models/body_55_spec.rb +65 -0
- data/spec/models/body_56_spec.rb +47 -0
- data/spec/models/body_57_spec.rb +47 -0
- data/spec/models/body_58_spec.rb +47 -0
- data/spec/models/body_59_spec.rb +41 -0
- data/spec/models/body_5_spec.rb +41 -0
- data/spec/models/body_60_spec.rb +47 -0
- data/spec/models/body_61_spec.rb +47 -0
- data/spec/models/body_62_spec.rb +47 -0
- data/spec/models/body_63_spec.rb +41 -0
- data/spec/models/body_64_spec.rb +89 -0
- data/spec/models/body_65_spec.rb +47 -0
- data/spec/models/body_66_spec.rb +89 -0
- data/spec/models/body_67_spec.rb +47 -0
- data/spec/models/body_68_spec.rb +47 -0
- data/spec/models/body_69_spec.rb +47 -0
- data/spec/models/body_6_spec.rb +47 -0
- data/spec/models/body_70_spec.rb +47 -0
- data/spec/models/body_71_spec.rb +59 -0
- data/spec/models/body_72_spec.rb +41 -0
- data/spec/models/body_73_spec.rb +47 -0
- data/spec/models/body_74_spec.rb +47 -0
- data/spec/models/body_75_spec.rb +41 -0
- data/spec/models/body_76_spec.rb +47 -0
- data/spec/models/body_77_spec.rb +47 -0
- data/spec/models/body_78_spec.rb +41 -0
- data/spec/models/body_79_spec.rb +41 -0
- data/spec/models/body_7_spec.rb +47 -0
- data/spec/models/body_80_spec.rb +41 -0
- data/spec/models/body_81_spec.rb +41 -0
- data/spec/models/body_82_spec.rb +41 -0
- data/spec/models/body_83_spec.rb +63 -0
- data/spec/models/body_84_spec.rb +47 -0
- data/spec/models/body_85_spec.rb +69 -0
- data/spec/models/body_86_spec.rb +47 -0
- data/spec/models/body_87_spec.rb +53 -0
- data/spec/models/body_88_spec.rb +47 -0
- data/spec/models/body_89_spec.rb +47 -0
- data/spec/models/body_8_spec.rb +47 -0
- data/spec/models/body_9_spec.rb +47 -0
- data/spec/models/body_spec.rb +47 -0
- data/spec/models/inline_response_200_10_spec.rb +53 -0
- data/spec/models/inline_response_200_11_spec.rb +53 -0
- data/spec/models/inline_response_200_12_spec.rb +53 -0
- data/spec/models/inline_response_200_13_spec.rb +53 -0
- data/spec/models/inline_response_200_14_spec.rb +71 -0
- data/spec/models/inline_response_200_15_spec.rb +71 -0
- data/spec/models/inline_response_200_16_spec.rb +41 -0
- data/spec/models/inline_response_200_17_spec.rb +71 -0
- data/spec/models/inline_response_200_18_spec.rb +71 -0
- data/spec/models/inline_response_200_19_spec.rb +47 -0
- data/spec/models/inline_response_200_1_spec.rb +71 -0
- data/spec/models/inline_response_200_20_spec.rb +53 -0
- data/spec/models/inline_response_200_21_spec.rb +53 -0
- data/spec/models/inline_response_200_22_spec.rb +47 -0
- data/spec/models/inline_response_200_23_spec.rb +47 -0
- data/spec/models/inline_response_200_24_spec.rb +71 -0
- data/spec/models/inline_response_200_25_spec.rb +67 -0
- data/spec/models/inline_response_200_26_spec.rb +67 -0
- data/spec/models/inline_response_200_27_spec.rb +117 -0
- data/spec/models/inline_response_200_28_spec.rb +101 -0
- data/spec/models/inline_response_200_29_smtp_events_spec.rb +53 -0
- data/spec/models/inline_response_200_29_spec.rb +123 -0
- data/spec/models/inline_response_200_2_spec.rb +71 -0
- data/spec/models/inline_response_200_30_attachments_spec.rb +53 -0
- data/spec/models/inline_response_200_30_spec.rb +101 -0
- data/spec/models/inline_response_200_30_to_spec.rb +47 -0
- data/spec/models/inline_response_200_31_attachments_spec.rb +59 -0
- data/spec/models/inline_response_200_31_images_spec.rb +53 -0
- data/spec/models/inline_response_200_31_spec.rb +89 -0
- data/spec/models/inline_response_200_31_to_spec.rb +47 -0
- data/spec/models/inline_response_200_32_spec.rb +71 -0
- data/spec/models/inline_response_200_33_spec.rb +57 -0
- data/spec/models/inline_response_200_34_spec.rb +57 -0
- data/spec/models/inline_response_200_35_spec.rb +57 -0
- data/spec/models/inline_response_200_36_spec.rb +57 -0
- data/spec/models/inline_response_200_37_spec.rb +47 -0
- data/spec/models/inline_response_200_38_spec.rb +89 -0
- data/spec/models/inline_response_200_39_spec.rb +53 -0
- data/spec/models/inline_response_200_3_spec.rb +71 -0
- data/spec/models/inline_response_200_40_spec.rb +107 -0
- data/spec/models/inline_response_200_41_spec.rb +77 -0
- data/spec/models/inline_response_200_42_spec.rb +77 -0
- data/spec/models/inline_response_200_43_spec.rb +77 -0
- data/spec/models/inline_response_200_44_spec.rb +53 -0
- data/spec/models/inline_response_200_45_spec.rb +101 -0
- data/spec/models/inline_response_200_45_stats_last_30_days_spec.rb +95 -0
- data/spec/models/inline_response_200_45_stats_last_60_days_spec.rb +95 -0
- data/spec/models/inline_response_200_45_stats_last_7_days_spec.rb +95 -0
- data/spec/models/inline_response_200_45_stats_last_90_days_spec.rb +95 -0
- data/spec/models/inline_response_200_45_stats_spec.rb +65 -0
- data/spec/models/inline_response_200_45_stats_today_spec.rb +95 -0
- data/spec/models/inline_response_200_46_spec.rb +95 -0
- data/spec/models/inline_response_200_47_spec.rb +99 -0
- data/spec/models/inline_response_200_48_spec.rb +99 -0
- data/spec/models/inline_response_200_49_last_30_days_spec.rb +95 -0
- data/spec/models/inline_response_200_49_spec.rb +123 -0
- data/spec/models/inline_response_200_4_spec.rb +71 -0
- data/spec/models/inline_response_200_50_spec.rb +99 -0
- data/spec/models/inline_response_200_51_spec.rb +99 -0
- data/spec/models/inline_response_200_52_spec.rb +99 -0
- data/spec/models/inline_response_200_53_spec.rb +99 -0
- data/spec/models/inline_response_200_54_spec.rb +107 -0
- data/spec/models/inline_response_200_55_spec.rb +107 -0
- data/spec/models/inline_response_200_56_spec.rb +95 -0
- data/spec/models/inline_response_200_56_stats_last_30_days_spec.rb +95 -0
- data/spec/models/inline_response_200_56_stats_last_60_days_spec.rb +95 -0
- data/spec/models/inline_response_200_56_stats_last_7_days_spec.rb +95 -0
- data/spec/models/inline_response_200_56_stats_last_90_days_spec.rb +95 -0
- data/spec/models/inline_response_200_56_stats_spec.rb +65 -0
- data/spec/models/inline_response_200_56_stats_today_spec.rb +95 -0
- data/spec/models/inline_response_200_57_spec.rb +137 -0
- data/spec/models/inline_response_200_58_spec.rb +137 -0
- data/spec/models/inline_response_200_59_spec.rb +137 -0
- data/spec/models/inline_response_200_5_spec.rb +53 -0
- data/spec/models/inline_response_200_60_spec.rb +137 -0
- data/spec/models/inline_response_200_61_spec.rb +137 -0
- data/spec/models/inline_response_200_62_spec.rb +137 -0
- data/spec/models/inline_response_200_63_spec.rb +41 -0
- data/spec/models/inline_response_200_64_spec.rb +59 -0
- data/spec/models/inline_response_200_65_spec.rb +59 -0
- data/spec/models/inline_response_200_66_spec.rb +59 -0
- data/spec/models/inline_response_200_67_spec.rb +65 -0
- data/spec/models/inline_response_200_68_spec.rb +65 -0
- data/spec/models/inline_response_200_69_spec.rb +77 -0
- data/spec/models/inline_response_200_69_stats_all_time_spec.rb +95 -0
- data/spec/models/inline_response_200_69_stats_last_30_days_spec.rb +95 -0
- data/spec/models/inline_response_200_69_stats_last_60_days_spec.rb +95 -0
- data/spec/models/inline_response_200_69_stats_last_7_days_spec.rb +95 -0
- data/spec/models/inline_response_200_69_stats_last_90_days_spec.rb +95 -0
- data/spec/models/inline_response_200_69_stats_spec.rb +71 -0
- data/spec/models/inline_response_200_69_stats_today_spec.rb +95 -0
- data/spec/models/inline_response_200_6_spec.rb +53 -0
- data/spec/models/inline_response_200_70_spec.rb +41 -0
- data/spec/models/inline_response_200_71_spec.rb +99 -0
- data/spec/models/inline_response_200_72_spec.rb +99 -0
- data/spec/models/inline_response_200_73_spec.rb +99 -0
- data/spec/models/inline_response_200_74_spec.rb +99 -0
- data/spec/models/inline_response_200_75_spec.rb +99 -0
- data/spec/models/inline_response_200_76_spec.rb +47 -0
- data/spec/models/inline_response_200_77_spec.rb +53 -0
- data/spec/models/inline_response_200_78_spec.rb +47 -0
- data/spec/models/inline_response_200_7_spec.rb +53 -0
- data/spec/models/inline_response_200_8_spec.rb +53 -0
- data/spec/models/inline_response_200_9_spec.rb +53 -0
- data/spec/models/inline_response_200_spec.rb +71 -0
- data/spec/models/ipslist_custom_dns_spec.rb +53 -0
- data/spec/models/ipslist_warmup_spec.rb +53 -0
- data/spec/models/ipslistpools_ips_spec.rb +71 -0
- data/spec/models/messagessearch_clicks_detail_spec.rb +65 -0
- data/spec/models/messagessearch_opens_detail_spec.rb +59 -0
- data/spec/models/messagessend_message_attachments_spec.rb +53 -0
- data/spec/models/messagessend_message_global_merge_vars_spec.rb +47 -0
- data/spec/models/messagessend_message_images_spec.rb +53 -0
- data/spec/models/messagessend_message_merge_vars_spec.rb +47 -0
- data/spec/models/messagessend_message_metadata_spec.rb +41 -0
- data/spec/models/messagessend_message_recipient_metadata_spec.rb +47 -0
- data/spec/models/messagessend_message_spec.rb +231 -0
- data/spec/models/messagessend_message_to_spec.rb +57 -0
- data/spec/models/messagessend_message_values_spec.rb +41 -0
- data/spec/models/messagessend_message_vars_spec.rb +47 -0
- data/spec/models/messagessendtemplate_message_spec.rb +231 -0
- data/spec/models/messagessendtemplate_template_content_spec.rb +47 -0
- data/spec/models/rejectslist_sender_spec.rb +107 -0
- data/spec/models/sendersdomains_dkim_spec.rb +53 -0
- data/spec/models/sendersdomains_spf_spec.rb +53 -0
- data/spec/models/templatesrender_merge_vars_spec.rb +47 -0
- data/spec/models/templatesrender_template_content_spec.rb +47 -0
- data/spec/models/urlstrackingdomains_cname_spec.rb +53 -0
- data/spec/spec_helper.rb +111 -0
- metadata +1113 -0
@@ -0,0 +1,216 @@
|
|
1
|
+
=begin
|
2
|
+
#Mandrill API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.1
|
7
|
+
Contact: apihelp@mandrill.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MailchimpTransactional
|
16
|
+
# information on an individual open
|
17
|
+
class MessagessearchOpensDetail
|
18
|
+
# the unix timestamp from when the message was opened
|
19
|
+
attr_accessor :ts
|
20
|
+
|
21
|
+
# the IP address that generated the open
|
22
|
+
attr_accessor :ip
|
23
|
+
|
24
|
+
# the approximate region and country that the opening IP is located
|
25
|
+
attr_accessor :location
|
26
|
+
|
27
|
+
# the email client or browser data of the open
|
28
|
+
attr_accessor :ua
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'ts' => :'ts',
|
34
|
+
:'ip' => :'ip',
|
35
|
+
:'location' => :'location',
|
36
|
+
:'ua' => :'ua'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'ts' => :'Integer',
|
44
|
+
:'ip' => :'String',
|
45
|
+
:'location' => :'String',
|
46
|
+
:'ua' => :'String'
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
return unless attributes.is_a?(Hash)
|
54
|
+
|
55
|
+
# convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
57
|
+
|
58
|
+
if attributes.has_key?(:'ts')
|
59
|
+
self.ts = attributes[:'ts']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'ip')
|
63
|
+
self.ip = attributes[:'ip']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'location')
|
67
|
+
self.location = attributes[:'location']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'ua')
|
71
|
+
self.ua = attributes[:'ua']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
ts == o.ts &&
|
94
|
+
ip == o.ip &&
|
95
|
+
location == o.location &&
|
96
|
+
ua == o.ua
|
97
|
+
end
|
98
|
+
|
99
|
+
# @see the `==` method
|
100
|
+
# @param [Object] Object to be compared
|
101
|
+
def eql?(o)
|
102
|
+
self == o
|
103
|
+
end
|
104
|
+
|
105
|
+
# Calculates hash code according to all attributes.
|
106
|
+
# @return [Fixnum] Hash code
|
107
|
+
def hash
|
108
|
+
[ts, ip, location, ua].hash
|
109
|
+
end
|
110
|
+
|
111
|
+
# Builds the object from hash
|
112
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
113
|
+
# @return [Object] Returns the model itself
|
114
|
+
def build_from_hash(attributes)
|
115
|
+
return nil unless attributes.is_a?(Hash)
|
116
|
+
self.class.swagger_types.each_pair do |key, type|
|
117
|
+
if type =~ /\AArray<(.*)>/i
|
118
|
+
# check to ensure the input is an array given that the attribute
|
119
|
+
# is documented as an array but the input is not
|
120
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
121
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
122
|
+
end
|
123
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
124
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
125
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
126
|
+
end
|
127
|
+
|
128
|
+
self
|
129
|
+
end
|
130
|
+
|
131
|
+
# Deserializes the data based on type
|
132
|
+
# @param string type Data type
|
133
|
+
# @param string value Value to be deserialized
|
134
|
+
# @return [Object] Deserialized data
|
135
|
+
def _deserialize(type, value)
|
136
|
+
case type.to_sym
|
137
|
+
when :DateTime
|
138
|
+
DateTime.parse(value)
|
139
|
+
when :Date
|
140
|
+
Date.parse(value)
|
141
|
+
when :String
|
142
|
+
value.to_s
|
143
|
+
when :Integer
|
144
|
+
value.to_i
|
145
|
+
when :Float
|
146
|
+
value.to_f
|
147
|
+
when :BOOLEAN
|
148
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
149
|
+
true
|
150
|
+
else
|
151
|
+
false
|
152
|
+
end
|
153
|
+
when :Object
|
154
|
+
# generic object (usually a Hash), return directly
|
155
|
+
value
|
156
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
157
|
+
inner_type = Regexp.last_match[:inner_type]
|
158
|
+
value.map { |v| _deserialize(inner_type, v) }
|
159
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
160
|
+
k_type = Regexp.last_match[:k_type]
|
161
|
+
v_type = Regexp.last_match[:v_type]
|
162
|
+
{}.tap do |hash|
|
163
|
+
value.each do |k, v|
|
164
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
else # model
|
168
|
+
temp_model = MailchimpTransactional.const_get(type).new
|
169
|
+
temp_model.build_from_hash(value)
|
170
|
+
end
|
171
|
+
end
|
172
|
+
|
173
|
+
# Returns the string representation of the object
|
174
|
+
# @return [String] String presentation of the object
|
175
|
+
def to_s
|
176
|
+
to_hash.to_s
|
177
|
+
end
|
178
|
+
|
179
|
+
# to_body is an alias to to_hash (backward compatibility)
|
180
|
+
# @return [Hash] Returns the object in the form of hash
|
181
|
+
def to_body
|
182
|
+
to_hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the object in the form of hash
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_hash
|
188
|
+
hash = {}
|
189
|
+
self.class.attribute_map.each_pair do |attr, param|
|
190
|
+
value = self.send(attr)
|
191
|
+
next if value.nil?
|
192
|
+
hash[param] = _to_hash(value)
|
193
|
+
end
|
194
|
+
hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Outputs non-array value in the form of hash
|
198
|
+
# For object, use to_hash. Otherwise, just return the value
|
199
|
+
# @param [Object] value Any valid value
|
200
|
+
# @return [Hash] Returns the value in the form of hash
|
201
|
+
def _to_hash(value)
|
202
|
+
if value.is_a?(Array)
|
203
|
+
value.compact.map { |v| _to_hash(v) }
|
204
|
+
elsif value.is_a?(Hash)
|
205
|
+
{}.tap do |hash|
|
206
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
207
|
+
end
|
208
|
+
elsif value.respond_to? :to_hash
|
209
|
+
value.to_hash
|
210
|
+
else
|
211
|
+
value
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
end
|
@@ -0,0 +1,545 @@
|
|
1
|
+
=begin
|
2
|
+
#Mandrill API
|
3
|
+
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
|
+
|
6
|
+
OpenAPI spec version: 1.0.1
|
7
|
+
Contact: apihelp@mandrill.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.12
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MailchimpTransactional
|
16
|
+
# the information on the message to send
|
17
|
+
class MessagessendMessage
|
18
|
+
# the full HTML content to be sent
|
19
|
+
attr_accessor :html
|
20
|
+
|
21
|
+
# optional full text content to be sent
|
22
|
+
attr_accessor :text
|
23
|
+
|
24
|
+
# the message subject
|
25
|
+
attr_accessor :subject
|
26
|
+
|
27
|
+
# the sender email address
|
28
|
+
attr_accessor :from_email
|
29
|
+
|
30
|
+
# optional from name to be used
|
31
|
+
attr_accessor :from_name
|
32
|
+
|
33
|
+
# an array of recipient information.
|
34
|
+
attr_accessor :to
|
35
|
+
|
36
|
+
# optional extra headers to add to the message (most headers are allowed)
|
37
|
+
attr_accessor :headers
|
38
|
+
|
39
|
+
# whether or not this message is important, and should be delivered ahead of non-important messages
|
40
|
+
attr_accessor :important
|
41
|
+
|
42
|
+
# whether or not to turn on open tracking for the message
|
43
|
+
attr_accessor :track_opens
|
44
|
+
|
45
|
+
# whether or not to turn on click tracking for the message
|
46
|
+
attr_accessor :track_clicks
|
47
|
+
|
48
|
+
# whether or not to automatically generate a text part for messages that are not given text
|
49
|
+
attr_accessor :auto_text
|
50
|
+
|
51
|
+
# whether or not to automatically generate an HTML part for messages that are not given HTML
|
52
|
+
attr_accessor :auto_html
|
53
|
+
|
54
|
+
# whether or not to automatically inline all CSS styles provided in the message HTML - only for HTML documents less than 256KB in size
|
55
|
+
attr_accessor :inline_css
|
56
|
+
|
57
|
+
# whether or not to strip the query string from URLs when aggregating tracked URL data
|
58
|
+
attr_accessor :url_strip_qs
|
59
|
+
|
60
|
+
# whether or not to expose all recipients in to \"To\" header for each email
|
61
|
+
attr_accessor :preserve_recipients
|
62
|
+
|
63
|
+
# set to false to remove content logging for sensitive emails
|
64
|
+
attr_accessor :view_content_link
|
65
|
+
|
66
|
+
# an optional address to receive an exact copy of each recipient's email
|
67
|
+
attr_accessor :bcc_address
|
68
|
+
|
69
|
+
# a custom domain to use for tracking opens and clicks instead of mandrillapp.com
|
70
|
+
attr_accessor :tracking_domain
|
71
|
+
|
72
|
+
# a custom domain to use for SPF/DKIM signing instead of mandrill (for \"via\" or \"on behalf of\" in email clients)
|
73
|
+
attr_accessor :signing_domain
|
74
|
+
|
75
|
+
# a custom domain to use for the messages's return-path
|
76
|
+
attr_accessor :return_path_domain
|
77
|
+
|
78
|
+
# whether to evaluate merge tags in the message. Will automatically be set to true if either merge_vars or global_merge_vars are provided.
|
79
|
+
attr_accessor :merge
|
80
|
+
|
81
|
+
# the merge tag language to use when evaluating merge tags, either mailchimp or handlebars
|
82
|
+
attr_accessor :merge_language
|
83
|
+
|
84
|
+
# global merge variables to use for all recipients. You can override these per recipient.
|
85
|
+
attr_accessor :global_merge_vars
|
86
|
+
|
87
|
+
# per-recipient merge variables, which override global merge variables with the same name.
|
88
|
+
attr_accessor :merge_vars
|
89
|
+
|
90
|
+
# an array of string to tag the message with. Stats are accumulated using tags, though we only store the first 100 we see, so this should not be unique or change frequently. Tags should be 50 characters or less. Any tags starting with an underscore are reserved for internal use and will cause errors.
|
91
|
+
attr_accessor :tags
|
92
|
+
|
93
|
+
# the unique id of a subaccount for this message - must already exist or will fail with an error
|
94
|
+
attr_accessor :subaccount
|
95
|
+
|
96
|
+
# an array of strings indicating for which any matching URLs will automatically have Google Analytics parameters appended to their query string automatically.
|
97
|
+
attr_accessor :google_analytics_domains
|
98
|
+
|
99
|
+
# optional string indicating the value to set for the utm_campaign tracking parameter. If this isn't provided the email's from address will be used instead.
|
100
|
+
attr_accessor :google_analytics_campaign
|
101
|
+
|
102
|
+
attr_accessor :metadata
|
103
|
+
|
104
|
+
# Per-recipient metadata that will override the global values specified in the metadata parameter.
|
105
|
+
attr_accessor :recipient_metadata
|
106
|
+
|
107
|
+
# an array of supported attachments to add to the message
|
108
|
+
attr_accessor :attachments
|
109
|
+
|
110
|
+
# an array of embedded images to add to the message
|
111
|
+
attr_accessor :images
|
112
|
+
|
113
|
+
class EnumAttributeValidator
|
114
|
+
attr_reader :datatype
|
115
|
+
attr_reader :allowable_values
|
116
|
+
|
117
|
+
def initialize(datatype, allowable_values)
|
118
|
+
@allowable_values = allowable_values.map do |value|
|
119
|
+
case datatype.to_s
|
120
|
+
when /Integer/i
|
121
|
+
value.to_i
|
122
|
+
when /Float/i
|
123
|
+
value.to_f
|
124
|
+
else
|
125
|
+
value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def valid?(value)
|
131
|
+
!value || allowable_values.include?(value)
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
136
|
+
def self.attribute_map
|
137
|
+
{
|
138
|
+
:'html' => :'html',
|
139
|
+
:'text' => :'text',
|
140
|
+
:'subject' => :'subject',
|
141
|
+
:'from_email' => :'from_email',
|
142
|
+
:'from_name' => :'from_name',
|
143
|
+
:'to' => :'to',
|
144
|
+
:'headers' => :'headers',
|
145
|
+
:'important' => :'important',
|
146
|
+
:'track_opens' => :'track_opens',
|
147
|
+
:'track_clicks' => :'track_clicks',
|
148
|
+
:'auto_text' => :'auto_text',
|
149
|
+
:'auto_html' => :'auto_html',
|
150
|
+
:'inline_css' => :'inline_css',
|
151
|
+
:'url_strip_qs' => :'url_strip_qs',
|
152
|
+
:'preserve_recipients' => :'preserve_recipients',
|
153
|
+
:'view_content_link' => :'view_content_link',
|
154
|
+
:'bcc_address' => :'bcc_address',
|
155
|
+
:'tracking_domain' => :'tracking_domain',
|
156
|
+
:'signing_domain' => :'signing_domain',
|
157
|
+
:'return_path_domain' => :'return_path_domain',
|
158
|
+
:'merge' => :'merge',
|
159
|
+
:'merge_language' => :'merge_language',
|
160
|
+
:'global_merge_vars' => :'global_merge_vars',
|
161
|
+
:'merge_vars' => :'merge_vars',
|
162
|
+
:'tags' => :'tags',
|
163
|
+
:'subaccount' => :'subaccount',
|
164
|
+
:'google_analytics_domains' => :'google_analytics_domains',
|
165
|
+
:'google_analytics_campaign' => :'google_analytics_campaign',
|
166
|
+
:'metadata' => :'metadata',
|
167
|
+
:'recipient_metadata' => :'recipient_metadata',
|
168
|
+
:'attachments' => :'attachments',
|
169
|
+
:'images' => :'images'
|
170
|
+
}
|
171
|
+
end
|
172
|
+
|
173
|
+
# Attribute type mapping.
|
174
|
+
def self.swagger_types
|
175
|
+
{
|
176
|
+
:'html' => :'String',
|
177
|
+
:'text' => :'String',
|
178
|
+
:'subject' => :'String',
|
179
|
+
:'from_email' => :'String',
|
180
|
+
:'from_name' => :'String',
|
181
|
+
:'to' => :'Array<MessagessendMessageTo>',
|
182
|
+
:'headers' => :'Object',
|
183
|
+
:'important' => :'BOOLEAN',
|
184
|
+
:'track_opens' => :'BOOLEAN',
|
185
|
+
:'track_clicks' => :'BOOLEAN',
|
186
|
+
:'auto_text' => :'BOOLEAN',
|
187
|
+
:'auto_html' => :'BOOLEAN',
|
188
|
+
:'inline_css' => :'BOOLEAN',
|
189
|
+
:'url_strip_qs' => :'BOOLEAN',
|
190
|
+
:'preserve_recipients' => :'BOOLEAN',
|
191
|
+
:'view_content_link' => :'BOOLEAN',
|
192
|
+
:'bcc_address' => :'String',
|
193
|
+
:'tracking_domain' => :'String',
|
194
|
+
:'signing_domain' => :'String',
|
195
|
+
:'return_path_domain' => :'String',
|
196
|
+
:'merge' => :'BOOLEAN',
|
197
|
+
:'merge_language' => :'String',
|
198
|
+
:'global_merge_vars' => :'Array<MessagessendMessageGlobalMergeVars>',
|
199
|
+
:'merge_vars' => :'Array<MessagessendMessageMergeVars>',
|
200
|
+
:'tags' => :'Array<String>',
|
201
|
+
:'subaccount' => :'String',
|
202
|
+
:'google_analytics_domains' => :'Array<String>',
|
203
|
+
:'google_analytics_campaign' => :'String',
|
204
|
+
:'metadata' => :'MessagessendMessageMetadata',
|
205
|
+
:'recipient_metadata' => :'Array<MessagessendMessageRecipientMetadata>',
|
206
|
+
:'attachments' => :'Array<MessagessendMessageAttachments>',
|
207
|
+
:'images' => :'Array<MessagessendMessageImages>'
|
208
|
+
}
|
209
|
+
end
|
210
|
+
|
211
|
+
# Initializes the object
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
213
|
+
def initialize(attributes = {})
|
214
|
+
return unless attributes.is_a?(Hash)
|
215
|
+
|
216
|
+
# convert string to symbol for hash key
|
217
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
218
|
+
|
219
|
+
if attributes.has_key?(:'html')
|
220
|
+
self.html = attributes[:'html']
|
221
|
+
end
|
222
|
+
|
223
|
+
if attributes.has_key?(:'text')
|
224
|
+
self.text = attributes[:'text']
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.has_key?(:'subject')
|
228
|
+
self.subject = attributes[:'subject']
|
229
|
+
end
|
230
|
+
|
231
|
+
if attributes.has_key?(:'from_email')
|
232
|
+
self.from_email = attributes[:'from_email']
|
233
|
+
end
|
234
|
+
|
235
|
+
if attributes.has_key?(:'from_name')
|
236
|
+
self.from_name = attributes[:'from_name']
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.has_key?(:'to')
|
240
|
+
if (value = attributes[:'to']).is_a?(Array)
|
241
|
+
self.to = value
|
242
|
+
end
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.has_key?(:'headers')
|
246
|
+
self.headers = attributes[:'headers']
|
247
|
+
end
|
248
|
+
|
249
|
+
if attributes.has_key?(:'important')
|
250
|
+
self.important = attributes[:'important']
|
251
|
+
end
|
252
|
+
|
253
|
+
if attributes.has_key?(:'track_opens')
|
254
|
+
self.track_opens = attributes[:'track_opens']
|
255
|
+
end
|
256
|
+
|
257
|
+
if attributes.has_key?(:'track_clicks')
|
258
|
+
self.track_clicks = attributes[:'track_clicks']
|
259
|
+
end
|
260
|
+
|
261
|
+
if attributes.has_key?(:'auto_text')
|
262
|
+
self.auto_text = attributes[:'auto_text']
|
263
|
+
end
|
264
|
+
|
265
|
+
if attributes.has_key?(:'auto_html')
|
266
|
+
self.auto_html = attributes[:'auto_html']
|
267
|
+
end
|
268
|
+
|
269
|
+
if attributes.has_key?(:'inline_css')
|
270
|
+
self.inline_css = attributes[:'inline_css']
|
271
|
+
end
|
272
|
+
|
273
|
+
if attributes.has_key?(:'url_strip_qs')
|
274
|
+
self.url_strip_qs = attributes[:'url_strip_qs']
|
275
|
+
end
|
276
|
+
|
277
|
+
if attributes.has_key?(:'preserve_recipients')
|
278
|
+
self.preserve_recipients = attributes[:'preserve_recipients']
|
279
|
+
end
|
280
|
+
|
281
|
+
if attributes.has_key?(:'view_content_link')
|
282
|
+
self.view_content_link = attributes[:'view_content_link']
|
283
|
+
end
|
284
|
+
|
285
|
+
if attributes.has_key?(:'bcc_address')
|
286
|
+
self.bcc_address = attributes[:'bcc_address']
|
287
|
+
end
|
288
|
+
|
289
|
+
if attributes.has_key?(:'tracking_domain')
|
290
|
+
self.tracking_domain = attributes[:'tracking_domain']
|
291
|
+
end
|
292
|
+
|
293
|
+
if attributes.has_key?(:'signing_domain')
|
294
|
+
self.signing_domain = attributes[:'signing_domain']
|
295
|
+
end
|
296
|
+
|
297
|
+
if attributes.has_key?(:'return_path_domain')
|
298
|
+
self.return_path_domain = attributes[:'return_path_domain']
|
299
|
+
end
|
300
|
+
|
301
|
+
if attributes.has_key?(:'merge')
|
302
|
+
self.merge = attributes[:'merge']
|
303
|
+
end
|
304
|
+
|
305
|
+
if attributes.has_key?(:'merge_language')
|
306
|
+
self.merge_language = attributes[:'merge_language']
|
307
|
+
end
|
308
|
+
|
309
|
+
if attributes.has_key?(:'global_merge_vars')
|
310
|
+
if (value = attributes[:'global_merge_vars']).is_a?(Array)
|
311
|
+
self.global_merge_vars = value
|
312
|
+
end
|
313
|
+
end
|
314
|
+
|
315
|
+
if attributes.has_key?(:'merge_vars')
|
316
|
+
if (value = attributes[:'merge_vars']).is_a?(Array)
|
317
|
+
self.merge_vars = value
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
if attributes.has_key?(:'tags')
|
322
|
+
if (value = attributes[:'tags']).is_a?(Array)
|
323
|
+
self.tags = value
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
if attributes.has_key?(:'subaccount')
|
328
|
+
self.subaccount = attributes[:'subaccount']
|
329
|
+
end
|
330
|
+
|
331
|
+
if attributes.has_key?(:'google_analytics_domains')
|
332
|
+
if (value = attributes[:'google_analytics_domains']).is_a?(Array)
|
333
|
+
self.google_analytics_domains = value
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
if attributes.has_key?(:'google_analytics_campaign')
|
338
|
+
self.google_analytics_campaign = attributes[:'google_analytics_campaign']
|
339
|
+
end
|
340
|
+
|
341
|
+
if attributes.has_key?(:'metadata')
|
342
|
+
self.metadata = attributes[:'metadata']
|
343
|
+
end
|
344
|
+
|
345
|
+
if attributes.has_key?(:'recipient_metadata')
|
346
|
+
if (value = attributes[:'recipient_metadata']).is_a?(Array)
|
347
|
+
self.recipient_metadata = value
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
if attributes.has_key?(:'attachments')
|
352
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
353
|
+
self.attachments = value
|
354
|
+
end
|
355
|
+
end
|
356
|
+
|
357
|
+
if attributes.has_key?(:'images')
|
358
|
+
if (value = attributes[:'images']).is_a?(Array)
|
359
|
+
self.images = value
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|
363
|
+
|
364
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
365
|
+
# @return Array for valid properties with the reasons
|
366
|
+
def list_invalid_properties
|
367
|
+
invalid_properties = Array.new
|
368
|
+
invalid_properties
|
369
|
+
end
|
370
|
+
|
371
|
+
# Check to see if the all the properties in the model are valid
|
372
|
+
# @return true if the model is valid
|
373
|
+
def valid?
|
374
|
+
merge_language_validator = EnumAttributeValidator.new('String', ['mailchimp', 'handlebars'])
|
375
|
+
return false unless merge_language_validator.valid?(@merge_language)
|
376
|
+
true
|
377
|
+
end
|
378
|
+
|
379
|
+
# Custom attribute writer method checking allowed values (enum).
|
380
|
+
# @param [Object] merge_language Object to be assigned
|
381
|
+
def merge_language=(merge_language)
|
382
|
+
validator = EnumAttributeValidator.new('String', ['mailchimp', 'handlebars'])
|
383
|
+
unless validator.valid?(merge_language)
|
384
|
+
fail ArgumentError, 'invalid value for "merge_language", must be one of #{validator.allowable_values}.'
|
385
|
+
end
|
386
|
+
@merge_language = merge_language
|
387
|
+
end
|
388
|
+
|
389
|
+
# Checks equality by comparing each attribute.
|
390
|
+
# @param [Object] Object to be compared
|
391
|
+
def ==(o)
|
392
|
+
return true if self.equal?(o)
|
393
|
+
self.class == o.class &&
|
394
|
+
html == o.html &&
|
395
|
+
text == o.text &&
|
396
|
+
subject == o.subject &&
|
397
|
+
from_email == o.from_email &&
|
398
|
+
from_name == o.from_name &&
|
399
|
+
to == o.to &&
|
400
|
+
headers == o.headers &&
|
401
|
+
important == o.important &&
|
402
|
+
track_opens == o.track_opens &&
|
403
|
+
track_clicks == o.track_clicks &&
|
404
|
+
auto_text == o.auto_text &&
|
405
|
+
auto_html == o.auto_html &&
|
406
|
+
inline_css == o.inline_css &&
|
407
|
+
url_strip_qs == o.url_strip_qs &&
|
408
|
+
preserve_recipients == o.preserve_recipients &&
|
409
|
+
view_content_link == o.view_content_link &&
|
410
|
+
bcc_address == o.bcc_address &&
|
411
|
+
tracking_domain == o.tracking_domain &&
|
412
|
+
signing_domain == o.signing_domain &&
|
413
|
+
return_path_domain == o.return_path_domain &&
|
414
|
+
merge == o.merge &&
|
415
|
+
merge_language == o.merge_language &&
|
416
|
+
global_merge_vars == o.global_merge_vars &&
|
417
|
+
merge_vars == o.merge_vars &&
|
418
|
+
tags == o.tags &&
|
419
|
+
subaccount == o.subaccount &&
|
420
|
+
google_analytics_domains == o.google_analytics_domains &&
|
421
|
+
google_analytics_campaign == o.google_analytics_campaign &&
|
422
|
+
metadata == o.metadata &&
|
423
|
+
recipient_metadata == o.recipient_metadata &&
|
424
|
+
attachments == o.attachments &&
|
425
|
+
images == o.images
|
426
|
+
end
|
427
|
+
|
428
|
+
# @see the `==` method
|
429
|
+
# @param [Object] Object to be compared
|
430
|
+
def eql?(o)
|
431
|
+
self == o
|
432
|
+
end
|
433
|
+
|
434
|
+
# Calculates hash code according to all attributes.
|
435
|
+
# @return [Fixnum] Hash code
|
436
|
+
def hash
|
437
|
+
[html, text, subject, from_email, from_name, to, headers, important, track_opens, track_clicks, auto_text, auto_html, inline_css, url_strip_qs, preserve_recipients, view_content_link, bcc_address, tracking_domain, signing_domain, return_path_domain, merge, merge_language, global_merge_vars, merge_vars, tags, subaccount, google_analytics_domains, google_analytics_campaign, metadata, recipient_metadata, attachments, images].hash
|
438
|
+
end
|
439
|
+
|
440
|
+
# Builds the object from hash
|
441
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
442
|
+
# @return [Object] Returns the model itself
|
443
|
+
def build_from_hash(attributes)
|
444
|
+
return nil unless attributes.is_a?(Hash)
|
445
|
+
self.class.swagger_types.each_pair do |key, type|
|
446
|
+
if type =~ /\AArray<(.*)>/i
|
447
|
+
# check to ensure the input is an array given that the attribute
|
448
|
+
# is documented as an array but the input is not
|
449
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
450
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
451
|
+
end
|
452
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
453
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
454
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
455
|
+
end
|
456
|
+
|
457
|
+
self
|
458
|
+
end
|
459
|
+
|
460
|
+
# Deserializes the data based on type
|
461
|
+
# @param string type Data type
|
462
|
+
# @param string value Value to be deserialized
|
463
|
+
# @return [Object] Deserialized data
|
464
|
+
def _deserialize(type, value)
|
465
|
+
case type.to_sym
|
466
|
+
when :DateTime
|
467
|
+
DateTime.parse(value)
|
468
|
+
when :Date
|
469
|
+
Date.parse(value)
|
470
|
+
when :String
|
471
|
+
value.to_s
|
472
|
+
when :Integer
|
473
|
+
value.to_i
|
474
|
+
when :Float
|
475
|
+
value.to_f
|
476
|
+
when :BOOLEAN
|
477
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
478
|
+
true
|
479
|
+
else
|
480
|
+
false
|
481
|
+
end
|
482
|
+
when :Object
|
483
|
+
# generic object (usually a Hash), return directly
|
484
|
+
value
|
485
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
486
|
+
inner_type = Regexp.last_match[:inner_type]
|
487
|
+
value.map { |v| _deserialize(inner_type, v) }
|
488
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
489
|
+
k_type = Regexp.last_match[:k_type]
|
490
|
+
v_type = Regexp.last_match[:v_type]
|
491
|
+
{}.tap do |hash|
|
492
|
+
value.each do |k, v|
|
493
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
494
|
+
end
|
495
|
+
end
|
496
|
+
else # model
|
497
|
+
temp_model = MailchimpTransactional.const_get(type).new
|
498
|
+
temp_model.build_from_hash(value)
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
# Returns the string representation of the object
|
503
|
+
# @return [String] String presentation of the object
|
504
|
+
def to_s
|
505
|
+
to_hash.to_s
|
506
|
+
end
|
507
|
+
|
508
|
+
# to_body is an alias to to_hash (backward compatibility)
|
509
|
+
# @return [Hash] Returns the object in the form of hash
|
510
|
+
def to_body
|
511
|
+
to_hash
|
512
|
+
end
|
513
|
+
|
514
|
+
# Returns the object in the form of hash
|
515
|
+
# @return [Hash] Returns the object in the form of hash
|
516
|
+
def to_hash
|
517
|
+
hash = {}
|
518
|
+
self.class.attribute_map.each_pair do |attr, param|
|
519
|
+
value = self.send(attr)
|
520
|
+
next if value.nil?
|
521
|
+
hash[param] = _to_hash(value)
|
522
|
+
end
|
523
|
+
hash
|
524
|
+
end
|
525
|
+
|
526
|
+
# Outputs non-array value in the form of hash
|
527
|
+
# For object, use to_hash. Otherwise, just return the value
|
528
|
+
# @param [Object] value Any valid value
|
529
|
+
# @return [Hash] Returns the value in the form of hash
|
530
|
+
def _to_hash(value)
|
531
|
+
if value.is_a?(Array)
|
532
|
+
value.compact.map { |v| _to_hash(v) }
|
533
|
+
elsif value.is_a?(Hash)
|
534
|
+
{}.tap do |hash|
|
535
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
536
|
+
end
|
537
|
+
elsif value.respond_to? :to_hash
|
538
|
+
value.to_hash
|
539
|
+
else
|
540
|
+
value
|
541
|
+
end
|
542
|
+
end
|
543
|
+
|
544
|
+
end
|
545
|
+
end
|