mitake_api 0.0.7 → 0.0.10

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: 43a265f351e7f06d316f8433346ddb2f93a77f6d3b1674cf3caedd2387d5a191
4
- data.tar.gz: 7a38894b71f645542fd46151f49968684e80b4a683d2f6dbe4b85912f7d653a6
3
+ metadata.gz: a5fbf3400b6875274c994d4577ba3c06feda91edf8f954f2c6aea293b36b6fff
4
+ data.tar.gz: 67197ddd5ca48b73616f53ded5e93c3722198d0439ea5b152aa6080838f5a262
5
5
  SHA512:
6
- metadata.gz: 5691bebe88b9ce379f0b50dfeb485b14f2ce34580ad6daaeff558007b2b4890d003d53acf27638104e361927b00a8a04955e926af9193a656f73f7118d4346b7
7
- data.tar.gz: ff4ab3a1a9f18513a001200504f49e1cc957e9ca9bbf564c050c9507c1731cca67095ced8110e6912ba21b62c8f4fd855376b241adc2040fc90bda807517f2b3
6
+ metadata.gz: 659db976dba4e5541777173d1e00d0acd66d0c05d3f3071c619c0e2fe6656ec66bcb02ff1a4faf269dc18ba7f2ab531a1807bcf4de77420754d7495ec2ed4a69
7
+ data.tar.gz: 471ccab8cc9ab1bd203f76a1f3a0e3b0cc7281d817caf2eae827a7b68c1e8b30e3f14caca9c97ada0a5b27c5639498b85a031271e702924c13422ca110e4b933
@@ -9,6 +9,7 @@ module MitakeApi
9
9
  @username = settings[:username]
10
10
  @password = settings[:password]
11
11
  @charset = settings[:charset] || 'UTF8'
12
+ @callback_url = settings[:callback_url]
12
13
  @url = "https://#{settings[:url]&.gsub(%r{https?://}, '')}"
13
14
  end
14
15
 
@@ -33,7 +34,8 @@ module MitakeApi
33
34
  def credentials
34
35
  {
35
36
  username: @username,
36
- password: @password
37
+ password: @password,
38
+ response: @callback_url
37
39
  }
38
40
  end
39
41
  end
@@ -29,7 +29,7 @@ module MitakeApi
29
29
  def to_h
30
30
  {
31
31
  dstaddr: message.to,
32
- dlvtime: message.deliver_at || '',
32
+ dlvtime: message.deliver_at.try(:strftime, '%Y%m%d%H%M%S') || '',
33
33
  smbody: message.content,
34
34
  clientid: message.uuid
35
35
  }
@@ -12,7 +12,7 @@ module MitakeApi
12
12
 
13
13
  def deliver!(message)
14
14
  @message = message
15
- client = Client.new(url: @url, username: @username, password: @password)
15
+ client = Client.new(url: @url, username: @username, password: @password, callback_url: @callback_url)
16
16
  client.send_message(message)
17
17
  end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module MitakeApi
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.10'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mitake_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Li
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday