paypal-sdk-permissions 1.96.3 → 1.96.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NDBlOGRlNmEyZmJkNTU3MTRkMDVhZWZlOGQ4Mjg3MjMyZjFhOWRhOQ==
5
- data.tar.gz: !binary |-
6
- NzdkMjMzMGZhOTY0NGFiNjk0MjI2ZjQ5MmUwYzVkNGM2ODNlN2Y2Nw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- NjQwZjBlOTE4NWI4YWU2Y2NiNDQ1NTJiMmI0ZTlkYmM3NWZjMTA4ZDk4Zjk5
10
- YTc5YzYxNDYzOTg0YzY2MzI4YWNlMDYyNTRlZTE3NjA1ODRiNmE5ZDE4MDE1
11
- MDk0YzMzNjU1YjA5NTI2ZDJiNzg5N2UyMTg1ZDViMzgxOTY1ZTg=
12
- data.tar.gz: !binary |-
13
- MGMxYWY3Y2I5Zjc0ODQ1NzgzNzgyODVjNmI5MjFkNDcyYzM0NjZlZmE3ODRk
14
- MWNhN2I0MWRjMGIyZmRjOWE1NTFmYTA3ZWNiYWVhMWI3NTQ0Mzk2MDIxODcz
15
- M2FlMzIyZDk3MDM3NmE4NmQ3MWZjZTNiZjU5Mzg2NTk3NTY2YjI=
2
+ SHA1:
3
+ metadata.gz: 790bed37ca770bc5587542503a23c8f2cabb531d
4
+ data.tar.gz: c878cbe3938e6e4bf40649cf680e10c16ed7aa54
5
+ SHA512:
6
+ metadata.gz: df0c490701951125e0ee5ae40f16b54b4e6410158ac60842eeba575e24ecacb800e9d83f70631872dd62e17f084766e4b8a0ab911afbd5e66f7e2c0dd974b378
7
+ data.tar.gz: 56e44efee026ffc3ef647f7dbb5fe491ab0c4dbf86f506f3a875da0ccd9a65e5f1c3cf8907498b26aab9700d131103205340dac28e599ed81558e9c9da65ecab
data/Gemfile CHANGED
@@ -15,3 +15,5 @@ end
15
15
  group :test do
16
16
  gem 'rspec'
17
17
  end
18
+
19
+ gem 'nokogiri', '~> 1.5.9', :platform => :mri_18
data/README.md CHANGED
@@ -64,32 +64,50 @@ PayPal::SDK::Core::Config.load('config/paypal.yml', ENV['RACK_ENV'] || 'develop
64
64
 
65
65
  ## Example
66
66
 
67
+ Request permission:
68
+
67
69
  ```ruby
68
70
  require 'paypal-sdk-permissions'
69
- @api = PayPal::SDK::Permissions::API.new(
71
+
72
+ PayPal::SDK.configure({
70
73
  :mode => "sandbox", # Set "live" for production
71
74
  :app_id => "APP-80W284485P519543T",
72
75
  :username => "jb-us-seller_api1.paypal.com",
73
76
  :password => "WX4WTU3S8MY44S7F",
74
- :signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" )
77
+ :signature => "AFcWxV21C7fd0v3bYYYRCpSSRl31A7yDhhsPUU2XhtMoZXsWHFxu-RWy" })
78
+
79
+ @api = PayPal::SDK::Permissions::API.new
75
80
 
76
81
  # Build request object
77
82
  @request_permissions = @api.build_request_permissions({
78
- :scope => ["EXPRESS_CHECKOUT","INVOICING"],
83
+ :scope => ["ACCESS_BASIC_PERSONAL_DATA","ACCESS_ADVANCED_PERSONAL_DATA"],
79
84
  :callback => "http://localhost:3000/samples/permissions/get_access_token" })
80
85
 
81
86
  # Make API call & get response
82
- @request_permissions_response = @api.request_permissions(@request_permissions)
87
+ @response = @api.request_permissions(@request_permissions)
83
88
 
84
89
  # Access Response
85
- if @request_permissions_response.success?
86
- @request_permissions_response.token
87
- @api.grant_permission_url(@request_permissions_response) # Redirect url to grant permissions
90
+ if @response.success?
91
+ @response.token
92
+ @api.grant_permission_url(@response) # Redirect url to grant permissions
88
93
  else
89
- @request_permissions_response.error
94
+ @response.error
90
95
  end
91
96
  ```
92
97
 
98
+ Make API call with `token` and `token_secret`:
99
+
100
+ ```ruby
101
+ @api = PayPal::SDK::Permissions::API.new({
102
+ :token => "3rMSi3kCmK1Q3.BKxkH29I53R0TRLrSuCO..l8AMOAFM6cQhPTTrfQ",
103
+ :token_secret => "RuE1j8RNRlSuL5T-PSSpVWLvOlI" })
104
+
105
+ @response = @api.get_basic_personal_data({
106
+ :attributeList => {
107
+ :attribute => [ "http://axschema.org/namePerson/first" ] } })
108
+ ```
109
+
110
+
93
111
  For more samples [https://paypal-sdk-samples.herokuapp.com/permissions/](https://paypal-sdk-samples.herokuapp.com/permissions/)
94
112
 
95
113
  ## Samples App
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module Permissions
4
- VERSION = "1.96.3"
4
+ VERSION = "1.96.4"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypal-sdk-permissions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.96.3
4
+ version: 1.96.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-26 00:00:00.000000000 Z
11
+ date: 2015-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paypal-sdk-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.3
19
+ version: 0.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.3
26
+ version: 0.3.0
27
27
  description: The PayPal Permission SDK provides Ruby APIs for developers to request
28
28
  and obtain permissions from merchants and consumers, to execute APIs on behalf of
29
29
  them. The permissions include variety of operations from processing payments to
@@ -34,20 +34,20 @@ executables: []
34
34
  extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
- - spec/permissions_spec.rb
38
- - spec/spec_helper.rb
39
- - spec/config/paypal.yml
40
- - spec/config/cert_key.pem
37
+ - Gemfile
38
+ - README.md
39
+ - Rakefile
41
40
  - lib/paypal-sdk-permissions.rb
42
41
  - lib/paypal-sdk/permissions.rb
42
+ - lib/paypal-sdk/permissions/api.rb
43
+ - lib/paypal-sdk/permissions/data_types.rb
43
44
  - lib/paypal-sdk/permissions/services.rb
44
45
  - lib/paypal-sdk/permissions/urls.rb
45
- - lib/paypal-sdk/permissions/api.rb
46
46
  - lib/paypal-sdk/permissions/version.rb
47
- - lib/paypal-sdk/permissions/data_types.rb
48
- - Rakefile
49
- - README.md
50
- - Gemfile
47
+ - spec/config/cert_key.pem
48
+ - spec/config/paypal.yml
49
+ - spec/permissions_spec.rb
50
+ - spec/spec_helper.rb
51
51
  homepage: https://developer.paypal.com
52
52
  licenses: []
53
53
  metadata: {}
@@ -57,22 +57,22 @@ require_paths:
57
57
  - lib
58
58
  required_ruby_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ! '>='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
69
  rubyforge_project:
70
- rubygems_version: 2.0.0
70
+ rubygems_version: 2.4.1
71
71
  signing_key:
72
72
  specification_version: 4
73
73
  summary: PayPal Permissions SDK
74
74
  test_files:
75
+ - spec/config/cert_key.pem
76
+ - spec/config/paypal.yml
75
77
  - spec/permissions_spec.rb
76
78
  - spec/spec_helper.rb
77
- - spec/config/paypal.yml
78
- - spec/config/cert_key.pem