notifications-ruby-client 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/DOCUMENTATION.md +27 -22
- data/bin/test_client.rb +2 -1
- data/lib/notifications/client/template_preview.rb +1 -0
- data/lib/notifications/client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba933202a1dfa0c6f3ceb4c368a9464fadf69e515123ef2799b543bbd05f0ab4
|
4
|
+
data.tar.gz: 2e92cb7452ba11d8c35630291c204ec3b2c6c960ca1d237a435a1c33105bf0d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8003252e3acca422ccf95b1e280ad87cb2c6fd32f8c6bb8c599823fa6aceaae4f7e1913c0033dd34700caaa1ae89b346959b8d56343c447f5acdb922cada589
|
7
|
+
data.tar.gz: a20da50f07aac17fc2d632246033f09f57a891593b7eb54124728906246e78fc348d22e394a5d928f81e720ac9cdc9497843098041046edf38cf2937efa39a5a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## 3.1.0
|
2
|
+
|
3
|
+
* Added `html` field to the TemplatePreview response, so users can see
|
4
|
+
the rendered HTML of their email templates.
|
5
|
+
|
1
6
|
## 3.0.0
|
2
7
|
|
3
8
|
* Changed response class for `send_precompiled_letter` request from `ResponseNotification` to a new response class: `ResponsePrecompiledLetter`. This may affect users sending precompiled letters.
|
data/DOCUMENTATION.md
CHANGED
@@ -445,32 +445,33 @@ You can only get the status of messages that are 7 days old or newer.
|
|
445
445
|
|
446
446
|
|Status|Information|
|
447
447
|
|:---|:---|
|
448
|
-
|Created|
|
449
|
-
|Sending|
|
448
|
+
|Created|GOV.UK Notify has placed the message in a queue, ready to be sent to the provider. It should only remain in this state for a few seconds.|
|
449
|
+
|Sending|GOV.UK Notify has sent the message to the provider. The provider will try to deliver the message to the recipient. GOV.UK Notify is waiting for delivery information.|
|
450
450
|
|Delivered|The message was successfully delivered.|
|
451
|
-
|Failed|This covers all failure statuses:<br>- `permanent-failure` - "The provider
|
451
|
+
|Failed|This covers all failure statuses:<br>- `permanent-failure` - "The provider could not deliver the message because the email address or phone number was wrong. You should remove these email addresses or phone numbers from your database. You’ll still be charged for text messages to numbers that do not exist."<br>- `temporary-failure` - "The provider could not deliver the message after trying for 72 hours. This can happen when the recipient's inbox is full or their phone is off. You can try to send the message again. You’ll still be charged for text messages to phones that are not accepting messages."<br>- `technical-failure` - "Your message was not sent because there was a problem between Notify and the provider.<br>You’ll have to try sending your messages again. You will not be charged for text messages that are affected by a technical failure."|
|
452
452
|
|
453
453
|
## Status - text only
|
454
454
|
|
455
455
|
|Status|Information|
|
456
456
|
|:---|:---|
|
457
|
-
|Pending|GOV.UK Notify received a callback from the provider but the device has not yet responded. Another callback from the provider determines the final status of the notification.|
|
458
|
-
|Sent|The
|
457
|
+
|Pending|GOV.UK Notify is waiting for more delivery information.<br>GOV.UK Notify received a callback from the provider but the recipient's device has not yet responded. Another callback from the provider determines the final status of the notification.|
|
458
|
+
|Sent / Sent internationally|The message was sent to an international number. The mobile networks in some countries do not provide any more delivery information. The GOV.UK Notify client API returns this status as `sent`. The GOV.UK Notify client app returns this status as `Sent internationally`.|
|
459
459
|
|
460
460
|
## Status - letter
|
461
461
|
|
462
462
|
|Status|information|
|
463
463
|
|:---|:---|
|
464
464
|
|Failed|The only failure status that applies to letters is `technical-failure`. GOV.UK Notify had an unexpected error while sending to our printing provider.|
|
465
|
-
|Accepted|GOV.UK Notify
|
466
|
-
|Received|The provider has
|
465
|
+
|Accepted|GOV.UK Notify has sent the letter to the provider to be printed.|
|
466
|
+
|Received|The provider has printed and dispatched the letter.|
|
467
467
|
|
468
468
|
## Status - precompiled letter
|
469
469
|
|
470
470
|
|Status|information|
|
471
471
|
|:---|:---|
|
472
|
-
|Pending virus check|GOV.UK Notify virus scan of the precompiled letter file
|
473
|
-
|Virus scan failed|GOV.UK Notify
|
472
|
+
|Pending virus check|GOV.UK Notify has not completed a virus scan of the precompiled letter file.|
|
473
|
+
|Virus scan failed|GOV.UK Notify found a potential virus in the precompiled letter file.|
|
474
|
+
|Validation failed|Content in the precompiled letter file is outside the printable area.|
|
474
475
|
|
475
476
|
## Get the status of one message
|
476
477
|
|
@@ -564,19 +565,22 @@ You can leave out these arguments to ignore these filters.
|
|
564
565
|
|
565
566
|
#### status (optional)
|
566
567
|
|
567
|
-
| status | description | text | email | letter |
|
568
|
-
|:--- |:--- |:--- |:--- |:--- |
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
568
|
+
| status | description | text | email | letter |Precompiled letter|
|
569
|
+
|:--- |:--- |:--- |:--- |:--- |:--- |
|
570
|
+
|created|GOV.UK Notify has placed the message in a queue, ready to be sent to the provider. It should only remain in this state for a few seconds.|Yes|Yes|||
|
571
|
+
|sending|GOV.UK Notify has sent the message to the provider. The provider will try to deliver the message to the recipient. GOV.UK Notify is waiting for delivery information.|Yes|Yes|||
|
572
|
+
|delivered|The message was successfully delivered|Yes|Yes|||
|
573
|
+
|sent / sent internationally|The message was sent to an international number. The mobile networks in some countries do not provide any more delivery information.|Yes||||
|
574
|
+
|pending|GOV.UK Notify is waiting for more delivery information.<br>GOV.UK Notify received a callback from the provider but the recipient's device has not yet responded. Another callback from the provider determines the final status of the notification.|Yes||||
|
575
|
+
|failed|This returns all failure statuses:<br>- permanent-failure<br>- temporary-failure<br>- technical-failure|Yes|Yes|||
|
576
|
+
|permanent-failure|The provider could not deliver the message because the email address or phone number was wrong. You should remove these email addresses or phone numbers from your database. You’ll still be charged for text messages to numbers that do not exist.|Yes|Yes|||
|
577
|
+
|temporary-failure|The provider could not deliver the message after trying for 72 hours. This can happen when the recipient's inbox is full or their phone is off. You can try to send the message again. You’ll still be charged for text messages to phones that are not accepting messages.|Yes|Yes|||
|
578
|
+
|technical-failure|Email / Text: Your message was not sent because there was a problem between Notify and the provider.<br>You’ll have to try sending your messages again. You will not be charged for text messages that are affected by a technical failure. <br><br>Letter: Notify had an unexpected error while sending to our printing provider. <br><br>You can leave out this argument to ignore this filter.|Yes|Yes|||
|
579
|
+
|accepted|GOV.UK Notify has sent the letter to the provider to be printed.|||Yes||
|
580
|
+
|received|The provider has printed and dispatched the letter.|||Yes||
|
581
|
+
|pending-virus-check|GOV.UK Notify is scanning the precompiled letter file for viruses.||||Yes|
|
582
|
+
|virus-scan-failed|GOV.UK Notify found a potential virus in the precompiled letter file.||||Yes|
|
583
|
+
|validation-failed|Content in the precompiled letter file is outside the printable area.||||Yes|
|
580
584
|
|
581
585
|
#### templateType (optional)
|
582
586
|
|
@@ -858,6 +862,7 @@ You can then call different methods on this object to return the requested infor
|
|
858
862
|
|`response.body`|Template content|String|
|
859
863
|
|`response.subject`|Template subject (email and letter)|String|
|
860
864
|
|`response.type`|Template type (sms/email/letter)|String|
|
865
|
+
|`response.html`|Body as rendered HTML (email only)|String|
|
861
866
|
|
862
867
|
### Error codes
|
863
868
|
|
data/bin/test_client.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifications-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Government Digital Service
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-02-
|
11
|
+
date: 2019-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|