kth-alimtalk 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 92576d90c537de122f3de9861d3802e0a4944cc0
4
- data.tar.gz: d89873bbd0c58d2e2db94dc71995d3ed4df493ac
3
+ metadata.gz: 8074e1226a9eff09609953e2aaf6224480180881
4
+ data.tar.gz: f12c3938c2c8cfa154291a9492f27bdb2511203c
5
5
  SHA512:
6
- metadata.gz: 838edb250967026203838dec1503faeb8c9f90ec10142aaf606cb55cf12728ba75f1c1b795d8e1a97a4d20f26a81775348582eb989e557966a7ae0a44a72b2fe
7
- data.tar.gz: bd8efd8bcf58ab8d5faacd1b1d45c3a70cefe6c3aba59bd79615f3e8ecf3c6bd1d195391e9dcf77d17143c72035487111601f871af1a4a3073b9245f6525fae3
6
+ metadata.gz: 0726c2f974dddacdade82e97bea58de8287dd86991ca73874c16a8287ee64531139c3b2920083f91a4fda3de8e325a5953f3fa465d0873e8720b9314d2e9a393
7
+ data.tar.gz: ef4e333e195b088cfc582e5c75553f82abd765d94433288e6d3ad8860b702af2783cae56008ad849ebaef358e592afb25709005e1abb59a2857e26421a29e7df
data/lib/kth/alimtalk.rb CHANGED
@@ -17,19 +17,19 @@ module Kth
17
17
  def send_message(phone_number, callback, msg, template_code, failed_type, options)
18
18
  request_url = "/kko/1/msg/#{client_id}"
19
19
  params = {
20
- 'PHONE' => phone_number,
21
- 'CALLBACK' => callback,
22
- 'MSG' => msg,
23
- 'TEMPLATE_CODE' => template_code,
24
- 'FAILED_TYPE' => failed_type
20
+ 'phone' => phone_number,
21
+ 'callback' => callback,
22
+ 'msg' => msg,
23
+ 'template_code' => template_code,
24
+ 'failed_type' => failed_type
25
25
  }
26
26
 
27
27
  if options.present?
28
- params['REQDATE'] = options['request_date'].strftime("%Y%m%d%H%M%S") if options['request_date']
29
- params['URL'] = options['url'] if options['url']
30
- params['URL_BUTTON_TXT'] = options['url_button_text'] if options['url_button_text']
31
- params['FAILED_SUBJECT'] = options['failed_subject'] if options['failed_subject']
32
- params['FAILED_MSG'] = options['failed_msg']
28
+ params['reqdate'] = options['request_date'].strftime("%Y%m%d%H%M%S") if options['request_date']
29
+ params['url'] = options['url'] if options['url']
30
+ params['url_button_text'] = options['url_button_text'] if options['url_button_text']
31
+ params['failed_subject'] = options['failed_subject'] if options['failed_subject']
32
+ params['failed_msg'] = options['failed_msg']
33
33
  end
34
34
 
35
35
  send_post_request request_url, params
@@ -84,19 +84,19 @@ module Kth
84
84
  def msg_test(phone_number, callback, msg, template_code, failed_type, options)
85
85
  request_url = "/kko/1/msg_test/#{client_id}"
86
86
  params = {
87
- 'PHONE' => phone_number,
88
- 'CALLBACK' => callback,
89
- 'MSG' => msg,
90
- 'TEMPLATE_CODE' => template_code,
91
- 'FAILED_TYPE' => failed_type
87
+ 'phone' => phone_number,
88
+ 'callback' => callback,
89
+ 'msg' => msg,
90
+ 'template_code' => template_code,
91
+ 'failed_type' => failed_type
92
92
  }
93
93
 
94
94
  if options.present?
95
- params['REQDATE'] = options['request_date'].strftime("%Y%m%d%H%M%S") if options['request_date']
96
- params['URL'] = options['url'] if options['url']
97
- params['URL_BUTTON_TXT'] = options['url_button_text'] if options['url_button_text']
98
- params['FAILED_SUBJECT'] = options['failed_subject'] if options['failed_subject']
99
- params['FAILED_MSG'] = options['failed_msg']
95
+ params['reqdate'] = options['request_date'].strftime("%Y%m%d%H%M%S") if options['request_date']
96
+ params['url'] = options['url'] if options['url']
97
+ params['url_button_text'] = options['url_button_text'] if options['url_button_text']
98
+ params['failed_subject'] = options['failed_subject'] if options['failed_subject']
99
+ params['failed_msg'] = options['failed_msg']
100
100
  end
101
101
 
102
102
  send_post_request request_url, params
@@ -1,5 +1,5 @@
1
1
  module Kth
2
2
  module Alimtalk
3
- VERSION = "0.1.8"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kth-alimtalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyoungwon Lee
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler