mitake_sms 1.5.3 → 1.6.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
  SHA256:
3
- metadata.gz: 69819e16435ee76e99640024557815e7ad6a9854c4bcdcea982b0fcd330c85e3
4
- data.tar.gz: fdb94f92929b03ca298d86ea6babaa38910bf266c6bfb8870f281ababa773068
3
+ metadata.gz: c363dc8dd6553a342f2e38afb125c68e77f9312dcb804ca067b12d828ea33a23
4
+ data.tar.gz: 2232bcf3e90cbcd41b3933d1e56df41934a88fba3fe03c6c8dc41ddebc7e0a15
5
5
  SHA512:
6
- metadata.gz: c6ecaef16af836d259dbcdc16e0a34d02fd3a1a5705803827bcef72c70ebc0639502a1eff273182205f1e141200cd307e01550903aec4a52ef9979eed767e452
7
- data.tar.gz: 93f2a41050e17e6c4f2abcede74f4a3877252e20533a89d7612c39ee39bdf381408da0a214218f31f4b581e466f268085e28f3824ba4008896cc280a1d869ef2
6
+ metadata.gz: 86ff828f6173002ae80d1a3db3da9f26cf711136026bf7492102e09f63ecb58aa6478d6b0afb22dae8455ae8ff697a3c65f282b2e8a5affc18c1d4c6cd3ca38a
7
+ data.tar.gz: 539afb9e3ea2adb46591fe17d36e0850d1d0aa8769636efaadb414d980ca57049234ac19f98d99f0e94ec925018845272c9d4adcf1219df26071601c99ae5b03
data/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.6.0] - 2025-05-25
11
+ ### Added
12
+ - Added `destname` parameter to `send_sms` method for recipient name or system integration key value
13
+ - Added tests for the new `destname` parameter
14
+
10
15
  ## [1.5.3] - 2025-05-25
11
16
  ### Changed
12
17
  - Updated the default API URL to `https://smsapi.mitake.com.tw/api/mtk/`
data/README.md CHANGED
@@ -68,6 +68,7 @@ end
68
68
  response = MitakeSms.send_sms(
69
69
  to: '0912345678',
70
70
  text: 'Hello with options!',
71
+ destname: 'John Doe', # Recipient name or integration key value
71
72
  response_url: 'https://your-callback-url.com/delivery-reports',
72
73
  client_id: 'your-client-reference-id',
73
74
  charset: 'BIG5' # Override the default UTF-8 encoding if needed
@@ -22,16 +22,18 @@ module MitakeSms
22
22
  # Send a single SMS
23
23
  # @param to [String] recipient phone number
24
24
  # @param text [String] message content
25
+ # @param destname [String] recipient name or key value for system integration (optional)
25
26
  # @param response_url [String] callback URL for delivery reports (optional)
26
27
  # @param client_id [String] client reference ID (optional)
27
28
  # @param charset [String] character encoding, defaults to 'UTF8' (optional)
28
29
  # @param options [Hash] additional options (optional)
29
30
  # @return [MitakeSms::Response] response object
30
- def send_sms(to:, text:, response_url: nil, client_id: nil, charset: 'UTF8', **options)
31
+ def send_sms(to:, text:, destname: nil, response_url: nil, client_id: nil, charset: 'UTF8', **options)
31
32
  require 'uri'
32
33
 
33
34
  # Create options hash with only non-nil values
34
35
  param_options = {}
36
+ param_options[:destname] = destname if destname
35
37
  param_options[:response_url] = response_url if response_url
36
38
  param_options[:client_id] = client_id if client_id
37
39
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MitakeSms
4
- VERSION = "1.5.3"
4
+ VERSION = "1.6.0"
5
5
  end
data/lib/mitake_sms.rb CHANGED
@@ -38,16 +38,18 @@ module MitakeSms
38
38
  # Send a single SMS message
39
39
  # @param to [String] recipient phone number
40
40
  # @param text [String] message content
41
+ # @param destname [String] recipient name or key value for system integration (optional)
41
42
  # @param response_url [String] callback URL for delivery reports (optional)
42
43
  # @param client_id [String] client reference ID (optional)
43
44
  # @param charset [String] character encoding, defaults to 'UTF8' (optional)
44
45
  # @param options [Hash] additional options (optional)
45
46
  # @return [MitakeSms::Response] response object
46
- def send_sms(to:, text:, response_url: nil, client_id: nil, charset: 'UTF8', **options)
47
+ def send_sms(to:, text:, destname: nil, response_url: nil, client_id: nil, charset: 'UTF8', **options)
47
48
  # Forward all parameters to the client method using named parameters
48
49
  client.send_sms(
49
50
  to: to,
50
51
  text: text,
52
+ destname: destname,
51
53
  response_url: response_url,
52
54
  client_id: client_id,
53
55
  charset: charset,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mitake_sms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zac