paypal-sdk-rest 1.7.2 → 1.7.4

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: 5f46029f31010a2e424a314fd2f326efcb4661c0
4
- data.tar.gz: 41892d50d32f53ec93fa740cd797dea74f8e65f1
3
+ metadata.gz: e9e80fb1f052a2fc5cbca599b00aec68263f24d8
4
+ data.tar.gz: '046494835138859f2c9db9217e25781de5321028'
5
5
  SHA512:
6
- metadata.gz: ccfb65353fbd4b5ccb65521012756afecadfe958efa3c39207425cec5fa2bbe4eba0ebaedd96871ceb3548b62c6c1d3a395bddc6f06cbeb4fb301b8b9dab4ca8
7
- data.tar.gz: 302b38701bed1734ee663a81cafff902add5e07176b701d1b2e6cb6d7c864f1dbee6e4425301a06f58fd3908ae29372f6b55b9b3eb1b0eda8de8d8a6c7fc17c4
6
+ metadata.gz: 34bcc8c9be7743b4bbf37a0d973cda853740e58996accea09be690e03902de30859d5a2b86a48f3c235951dc37b92da2c05b19b4b6e3d44d6b2f1981e5fd517d
7
+ data.tar.gz: 5ee63c4d2ecdde4280916ab637a4a8d05d47da69ffc38faf91cc5d1734f00890c1a0e1dbf4cb64880a551ba45c8fa8a9f0bcd2bdf356ba194591225bb12765c3
data/README.md CHANGED
@@ -3,6 +3,15 @@
3
3
 
4
4
  The PayPal REST SDK provides Ruby APIs to create, process and manage payment.
5
5
 
6
+ ## PayPal Checkout v2
7
+ 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.
8
+
9
+ 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.
10
+
11
+
12
+ ## 2.0 Release Candidate!
13
+ 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!
14
+
6
15
  ## Prerequisites
7
16
  - Ruby 2.0.0 or above
8
17
  - 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
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module REST
4
- VERSION = "1.7.2"
4
+ VERSION = "1.7.4"
5
5
  end
6
6
  end
7
7
  end
@@ -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.2
4
+ version: 1.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-03 00:00:00.000000000 Z
11
+ date: 2020-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -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
@@ -150,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
148
  version: '0'
151
149
  requirements: []
152
150
  rubyforge_project:
153
- rubygems_version: 2.6.14
151
+ rubygems_version: 2.5.2.3
154
152
  signing_key:
155
153
  specification_version: 4
156
154
  summary: The PayPal REST SDK provides Ruby APIs to create, process and manage payment.
@@ -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
File without changes