paypal-sdk-rest 1.4.6 → 1.4.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6caede99d228cdad852593c3f30716e8655bb0b4
|
4
|
+
data.tar.gz: 60ed17097e21be9d538c49e60b93ed0af556c62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c5029ab40c1bc6d42ef395fdc6ac1900e7f6e52c2d8e468e3d936d420c38a141be2e2de8b958df56a37b91ed12ad62959cf7d1121054fcba4de120f0a8a4f57
|
7
|
+
data.tar.gz: bb6c7d3eead1be286fdf3c7d45dfd702ab52cc6a7b83cc89526a5769c69948ea72f0f4444ecb5905a33163b25bead559562d2aa19174339cddbbeee8ed61e00b
|
@@ -76,7 +76,7 @@ module PayPal::SDK
|
|
76
76
|
options = { :refresh_token => options } if options.is_a? String
|
77
77
|
options = options.merge( :grant_type => "refresh_token" )
|
78
78
|
http_header = http_header.merge( { "Content-Type" => "application/x-www-form-urlencoded", "Authorization" => basic_auth_header(with_credentials(options)) } )
|
79
|
-
Tokeninfo.new(api.post(
|
79
|
+
Tokeninfo.new(api.post(PATH, options, http_header))
|
80
80
|
end
|
81
81
|
alias_method :refresh, :create_from_refresh_token
|
82
82
|
|
@@ -1173,21 +1173,25 @@ module PayPal::SDK
|
|
1173
1173
|
success?
|
1174
1174
|
end
|
1175
1175
|
|
1176
|
+
#
|
1176
1177
|
class << self
|
1177
|
-
def search(options)
|
1178
|
+
def search(options, access_token = nil)
|
1178
1179
|
path = "v1/invoicing/search"
|
1180
|
+
api.token = access_token unless access_token.nil?
|
1179
1181
|
response = api.post(path, options)
|
1180
1182
|
Invoices.new(response)
|
1181
1183
|
end
|
1182
1184
|
|
1183
|
-
def find(resource_id)
|
1185
|
+
def find(resource_id, access_token = nil)
|
1184
1186
|
raise ArgumentError.new("id required") if resource_id.to_s.strip.empty?
|
1185
1187
|
path = "v1/invoicing/invoices/#{resource_id}"
|
1188
|
+
api.token = access_token unless access_token.nil?
|
1186
1189
|
self.new(api.get(path))
|
1187
1190
|
end
|
1188
1191
|
|
1189
|
-
def get_all(options = {})
|
1192
|
+
def get_all(options = {}, access_token = nil)
|
1190
1193
|
path = "v1/invoicing/invoices/"
|
1194
|
+
api.token = access_token unless access_token.nil?
|
1191
1195
|
Invoices.new(api.get(path, options))
|
1192
1196
|
end
|
1193
1197
|
end
|
@@ -4,7 +4,7 @@ describe "Invoice", :integration => true do
|
|
4
4
|
|
5
5
|
InvoiceAttributes = {
|
6
6
|
"merchant_info" => {
|
7
|
-
"email" => "
|
7
|
+
"email" => "jaypatel512-facilitator@hotmail.com"
|
8
8
|
},
|
9
9
|
"billing_info" => [ { "email" => "example@example.com" } ],
|
10
10
|
"items" => [
|
@@ -31,8 +31,8 @@ describe "Invoice", :integration => true do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "get invoice" do
|
34
|
-
invoice = PayPal::SDK::REST::Invoice.find("INV2-
|
34
|
+
invoice = PayPal::SDK::REST::Invoice.find("INV2-6KYE-67GV-8AJR-SAER")
|
35
35
|
expect(invoice).to be_a PayPal::SDK::REST::Invoice
|
36
|
-
expect(invoice.id).to eql "INV2-
|
36
|
+
expect(invoice.id).to eql "INV2-6KYE-67GV-8AJR-SAER"
|
37
37
|
end
|
38
38
|
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.4.
|
4
|
+
version: 1.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|