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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e01168b996d2cd17b84b6a61e05ae19af58d4691
4
- data.tar.gz: 16f3f72b5c61e5c2b6745d7e2f43ec805b3a76d1
3
+ metadata.gz: 2490e56be1c78da53b019c1702f3d547df672024
4
+ data.tar.gz: bceeb80ea46eb51676489edcde9a6c419c9066f0
5
5
  SHA512:
6
- metadata.gz: 0452d37fb1b03f9b40ba21085567010cedab37451f74fc05217d4f76c5dd212aa96805a2d8718ec1eba81c6c720b4693a3b477e3d76dd0bfeaeaef1217edfb05
7
- data.tar.gz: bc894c391a9e1eece74d1d43ed9032bede1a7065c2c88ba4564179ea0aacdc9235af17b5c295bef9cfbbccb4419eed6ddffe56744ed97ef84c83525e479d0241
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.encode("UTF-8")
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
- Webhook.new(response)
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
 
@@ -1,7 +1,7 @@
1
1
  module PayPal
2
2
  module SDK
3
3
  module REST
4
- VERSION = "1.4.8"
4
+ VERSION = "1.4.9"
5
5
  end
6
6
  end
7
7
  end
@@ -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.8
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-19 00:00:00.000000000 Z
11
+ date: 2016-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls