README.md in notifications-ruby-client-2.6.0 vs README.md in notifications-ruby-client-2.7.0

- old
+ new

@@ -366,27 +366,30 @@ <summary> Click here to expand for more information. </summary> ```ruby -notification.id # => uuid for the notification -notification.to # => recipient email address or mobile number -notification.status # => status of the message "created|pending|sent|delivered|permanent-failure|temporary-failure" -notification.created_at # => Date time the message was created -notification.api_key # => uuid for the api key (not the actual api key) -notification.billable_units # => units billable or nil for email -notification.subject # => Subject of email or nil for sms -notification.body # => Body of message -notification.job # => job id if created by a csv or nil if message sent via api -notification.notification_type # => sms | email -notification.service # => uuid for service -notification.sent_at # => Date time the message is sent to the provider or nil if status = "created" -notification.sent_by # => Name of the provider that sent the message or nil if status = "created" -notification.template # => Hash containing template id, name, version, template type sms|email -notification.template_version # Template version number -notification.reference # => reference of the email or nil for sms -notification.updated_at # => Date time that the notification was last updated +notification.id # => uuid for the notification +notification.reference # => reference string you supplied in the request +notification.email_address # => email address of the recipient (for email notifications) +notification.phone_number # => phone number of the recipient (for SMS notifications) +notification.line_1 # => line 1 of the address of the recipient (for letter notifications) +notification.line_2 # => line 2 of the address of the recipient (for letter notifications) +notification.line_3 # => line 3 of the address of the recipient (for letter notifications) +notification.line_4 # => line 4 of the address of the recipient (for letter notifications) +notification.line_5 # => line 5 of the address of the recipient (for letter notifications) +notification.line_6 # => line 6 of the address of the recipient (for letter notifications) +notification.postcode # => postcode of the recipient (for letter notifications) +notification.type # => type of notification sent (sms, email or letter) +notification.status # => notification status (sending / delivered / permanent-failure / temporary-failure / technical-failure) +notification.template # => uuid of the template +notification.body # => body of the notification +notification.subject # => the subject of the notification (email notifications only) +notification.sent_at # => date and time the notification was sent to the provider +notification.created_at # => date and time the notification was created +notification.completed_at # => date and time the notification was delivered or failed +notification.created_by_name # => name of the person who sent the notification if sent manually ``` Otherwise a `Notification::Client::RequestError` is raised |`error.code`|`error.message`| |:---|:---| @@ -406,22 +409,23 @@ The ID of the notification. </details> -## Get the status of the all messages +## Get the status of all messages #### Method <details> <summary> Click here to expand for more information. </summary> ```ruby # See section below for a description of the arguments. -# This will return 250 of the most recent messages if `older_than` is omitted, the following 250 messages can be accessed through the hash `notifications.links["next"]` +# This will return 250 of the most recent messages over the last 7 days, if `older_than` is omitted. +# The following 250 messages can be accessed through the hash `notifications.links["next"]` args = { 'template_type' => 'sms', 'status' => 'failed', 'reference' => 'your reference string' 'older_than' => 'e194efd1-c34d-49c9-9915-e4267e01e92e' # => Notifications::Client::Notification @@ -465,17 +469,10 @@ Click here to expand for more information. </summary> ##### `template_type` -<details> -<summary> -Click here to expand for more information. -</summary> - -##### `template_type` - If omitted all messages are returned. Otherwise you can filter by: * `email` * `sms` * `letter` @@ -684,17 +681,13 @@ * `email` * `sms` * `letter` - </details> -</details> - - ## Generate a preview template #### Method This will return the contents of a template with the placeholders replaced with the given personalisation. @@ -726,10 +719,11 @@ ```Ruby template.id # => uuid for the template template.version # => version of the template template.body # => content of the template template.subject # => subject for email templates, will be empty for other template types +template.type # => type of notification the template is for (sms, email or letter) ``` Otherwise a `Notifications::Client::RequestError` is thrown. |`error.code`|`error.message`| |:---|:---| @@ -762,10 +756,11 @@ Click here to expand for more information. </summary> ```ruby # See section below for a description of the arguments. -# This will return 250 of the most recent messages if `older_than` is omitted, the following 250 messages can be accessed through the hash `received_texts.links["next"]` +# This will return 250 of the most recent messages over the last 7 days, if `older_than` is omitted. +# The following 250 messages can be accessed through the hash `received_texts.links["next"]` args = { 'older_than' => 'e194efd1-c34d-49c9-9915-e4267e01e92e' # => Notifications::Client::ReceivedText } received_texts = client.get_received_texts(args) ```