paypal-sdk-rest 1.4.6 → 1.4.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b89533a4472fd49262d9f3af777a8981fb4b04fc
4
- data.tar.gz: d67d08d9242c4d1415b1105eb785470821669698
3
+ metadata.gz: 6caede99d228cdad852593c3f30716e8655bb0b4
4
+ data.tar.gz: 60ed17097e21be9d538c49e60b93ed0af556c62f
5
5
  SHA512:
6
- metadata.gz: 25ee8a3be99ebcfc20ae86ee32ca46b4e64ae52768e3121a7ace3acea5345c77ef3a5bd0391b0840350792e728cb97da470d1aad16b30e0ea5dfe5f9ac534a85
7
- data.tar.gz: 1b19d84752d768358ab6b44ba8ff5c98576de6a32a033a0a1b7f3d820daa7bf5b88bfcacb2d886cdf6f2d9324c0ff45e087d6f38854bdf8c108459b5e3f46086
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(FP_PATH, options, http_header))
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
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module REST
4
- VERSION = "1.4.6"
4
+ VERSION = "1.4.7"
5
5
  end
6
6
  end
7
7
  end
@@ -4,7 +4,7 @@ describe "Invoice", :integration => true do
4
4
 
5
5
  InvoiceAttributes = {
6
6
  "merchant_info" => {
7
- "email" => "PPX.DevNet-facilitator@gmail.com"
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-P6VJ-36HG-BBVT-M2MA")
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-P6VJ-36HG-BBVT-M2MA"
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.6
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-14 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls