toss_payments 0.3.6 → 0.3.8

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/toss_payments.rb +7 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f74664080b2e8638dbee703b797d56828bbaccfe6041e6017691c5f0c7f96d6
4
- data.tar.gz: 6d34bb39af26f7c356b69d721a387c09fb1bf5bd9424ba6f548ffdb1215d1fef
3
+ metadata.gz: 13a84ad33130755ba6072a7fe8963ef8cf63c659bc43758233502c9cc60ee130
4
+ data.tar.gz: 2a2cee78d7fd79dec98e041a0f40056ad4cffe1a4cb5449e0effc8c4695effe9
5
5
  SHA512:
6
- metadata.gz: 338989785ba15c94a962c953cdf958c53031938cd70de92c3b118037faddd736e91817d6d7807a433295c62493649dd280420b90ccacc1c131c1927dca0802fd
7
- data.tar.gz: ba59094c3f2dc8268711c56130e4bb2aaa1712537a8aab0059f088ad5c6509bcc4254681e86d754d87c510396d42841def44f39304c5a6b972887f7ed2f63ccb
6
+ metadata.gz: f32f01fcfab996402eb685cc7fc91a8b8b7b7c4933b82404e97b1377e1d791e8e7f22b11a2a6a87c0989b561884eba17116dcd7da7c30512b98154ac715d55d9
7
+ data.tar.gz: c407034e46648c891ff53977b010cc3e38bae35a02a37363a9bd5fb3cd157934e9f1ed99e539237dfce0f8a2b4373812ae54e71cbae1ea22eb1e15d1f6fcf59c
data/lib/toss_payments.rb CHANGED
@@ -24,7 +24,7 @@ module TossPayments
24
24
  :balanced_amount,
25
25
  :status,
26
26
  :requested_at,
27
- :approved_at,
27
+ :approved_at, # nullable
28
28
  :use_escrow,
29
29
  :last_transaction_key,
30
30
  :supplied_amount,
@@ -174,7 +174,7 @@ module TossPayments
174
174
  balanced_amount: response["balancedAmount"],
175
175
  status: response["status"]&.downcase&.to_sym,
176
176
  requested_at: Time.parse(response["requestedAt"]),
177
- approved_at: Time.parse(response["approvedAt"]),
177
+ approved_at: response["approvedAt"] ? Time.parse(response["approvedAt"]) : nil,
178
178
  use_escrow: response["useEscrow"],
179
179
  last_transaction_key: response["lastTransactionKey"],
180
180
  supplied_amount: response["suppliedAmount"],
@@ -218,6 +218,11 @@ module TossPayments
218
218
  refund_status: response["virtualAccount"]["refundStatus"]&.downcase&.to_sym,
219
219
  expired: response["virtualAccount"]["expired"],
220
220
  settlement_status: response["virtualAccount"]["settlementStatus"],
221
+ refund_receive_account: response["virtualAccount"]["refundReceiveAccount"] ? {
222
+ bank_code: response["virtualAccount"]["refundReceiveAccount"]["bankCode"],
223
+ account_number: response["virtualAccount"]["refundReceiveAccount"]["accountNumber"],
224
+ holder_name: response["virtualAccount"]["refundReceiveAccount"]["holderName"],
225
+ } : nil,
221
226
  } : nil,
222
227
  secret: response["secret"],
223
228
  mobile_phone: response["mobilePhone"] ? {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toss_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soohyeon Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-13 00:00:00.000000000 Z
11
+ date: 2023-03-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: toss payments api
14
14
  email: lsh59727@gmail.com