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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aa0a6d3a19753534e19441bc9bd6ac3e0dc1913d1a5dee660d629367ea85dd4
4
- data.tar.gz: b760674b646a232fa7a0d6e6c844fef4488cd4fd582496f6380c3eaee861e520
3
+ metadata.gz: ba933202a1dfa0c6f3ceb4c368a9464fadf69e515123ef2799b543bbd05f0ab4
4
+ data.tar.gz: 2e92cb7452ba11d8c35630291c204ec3b2c6c960ca1d237a435a1c33105bf0d5
5
5
  SHA512:
6
- metadata.gz: 10593571a7496c3669361bc56bcdab4fe2e7075ab2a743b08e860894721b288c31d042a9c8f433122385373523a948b8cd53d78fc8cf374f314868708dbfef9e
7
- data.tar.gz: 10ab2c60a4f94ce96e8da05a0b1d71205051c9655005948a7cf9b4ec08e9a42e775cbb2ce3dbebd440f4c4542754dd41ffa818a50c824d5d4314777589ea69e9
6
+ metadata.gz: d8003252e3acca422ccf95b1e280ad87cb2c6fd32f8c6bb8c599823fa6aceaae4f7e1913c0033dd34700caaa1ae89b346959b8d56343c447f5acdb922cada589
7
+ data.tar.gz: a20da50f07aac17fc2d632246033f09f57a891593b7eb54124728906246e78fc348d22e394a5d928f81e720ac9cdc9497843098041046edf38cf2937efa39a5a
@@ -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.
@@ -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|The message is queued to be sent to the provider. The notification usually remains in this state for a few seconds.|
449
- |Sending|The message is queued to be sent by the provider to the recipient, and GOV.UK Notify is waiting for delivery information.|
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 was unable to deliver message, email or phone number does not exist; remove this recipient from your list"<br>- `temporary-failure` - "The provider was unable to deliver message, email inbox was full or phone was turned off; you can try to send the message again"<br>- `technical-failure` - "Notify had a technical failure; you can try to send the message again"|
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 text message was delivered internationally. This only applies to text messages sent to non-UK phone numbers. GOV.UK Notify may not receive additional status updates depending on the recipient's country and telecoms provider.|
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 is printing and posting the letter.|
466
- |Received|The provider has received the letter to deliver.|
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 is not yet complete.|
473
- |Virus scan failed|GOV.UK Notify virus scan has identified a potential virus in the precompiled letter file.|
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
- |`created` |The message is queued to be sent to the provider|Yes|Yes||
570
- |`sending` |The message is queued to be sent by the provider to the recipient|Yes|Yes||
571
- |`delivered`|The message was successfully delivered|Yes|Yes||
572
- |`pending`|GOV.UK Notify received a callback from the provider but the device has not yet responded|Yes|||
573
- |`sent`|The text message was delivered internationally|Yes|Yes||
574
- |`failed`|This returns all failure statuses:<br>- `permanent-failure`<br>- `temporary-failure`<br>- `technical-failure`|Yes|Yes||
575
- |`permanent-failure`|The provider was unable to deliver message, email or phone number does not exist; remove this recipient from your list|Yes|Yes||
576
- |`temporary-failure`|The provider was unable to deliver message, email inbox was full or phone was turned off; you can try to send the message again|Yes|Yes||
577
- |`technical-failure`|Email / Text: Notify had a technical failure; you can try to send the message again. <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||
578
- |`accepted`|Notify is printing and posting the letter|||Yes|
579
- |`received`|The provider has received the letter to deliver|||Yes|
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
 
@@ -246,7 +246,8 @@ def expected_fields_in_template_preview
246
246
  %w(id
247
247
  body
248
248
  version
249
- type)
249
+ type
250
+ html)
250
251
  end
251
252
 
252
253
  def expected_fields_in_notification_response
@@ -7,6 +7,7 @@ module Notifications
7
7
  body
8
8
  subject
9
9
  type
10
+ html
10
11
  ).freeze
11
12
 
12
13
  attr_reader(*FIELDS)
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Notifications
11
11
  class Client
12
- VERSION = "3.0.0".freeze
12
+ VERSION = "3.1.0".freeze
13
13
  end
14
14
  end
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.0.0
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-06 00:00:00.000000000 Z
11
+ date: 2019-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt