paypal-checkout-sdk 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +7 -0
  2. data/lib/core/access_token.rb +20 -0
  3. data/lib/core/paypal_environment.rb +38 -0
  4. data/lib/core/paypal_http_client.rb +56 -0
  5. data/lib/core/token_requests.rb +40 -0
  6. data/lib/core/version.rb +3 -0
  7. data/lib/lib.rb +18 -0
  8. data/lib/orders/orders_authorize_request.rb +45 -0
  9. data/lib/orders/orders_capture_request.rb +45 -0
  10. data/lib/orders/orders_create_request.rb +39 -0
  11. data/lib/orders/orders_get_request.rb +31 -0
  12. data/lib/orders/orders_patch_request.rb +33 -0
  13. data/lib/orders/orders_validate_request.rb +37 -0
  14. data/lib/payments/authorizations_capture_request.rb +41 -0
  15. data/lib/payments/authorizations_get_request.rb +29 -0
  16. data/lib/payments/authorizations_reauthorize_request.rb +41 -0
  17. data/lib/payments/authorizations_void_request.rb +29 -0
  18. data/lib/payments/captures_get_request.rb +29 -0
  19. data/lib/payments/captures_refund_request.rb +41 -0
  20. data/lib/payments/refunds_get_request.rb +29 -0
  21. data/lib/paypal-checkout-sdk.rb +1 -0
  22. data/paypal-checkout-sdk.gemspec +13 -0
  23. data/spec/orders/orders_authorize_spec.rb +18 -0
  24. data/spec/orders/orders_capture_spec.rb +18 -0
  25. data/spec/orders/orders_create_spec.rb +36 -0
  26. data/spec/orders/orders_get_spec.rb +37 -0
  27. data/spec/orders/orders_helper.rb +33 -0
  28. data/spec/orders/orders_patch_spec.rb +60 -0
  29. data/spec/orders/orders_validate_spec.rb +18 -0
  30. data/spec/payments/authorizations_capture_spec.rb +18 -0
  31. data/spec/payments/authorizations_get_spec.rb +18 -0
  32. data/spec/payments/authorizations_reauthorize_spec.rb +17 -0
  33. data/spec/payments/authorizations_void_spec.rb +17 -0
  34. data/spec/payments/captures_get_spec.rb +18 -0
  35. data/spec/payments/captures_refund_spec.rb +18 -0
  36. data/spec/payments/refunds_get_spec.rb +18 -0
  37. data/spec/spec_helper.rb +109 -0
  38. data/spec/test_harness.rb +25 -0
  39. metadata +80 -0
@@ -0,0 +1,29 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # authorizations_get_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/+xbbW/bOPJ///8UA+0f2AawrWz6sLt+l2vTa+42TS52DzjkgoQWxxY3FKklR3Z0Rb/7gaRkW5K9SW+d9A7wi6LRkJTmN/PjPEj05+gjyzAaRqygVBvxL0ZCKzuYIUW96B3axIjciaJhNEr1wgJHYkJamGoDTEG9DjnkrMxQUQ8mJZy+G0S96G8FmvKCGZYhobHR8Oq6F31AxtE0pJ+jcZk7LSwZoWZRL/o7M4JNJFbaHa9rF/Wiv2K5ZaSp8nGSoLVA+g4VTI3Oqj9R8VwLRRDPf4i1w3AU+xGn9bExrAwKHfaiS2T8XMkyGk6ZtOgEvxXCII+GZArsRRdG52hIoI2GqpDyy3Uveq9N1sZ9wSj9OtQNn9wI3gDewTpOEU7fgZ4CpbjBL95ji1QkKZAGm+pF7csdgXZz0FK4iRM6kc21shhkS8Btp7VwP4xzAzoyTFmWuElfhacSrANaeeZMKyw3OCbThaKGmktRV9mkMAZVUgJTHMK8sHtgKhRTiWByXfse2CJJgVlgMGGSqQRBmyVOXuDu8G1jXq3yTaI5NnC2R7pwryg1iP0kZYYlhAZOR+f9V0c//LgyhFt7/SLmOrGxUIQz45kQc2Ewodigpbie3HeTbXwAlDICwVGRmAq0nuX1pF0wuPegVeZMFk1r1JKuFfxIr9pvmZilBBMc/rM4PHyZFNL/j+FKinB1rMDbAo1nRwXNIZXiDuH2Lxf/uA1GYAZBaQIqc5EwKUuYmsAdJgfhpnF919YzgGMiMiaXKzY/a/zx3dqzbDHhYi44cqehBkp1YZnilNrNj4trhO+18X4ylfFBFdkEjQtStSK5ZAlW6aTJkB5YRLh6W8veOiJ8LW12EtsewY3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x9ET9jQtlQ0K7P/4Ppvg1Nlb8DTZVtaJVkN9C08q+kMh1eDjwRxG388lnBs6jJrab8KXm1XbMcFQ9vUlqqNQaeUrdtwXxq2MyFtku0Whad9+gbh7+FDUUnZoiNkeJYgRt4ghi8m8bAz9jxjjhz5dGWSqtbZT1U47uqM9GK8J76qBLNhZqB38rP8IZ5IhQz5Un12IbynaFNpb4iVF21Q7I/KySJvDC5tgjLNyxnTEg4uSdU1oUIeHF2enZyABfMEJwrHLp6PWPkfLdag9ayGcKfNBdoHyxqjg5fvT54puKM2pU1PVxU/8f2GS/0EDz7wKn1KEu82Y0lrh8RM5RufowJ108Zvc4Vbk+/WmEr/daS3aXf1fwdx5htfMsZpSNipmnpdWmLeRpYnssy9NNBVfAfDxAcCqYStN/Dp8tT2wPrbuGH3PVaH+4/owyeJ/PkrsU3am1lC2ln9Fvkx3yLek+r1/Vj+5TQZIy63UprYN+z7HuWfc+y71n2Pcu+Z9n3LPueZd+z7HuWfc+y71meqGfZGpEEyVZIqiTdmBQaEje88yAxQinRwIXRFD6JbfgA5Kfc5OtT1r4FbRjdgADnKN3OXc0DPZ2iQd7+3BpOtkBHMf9F7gxNkjJFrQ9pOStzJgeJzuLCxgucsDy3cZbnscWkMILKOOjZXz3/4OnTNhc2LwhvEkY406ZT524a3h70Eq1CO2hXByQTPfc2rI/+bD+L/FSRzhKjoolrKWpiOVVcOKgWFilSih2NQVhAKWZiIv1BNAg+W+PM4Ll25+NROXaHoW9//qrI+cajoE35/njgf+/xwOsvvehtKNcrX7uywG0boVX8q/Xh9QNRfhYOdAyjP5+Mo/ATj2gYxfOjuKKcjZs/rIk/t3/U8SXqRaM7kS+1ObnPMSHkI0/nt5pjNDw6PPzyf/8GAAD//w==
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Shows details for an authorized payment, by ID.
14
+ #
15
+ class AuthorizationsGetRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(authorization_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "GET"
22
+ @path = "/v2/payments/authorizations/{authorization_id}?"
23
+
24
+ @path = @path.gsub("{authorization_id}", CGI::escape(authorization_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # authorizations_reauthorize_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/+xc3W/bRhJ/v79iwPbQGJBEx4nTVsA9+JIU8V1d+yynQOEz4tXuSNya3GV3l7J5Rf73w+ySEj+kKG1l9w7QgwFxdknOx28+SfrX6AeWYTSOWOESbeR/mJNa2ZHBmoDRIHqDlhuZ01I0ji5XaxaYguWRgAtWXrAUGOe6UA5yVmao3ACmJZy+GcGVBlS2MAguYQ5mhRIWmEGwTqYpsAWTKZumOIDG/YHV1wE2c2hAOgtSSSdZCi4xiEPBSki00gZyNFILwIdcGrQj+EkXwJnacD2t0hK04ggzozMQrLQw04UBp+Ho29G/i8PDF3xqYv8DO4enM3hxGM5J2ALBGaYs3VaAlXRNlyAI5hD0zP/WRs6lIvU0dT2AUheQFdYBN0jb2yqteZXKOmSCLrYSRqr5+kuvTtwixUlTNY27OYvpDBJmgYHC+7Z6vUAG0Uu/5QZrLbBWwmAIbaDIyQDPnx//daPqUADLCGMDUNrRdnzgSFQFUpEirdf7l18fw/vJmy08Too818bZAAi64W24+i0Y/KVAS1A2LEOHZhQNon8VaMqLmmKj8fXNIHqHTKBpUX+NrsqcvMs6I9U8GkQ/MiMJ4ZXXnTSREA2if2K5YaXtgieco7Xg9B2qgN3wE5XItVQO4sXzWJOyjmK/QlyfGMPKwNDhgLxYnKu0jMYzllokwi8FoTcaO1PgILowOkfjJNporIo0/TjYKk5w/+Fl0Nn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6PDl8cETFWeuW1m77UX179bP1b0eg0cfEFufpYlXu9HEzWfEDKXbD2PC8WNGr3OFm9OvVthJvzVld+l3tX/HMWYT3nLmkoljpq3pJrWDPA0sz/17B9IG/2TgHx6gf+mDKY72K3h/eWoHYOkSfomOG324f4wyeprMk1OLb1TjzI6kvdU/Iz/mG9h7XL5uPrdPCU3GpN+tdBb2Pcu+Z9n3LPueZd+z7HuWfc+y71n2Pcu+Z9n3LPue5ZF6lo0RSbq0E5IqSj8mhYaElnceJCbov9S6MNqFR2JrHgD5LR/y5pbGs6A1q2skwAWm5LmrfaBnMzQouo9bq09eeoz5J3JnaHjClOs8SMtZmbN0xHUWFza+xynLcxtneR5b5IWRrowDn8PV/Q8eP20LafPC4QfOHM616dW565Y3Bz2uVWgH7eoFSa4XXof1qz+b30V+rEgXPr9rQ6ImtWU5VUKSqBbuE3QJ9jgGaQFTOZfTNHy3EmzWwMzoqbzz86Xy3//5pT///asiF2tfBW3T968H/u++HnjzcRC9DuV6ZWsqC6rPbOOfrQ+v75zLz8ILHePo4nxyFYVPNaNxFC+O4gpzNm7/s4b41+7HmR/j9v9vmNzJfMna24ccuUMx8dh+rQVG46PD5x//8l8AAAD//w==
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. You can reauthorize a payment only once from days four to 29.<br/><br/>If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.<br/><br/>A reauthorized payment itself has a new honor period of three days.<br/><br/>You can reauthorize an authorized payment once for up to 115% of the original authorized amount, not to exceed an increase of $75 USD.<br/><br/>Supports only the `amount` request parameter.
14
+ #
15
+ class AuthorizationsReauthorizeRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(authorization_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "POST"
22
+ @path = "/v2/payments/authorizations/{authorization_id}/reauthorize?"
23
+
24
+ @path = @path.gsub("{authorization_id}", CGI::escape(authorization_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+
28
+ def pay_pal_request_id(pay_pal_request_id)
29
+ @headers["PayPal-Request-Id"] = pay_pal_request_id
30
+ end
31
+
32
+ def prefer(prefer)
33
+ @headers["Prefer"] = prefer
34
+ end
35
+
36
+ def request_body(reauthorizeRequest)
37
+ @body = reauthorizeRequest
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,29 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # authorizations_void_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/6yTQW/TQBCF7/yK0ZyXukScfIsaUCsENSSqhFCFJt5JvXSzu8yOI0yU/47WMdCUckDiZr15Hr1vnr3Hd7RlrJF67aK476Quhny2i86iwQXnVlwqGtZ4E53NBqJAS6Flnw1QgJ9vsoVEw5aDGlgPcLU4g4+xL9YQFcrCp92gHSl0lGHNHGDTez9AS0l7YXuGBt/3LENDQltWloz1p1uDl0yW5UTd42pIhSWruHCHBm9IHK09T4zzh4xo8A0Pf5mccs/blnMGjfcln8Tt9MjBpuiCQrV7UcVCNqvGSUk9F6HhGOjc4Acmex38gPWGfOYifO2dsMVapWeDjcTEoo4z1qH3/nBr8HWU7WPuhrT7N+qTZj+Ptf4G/4N11TE0NDTkn99xYCFlC1cL2EQB7fjJ/uLY7n+CLh7OelxSxCLlFEPmh9pFDMphsiGl5F07ElZf8ljhpWp6y9pFizU218sVHo+HNVa7WTWFz9Xph1/tH5/rUE3/wvLepV8kr74lbpXtUkn7fBEtYz07f3l49gMAAP//
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.
14
+ #
15
+ class AuthorizationsVoidRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(authorization_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "POST"
22
+ @path = "/v2/payments/authorizations/{authorization_id}/void?"
23
+
24
+ @path = @path.gsub("{authorization_id}", CGI::escape(authorization_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,29 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # captures_get_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/+w8bXMbN3Pf+yt27ulMrBmKp8iWk+hTZUuO1Ua2Ksmd6bgaEjwseYhwwAXAkWIz/u+dBe7IeyEtO6aUPsl98FjcBQ77jl28/R69YxlGx1HCclcYtMMZumgQnaJNjMid0Co6jq5TvbDA0TEhLUy1AQZlBw45W2ao3AAmSzg/HUaD6D8LNMtLZliGDo2Njj/eDqK3yDiaBvT36GaZ0+DWGaFm0SD6L2YEm0gsiTopXKqN+F/m6RhE/4HLLZgmvSdJgtaC03eoYGp0Vv6JiudaKAfx/PtYs8Klh7HHENUnxrBlIOhgEF0h4++VXEbHUyYtEuC3Qhjk0bEzBQ6iS6NzNE6gjY5VIeWn20H0Rpuszfclc+nXcV1KdiR4g+UOlzcpwiVbXjK5P0OFhjnkcH7q9eNS7GjIIxapSFJwGmyqF5VKd8Q+tUHrwkcISCCba2UxwFasvw6kdXn/PMcnHZ6+ivISUCd9rY0LrXDZJYhlulCuQdYK1FVHUhiDKlkCUxxCu9JdpkIxlQgmwRmmLEuo1wBskaTALDCYMMlUgqDNSl+8wN3xt9XaSpJHiebY4LON6bL70aUGcT9JmWGJQwPn1+/3Xxx+/8NaENT39lnMdWJjoRzOjHfZmAuDiYsNWhdXjfepsY33w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dM0uYE8PKr7pTYH5+SH0LG4KDP6BVXbq1hdzVOvwXVNS1rcoNSeMmbJ8/9vljnz/+xfLH252e+CD7CKjHOs7QMujrMNhpSFi3kT7iK3ybhRpqex68hZeS1ccPWgaZbZ3CWoE23W4hFCzS5eeopmlofHn27vT83c9jCsPj07N352en4+FTHYgrcr7xWbUmvH9W7f/vs2q3nwbR63DWvNQ1y3MpkhC8fg0G+ta5/CK8RnIc/Xx2E4UnUqPjKJ4fxtUbXHH1ilj8+/o51E/RILq+E/mKgrP7HBOHPLg9hc3o+PDg4NO//B8AAAD//w==
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Shows details for a captured payment, by ID.
14
+ #
15
+ class CapturesGetRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(capture_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "GET"
22
+ @path = "/v2/payments/captures/{capture_id}?"
23
+
24
+ @path = @path.gsub("{capture_id}", CGI::escape(capture_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # captures_refund_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/+xdbW/bOPJ///8UA+8f2AZw7DZtursBDri0Sa/Z2za5JF3gkAtiWhxb3FCkSlJ2tIt+9wMfZOuxSVsn3evqRYFmhpJmhsPfPIii/xi8JQkO9gYRSU2mUI8UzjJBB8PBAepIsdQwKQZ7g1NH1kAgjKSQkjxBYYYwzeHoYASvpAICs4xz8DcZAhMRzygCEYBJanJ7DZeEAhNgYoSfz47fgsL3GWoDU0nz4i4pUYaR1hv9J3v8+GkUSYruf0gSmQnjqeM1GeT0N4xM95MGw8G/MlT5CV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uvbRPmzgDQQ8udKnmNiszR8T/+ofzz/iCXHgR7EOxBcCNv14rO8QuisTVNamZIHckRReP2RBTgtWpKL2O52hnhOOFASUFhlvEZ49yTw/EZ5+VrmQbCtYRrIZfCgkix2eIhUIMzFKZ+cEiZ2nJUbjblLFqva+/8JE3BH4Hjvt4vW2fslYEjYZSkWeS/c9dZmkplINMIEdGo4ZG9D47mI3ihCBPnChFKTuNrcv+CYCu8GXB39jtVrgilCrV2e77Dk6+Ye+9gVx5ZEMat5g/U2ajIVG0D1jhNCzO325F4eGC/I/UaQrjmy8/qeZfaGXj+rHT+hIMNwrlc2gnEmVR+7+3O7m7XKDKzsaLtbOC/Nw8w1WwuRvBaLnGBauiu8gfnWDAkUYSp9ZyE3LAkS4CjmJvYO5aoam8ndGf3WePojLD1DRaoimhjwVBAJpyR6F2lBLxh2nzlE4hKHlzbM12md51JFPZqHR0U4Yy5M6OJvkZqDaRLp1fX3rgFuLcuKGz4sFNgl2ix21FRf5wtBrPXr9Og0D1hynNAEancTaxLpCBVMlUMDVE5LKzCwrXRLDA/3bHXZtqDg9syXRyDoTO+qcbaHcpmIw3hVz4tbX/l1zWizyP7PLLPI7/hRlvnuy93yn31lVdBavl1BMcq4DecOL7hrOTMP+PA56tdEl/RFb8ueYnVnQZXN3j4C+8fofw259o5RYHUuSl6GedlWeOQZk9ODt8eHL39x8Ti7OTV/tEvhweTDWly5z3fWUpbT5Ss0vsTJf+8J0pefhgOXvqvvcJckzTl4Qc4xr9533xtTPrGnwe2Nzg5Pjsf+B9xGOwNxoudcYjyelz8HM/4j/UPNnwYr36b5+yapStJDm9SjAxSv94tTA72dh4/+fB//wUAAP//
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an <code>amount</code> object in the JSON request body.
14
+ #
15
+ class CapturesRefundRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(capture_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "POST"
22
+ @path = "/v2/payments/captures/{capture_id}/refund?"
23
+
24
+ @path = @path.gsub("{capture_id}", CGI::escape(capture_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+
28
+ def pay_pal_request_id(pay_pal_request_id)
29
+ @headers["PayPal-Request-Id"] = pay_pal_request_id
30
+ end
31
+
32
+ def prefer(prefer)
33
+ @headers["Prefer"] = prefer
34
+ end
35
+
36
+ def request_body(refundRequest)
37
+ @body = refundRequest
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,29 @@
1
+ # This class was generated on Mon, 27 Aug 2018 13:52:18 PDT by version 0.1.0-dev+904328-dirty of Braintree SDK Generator
2
+ # refunds_get_request.rb
3
+ # @version 0.1.0-dev+904328-dirty
4
+ # @type request
5
+ # @data H4sIAAAAAAAC/+xcb3PbNtJ//3yKHfaZaTwjS64Tu61fPU7sNHqujn22czM3Po8EkSsRNQiwwFKy2sl3vwFASvwj1k4iu9ccX2Ri7YLC/sMPu+AKvwfvWYLBUaBxmsnI9GdIQS84QRNqnhJXMjgKrmK1MBAhMS4MTJUGBn58DyZLGJ70g17w9wz18oJpliChNsHRzW0veIcsQl2h/h5cL1M7oyHN5SzoBf9gmrOJwFyS44xipflvzM3eC/6GyxZOVcrjMERjgNQdSphqleR/ooxSxSXBYP7dQLGM4v2B41ipj7VmSy/QXi+4RBadS7EMjqZMGLSEXzOuMQqOSGfYCy60SlETRxMcyUyIj7e94K3SSV3vC0bxp2nt7TniUUXjhpLXMcIFW14wsTtDiZoRRjA8cU6hGHO3uI+LmIcxkAITq0XhvS3pbMegIf8llmhJJlXSoKet9L10AjX1fVjNXBUup0onzuWfJHxOKEu/9sKZkrhsCsUSlUmqiLYiNQUMM61RhktgMgI/Ll8cUy6ZDDkTQJpJw0L7VA9MFsbADDCYMMFkiKA0pGyZoCSIMtyefm1RVog8ClWEFT3r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unKCe1NkUv4mVZ1jhPs8cXp+9Phu9/GlucHb89Hv58ejLekiaP7vnO0mjjjZJVenej5H/ujZK3H3vBG/9rr9zXLE0FDz1I/eJj8x1ReubvAzsKfjq9Dvyt0MFRMJjvD/JN3gzye7cHv68ugP4Y9IKrO56u5j+9TzEkjPwqt+AYHO3v7X38n38DAAD//w==
6
+ # DO NOT EDIT
7
+ require 'cgi'
8
+
9
+ module PayPalCheckoutSdk
10
+ module Payments
11
+
12
+ #
13
+ # Shows details for a refund, by ID.
14
+ #
15
+ class RefundsGetRequest
16
+ attr_accessor :path, :body, :headers, :verb
17
+
18
+ def initialize(refund_id)
19
+ @headers = {}
20
+ @body = nil
21
+ @verb = "GET"
22
+ @path = "/v2/payments/refunds/{refund_id}?"
23
+
24
+ @path = @path.gsub("{refund_id}", CGI::escape(refund_id.to_s))
25
+ @headers["Content-Type"] = "application/json"
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1 @@
1
+ require_relative './lib'
@@ -0,0 +1,13 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'paypal-checkout-sdk'
3
+ s.version = '1.0.1'
4
+ s.date = '2018-02-04'
5
+ s.summary = "This repository contains PayPal's Ruby SDK for Checkout REST API"
6
+ s.description = "This repository contains PayPal's Ruby SDK for Checkout REST API"
7
+ s.authors = ["http://developer.paypal.com"]
8
+ s.email = 'dl-paypal-checkout-api@paypal.com'
9
+ s.files = Dir.glob ["lib/**/*.{rb}", "spec/**/*", "*.gemspec"]
10
+ s.homepage =
11
+ 'https://github.com/paypal/Checkout-Ruby-SDK'
12
+ s.license = 'MIT'
13
+ end
@@ -0,0 +1,18 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative '../../lib/lib'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersAuthorizeRequest do
10
+
11
+ it 'successfully makes a request', :skip => 'This test is an example, in production, orders require payer approval' do
12
+ request = OrdersAuthorizeRequest.new("ORDER-ID")
13
+
14
+ resp = TestHarness::client.execute(request)
15
+ expect(resp.status_code).to eq(201)
16
+ expect(resp.result).not_to be_nil
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative '../../lib/lib'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersCaptureRequest do
10
+
11
+ it 'successfully makes a request' , :skip => 'This test is an example, in production, orders require payer approval' do
12
+ request = OrdersCaptureRequest.new("ORDER-ID")
13
+
14
+ resp = TestHarness::client.execute(request)
15
+ expect(resp.status_code).to eq(201)
16
+ expect(resp.result).not_to be_nil
17
+ end
18
+ end
@@ -0,0 +1,36 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative './orders_helper'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersCreateRequest do
10
+ it 'successfully makes a request' do
11
+
12
+ resp = OrdersHelper::create_order
13
+ expect(resp.status_code).to eq(201)
14
+ expect(resp.result).not_to be_nil
15
+ expect(resp.result.intent).to eq('CAPTURE')
16
+ expect(resp.result.purchase_units.count).to eq(1)
17
+ expect(resp.result.purchase_units[0].reference_id).to eq('test_ref_id1')
18
+ expect(resp.result.purchase_units[0].amount.currency_code).to eq('USD')
19
+ expect(resp.result.purchase_units[0].amount.value).to eq('100.00')
20
+
21
+ expect(resp.result.create_time).not_to be_nil
22
+ expect(resp.result.links).not_to be_nil
23
+ found_approve = false
24
+
25
+ for link in resp.result.links
26
+ if "approve" === link.rel
27
+ expect(link["href"]).not_to be_nil
28
+ expect(link["method"]).to eq("GET")
29
+ found_approve = true
30
+ end
31
+ end
32
+
33
+ expect(found_approve).to be_truthy
34
+ expect(resp.result.status).to eq('CREATED')
35
+ end
36
+ end
@@ -0,0 +1,37 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative './orders_helper'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersGetRequest do
10
+
11
+ it 'successfully makes a request' do
12
+ create_resp = OrdersHelper::create_order
13
+ request = OrdersGetRequest.new(create_resp.result.id)
14
+ resp = TestHarness::client.execute(request)
15
+ expect(resp.status_code).to eq(200)
16
+ expect(resp.result).not_to be_nil
17
+ expect(resp.result.intent).to eq('CAPTURE')
18
+ expect(resp.result.purchase_units.count).to eq(1)
19
+ expect(resp.result.purchase_units[0].reference_id).to eq('test_ref_id1')
20
+ expect(resp.result.purchase_units[0].amount.currency_code).to eq('USD')
21
+ expect(resp.result.purchase_units[0].amount.value).to eq('100.00')
22
+
23
+ expect(resp.result.create_time).not_to be_nil
24
+ expect(resp.result.links).not_to be_nil
25
+ found_approve = false
26
+
27
+ for link in resp.result.links
28
+ if "approve" === link.rel
29
+ expect(link["href"]).not_to be_nil
30
+ expect(link["method"]).to eq("GET")
31
+ found_approve = true
32
+ end
33
+ end
34
+ expect(found_approve).to be_truthy
35
+ expect(resp.result.status).to eq('CREATED')
36
+ end
37
+ end
@@ -0,0 +1,33 @@
1
+ require_relative '../test_harness'
2
+
3
+ include PayPalCheckoutSdk::Orders
4
+
5
+ module OrdersHelper
6
+ class << self
7
+ def create_order
8
+ body = {
9
+ intent: 'CAPTURE',
10
+ purchase_units: [{
11
+ reference_id: 'test_ref_id1',
12
+ amount: {
13
+ value: '100.00',
14
+ currency_code: 'USD'
15
+ }
16
+ }],
17
+ redirect_urls: {
18
+ cancel_url: 'https://example.com/cancel',
19
+ return_url: 'https://example.com/return'
20
+ }
21
+ }
22
+ request = OrdersCreateRequest.new()
23
+ request.prefer("return=representation")
24
+ request.request_body(body)
25
+
26
+ return TestHarness::client.execute(request)
27
+ end
28
+
29
+ def get_order(id)
30
+ return TestHarness::exec(OrdersGetRequest.new(id))
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,60 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative './orders_helper'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersPatchRequest do
10
+ def build_request_body
11
+ return [
12
+ {
13
+ "op": "add",
14
+ "path": "/purchase_units/@reference_id=='test_ref_id1'/description",
15
+ "value": "added_description"
16
+ },
17
+ {
18
+ "op": "replace",
19
+ "path": "/purchase_units/@reference_id=='test_ref_id1'/amount",
20
+ "value": {
21
+ "currency_code": "USD",
22
+ "value": "200.00"
23
+ }
24
+
25
+ }
26
+ ]
27
+ end
28
+
29
+ it 'successfully makes a request' do
30
+ create_resp = OrdersHelper::create_order
31
+ request = OrdersPatchRequest.new(create_resp.result.id)
32
+ request.request_body(build_request_body)
33
+
34
+ resp = TestHarness::client.execute(request)
35
+ expect(resp.status_code).to eq(204)
36
+ resp = OrdersHelper::get_order create_resp.result.id
37
+ expect(resp.status_code).to eq(200)
38
+ expect(resp.result).not_to be_nil
39
+ expect(resp.result.intent).to eq('CAPTURE')
40
+ expect(resp.result.purchase_units.count).to eq(1)
41
+ expect(resp.result.purchase_units[0].reference_id).to eq('test_ref_id1')
42
+ expect(resp.result.purchase_units[0].amount.currency_code).to eq('USD')
43
+ expect(resp.result.purchase_units[0].amount.value).to eq('200.00')
44
+ expect(resp.result.purchase_units[0].description).to eq('added_description')
45
+
46
+ expect(resp.result.create_time).not_to be_nil
47
+ expect(resp.result.links).not_to be_nil
48
+ found_approve = false
49
+
50
+ for link in resp.result.links
51
+ if "approve" === link.rel
52
+ expect(link["href"]).not_to be_nil
53
+ expect(link["method"]).to eq("GET")
54
+ found_approve = true
55
+ end
56
+ end
57
+ expect(found_approve).to be_truthy
58
+ expect(resp.result.status).to eq('CREATED')
59
+ end
60
+ end
@@ -0,0 +1,18 @@
1
+
2
+
3
+ require_relative '../test_harness'
4
+ require_relative '../../lib/lib'
5
+ require 'json'
6
+
7
+ include PayPalCheckoutSdk::Orders
8
+
9
+ describe OrdersValidateRequest do
10
+
11
+ it 'successfully makes a request' , :skip => 'This test is an example, in production, orders require payer approval' do
12
+ request = OrdersValidateRequest.new("ORDER-ID")
13
+
14
+ resp = TestHarness::client.execute(request)
15
+ expect(resp.status_code).to eq(200)
16
+ expect(resp.result).not_to be_nil
17
+ end
18
+ end