blastengine 0.6.0 → 0.6.2

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: 6ba1cbb4d5e111cb6b99560d4dfeb7b306a454781c5b0371693054e5840d47f3
4
- data.tar.gz: 97eb8e49ae1f518f4c6524567e46e24ec29dec6f691c2879a4d21888845f73a9
3
+ metadata.gz: 126d3a382aa2b4d8f8993bcb3b7c553d9103a8fa8f5839b3eebf0531bc1ca82a
4
+ data.tar.gz: 68cb8fd128c3583cfd4656f7eb8e78cb85309728edca64c71be1748d676ba80b
5
5
  SHA512:
6
- metadata.gz: 0ac46c3d7d838628150e818cf674768d5a04a7f29b59b21c7a419549d1c3ce0316b59cb69e50089121328d44df93e60bcfa570b16af833311e59f855c23839b0
7
- data.tar.gz: 025c7107e6d154debe100b3010f6593fd2585e41ad83021cacfe4d6ca83fbe70ddc3c6126760d18a87ca8a8382d6e05b1195bfd582704f5f79a79abe58ccc2c2
6
+ metadata.gz: a897b4db612916980a305b4800abaa7bb6ff29ebd182a4be048e9d032b97ad309327aebc49fb606f48d31c376948626df215f6cd0038249fc63366e8b5fed4e2
7
+ data.tar.gz: c33c739312e078c5d7aedccd50ddd90b7dbb42f895b8dc1288636fc3d80d288a2a04ae689e43508ade2ed8fe6e2f5cf19aef2053e3ffdd5d92526e68152ccbb0
@@ -96,6 +96,17 @@ module Blastengine
96
96
  @html_part = res["html_part"]
97
97
  end
98
98
 
99
+ #
100
+ # メール送信のキャンセル
101
+ #
102
+ def cancel
103
+ # APIリクエスト用のパス
104
+ path = "/deliveries/#{@delivery_id}/cancel"
105
+ # API実行
106
+ res = @@client.patch path, {}
107
+ return res["delivery_id"]
108
+ end
109
+
99
110
  #
100
111
  # バルクメールの削除
101
112
  #
@@ -144,14 +144,6 @@ module Blastengine
144
144
  return res["delivery_id"]
145
145
  end
146
146
 
147
- def cancel
148
- # APIリクエスト用のパス
149
- path = "/deliveries/#{@delivery_id}/cancel"
150
- # API実行
151
- res = @@client.patch path, {}
152
- return res["delivery_id"]
153
- end
154
-
155
147
  def import(file, ignore_errors = false)
156
148
  # APIリクエスト用のパス
157
149
  path = "/deliveries/#{@delivery_id}/emails/import"
@@ -42,7 +42,7 @@ module Blastengine
42
42
  raise "CC or BCC is not supported when sending at a specified time." if date != nil
43
43
  raise "CC or BCC is not supported when sending to multiple recipients." if @to.size > 1
44
44
  end
45
- if date != nil || @to.size == 1
45
+ if date == nil
46
46
  return self.sendTransaction();
47
47
  end
48
48
  return self.sendBulk(date)
@@ -108,5 +108,19 @@ module Blastengine
108
108
  res = Mail.client.get url
109
109
  return res['data'].map {|params| Mail.from_hash params }
110
110
  end
111
+
112
+ def self.all(params = {})
113
+ Hash[ params.map{|k,v| [k.to_sym, v] } ]
114
+ if params[:delivery_start] != nil
115
+ params[:delivery_start] = params[:delivery_start].iso8601
116
+ end
117
+ if params[:delivery_end] != nil
118
+ params[:delivery_end] = params[:delivery_end].iso8601
119
+ end
120
+ query_string = URI.encode_www_form(params)
121
+ url = "/deliveries/all?#{query_string}";
122
+ res = Mail.client.get url
123
+ return res['data'].map {|params| Mail.from_hash params }
124
+ end
111
125
  end
112
126
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Blastengine
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blastengine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Atsushi Nakatsugawa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-05 00:00:00.000000000 Z
11
+ date: 2024-04-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a SDK for sending email by blastengine.
14
14
  email: