Skip to content

Commit e344e01

Browse files
authored
Merge pull request #73 from sendwithus/remove-unused-methods
Remove unused methods and tidy up README
2 parents e97eb6f + 0edd28c commit e344e01

File tree

4 files changed

+19
-29
lines changed

4 files changed

+19
-29
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
4.0.1 - Remove unused methods
12
4.0.0 - Deprecate Logs List API endpoint
23
3.1.0 - Add `strict` option to the render call
34
3.0.0 - Deprecate and remove Conversions API calls

README.md

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ begin
150150
],
151151
files: ['path/to/attachment.txt'],
152152
esp_account: 'esp_MYESPACCOUNT',
153-
version: 'v2',
153+
version_name: 'v2',
154154
tags: ['tag1', 'tag2'],
155155
locale: 'en-US')
156156
puts result
@@ -214,6 +214,7 @@ end
214214
```
215215

216216
### Remove Customer from Drip Campaign
217+
217218
```ruby
218219
require 'rubygems'
219220
require 'send_with_us'
@@ -285,23 +286,9 @@ result = obj.customer_create("visha@example.com")
285286
result = obj.customer_delete("visha@example.com")
286287
```
287288

288-
### Get logs for customer
289-
This will retrieve email logs for a customer.
290-
291-
Optional Arguments:
292-
- **count** – The number of logs to return. _Max: 100, Default: 100._
293-
- **created_gt** – Return logs created strictly after the given UTC timestamp.
294-
- **created_lt** – Return logs created strictly before the given UTC timestamp.
295-
296-
297-
```ruby
298-
obj.customer_email_log('customer@example.com', count: 1)
299-
```
300-
301289
## Templates
302290

303291
```ruby
304-
305292
# List Templates
306293
obj.list_templates() # Alternatively, obj.emails()
307294

@@ -314,12 +301,14 @@ obj.delete_template(template_id)
314301
# List Template Versions
315302
obj.list_template_versions(template_id)
316303

304+
# Get Template Version
305+
obj.get_template_version(template_id, version_id)
306+
317307
# Update Template Version
318308
obj.update_template_version(template_id, version_id, name, subject, html, text)
319309

320310
# Create Template Version
321311
obj.create_template_version(template_id, name, subject, html, text)
322-
323312
```
324313

325314

@@ -353,16 +342,24 @@ Take a look at our Mailer that you can use similarly to ActionMailer
353342

354343
## Logs
355344

345+
### Get single log
346+
347+
Used to get the details for a single log. The log ID can be obtained by recording the `receipt_id` value returned from the `send` call.
348+
349+
```ruby
350+
obj.log('log_sld7xWJ3isc23-3')
351+
```
352+
353+
### Get logs for customer
354+
This will retrieve email logs for a customer.
355+
356356
Optional Arguments:
357357
- **count** – The number of logs to return. _Max: 100, Default: 100._
358-
- **offset** – Offset the number of logs to return. _Default: 0_
359358
- **created_gt** – Return logs created strictly after the given UTC timestamp.
360-
- **created_gte** – Return logs created on or after the given UTC timestamp.
361359
- **created_lt** – Return logs created strictly before the given UTC timestamp.
362-
- **created_lte** – Return logs created on or before the given UTC timestamp.
363360

364361
```ruby
365-
obj.logs(count: 1, offset: 1)
362+
obj.customer_email_log('customer@example.com', count: 1)
366363
```
367364

368365
## Errors

lib/send_with_us/api.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,6 @@ def drip_campaign_details(drip_campaign_id)
214214
SendWithUs::ApiRequest.new(@configuration).get("drip_campaigns/#{drip_campaign_id}")
215215
end
216216

217-
def list_customers_on_campaign(drip_campaign_id)
218-
SendWithUs::ApiRequest.new(@configuration).get("drip_campaigns/#{drip_campaign_id}/customers")
219-
end
220-
221-
def list_customers_on_campaign_step(drip_campaign_id, drip_campaign_step_id)
222-
SendWithUs::ApiRequest.new(@configuration).get("drip_campaigns/#{drip_campaign_id}/step/#{drip_campaign_step_id}/customers")
223-
end
224-
225217
def customer_get(email)
226218
SendWithUs::ApiRequest.new(@configuration).get("customers/#{email}")
227219
end

lib/send_with_us/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module SendWithUs
2-
VERSION = '3.1.0'
2+
VERSION = '4.0.1'
33
end

0 commit comments

Comments
 (0)