iamport 0.2.2 → 0.2.4

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: 48851587820d368b22b195dbea63ae700e43b8ee
4
- data.tar.gz: f2e4b51589d1af0ed6d4709f107d5a4260d2329a
3
+ metadata.gz: 83829b1d4beb85703b707bdc156550353cd1c566
4
+ data.tar.gz: 0bde5b44d72e1be6c970d854b6fa4bf9c8ebca6e
5
5
  SHA512:
6
- metadata.gz: 9009da81c94325631a3846ff6c87fc991d1d3cf06fdcc1f2f5f4945324c2796ad79d2d8c6be124270bb1675851b82541ce2ce9823693ea6e970a9599098219f1
7
- data.tar.gz: d91445bd068ca76b25d60d891f4537cdf2d7746b4a371516208cb1efcabf8fe3562955cb8f1d0f6dc319ab012fd7f79f9ed8c820f26dfa31c879f12498ca2522
6
+ metadata.gz: 348883e8a7dd92920b88572101e519e07eafbb9c0b9e8c5deb29a44ef3d2c235e7663fdefc98a7b729356c07f86686485ecd94d4610fea5f41ce958c0d25d2f4
7
+ data.tar.gz: 229520de3de7577fb5d3ec4977a992d6eea4dc7dea116095de7f94046b411eb4d0651f65327af6947db72de228df8d88682edcc0e886eb63f45ab1223c8207d8
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ language: ruby
3
+ sudo: false
4
+ rvm:
5
+ - 2.2
6
+ branches:
7
+ only: master
8
+ script: COVERAGE=true bundle exec rspec
data/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.2.4] - 2017-09-29 Fri.
10
+ ### Added
11
+ - prepare method for create payment preparation information by @cancue.
12
+ - prepared method for get list of payment preparation information by @cancue.
13
+ - payments.validation use case to README.md by @cancue.
14
+ - CHANGELOG.md file to record change logs by @jhsbeat.
15
+
16
+ ### Changed
17
+ - Nothing changed.
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Ruby 사용자를 위한 아임포트 REST API 연동 모듈입니다.
4
4
 
5
+ ## Code Status
6
+
7
+ [![Build Status](https://travis-ci.org/iamport/iamport-rest-client-ruby.svg?branch=master)](https://travis-ci.org/iamport/iamport-rest-client-ruby)
8
+
5
9
  # 세팅하는 방법
6
10
 
7
11
  ```ruby
@@ -32,6 +36,18 @@ Iamport.payments(status: "paid")
32
36
  Iamport.payments(status: "paid", page: 2)
33
37
  ```
34
38
 
39
+ ## payments.validation API
40
+
41
+ ##### 결제예정금액을 사전등록
42
+ ```ruby
43
+ Iamport.prepare(merchant_uid: "M00001", amount: 10000)
44
+ ```
45
+
46
+ ##### 사전등록된 결제정보를 조회
47
+ ```ruby
48
+ Iamport.prepared(merchant_uid: "M00001")
49
+ ```
50
+
35
51
  ## cancel API
36
52
  body의 값은 [API 문서 - cancel](https://api.iamport.kr/#!/payments/cancelPayment)에 있는 사용하는 것을 추가하여 진행하면 됩니다.​
37
53
 
@@ -1,3 +1,3 @@
1
1
  module Iamport
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/iamport.rb CHANGED
@@ -59,6 +59,22 @@ module Iamport
59
59
  _get(uri)
60
60
  end
61
61
 
62
+ # Prepare payment validation
63
+ # https://api.iamport.kr/#!/payments/prepare
64
+ def prepare(body)
65
+ uri = "payments/prepare"
66
+
67
+ _post(uri, body)
68
+ end
69
+
70
+ # Get prepared payment information by merchant_uid
71
+ # https://api.iamport.kr/#!/payments/prepare/:merchant_uid
72
+ def prepared(merchant_uid)
73
+ uri = "payments/prepare/#{merchant_uid}"
74
+
75
+ _get(uri)
76
+ end
77
+
62
78
  # Canceled payments
63
79
  # https://api.iamport.kr/#!/payments/cancelPayment
64
80
  def cancel(body)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iamport
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sell it
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-04 00:00:00.000000000 Z
11
+ date: 2017-09-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,8 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - ".travis.yml"
78
+ - CHANGELOG.md
77
79
  - CODE_OF_CONDUCT.md
78
80
  - Gemfile
79
81
  - LICENSE