Class: EmailsClient
- Inherits:
-
Object
- Object
- EmailsClient
- Defined in:
- lib/lockstep_sdk/clients/emails.rb
Instance Method Summary collapse
-
#create_emails ⇒ Object
Creates one or more emails from the specified array of Email Models.
-
#delete_email(id:) ⇒ Object
Deletes the Email referred to by this unique identifier.
-
#initialize(lockstepsdk) ⇒ EmailsClient
constructor
Initialize the EmailsClient class with a lockstepsdk instance.
-
#query_emails(filter:, include_param:, order:, pageSize:, pageNumber:) ⇒ Object
Queries Emails on the Lockstep Platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_email(id:, include_param:) ⇒ Object
Retrieves the email with the specified email identifier.
-
#retrieve_email_logo(emailId:, nonce:) ⇒ Object
Retrieves a signature logo for the email with the specified identifier and increments 'ViewCount'.
-
#update_email(id:) ⇒ Object
Updates an existing Email with the information supplied to this PATCH call.
Constructor Details
#initialize(lockstepsdk) ⇒ EmailsClient
Initialize the EmailsClient class with a lockstepsdk instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 22 def initialize(lockstepsdk) @lockstepsdk = lockstepsdk end |
Instance Method Details
#create_emails ⇒ Object
Creates one or more emails from the specified array of Email Models
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
80 81 82 83 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 80 def create_emails() path = "/api/v1/Emails" @lockstepsdk.request(:post, path, body, nil) end |
#delete_email(id:) ⇒ Object
Deletes the Email referred to by this unique identifier.
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
58 59 60 61 62 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 58 def delete_email(id:) path = "/api/v1/Emails/#{id}" params = {} @lockstepsdk.request(:delete, path, nil, params) end |
#query_emails(filter:, include_param:, order:, pageSize:, pageNumber:) ⇒ Object
Queries Emails on the Lockstep Platform using the specified filtering, sorting, nested fetch, and pagination rules requested.
More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
96 97 98 99 100 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 96 def query_emails(filter:, include_param:, order:, pageSize:, pageNumber:) path = "/api/v1/Emails/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => pageSize, :pageNumber => pageNumber} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_email(id:, include_param:) ⇒ Object
Retrieves the email with the specified email identifier.
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
33 34 35 36 37 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 33 def retrieve_email(id:, include_param:) path = "/api/v1/Emails/#{id}" params = {:include => include_param} @lockstepsdk.request(:get, path, nil, params) end |
#retrieve_email_logo(emailId:, nonce:) ⇒ Object
Retrieves a signature logo for the email with the specified identifier and increments 'ViewCount'.
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
69 70 71 72 73 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 69 def retrieve_email_logo(emailId:, nonce:) path = "/api/v1/Emails/#{emailId}/logo/#{nonce}" params = {} @lockstepsdk.request(:get, path, nil, params) end |
#update_email(id:) ⇒ Object
Updates an existing Email with the information supplied to this PATCH call.
The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
An Email represents a communication sent from one company to another. The creator of the email is identified by the `CompanyId` field, recipient(s) by the `EmailTo` field, and cc recipient(s) by the 'EmailCC' field. The Email Model represents an email and a number of different metadata attributes related to the creation, storage, and ownership of the email.
47 48 49 50 51 |
# File 'lib/lockstep_sdk/clients/emails.rb', line 47 def update_email(id:) path = "/api/v1/Emails/#{id}" params = {} @lockstepsdk.request(:patch, path, body, params) end |