paypal-sdk-rest 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 38b4da25c343ab05d78dd621d36bb49078596118
4
- data.tar.gz: 34cfe1f759ef25430f2473191ce6a6df937c56c4
3
+ metadata.gz: 9eae5ffc61d34b58e5ebf8dd292e10b41bf8a0d4
4
+ data.tar.gz: b9c144027cde5ef9653916733a3b41deaff5271c
5
5
  SHA512:
6
- metadata.gz: 8a2b39a7bf199f4f636a332b096862edd7172c0d94751f783a2627eaef95ad9b8b246879597a0bfdced3be0e8c0ffd4f21b846cc492629250deaa3bfc13c1481
7
- data.tar.gz: e5000ed76b0d7d699f3977b56470129e6ebfeb91a3636cf85b29b8ea9045381d23965e1c1c88e47f2600fd164833bba01218693c5f3f061b132705fe0b4eb916
6
+ metadata.gz: 6dc05fba44917155e950ffdf1399d49d416d5141e80ccfdefe8a185b69065836764d320be68c6917a712aa42b6654d1ce850d0413f69063c2a2b42cb8e904b3a
7
+ data.tar.gz: c918da2cd9c69ff6bd60fe5427eb77842638d4ffc07941d807f880a0bbba0bd4b1b2a1ae35d7301d705b636eed04472099a016d6b66f1bef9d5c12a488bb4051
data/README.md CHANGED
@@ -112,7 +112,6 @@ puts userinfo.to_hash
112
112
  put tokeninfo.logout_url
113
113
  ```
114
114
 
115
-
116
115
  ## Create Payment
117
116
 
118
117
  ```ruby
@@ -227,3 +226,38 @@ userinfo = Userinfo.get("Replace with access_token")
227
226
  logout_url = tokeninfo.logout_url
228
227
  ```
229
228
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/paypal/rest-api-sdk-ruby/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
229
+
230
+
231
+ ## Payouts
232
+
233
+ To make Payouts, you should enable this option in your account at http://developer.paypal.com.
234
+
235
+ ```ruby
236
+ Payout.new(
237
+ {
238
+ :sender_batch_header => {
239
+ :sender_batch_id => SecureRandom.hex(8),
240
+ :email_subject => 'You have a Payout!',
241
+ },
242
+ :items => [
243
+ {
244
+ :recipient_type => 'EMAIL',
245
+ :amount => {
246
+ :value => '1.0',
247
+ :currency => 'USD'
248
+ },
249
+ :note => 'Thanks for your patronage!',
250
+ :receiver => 'shirt-supplier-one@mail.com',
251
+ :sender_item_id => "2014031400023",
252
+ }
253
+ ]
254
+ }
255
+ )
256
+
257
+ begin
258
+ @payout_batch = @payout.create
259
+ logger.info "Created Payout with [#{@payout_batch.batch_header.payout_batch_id}]"
260
+ rescue ResourceNotFound => err
261
+ logger.error @payout.error.inspect
262
+ end
263
+ ```
@@ -14,7 +14,7 @@ module PayPal::SDK::Core
14
14
  def to_s
15
15
  begin
16
16
  response_body = JSON.parse(response.body)
17
- debug_id = response_body["debug_id"]
17
+ debug_id = response["Paypal-Debug-Id"]
18
18
  rescue
19
19
  end
20
20
  message = "Failed."
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module REST
4
- VERSION = "1.2.0"
4
+ VERSION = "1.2.1"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-sdk-rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls