paypal-sdk-rest 1.4.8 → 1.4.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paypal-sdk/rest/data_types.rb +11 -2
- data/lib/paypal-sdk/rest/version.rb +1 -1
- data/spec/web_profile_examples_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2490e56be1c78da53b019c1702f3d547df672024
|
4
|
+
data.tar.gz: bceeb80ea46eb51676489edcde9a6c419c9066f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ace6f59d27a3d96761684d8c89bb75f88e6d24e5a0542b1c60d827a4e409539a890762e151d5517c7147575b780062e906a4092fc32e6db4d04dc7faaebd3669
|
7
|
+
data.tar.gz: 48ed978938587c4b73b864ec6bb8c2153c8d17e532b7129c1147807c9e5d3aa6339377809ed5d386d7182cb9b8b046768711c22eb7cf0f5b9a72905d84ecb8bf
|
@@ -1328,7 +1328,7 @@ module PayPal::SDK
|
|
1328
1328
|
end
|
1329
1329
|
|
1330
1330
|
def get_expected_sig(transmission_id, timestamp, webhook_id, event_body)
|
1331
|
-
utf8_encoded_event_body = event_body.
|
1331
|
+
utf8_encoded_event_body = event_body.force_encoding("UTF-8")
|
1332
1332
|
crc = Zlib::crc32(utf8_encoded_event_body).to_s
|
1333
1333
|
transmission_id + "|" + timestamp + "|" + webhook_id + "|" + crc
|
1334
1334
|
end
|
@@ -2112,6 +2112,7 @@ module PayPal::SDK
|
|
2112
2112
|
object_of :flow_config, FlowConfig
|
2113
2113
|
object_of :input_fields, InputFields
|
2114
2114
|
object_of :presentation, Presentation
|
2115
|
+
object_of :temporary, Boolean
|
2115
2116
|
end
|
2116
2117
|
|
2117
2118
|
include RequestDataType
|
@@ -2120,7 +2121,7 @@ module PayPal::SDK
|
|
2120
2121
|
path = "v1/payment-experience/web-profiles/"
|
2121
2122
|
response = api.post(path, self.to_hash, http_header)
|
2122
2123
|
self.merge!(response)
|
2123
|
-
|
2124
|
+
WebProfile.new(response)
|
2124
2125
|
end
|
2125
2126
|
|
2126
2127
|
def update()
|
@@ -2156,6 +2157,13 @@ module PayPal::SDK
|
|
2156
2157
|
def get_list(options = {})
|
2157
2158
|
path = "v1/payment-experience/web-profiles/"
|
2158
2159
|
l = api.get(path, options)
|
2160
|
+
# The API is inconsistent in that it returns an array of WebProfiles
|
2161
|
+
# instead of a JSON object with a property which should be a list
|
2162
|
+
# of WebProfiles.
|
2163
|
+
#
|
2164
|
+
# Note that the WebProfileList is technically incorrect. It should
|
2165
|
+
# be a WebProfile.new() here, but due to backwards-compatibility,
|
2166
|
+
# may need to leave it as WebProfileList.
|
2159
2167
|
l.map { |x| WebProfileList.new(x) }
|
2160
2168
|
end
|
2161
2169
|
end
|
@@ -2197,6 +2205,7 @@ module PayPal::SDK
|
|
2197
2205
|
object_of :flow_config, FlowConfig
|
2198
2206
|
object_of :input_fields, InputFields
|
2199
2207
|
object_of :presentation, Presentation
|
2208
|
+
object_of :temporary, Boolean
|
2200
2209
|
end
|
2201
2210
|
end
|
2202
2211
|
|
@@ -34,6 +34,7 @@ describe "WebProfiles" do
|
|
34
34
|
|
35
35
|
# create webhook
|
36
36
|
$webprofile.create
|
37
|
+
expect($webprofile).to be_an_instance_of(WebProfile)
|
37
38
|
expect($webprofile.name.to_s).to eq($randname)
|
38
39
|
end
|
39
40
|
|
@@ -45,6 +46,7 @@ describe "WebProfiles" do
|
|
45
46
|
|
46
47
|
it "Retrieve" do
|
47
48
|
webprofile = WebProfile.find($webprofile.id)
|
49
|
+
expect(webprofile).to be_an_instance_of(WebProfile)
|
48
50
|
expect(webprofile.name.to_s).to eq($randname)
|
49
51
|
end
|
50
52
|
|
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.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PayPal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|