From 4ac822ce7820af76de07591db1f7b2a96fe8b54c Mon Sep 17 00:00:00 2001 From: johnkelesidis <john@mailerlite.com> Date: Thu, 1 Aug 2024 15:27:57 +0300 Subject: [PATCH] Remove simple personalization (variables) --- .../java/com/mailersend/sdk/emails/Email.java | 38 ------------------- .../mailersend/sdk/tests/EmailSendTest.java | 2 +- .../EmailSendTest_ScheduleEmailTest().json | 2 +- .../fixtures/EmailSendTest_TestBccSend().json | 2 +- .../EmailSendTest_TestBulkSendStatus().json | 2 +- .../fixtures/EmailSendTest_TestCcSend().json | 2 +- ...ailSendTest_TestEmailWithAttachment().json | 2 +- ...SendTest_TestInvalidPersonalization().json | 2 +- ...ndTest_TestInvalidTokenFailsWith401().json | 2 +- ...ailSendTest_TestPojoPersonalization().json | 2 +- .../EmailSendTest_TestSendBulkEmail().json | 2 +- .../EmailSendTest_TestSimpleSend().json | 2 +- 12 files changed, 11 insertions(+), 49 deletions(-) diff --git a/src/main/java/com/mailersend/sdk/emails/Email.java b/src/main/java/com/mailersend/sdk/emails/Email.java index ccb071f..bf9cedd 100644 --- a/src/main/java/com/mailersend/sdk/emails/Email.java +++ b/src/main/java/com/mailersend/sdk/emails/Email.java @@ -65,9 +65,6 @@ public class Email { public ArrayList<Attachment> attachments = new ArrayList<Attachment>(); - @SerializedName("variables") - public ArrayList<Variable> templateVariables = new ArrayList<Variable>(); - @SerializedName("personalization") public ArrayList<Personalization> personalization = new ArrayList<Personalization>(); @@ -313,42 +310,7 @@ public void addPersonalization(String name, Object value) { this.allRecipientsPersonalization.put(name, value); } - - - /** - * Adds a variable for the given recipient - * - * @param recipient a {@link com.mailersend.sdk.Recipient} object. - * @param variable a {@link java.lang.String} object. - * @param value a {@link java.lang.String} object. - */ - public void AddVariable(Recipient recipient, String variable, String value) { - - // check if there is already a variable object for this recipient - Variable var = null; - for (Variable v : this.templateVariables) { - - if (v.email.equals(recipient.email)) { - - var = v; - break; - } - } - if (var != null) { - - // add the substitution to the existing variable - var.addSubstitution(new Substitution(variable, value)); - } else { - - // if the variable doesn't exist, create it - var = new Variable(); - var.email = recipient.email; - var.addSubstitution(new Substitution(variable, value)); - this.templateVariables.add(var); - } - } - /** * Adds a variable to all recipients diff --git a/src/test/java/com/mailersend/sdk/tests/EmailSendTest.java b/src/test/java/com/mailersend/sdk/tests/EmailSendTest.java index cd83f12..cf34583 100644 --- a/src/test/java/com/mailersend/sdk/tests/EmailSendTest.java +++ b/src/test/java/com/mailersend/sdk/tests/EmailSendTest.java @@ -309,7 +309,7 @@ public void ScheduleEmailTest() { email.setFrom(TestHelper.fromName, TestHelper.emailFrom); - TemporalAccessor ta = DateTimeFormatter.ISO_INSTANT.parse("2022-10-07T00:00:00.875000Z"); + TemporalAccessor ta = DateTimeFormatter.ISO_INSTANT.parse("2024-08-03T00:00:00.875000Z"); Date scheduleDate = Date.from(Instant.from(ta)); Calendar calendar = Calendar.getInstance(); diff --git a/src/test/resources/fixtures/EmailSendTest_ScheduleEmailTest().json b/src/test/resources/fixtures/EmailSendTest_ScheduleEmailTest().json index 4daf0ff..a8e03e6 100644 --- a/src/test/resources/fixtures/EmailSendTest_ScheduleEmailTest().json +++ b/src/test/resources/fixtures/EmailSendTest_ScheduleEmailTest().json @@ -1 +1 @@ -{"6b15cf69672ee532a9f601876778851cc4ca3135":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["755442149ddbeea0-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 05 Oct 2022 06:56:34 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-10-06T00:00:00Z"],"x-message-id":["633d2aa226762ac1d30457e0"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":202}} \ No newline at end of file +{"d7f242eada3144a0e09e58a50e39db613b826590":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5d0d95b7f7176-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Thu, 01 Aug 2024 12:26:18 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7eea1101995a278ad874"]},"statusCode":202},"6b15cf69672ee532a9f601876778851cc4ca3135":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["755442149ddbeea0-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 05 Oct 2022 06:56:34 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-10-06T00:00:00Z"],"x-message-id":["633d2aa226762ac1d30457e0"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":202},"e4a0bcf8b4e53b4dcfb4d96b2db3d8a0054a92f2":{"body":"{\"message\":\"The send_at must be a date before or equal to 2024-08-04 12:24:25.\",\"errors\":{\"send_at\":[\"The send_at must be a date before or equal to 2024-08-04 12:24:25.\"]}}","headers":{":status":["422"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ce134f316f56-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:24:25 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"]},"statusCode":422}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestBccSend().json b/src/test/resources/fixtures/EmailSendTest_TestBccSend().json index acfe583..21486c0 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestBccSend().json +++ b/src/test/resources/fixtures/EmailSendTest_TestBccSend().json @@ -1 +1 @@ -{"13e265f3e3ef5a5772f3d6f00236208e5fba2762":{"body":"{\"message\":\"There are some warnings for your request.\",\"warnings\":[{\"type\":\"SOME_SUPPRESSED\",\"warning\":\"Some of the recipients have been suppressed.\",\"recipients\":[{\"email\":\"bcc@test-sdk.com\",\"name\":\"BCC Email\",\"reasons\":[\"blocklisted\"]}]}]}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdab33d8b38d0-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:06 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f366eea0254cd05351a"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":202}} \ No newline at end of file +{"7c6a2eadf3785e3e9a7328cfd736ce3fca2e9c9b":{"body":"{\"message\":\"There are some warnings for your request.\",\"warnings\":[{\"type\":\"SOME_SUPPRESSED\",\"warning\":\"Some of the recipients have been suppressed.\",\"recipients\":[{\"email\":\"bcc@test-sdk.com\",\"name\":\"BCC Email\",\"reasons\":[\"blocklisted\"]}]}]}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca393b706f3d-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:47 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7ddb155d91c93d446209"]},"statusCode":202},"13e265f3e3ef5a5772f3d6f00236208e5fba2762":{"body":"{\"message\":\"There are some warnings for your request.\",\"warnings\":[{\"type\":\"SOME_SUPPRESSED\",\"warning\":\"Some of the recipients have been suppressed.\",\"recipients\":[{\"email\":\"bcc@test-sdk.com\",\"name\":\"BCC Email\",\"reasons\":[\"blocklisted\"]}]}]}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdab33d8b38d0-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:06 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f366eea0254cd05351a"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestBulkSendStatus().json b/src/test/resources/fixtures/EmailSendTest_TestBulkSendStatus().json index 03927f9..aa3ebbb 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestBulkSendStatus().json +++ b/src/test/resources/fixtures/EmailSendTest_TestBulkSendStatus().json @@ -1 +1 @@ -{"37b5f50e96caf7fc67c73a1adb5f10d0423dafd7":{"body":"{\"data\":{\"id\":\"63189f33fad6a72e7b046337\",\"state\":\"queued\",\"total_recipients_count\":2,\"suppressed_recipients_count\":0,\"suppressed_recipients\":null,\"validation_errors_count\":0,\"validation_errors\":null,\"messages_id\":null,\"created_at\":\"2022-09-07T13:40:03.225000Z\",\"updated_at\":\"2022-09-07T13:40:03.225000Z\"}}","headers":{":status":["200"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa12ae8fd5e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:03 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"]},"statusCode":200},"8bea544a494d82e7caa837ef07dc6ae54aaa8e5a":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"63189f33fad6a72e7b046337\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda9ef84dfd5e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:03 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["10"],"x-ratelimit-remaining":["9"]},"statusCode":202}} \ No newline at end of file +{"37b5f50e96caf7fc67c73a1adb5f10d0423dafd7":{"body":"{\"data\":{\"id\":\"63189f33fad6a72e7b046337\",\"state\":\"queued\",\"total_recipients_count\":2,\"suppressed_recipients_count\":0,\"suppressed_recipients\":null,\"validation_errors_count\":0,\"validation_errors\":null,\"messages_id\":null,\"created_at\":\"2022-09-07T13:40:03.225000Z\",\"updated_at\":\"2022-09-07T13:40:03.225000Z\"}}","headers":{":status":["200"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa12ae8fd5e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:03 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"]},"statusCode":200},"8f0780761a780ae068a00da370e58cf5d23a6404":{"body":"{\"data\":{\"id\":\"66ab7dd85c94bed1378f8af0\",\"state\":\"queued\",\"total_recipients_count\":2,\"suppressed_recipients_count\":0,\"suppressed_recipients\":null,\"validation_errors_count\":0,\"validation_errors\":null,\"messages_id\":null,\"created_at\":\"2024-08-01T12:21:44.000000Z\",\"updated_at\":\"2024-08-01T12:21:44.000000Z\"}}","headers":{":status":["200"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca291a97eeb0-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:44 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"]},"statusCode":200},"4608d385c6f46ad4f9fbb8bc08f9d1e71e0faea0":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"66ab7dd85c94bed1378f8af0\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca266dc9eeb0-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:44 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"]},"statusCode":202},"8bea544a494d82e7caa837ef07dc6ae54aaa8e5a":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"63189f33fad6a72e7b046337\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda9ef84dfd5e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:03 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["10"],"x-ratelimit-remaining":["9"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestCcSend().json b/src/test/resources/fixtures/EmailSendTest_TestCcSend().json index 002c2aa..4b5cbaa 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestCcSend().json +++ b/src/test/resources/fixtures/EmailSendTest_TestCcSend().json @@ -1 +1 @@ -{"ec4d2d45acec574fe06fd7fe8fd5a135e10cce16":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaaa7bd938cb-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:40:05 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f35c55e2c48af0f453b"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["115"]},"statusCode":202}} \ No newline at end of file +{"15f5de7b423db5fa23acaaa01686aa62d58f5cfa":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca32094f7184-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Thu, 01 Aug 2024 12:21:46 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7dda5bd70b2cf6fc8995"]},"statusCode":202},"ec4d2d45acec574fe06fd7fe8fd5a135e10cce16":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaaa7bd938cb-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:40:05 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f35c55e2c48af0f453b"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["115"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestEmailWithAttachment().json b/src/test/resources/fixtures/EmailSendTest_TestEmailWithAttachment().json index 12a3e8c..b692dbd 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestEmailWithAttachment().json +++ b/src/test/resources/fixtures/EmailSendTest_TestEmailWithAttachment().json @@ -1 +1 @@ -{"50ed637b263854bc74bee8aaecd31258246e6a23":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa6cc12fd66-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:40:04 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f3455817566900b378c"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["116"]},"statusCode":202}} \ No newline at end of file +{"872ed332468f4b2427c07accf4e75f1353d64c4d":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca303f6738c9-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Thu, 01 Aug 2024 12:21:45 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7dd9cdde5c03b77e1432"]},"statusCode":202},"50ed637b263854bc74bee8aaecd31258246e6a23":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa6cc12fd66-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:40:04 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f3455817566900b378c"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["116"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestInvalidPersonalization().json b/src/test/resources/fixtures/EmailSendTest_TestInvalidPersonalization().json index 1c2a3cf..7ac61d8 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestInvalidPersonalization().json +++ b/src/test/resources/fixtures/EmailSendTest_TestInvalidPersonalization().json @@ -1 +1 @@ -{"8f2462980d8b8035a1db1929eaa80ea4e958a9b9":{"body":"{\"message\":\"The given data was invalid.\",\"errors\":{\"personalization.0.data\":[\"The personalization.0.data contains array keys with dot notation: invalid.pers2, invalid.pers1\"]}}","headers":{":status":["422"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda0b0bc86f41-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:39:39 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":422}} \ No newline at end of file +{"743ef742f69454cd1b3111206cdf5028be8037da":{"body":"{\"message\":\"The personalization.0.data contains array keys with dot notation: invalid.pers2, invalid.pers1\",\"errors\":{\"personalization.0.data\":[\"The personalization.0.data contains array keys with dot notation: invalid.pers2, invalid.pers1\"]}}","headers":{":status":["422"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca37fa346f5b-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:47 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"]},"statusCode":422},"8f2462980d8b8035a1db1929eaa80ea4e958a9b9":{"body":"{\"message\":\"The given data was invalid.\",\"errors\":{\"personalization.0.data\":[\"The personalization.0.data contains array keys with dot notation: invalid.pers2, invalid.pers1\"]}}","headers":{":status":["422"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda0b0bc86f41-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:39:39 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["118"]},"statusCode":422}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestInvalidTokenFailsWith401().json b/src/test/resources/fixtures/EmailSendTest_TestInvalidTokenFailsWith401().json index a8e42bc..15017cc 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestInvalidTokenFailsWith401().json +++ b/src/test/resources/fixtures/EmailSendTest_TestInvalidTokenFailsWith401().json @@ -1 +1 @@ -{"10a3065757d7356252bd3438f1f5cb8df6d0fea5":{"body":"{\"message\":\"Unauthenticated.\"}","headers":{":status":["401"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaadbade38d6-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:05 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["119"]},"statusCode":401}} \ No newline at end of file +{"10a3065757d7356252bd3438f1f5cb8df6d0fea5":{"body":"{\"message\":\"Unauthenticated.\"}","headers":{":status":["401"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaadbade38d6-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:05 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["119"]},"statusCode":401},"1a5ab7aa0d32d5b2ef7c1db6499d5231378569b8":{"body":"{\"message\":\"Unauthenticated.\"}","headers":{":status":["401"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca348a31eee8-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:46 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["119"]},"statusCode":401}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestPojoPersonalization().json b/src/test/resources/fixtures/EmailSendTest_TestPojoPersonalization().json index 7519f05..1c64f71 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestPojoPersonalization().json +++ b/src/test/resources/fixtures/EmailSendTest_TestPojoPersonalization().json @@ -1 +1 @@ -{"2f775788bba2e00bbec80a42fc8a02085ba438b3":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fd939c86c6f67-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:39:06 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189efa179486c438064c02"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["119"]},"statusCode":202}} \ No newline at end of file +{"aecc64b317fd47d52c358aa286b258f46daa7121":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca2aa8e7717c-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Thu, 01 Aug 2024 12:21:45 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7dd8141c1143f94c890e"]},"statusCode":202},"2f775788bba2e00bbec80a42fc8a02085ba438b3":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fd939c86c6f67-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:39:06 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189efa179486c438064c02"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["119"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestSendBulkEmail().json b/src/test/resources/fixtures/EmailSendTest_TestSendBulkEmail().json index 33e9bf9..8bab885 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestSendBulkEmail().json +++ b/src/test/resources/fixtures/EmailSendTest_TestSendBulkEmail().json @@ -1 +1 @@ -{"8bea544a494d82e7caa837ef07dc6ae54aaa8e5a":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"63189f3449a62b6d830a00ff\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa3cf196f6e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:04 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["10"],"x-ratelimit-remaining":["8"]},"statusCode":202}} \ No newline at end of file +{"4608d385c6f46ad4f9fbb8bc08f9d1e71e0faea0":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"66ab7dd9ef2d2c1378eec1a5\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca2d5ec66f55-ATH"],"content-type":["application/json"],"date":["Thu, 01 Aug 2024 12:21:45 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"]},"statusCode":202},"8bea544a494d82e7caa837ef07dc6ae54aaa8e5a":{"body":"{\"message\":\"The bulk email is being processed.\",\"bulk_email_id\":\"63189f3449a62b6d830a00ff\"}","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fdaa3cf196f6e-ATH"],"content-type":["application/json"],"date":["Wed, 07 Sep 2022 13:40:04 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-ratelimit-limit":["10"],"x-ratelimit-remaining":["8"]},"statusCode":202}} \ No newline at end of file diff --git a/src/test/resources/fixtures/EmailSendTest_TestSimpleSend().json b/src/test/resources/fixtures/EmailSendTest_TestSimpleSend().json index 29c7d81..4069716 100644 --- a/src/test/resources/fixtures/EmailSendTest_TestSimpleSend().json +++ b/src/test/resources/fixtures/EmailSendTest_TestSimpleSend().json @@ -1 +1 @@ -{"fae23397116fce941dad41106e3356ac6502a7a5":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda50c9af6f73-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:39:50 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f260a946e37f800f018"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["117"]},"statusCode":202}} \ No newline at end of file +{"fae23397116fce941dad41106e3356ac6502a7a5":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["746fda50c9af6f73-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Wed, 07 Sep 2022 13:39:50 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d15724800; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2022-09-08T00:00:00Z"],"x-message-id":["63189f260a946e37f800f018"],"x-ratelimit-limit":["120"],"x-ratelimit-remaining":["117"]},"statusCode":202},"c77fa05d778da4eaa4ce70abf8b47cce57cc59ca":{"body":"","headers":{":status":["202"],"cache-control":["no-cache, private"],"cf-cache-status":["DYNAMIC"],"cf-ray":["8ac5ca3b7a7dee8b-ATH"],"content-type":["text/html; charset\u003dUTF-8"],"date":["Thu, 01 Aug 2024 12:21:47 GMT"],"server":["cloudflare"],"strict-transport-security":["max-age\u003d31536000; includeSubDomains"],"x-apiquota-remaining":["-1"],"x-apiquota-reset":["2024-08-02T00:00:00Z"],"x-message-id":["66ab7ddb3d02e0f1d3a506d8"]},"statusCode":202}} \ No newline at end of file