paypal-sdk-rest 1.7.2 → 1.7.6
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 +5 -5
- data/README.md +13 -0
- data/lib/paypal-sdk/rest/data_types.rb +92 -0
- data/lib/paypal-sdk/rest/version.rb +1 -1
- data/spec/payouts_examples_spec.rb +25 -0
- metadata +10 -14
- data/spec/log/http.log +0 -0
- data/spec/log/rest_http.log +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9515894cf88eb5c0c31a04a4cbe196a7a42acad07af1adf19b92d0fb677ce068
|
4
|
+
data.tar.gz: '09e8c8330ebb62ba079e572517cd2b4398ebb2cfc3be3f6704956a8d3913d7e8'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59dc7bb58480e1da15b1afae4dd3d8a8744c9d3b92d02fbbe3720cf1f2f368108120fba73a910559775f22203d15de63ef0900aeb3c4e6dc40a1b830ade05f47
|
7
|
+
data.tar.gz: 8c47c5e43e73b78b991dc802c3d9253a394883ebe288fcca8f20ecfb695056f376f25560ff50f641f4ec856aa1a7563a258950ade9ee898cca3989f2b650fad2
|
data/README.md
CHANGED
@@ -1,8 +1,21 @@
|
|
1
|
+
# Deprecation Notice:
|
2
|
+
This SDK is deprecated. You can continue to use it, but no new features or support requests will be accepted.
|
3
|
+
For alternatives, please visit [the current SDK homepage on the PayPal Developer Portal](https://developer.paypal.com/docs/api/rest-sdks/)
|
4
|
+
|
1
5
|
## PayPal REST API Ruby SDK [](https://travis-ci.org/paypal/PayPal-Ruby-SDK) [](https://coveralls.io/github/paypal/PayPal-Ruby-SDK?branch=master)
|
2
6
|
|
3
7
|
|
4
8
|
The PayPal REST SDK provides Ruby APIs to create, process and manage payment.
|
5
9
|
|
10
|
+
## PayPal Checkout v2
|
11
|
+
Please note that if you are integrating with PayPal Checkout, this SDK and corresponding API [v1/payments](https://developer.paypal.com/docs/api/payments/v1/) are in the process of being deprecated.
|
12
|
+
|
13
|
+
We recommend that you integrate with API [v2/checkout/orders](https://developer.paypal.com/docs/api/orders/v2/) and [v2/payments](https://developer.paypal.com/docs/api/payments/v2/). Please refer to the [Checkout Ruby SDK](https://github.com/paypal/Checkout-Ruby-SDK) to continue with the integration.
|
14
|
+
|
15
|
+
|
16
|
+
## 2.0 Release Candidate!
|
17
|
+
We're releasing a [brand new version of our SDK!](https://github.com/paypal/PayPal-Ruby-SDK/tree/2.0-beta) 2.0 is currently at release candidate status, and represents a full refactor, with the goal of making all of our APIs extremely easy to use. 2.0 includes all of the existing APIs (except payouts), and includes the new Orders API (disputes and Marketplace coming soon). Check out the [FAQ and migration guide](https://github.com/paypal/PayPal-Ruby-SDK/tree/2.0-beta/docs), and let us know if you have any suggestions or issues!
|
18
|
+
|
6
19
|
## Prerequisites
|
7
20
|
- Ruby 2.0.0 or above
|
8
21
|
- Bundler
|
@@ -1713,6 +1713,7 @@ module PayPal::SDK
|
|
1713
1713
|
object_of :note, String
|
1714
1714
|
object_of :receiver, String
|
1715
1715
|
object_of :sender_item_id, String
|
1716
|
+
object_of :recipient_wallet, String
|
1716
1717
|
end
|
1717
1718
|
|
1718
1719
|
include RequestDataType
|
@@ -2496,6 +2497,97 @@ module PayPal::SDK
|
|
2496
2497
|
end
|
2497
2498
|
end
|
2498
2499
|
|
2500
|
+
class Dispute < Base
|
2501
|
+
def self.load_members
|
2502
|
+
object_of :dispute_id, String
|
2503
|
+
object_of :create_time, String
|
2504
|
+
object_of :update_time, String
|
2505
|
+
array_of :disputed_transactions, TransactionInfo
|
2506
|
+
object_of :reason, String
|
2507
|
+
object_of :status, String
|
2508
|
+
object_of :dispute_amount, Money
|
2509
|
+
object_of :external_reason_code, String
|
2510
|
+
object_of :dispute_outcome, DisputeOutcome
|
2511
|
+
object_of :dispute_life_cycle_stage, String
|
2512
|
+
object_of :dispute_channel, String
|
2513
|
+
array_of :messages, Messages
|
2514
|
+
object_of :buyer_response_due_date, String
|
2515
|
+
object_of :seller_response_due_date, String
|
2516
|
+
object_of :offer, Offer
|
2517
|
+
array_of :links, Links
|
2518
|
+
end
|
2519
|
+
end
|
2520
|
+
|
2521
|
+
class TransactionInfo < Base
|
2522
|
+
def self.load_members
|
2523
|
+
object_of :buyer_transaction_id, String
|
2524
|
+
object_of :seller_transaction_id, String
|
2525
|
+
object_of :create_time, String
|
2526
|
+
object_of :transaction_status, String
|
2527
|
+
object_of :gross_amount, Money
|
2528
|
+
object_of :invoice_number, String
|
2529
|
+
object_of :custom, String
|
2530
|
+
object_of :buyer, Buyer
|
2531
|
+
object_of :seller, Seller
|
2532
|
+
array_of :items, ItemInfo
|
2533
|
+
end
|
2534
|
+
end
|
2535
|
+
|
2536
|
+
class Buyer < Base
|
2537
|
+
def self.load_members
|
2538
|
+
object_of :email, String
|
2539
|
+
object_of :name, String
|
2540
|
+
end
|
2541
|
+
end
|
2542
|
+
|
2543
|
+
class Seller < Base
|
2544
|
+
def self.load_members
|
2545
|
+
object_of :email, String
|
2546
|
+
object_of :merchant_id, String
|
2547
|
+
object_of :name, String
|
2548
|
+
end
|
2549
|
+
end
|
2550
|
+
|
2551
|
+
class ItemInfo < Base
|
2552
|
+
def self.load_members
|
2553
|
+
object_of :item_id, String
|
2554
|
+
object_of :partner_transaction_id, String
|
2555
|
+
object_of :reason, String
|
2556
|
+
object_of :dispute_amount, Money
|
2557
|
+
object_of :notes, String
|
2558
|
+
end
|
2559
|
+
end
|
2560
|
+
|
2561
|
+
class Money < Base
|
2562
|
+
def self.load_members
|
2563
|
+
object_of :currency_code, String
|
2564
|
+
object_of :value, String
|
2565
|
+
end
|
2566
|
+
end
|
2567
|
+
|
2568
|
+
class DisputeOutcome < Base
|
2569
|
+
def self.load_members
|
2570
|
+
object_of :outcome_code, String
|
2571
|
+
object_of :amount_refunded, Money
|
2572
|
+
end
|
2573
|
+
end
|
2574
|
+
|
2575
|
+
class Messages < Base
|
2576
|
+
def self.load_members
|
2577
|
+
object_of :posted_by, String
|
2578
|
+
object_of :time_posted, String
|
2579
|
+
object_of :content, String
|
2580
|
+
end
|
2581
|
+
end
|
2582
|
+
|
2583
|
+
class Offer < Base
|
2584
|
+
def self.load_members
|
2585
|
+
object_of :buyer_requested_amount, Money
|
2586
|
+
object_of :seller_offered_amount, Money
|
2587
|
+
object_of :offer_type, String
|
2588
|
+
end
|
2589
|
+
end
|
2590
|
+
|
2499
2591
|
constants.each do |data_type_klass|
|
2500
2592
|
data_type_klass = const_get(data_type_klass)
|
2501
2593
|
data_type_klass.load_members if defined? data_type_klass.load_members
|
@@ -2,6 +2,25 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe "Payouts", :integration => true do
|
4
4
|
|
5
|
+
PayoutVenmoAttributes = {
|
6
|
+
:sender_batch_header => {
|
7
|
+
:sender_batch_id => SecureRandom.hex(8)
|
8
|
+
},
|
9
|
+
:items => [
|
10
|
+
{
|
11
|
+
:recipient_type => 'PHONE',
|
12
|
+
:amount => {
|
13
|
+
:value => '1.0',
|
14
|
+
:currency => 'USD'
|
15
|
+
},
|
16
|
+
:note => 'Thanks for your patronage!',
|
17
|
+
:sender_item_id => '2014031400023',
|
18
|
+
:receiver => '5551232368',
|
19
|
+
:recipient_wallet => 'VENMO'
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
23
|
+
|
5
24
|
PayoutAttributes = {
|
6
25
|
:sender_batch_header => {
|
7
26
|
:sender_batch_id => SecureRandom.hex(8),
|
@@ -21,6 +40,12 @@ describe "Payouts", :integration => true do
|
|
21
40
|
]
|
22
41
|
}
|
23
42
|
|
43
|
+
it "create venmo payout" do
|
44
|
+
$payout = PayPal::SDK::REST::Payout.new(PayoutVenmoAttributes)
|
45
|
+
$payout_batch = $payout.create
|
46
|
+
expect($payout_batch).to be_truthy
|
47
|
+
end
|
48
|
+
|
24
49
|
it "create payout sync" do
|
25
50
|
$payout = PayPal::SDK::REST::Payout.new(PayoutAttributes)
|
26
51
|
$payout_batch = $payout.create(true)
|
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.7.
|
4
|
+
version: 1.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|
@@ -52,8 +52,8 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
|
-
description: The PayPal REST SDK provides Ruby APIs to create, process
|
56
|
-
payment.
|
55
|
+
description: "[Deprecated] The PayPal REST SDK provides Ruby APIs to create, process
|
56
|
+
and manage payment. It is recommended to use paypal-server-sdk instead"
|
57
57
|
email:
|
58
58
|
- DL-PP-RUBY-SDK@paypal.com
|
59
59
|
executables: []
|
@@ -119,8 +119,6 @@ files:
|
|
119
119
|
- spec/core/logging_spec.rb
|
120
120
|
- spec/core/openid_connect_spec.rb
|
121
121
|
- spec/invoice_examples_spec.rb
|
122
|
-
- spec/log/http.log
|
123
|
-
- spec/log/rest_http.log
|
124
122
|
- spec/payments_examples_spec.rb
|
125
123
|
- spec/payouts_examples_spec.rb
|
126
124
|
- spec/rest/data_types_spec.rb
|
@@ -134,7 +132,7 @@ homepage: https://developer.paypal.com
|
|
134
132
|
licenses:
|
135
133
|
- PayPal SDK License
|
136
134
|
metadata: {}
|
137
|
-
post_install_message:
|
135
|
+
post_install_message:
|
138
136
|
rdoc_options: []
|
139
137
|
require_paths:
|
140
138
|
- lib
|
@@ -149,11 +147,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
147
|
- !ruby/object:Gem::Version
|
150
148
|
version: '0'
|
151
149
|
requirements: []
|
152
|
-
|
153
|
-
|
154
|
-
signing_key:
|
150
|
+
rubygems_version: 3.5.23
|
151
|
+
signing_key:
|
155
152
|
specification_version: 4
|
156
|
-
summary: The PayPal REST SDK provides Ruby APIs to create, process and
|
153
|
+
summary: "[Deprecated] The PayPal REST SDK provides Ruby APIs to create, process and
|
154
|
+
manage payment. It is recommended to use paypal-server-sdk instead"
|
157
155
|
test_files:
|
158
156
|
- spec/README.md
|
159
157
|
- spec/config/cacert.pem
|
@@ -166,8 +164,6 @@ test_files:
|
|
166
164
|
- spec/core/logging_spec.rb
|
167
165
|
- spec/core/openid_connect_spec.rb
|
168
166
|
- spec/invoice_examples_spec.rb
|
169
|
-
- spec/log/http.log
|
170
|
-
- spec/log/rest_http.log
|
171
167
|
- spec/payments_examples_spec.rb
|
172
168
|
- spec/payouts_examples_spec.rb
|
173
169
|
- spec/rest/data_types_spec.rb
|
data/spec/log/http.log
DELETED
File without changes
|
data/spec/log/rest_http.log
DELETED
File without changes
|