bizm 2.2.1 → 2.3.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/bizm.rb +6 -4
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56be1cc39cdc4efc9bf57042290cd56d417748df23f51301cbaadbd2d718bfd6
4
- data.tar.gz: 1d7e58fc7c5dd1ffb323926d7b02a3cbbb3247da8ad200c5bc3a4378358b1c2b
3
+ metadata.gz: 6f5f4d5a6ef908cdc6b348cd823f145b2e979331ecc50ac8f99bf682cc6614b0
4
+ data.tar.gz: 02c1e7867ff618b41d582dd4b69539173841f6be2e7bdcb21bb87706e779ca70
5
5
  SHA512:
6
- metadata.gz: b4aa57a0c8df1af0316b3835e0eb8914b90e30f524320d61aedbdcfe0a98c42cedfcf41a3c4814bf706a48df5be030c43fe7755e0da393761c3b854a85666d0e
7
- data.tar.gz: 67d81f61998ad20b8af29a0de163906ce09e576ad386eba62c80619a6e819e371793c1425f7cd01ef5746696caaeface3351c33edbe523d722f91f1bbe04b318
6
+ metadata.gz: e3326d52b6620d118b82943f417b41869709e15aca126845435fa204f15f91fe2fc339822169a86415a2036d9e38ccdcd1954a76344c49e58732e5f7c84247c5
7
+ data.tar.gz: 94f33b4d2a0cdc3c77fd9f5f3dca0fff6d1cbd26ff1a29e8ecc64560b3fdbe2091e3fb79bfbce45c4cde8180cac929ac3494597e74786fbfd065d0df3ab2b909
data/lib/bizm.rb CHANGED
@@ -44,11 +44,14 @@ class BizM
44
44
  end
45
45
 
46
46
  buttons.each_with_index do |button, index|
47
- data["button#{index + 1}".to_sym] = {
47
+ button_data = {
48
48
  name: button[:name],
49
49
  type: 'WL',
50
- url_mobile: button[:url]
50
+ url_mobile: button[:url],
51
51
  }
52
+ button_data.merge!(url_pc: button[:url_pc]) if button[:url_pc].present?
53
+
54
+ data["button#{index + 1}".to_sym] = button_data
52
55
  end
53
56
 
54
57
  if msg_sms && sms_sender
@@ -74,7 +77,6 @@ class BizM
74
77
  uri = URI.parse('https://alimtalk-api.bizmsg.kr/v2/sender/cancel_reserved')
75
78
 
76
79
  header = {
77
- 'Content-type': 'application/json;charset=UTF-8',
78
80
  'userid': @user_id
79
81
  }
80
82
  data = {
@@ -82,7 +84,7 @@ class BizM
82
84
  profile: @profile,
83
85
  }
84
86
  request = Net::HTTP::Post.new(uri.path, header)
85
- request.body = data.to_json
87
+ request.set_form_data(data) # This API doesn't accept JSON body
86
88
 
87
89
  http = Net::HTTP.new(uri.host, uri.port)
88
90
  http.use_ssl = true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bizm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soohyeon Lee
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-16 00:00:00.000000000 Z
12
+ date: 2024-01-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: BizM client for ruby sending Kakao AlimTalk
15
15
  email: lsh59727@gmail.com
@@ -37,7 +37,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  requirements: []
40
- rubygems_version: 3.1.6
40
+ rubygems_version: 3.3.7
41
41
  signing_key:
42
42
  specification_version: 4
43
43
  summary: BizM client for ruby