stripe 3.5.1 → 3.5.2

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: 6b7dbd882684aa750e2f41166db12d75e2cabae4
4
- data.tar.gz: 6e83b5c99ad759bc9f0788fc95cd171e5a67b0b1
3
+ metadata.gz: 37fac5005ed9a37c3996413717db00c9308bd1a2
4
+ data.tar.gz: 97f90fd989e7735522947754e60237ceb238c822
5
5
  SHA512:
6
- metadata.gz: 8a8e35eb52b5a40da94ca6a30b639b67bd029474d27728aa656de7c55ce52073a5ecaea2e0d0cd79e913bd4c58ecfef90bafef26b0d9a7a9e865894aec2245c9
7
- data.tar.gz: 3d97567c3dfc0762ee9fae4a00f13faf689a8042630d87bb8e0e638b26b4b907dfdb4229fcfa70cc686da79ae7fa38ab51d7baaf2c86bc676998139d1524243c
6
+ metadata.gz: b2d32411c530bb4b43c4c3313f0ed2867b2f1dfa0bade82185d155eaf5ec23a08f2e4d327278116d0e9045fe3b88f9d666a8f56367e6af2a42733610885c633b
7
+ data.tar.gz: 942c93711ce7de11108f2c9721af9a4dfdecdbb73714c3abdcf6f87cc42e2ac61f18f0e76059a5e318517f29c3c1c7c21221434db5afd2f0c79581a4c4ef4a1c
@@ -0,0 +1,544 @@
1
+ # Changelog
2
+
3
+ ## 3.5.2 - 2017-10-13
4
+ * [#592](https://github.com/stripe/stripe-ruby#592) Bring back `Marshal.dump/load` support with custom marshal encoder/decoder
5
+
6
+ ## 3.5.1 - 2017-10-12
7
+ * [#591](https://github.com/stripe/stripe-dotnet#591) Use thread-local `StripeClient` instances for thread safety
8
+
9
+ ## 3.5.0 - 2017-10-11
10
+ * [#589](https://github.com/stripe/stripe-dotnet#589) Rename source `delete` to `detach` (and deprecate the former)
11
+
12
+ ## 3.4.1 - 2017-10-05
13
+ * [#586](https://github.com/stripe/stripe-dotnet#586) Log query strings as well as form bodies with STRIPE_LOG
14
+ * [#588](https://github.com/stripe/stripe-dotnet#588) Require minimum Faraday 0.10 for bug fix in parameter encoding
15
+
16
+ ## 3.4.0 - 2017-09-20
17
+ * Mark legacy Bitcoin API as deprecated, and remove corresponding tests
18
+ * Mark recipients API as deprecated, and remove recipient card tests
19
+
20
+ ## 3.3.2 - 2017-09-20
21
+ * Correct minimum required Ruby version in gemspec (it's 2.0.0)
22
+
23
+ ## 3.3.1 - 2017-08-18
24
+ * Only parse webhook payload after verification to decrease likelihood of
25
+ attack
26
+
27
+ ## 3.3.0 - 2017-08-11
28
+ * Add support for standard library logger interface with `Stripe.logger`
29
+ * Error logs now go to stderr if using `Stripe.log_level`/`STRIPE_LOG`
30
+ * `Stripe.log_level`/`STRIPE_LOG` now support `Stipe::LEVEL_ERROR`
31
+
32
+ ## 3.2.0 - 2017-08-03
33
+ * Add logging for request retry account and `Stripe-Account` header
34
+
35
+ ## 3.1.0 - 2017-08-03
36
+ * Implement request logging with `Stripe.log_level` and `STRIPE_LOG`
37
+
38
+ ## 3.0.3 - 2017-07-28
39
+ * Revert `nil` to empty string coercion from 3.0.2
40
+ * Handle `invalid_client` OAuth error code
41
+ * Improve safety of error handling logic safer for unrecognized OAuth error codes
42
+
43
+ ## 3.0.2 - 2017-07-12 (yanked)
44
+ * Convert `nil` to empty string when serializing parameters (instead of opaquely dropping it) -- NOTE: this change has since been reverted
45
+
46
+ ## 3.0.1 - 2017-07-11
47
+ * Properties set with an API resource will now serialize that resource's ID if possible
48
+ * API resources will throw an ArgumentError on save if a property has been with an API resource that cannot be serialized
49
+
50
+ ## 3.0.0 - 2017-06-27
51
+ * `#pay` on invoice now takes params as well as opts
52
+
53
+ ## 2.12.0 - 2017-06-20
54
+ * Add support for ephemeral keys
55
+
56
+ ## 2.11.0 - 2017-05-26
57
+ * Warn when keys that look like opts are included as parameters
58
+
59
+ ## 2.10.0 - 2017-05-25
60
+ * Add support for account login links
61
+
62
+ ## 2.9.0 - 2017-05-18
63
+ * Support for OAuth operations in `Stripe::OAuth`
64
+
65
+ ## 2.8.0 - 2017-04-28
66
+ * Support for checking webhook signatures
67
+
68
+ ## 2.7.0 - 2017-04-26
69
+ * Add model `InvoiceLineItem`
70
+
71
+ ## 2.6.0 - 2017-04-26
72
+ * Add `OBJECT_NAME` constants to all API resources
73
+
74
+ ## 2.5.0 - 2017-04-24
75
+ * Make `opts` argument in `Util.convert_to_stripe_object` optional
76
+
77
+ ## 2.4.0 - 2017-04-18
78
+ * Add `Stripe.set_app_info` for use by plugin creators
79
+
80
+ ## 2.3.0 - 2017-04-14
81
+ * Add question mark accessor when assigning boolean value to undefined field
82
+
83
+ ## 2.2.1 - 2017-04-07
84
+ * Declare minimum required Faraday as 0.9
85
+
86
+ ## 2.2.0 - 2017-04-06
87
+ * Add support for payouts and recipient transfers
88
+
89
+ ## 2.1.0 - 2017-03-17
90
+ * Support for detaching sources from customers
91
+
92
+ ## 2.0.3 - 2017-03-16
93
+ * Fix marshalling of `StripeObjects` that have an embedded client
94
+
95
+ ## 2.0.2 - 2017-03-16
96
+ * Fix bad field reference when recovering from a JSON parsing problem
97
+
98
+ ## 2.0.1 - 2017-02-22
99
+ * Fix multipart parameter encoding to repair broken file uploads
100
+
101
+ ## 2.0.0 - 2017-02-14
102
+ * Drop support for Ruby 1.9
103
+ * Allow HTTP client that makes Stripe calls to be configured via Faraday
104
+ * Drop RestClient
105
+ * Switch to OpenAPI 2.0 spec and generated fixtures in test suite
106
+ * Switch to Webmock in test suite
107
+
108
+ ## 1.58.0 - 2017-01-19
109
+ * Remove erroneously added list methods for `Source` model
110
+
111
+ ## 1.57.1 - 2016-11-28
112
+ * Disallow sending protected fields along with API resource `.update`
113
+
114
+ ## 1.57.0 - 2016-11-21
115
+ * Add retrieve method for 3-D Secure resources
116
+
117
+ ## 1.56.2 - 2016-11-17
118
+ * Improve `StripeObject`'s `#to_s` to better handle how embedded objects are displayed
119
+
120
+ ## 1.56.1 - 2016-11-09
121
+ * Fix (fairly serious) memory like in `StripeObject`
122
+
123
+ ## 1.56.0 - 2016-10-24
124
+ * Add accessors for new fields added in `#update_attributes`
125
+ * Handle multi-plan subscriptions through new subscription items
126
+ * Handle 403 status codes from the API
127
+
128
+ ## 1.55.1 - 2016-10-24
129
+ Identical to 1.56.0 above. I incorrectly cut a patch-level release.
130
+
131
+ ## 1.55.0 - 2016-09-15
132
+ * Add support for Apple Pay domains
133
+
134
+ ## 1.54.0 - 2016-09-01
135
+ * Whitelist errors that should be retried; scope to known socket and HTTP errors
136
+
137
+ ## 1.53.0 - 2016-08-31
138
+ * Relax version constraint on rest-client (and by extension mime-types) for users on Ruby 2+
139
+
140
+ ## 1.52.0 - 2016-08-30
141
+ * Make sure `Subscription`'s `source` is saved with its parent
142
+
143
+ ## 1.51.1 - 2016-08-30
144
+ * Make sure `Account`'s `external_account` is saved with its parent
145
+
146
+ ## 1.51.0 - 2016-08-26
147
+ * Error when an array of maps is detected that cannot be accurately encoded
148
+ * Start using strings for header names instead of symbols for better clarity
149
+
150
+ ## 1.50.1 - 2016-08-25
151
+ * Fix encoding of arrays of maps where maps unequal sets of keys
152
+
153
+ ## 1.50.0 - 2016-08-15
154
+ * Allow sources to be created
155
+
156
+ ## 1.49.0 - 2016-07-28
157
+ * Add top-level `Source` model
158
+
159
+ ## 1.48.0 - 2016-07-12
160
+ * Add `ThreeDSecure` model for 3-D secure payments
161
+
162
+ ## 1.47.0 - 2016-07-11
163
+ * Allow rest-client version 2.0+ to be used with the gem
164
+
165
+ ## 1.46.0 - 2016-07-07
166
+ * Allow retry when a 409 conflict is encountered
167
+
168
+ ## 1.45.0 - 2016-07-07
169
+ * Do not send subresources when updating except when explicitly told to do so (see #433)
170
+
171
+ ## 1.44.0 - 2016-06-29
172
+ * Add `update` class method to all resources that can be updated
173
+
174
+ ## 1.43.1 - 2016-06-17
175
+ * Fix type of resource returned from `Order#return_order`
176
+
177
+ ## 1.43.0 - 2016-05-20
178
+ * Allow Relay orders to be returned and add associated types
179
+ * Support Alipay account retrieval and deletion
180
+
181
+ ## 1.42.0 - 2016-05-04
182
+ * Add support for the new /v1/subscriptions endpoint (retrieve, list, create, update, and delete)
183
+
184
+ ## 1.41.0 - 2016-04-13
185
+ * Add global `stripe_account` option that adds a `Stripe-Account` header to all requests
186
+
187
+ ## 1.40.0 - 2016-04-06
188
+ * Fix bug that omitted subresources from serialization
189
+
190
+ ## 1.39.0 - 2016-03-31
191
+ * Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1
192
+
193
+ ## 1.38.0 - 2016-03-18
194
+ * Allow `opts` to be passed to an API resource's `#save` method
195
+
196
+ ## 1.37.0 - 2016-03-14
197
+ * Add `Account#reject` to support the new API feature
198
+
199
+ ## 1.36.2 - 2016-03-14
200
+ * Fix reference to non-existent `#url` in `ListObject`
201
+
202
+ ## 1.36.1 - 2016-03-04
203
+ * Fix serialization when subhash given to `#save` or `#update_attributes`
204
+
205
+ ## 1.36.0 - 2016-02-08
206
+ * Add `CountrySpec` model for looking up country payment information
207
+
208
+ ## 1.35.1 - 2016-02-03
209
+ * Add compatibility layer for old API versions on `Charge#refund`
210
+
211
+ ## 1.35.0 - 2016-02-01
212
+ * Allow CA cert bundle location to be configured
213
+ * Updated bundled CA certs
214
+
215
+ ## 1.34.0 - 2016-01-25
216
+ * Add support for deleting products and SKUs
217
+
218
+ ## 1.33.1 - 2016-01-21
219
+ * Pass through arguments of `Charge#refund`
220
+
221
+ ## 1.33.0 - 2016-01-19
222
+ * Re-implement `Charge#refund` helper to use the modern endpoint suggested by docs
223
+
224
+ ## 1.32.1 - 2016-01-07
225
+ * Fix bug where ivar left uninitialized in StripeObject could error on serialization
226
+ * Fix bug where a nil customer from API could error Bitcoin model on refresh
227
+
228
+ ## 1.32.0 - 2016-01-05
229
+ * Add configuration to optionally retry network failures
230
+ * Use modern API endpoint for producing application fee refunds
231
+
232
+ ## 1.31.0 - 2015-10-29
233
+ * Add BankAccount#verify convenience method
234
+
235
+ ## 1.30.3 - 2015-10-28
236
+ * Fix bug where arrays that were not `additional_owners` were not properly encoded for requests
237
+
238
+ ## 1.30.2 - 2015-10-12
239
+ * Fix bug where `opts` didn't properly propagate to descendant `StripeObjects`
240
+
241
+ ## 1.30.1 - 2015-10-10
242
+ * Fix bug that prevent lists of hashes from being URI-encoded properly
243
+ * Fix bug where filter conditions were not making it past the first instantiated `ListObject`
244
+
245
+ ## 1.30.0 - 2015-10-09
246
+ * Add `StripeObject#deleted?` for a reliable way to check whether an object is alive
247
+ * Deprecate `StripeObject#refresh_from`
248
+ * New parameter encoding scheme that doesn't use `URI.escape`
249
+
250
+ ## 1.29.1 - 2015-10-06
251
+ * Fix bug where ampersands were not being properly encoded
252
+
253
+ ## 1.29.0 - 2015-10-05
254
+ * Add pagination helpers `#auto_paging_each`, `#previous_page`, and `#next_page`
255
+
256
+ ## 1.28.1 - 2015-10-05
257
+ * Fix URI being referenced by file upload resources
258
+
259
+ ## 1.28.0 - 2015-10-05
260
+ * Make StripeObject's #save "upsert"-like; creates an object if new
261
+ * Add #update_attributes to StripeObject for safe mass assignment
262
+ * Properly mass assign attributes on calls to #save
263
+ * Add question mark helpers for boolean fields (e.g. #paid? as well as old #paid)
264
+ * Fix a bug that broke the API for StripeObject initialization
265
+ * Remove use of deprecated URI.escape
266
+
267
+ ## 1.27.2 - 2015-09-25
268
+ * Correct the URLs used to fetch Bitcoin transactions.
269
+
270
+ ## 1.27.1 - 2015-09-20
271
+ * Use hash rockets for backwards compatibility.
272
+
273
+ ## 1.27.0 - 2015-09-14
274
+ * Add Orders, Products, and SKUs for Relay
275
+
276
+ ## 1.26.0 - 2015-09-11
277
+ * Add support for 429 Rate Limited response
278
+
279
+ ## 1.25.0 - 2015-08-17
280
+ * Added support for refund listing and retrieval without an associated charge
281
+
282
+ ## 1.24.0 - 2015-08-03
283
+ * Added support for deleting managed accounts
284
+ * Added support for dispute listing and retrieval
285
+ * Bugfix: token objects now are the correct class
286
+
287
+ ## 1.23.0 - 2015-07-06
288
+ * Added request IDs and HTTP headers to errors
289
+
290
+ ## 1.22.0 - 2015-06-10
291
+ * Added support for bank accounts and debit cards in managed accounts (via the `external_accounts` param)
292
+
293
+ ## 1.21.0 - 2015-04-14
294
+ * Remove TLS cert revocation check (all pre-heartbleed certs have expired)
295
+ * Bugfix: don't unset keys when they don't exist on StripeObject
296
+
297
+ ## 1.20.4 - 2015-03-26
298
+ * Raise an error when explicitly passing nil as the API key on resource methods
299
+ * Fix error when passing an API key to Balance.retrieve (github issue #232)
300
+
301
+ ## 1.20.3 - 2015-03-13
302
+ * Fixed error when updating certain resources (github issue #224)
303
+
304
+ ## 1.20.2 - 2015-03-10
305
+ * Added support for updating nested hashes besides `metadata` (which was already supported)
306
+ * Fixed bug in balance retrieval
307
+
308
+ ## 1.20.1 - 2015-02-26
309
+ * Updated Card to point to customer sources endpoint when customer property is set
310
+
311
+ ## 1.20.0 - 2015-02-19
312
+ * Added Update & Delete operations to Bitcoin Receivers
313
+
314
+ ## 1.19.1 - 2015-02-18
315
+ * Fixed fetching upcoming invoice/paying invoice methods
316
+
317
+ ## 1.19.0 - 2015-02-15
318
+ * Support for new Transfers /reversals endpoint
319
+ * Account retrieval now optionally accepts an account ID
320
+ * Better support for passing custom headers, like Stripe-Account, through requests
321
+
322
+ ## 1.18.0 - 2015-01-21
323
+ * 1 major enhancement:
324
+ * Added support for making bitcoin charges through BitcoinReceiver source object
325
+
326
+ ## 1.17.3 - 2015-01-12
327
+ * 1 bugfix:
328
+ * Fixed API key propagation for ApplicationFee#refund
329
+
330
+ ## 1.17.2 - 2015-01-08
331
+ * 1 bugfix:
332
+ * Fixed API key propagation for child resources
333
+
334
+ ## 1.17.1 - 2015-01-07
335
+ * 2 minor enhacements:
336
+ * Fixed dependencies for Ruby versions less than 1.9.3
337
+ * Added deauthorize method to Account object
338
+
339
+ ## 1.17.0 - 2014-12-15
340
+ * 1 major enhacement:
341
+ * File uploads resource was added (for uploading pdf or image documents for disputes)
342
+
343
+ ## 1.16.1 - 2014-12-19
344
+ * 2 minor enhancements:
345
+ * Ability to send idempotent requests
346
+ * Ability to specify stripe account as a header
347
+
348
+ ## 1.16.0 - 2014-10-08
349
+ * 1 minor enhacement:
350
+ * Coupons now support update operations - useful for manipulating metadata
351
+
352
+ ## 1.15.0 - 2014-07-26
353
+ * 1 major enhacement:
354
+ * Application Fee refunds now a list instead of array
355
+
356
+ ## 1.14.0 - 2014-06-17
357
+ * 1 major enhancement:
358
+ * Add metadata for refunds and disputes
359
+
360
+ ## 1.13.0 - 2014-05-28
361
+ * 1 major enhancement:
362
+ * Support for canceling transfers
363
+
364
+ ## 1.12.0 - 2014-05-21
365
+ * 1 major enhancement:
366
+ * Support for cards for recipients
367
+
368
+ ## 1.11.0 - 2014-04-09
369
+ * 2 minor enhancements:
370
+ * Update included ca bundles
371
+ * Implement certificate blacklisting
372
+
373
+ ## 1.10.2 - 2014-02-18
374
+ * 1 minor enhancement:
375
+ * Add create_subscription on Customer resources, so you can create
376
+ subscriptions without needing to retrieve the customer first (github
377
+ issue #120)
378
+
379
+ ## 1.10.1 - 2014-02-03
380
+ * 1 bugfix:
381
+ * Fix marshaling of StripeObjects
382
+
383
+ ## 1.10.0 - 2014-01-29
384
+ * 2 major enhancements
385
+ * Support for multiple subscriptions per customer
386
+ * Testing ruby 2.1.0
387
+
388
+ * 2 minor enhancements
389
+ * Replace multi_json with json
390
+ * Allow #save to take opts (for :expand)
391
+
392
+ * 1 bugfix
393
+ * Fix #try and #respond_to? on StripeObjects
394
+
395
+ ## 1.9.9 - 2013-12-02
396
+ * 1 major enhancement
397
+ * Add ApplicationFee resource
398
+
399
+ ## 1.8.9 - 2013-11-14
400
+ * 2 bugfixes:
401
+ * Fix gemspec dependencies so the gem doesn't break for Ruby 1.8 users
402
+ * Fix api_resource_test to not use returns as a way of testing rescue behavior
403
+
404
+ ## 1.8.8 - 2013-10-3
405
+ * 1 major enhancement
406
+ * Add support for metadata on resources
407
+
408
+ ## 1.8.7 - 2013-08-18
409
+ * 1 minor enhancement
410
+ * Add support for closing disputes.
411
+
412
+ ## 1.8.6 - 2013-08-13
413
+ * 1 major enhancement
414
+ * Add Balance and BalanceTransaction resources
415
+
416
+ ## 1.8.5 - 2013-08-12
417
+ * 1 major enhancement
418
+ * Add support for unsetting attributes by setting to nil. This permits unsetting email and description on customers and description on charges. Setting properties to a blank string is now an error.
419
+ * Attempting to set an object's id is now an error
420
+
421
+ ## 1.8.4 - 2013-07-11
422
+ * 1 major enhancement
423
+ * Add support for new cards API (Stripe API version - 2013-07-05)
424
+
425
+ ## 1.8.3 - 2013-05-06
426
+ * 1 bugfix:
427
+ * Fix handling of per-call API keys (github issue #67)
428
+
429
+ ## 1.8.2 - 2013-05-01
430
+ * 3 minor enhancements:
431
+ * Use to_sym instead of type checking for minor performance improvement (github issue #59)
432
+ * Handle low-memory situations without throwing an exception (github issue #61)
433
+ * Add an Customer#upcoming_invoice convenience method (github issue #65)
434
+
435
+ * 1 bugfix:
436
+ * Allow updating resources without first retrieving them (github issue #60)
437
+
438
+ ## 1.8.1 - 2013-04-19
439
+ * 1 minor enhancement:
440
+ * Add support for specifying an API key when retrieving an upcoming invoice
441
+
442
+ ## 1.8.0 - 2013-04-11
443
+ * 1 major enhancement:
444
+ * Add new Recipient resource
445
+ * Allow Transfers to be createable
446
+
447
+ ## 1.7.11 - 2013-02-21
448
+ * 1 minor enhancement
449
+ * Add 'id' to the list of permanent attributes
450
+
451
+ ## 1.7.10 - 2013-02-01
452
+ * 1 major enhancement
453
+ * Add support for passing options when retrieving Stripe objects e.g., Stripe::Charge.retrieve({id:"foo", expand:["customer"]}) Stripe::Charge("foo") is still supported as well
454
+
455
+ ## 1.7.9 - 2013-01-15
456
+ * 1 major enhancement
457
+ * Add support for setting a Stripe API version override.
458
+
459
+ ## 1.7.8 - 2012-11-21
460
+ * 1 bugfix
461
+ * Relax the version constraint on multi_json (github issue #44)
462
+
463
+ ## 1.7.7 - 2012-11-07
464
+ * 1 minor enhancement:
465
+ * Add support for updating charge disputes
466
+
467
+ * 1 bugfix
468
+ * Fix Account API resource bug
469
+
470
+ ## 1.7.6 - 2012-10-30
471
+ * 1 major enhancement
472
+ * Add support for creating invoices
473
+
474
+ ## 1.7.5 - 2012-10-25
475
+ * 1 major enhancement
476
+ * Add support for new API lists
477
+
478
+ ## 1.7.4 - 2012-10-08
479
+ * 1 bugfix
480
+ * Fix bug introduced in 1.7.3 calling API methods that take no
481
+ arguments, like Stripe::Invoice#pay (github issue #42)
482
+
483
+ ## 1.7.3 - 2012-09-14
484
+ * 2 bugfixes
485
+ * Make sure that both keys and values of GET params are URL-encoded. NOTE: If you were previously URL-encoding values yourself, you may need to adjust your code.
486
+ * URL-encode POST params directly, instead of allowing rest-client to do it to work around an unfortunate interaction with the hashery gem (github issue #38)
487
+
488
+ ## 1.7.2 - 2012-08-31
489
+ * 1 major enhancement
490
+ * Add support for new pay and update methods for Invoice objects
491
+
492
+ ## 1.7.1 - 2012-08-15
493
+ * 1 major enhancement
494
+ * Add new Account API resource
495
+
496
+ ## 1.7.0 - 2012-05-17
497
+ * 3 major enhancements:
498
+ * Switch from vendored stripe-json to multi_json for all JSON parsing and rendering. This should not impact programmatic usage of the library, but may cause small rendering differences from, e.g., StripeObject#inspect (github issue #22)
499
+ * Add new delete_discount method to Customer objects
500
+ * Add new Transfer API resource
501
+
502
+ * 2 minor enhancements:
503
+ * Switch from HTTP Basic auth to Bearer auth (Note: Stripe will support Basic auth for the indefinite future, but recommends Bearer auth when possible going forward)
504
+ * Numerous test suite improvements
505
+
506
+ ## 1.6.3 - 2012-03-22
507
+ * 1 bugfix:
508
+ * Encode GET query strings ourselves instead of using rest-client to work around a bug
509
+
510
+ ## 1.6.2 - 2012-02-24
511
+ * 1 bugfix:
512
+ * Correct argument handling in StripeObject#as_json
513
+
514
+ ## 1.6.1 - 2012-02-22
515
+ * 1 bugfix:
516
+ * Fix StripeObject#inspect when ActiveSupport 3.0 is loaded
517
+
518
+ ## 1.6.0 - 2012-02-01
519
+ * A whole bunch of releases between 1.5.0 and 1.6.0, but few changes, mainly the addition of plans, coupons, events, and tokens
520
+ * 1.6.0 also contains a new inspect/to_string implementation
521
+
522
+ ## 1.5.0 - 2011-05-09
523
+ * 1 major enhancement:
524
+ * Update for new RESTful API
525
+
526
+ ## 1.3.4 - 2011-01-07
527
+ * 1 major enhancement:
528
+ * Rename to Stripe
529
+
530
+ ## 1.2 - 2010-06-06
531
+ * 1 major enhancement:
532
+ * Support for the set_customer_subscription and delete_customer API methods
533
+
534
+ ## 1.1 - 2010-03-14
535
+ * 1 major enhancement:
536
+ * Support for recurring billing
537
+
538
+ ## 1.0 - 2010-01-05
539
+ * 1 major enhancement:
540
+ * Initial release
541
+
542
+ <!--
543
+ # vim: set tw=0:
544
+ -->
@@ -1,711 +1 @@
1
- === 3.5.1 2017-10-12
2
-
3
- * [#591] Use thread-local `StripeClient` instances for thread safety
4
-
5
- === 3.5.0 2017-10-11
6
-
7
- * [#589] Rename source `delete` to `detach` (and deprecate the former)
8
-
9
- === 3.4.1 2017-10-05
10
-
11
- * [#586] Log query strings as well as form bodies with STRIPE_LOG
12
- * [#588] Require minimum Faraday 0.10 for bug fix in parameter encoding
13
-
14
- === 3.4.0 2017-09-20
15
-
16
- * Mark legacy Bitcoin API as deprecated, and remove corresponding tests
17
- * Mark recipients API as deprecated, and remove recipient card tests
18
-
19
- === 3.3.2 2017-09-20
20
-
21
- * Correct minimum required Ruby version in gemspec (it's 2.0.0)
22
-
23
- === 3.3.1 2017-08-18
24
-
25
- * Only parse webhook payload after verification to decrease likelihood of
26
- attack
27
-
28
- === 3.3.0 2017-08-11
29
-
30
- * Add support for standard library logger interface with `Stripe.logger`
31
- * Error logs now go to stderr if using `Stripe.log_level`/`STRIPE_LOG`
32
- * `Stripe.log_level`/`STRIPE_LOG` now support `Stipe::LEVEL_ERROR`
33
-
34
- === 3.2.0 2017-08-03
35
-
36
- * Add logging for request retry account and `Stripe-Account` header
37
-
38
- === 3.1.0 2017-08-03
39
-
40
- * Implement request logging with `Stripe.log_level` and `STRIPE_LOG`
41
-
42
- === 3.0.3 2017-07-28
43
-
44
- * Revert `nil` to empty string coercion from 3.0.2
45
- * Handle `invalid_client` OAuth error code
46
- * Improve safety of error handling logic safer for unrecognized OAuth error
47
- codes
48
-
49
- === 3.0.2 2017-07-12 (yanked)
50
-
51
- * Convert `nil` to empty string when serializing parameters (instead of
52
- opaquely dropping it) -- NOTE: this change has since been reverted
53
-
54
- === 3.0.1 2017-07-11
55
-
56
- * Properties set with an API resource will now serialize that resource's ID if
57
- possible
58
- * API resources will throw an ArgumentError on save if a property has been with
59
- an API resource that cannot be serialized
60
-
61
- === 3.0.0 2017-06-27
62
-
63
- * `#pay` on invoice now takes params as well as opts
64
-
65
- === 2.12.0 2017-06-20
66
-
67
- * Add support for ephemeral keys
68
-
69
- === 2.11.0 2017-05-26
70
-
71
- * Warn when keys that look like opts are included as parameters
72
-
73
- === 2.10.0 2017-05-25
74
-
75
- * Add support for account login links
76
-
77
- === 2.9.0 2017-05-18
78
-
79
- * Support for OAuth operations in `Stripe::OAuth`
80
-
81
- === 2.8.0 2017-04-28
82
-
83
- * Support for checking webhook signatures
84
-
85
- === 2.7.0 2017-04-26
86
-
87
- * Add model `InvoiceLineItem`
88
-
89
- === 2.6.0 2017-04-26
90
-
91
- * Add `OBJECT_NAME` constants to all API resources
92
-
93
- === 2.5.0 2017-04-24
94
-
95
- * Make `opts` argument in `Util.convert_to_stripe_object` optional
96
-
97
- === 2.4.0 2017-04-18
98
-
99
- * Add `Stripe.set_app_info` for use by plugin creators
100
-
101
- === 2.3.0 2017-04-14
102
-
103
- * Add question mark accessor when assigning boolean value to undefined field
104
-
105
- === 2.2.1 2017-04-07
106
-
107
- * Declare minimum required Faraday as 0.9
108
-
109
- === 2.2.0 2017-04-06
110
-
111
- * Add support for payouts and recipient transfers
112
-
113
- === 2.1.0 2017-03-17
114
-
115
- * Support for detaching sources from customers
116
-
117
- === 2.0.3 2017-03-16
118
-
119
- * Fix marshalling of `StripeObjects` that have an embedded client
120
-
121
- === 2.0.2 2017-03-16
122
-
123
- * Fix bad field reference when recovering from a JSON parsing problem
124
-
125
- === 2.0.1 2017-02-22
126
-
127
- * Fix multipart parameter encoding to repair broken file uploads
128
-
129
- === 2.0.0 2017-02-14
130
-
131
- * Drop support for Ruby 1.9
132
- * Allow HTTP client that makes Stripe calls to be configured via Faraday
133
- * Drop RestClient
134
- * Switch to OpenAPI 2.0 spec and generated fixtures in test suite
135
- * Switch to Webmock in test suite
136
-
137
- === 1.58.0 2017-01-19
138
-
139
- * Remove erroneously added list methods for `Source` model
140
-
141
- === 1.57.1 2016-11-28
142
-
143
- * Disallow sending protected fields along with API resource `.update`
144
-
145
- === 1.57.0 2016-11-21
146
-
147
- * Add retrieve method for 3-D Secure resources
148
-
149
- === 1.56.2 2016-11-17
150
-
151
- * Improve `StripeObject`'s `#to_s` to better handle how embedded objects are displayed
152
-
153
- === 1.56.1 2016-11-09
154
-
155
- * Fix (fairly serious) memory like in `StripeObject`
156
-
157
- === 1.56.0 2016-10-24
158
-
159
- * Add accessors for new fields added in `#update_attributes`
160
- * Handle multi-plan subscriptions through new subscription items
161
- * Handle 403 status codes from the API
162
-
163
- === 1.55.1 2016-10-24
164
-
165
- Identical to 1.56.0 above. I incorrectly cut a patch-level release.
166
-
167
- === 1.55.0 2016-09-15
168
-
169
- * Add support for Apple Pay domains
170
-
171
- === 1.54.0 2016-09-01
172
-
173
- * Whitelist errors that should be retried; scope to known socket and HTTP errors
174
-
175
- === 1.53.0 2016-08-31
176
-
177
- * Relax version constraint on rest-client (and by extension mime-types) for users on Ruby 2+
178
-
179
- === 1.52.0 2016-08-30
180
-
181
- * Make sure `Subscription`'s `source` is saved with its parent
182
-
183
- === 1.51.1 2016-08-30
184
-
185
- * Make sure `Account`'s `external_account` is saved with its parent
186
-
187
- === 1.51.0 2016-08-26
188
-
189
- * Error when an array of maps is detected that cannot be accurately encoded
190
- * Start using strings for header names instead of symbols for better clarity
191
-
192
- === 1.50.1 2016-08-25
193
-
194
- * Fix encoding of arrays of maps where maps unequal sets of keys
195
-
196
- === 1.50.0 2016-08-15
197
-
198
- * Allow sources to be created
199
-
200
- === 1.49.0 2016-07-28
201
-
202
- * Add top-level `Source` model
203
-
204
- === 1.48.0 2016-07-12
205
-
206
- * Add `ThreeDSecure` model for 3-D secure payments
207
-
208
- === 1.47.0 2016-07-11
209
-
210
- * Allow rest-client version 2.0+ to be used with the gem
211
-
212
- === 1.46.0 2016-07-07
213
-
214
- * Allow retry when a 409 conflict is encountered
215
-
216
- === 1.45.0 2016-07-07
217
-
218
- * Do not send subresources when updating except when explicitly told to do so (see #433)
219
-
220
- === 1.44.0 2016-06-29
221
-
222
- * Add `update` class method to all resources that can be updated
223
-
224
- === 1.43.1 2016-06-17
225
-
226
- * Fix type of resource returned from `Order#return_order`
227
-
228
- === 1.43.0 2016-05-20
229
-
230
- * Allow Relay orders to be returned and add associated types
231
- * Support Alipay account retrieval and deletion
232
-
233
- === 1.42.0 2016-05-04
234
-
235
- * Add support for the new /v1/subscriptions endpoint
236
- * Stripe::Subscription.retrieve
237
- * Stripe::Subscription.list
238
- * Stripe::Subscription.create
239
- * Stripe::Subscription.update
240
- * Stripe::Subscription.delete
241
-
242
- === 1.41.0 2016-04-13
243
-
244
- * Add global `stripe_account` option that adds a `Stripe-Account` header to all requests
245
-
246
- === 1.40.0 2016-04-06
247
-
248
- * Fix bug that omitted subresources from serialization
249
-
250
- === 1.39.0 2016-03-31
251
-
252
- * Update CA cert bundle for compatibility with OpenSSL versions below 1.0.1
253
-
254
- === 1.38.0 2016-03-18
255
-
256
- * Allow `opts` to be passed to an API resource's `#save` method
257
-
258
- === 1.37.0 2016-03-14
259
-
260
- * Add `Account#reject` to support the new API feature
261
-
262
- === 1.36.2 2016-03-14
263
-
264
- * Fix reference to non-existent `#url` in `ListObject`
265
-
266
- === 1.36.1 2016-03-04
267
-
268
- * Fix serialization when subhash given to `#save` or `#update_attributes`
269
-
270
- === 1.36.0 2016-02-08
271
-
272
- * Add `CountrySpec` model for looking up country payment information
273
-
274
- === 1.35.1 2016-02-03
275
-
276
- * Add compatibility layer for old API versions on `Charge#refund`
277
-
278
- === 1.35.0 2016-02-01
279
-
280
- * Allow CA cert bundle location to be configured
281
- * Updated bundled CA certs
282
-
283
- === 1.34.0 2016-01-25
284
-
285
- * Add support for deleting products and SKUs
286
-
287
- === 1.33.1 2016-01-21
288
-
289
- * Pass through arguments of `Charge#refund`
290
-
291
- === 1.33.0 2016-01-19
292
-
293
- * Re-implement `Charge#refund` helper to use the modern endpoint suggested by docs
294
-
295
- === 1.32.1 2016-01-07
296
-
297
- * Fix bug where ivar left uninitialized in StripeObject could error on serialization
298
- * Fix bug where a nil customer from API could error Bitcoin model on refresh
299
-
300
- === 1.32.0 2016-01-05
301
-
302
- * Add configuration to optionally retry network failures
303
- * Use modern API endpoint for producing application fee refunds
304
-
305
- === 1.31.0 2015-10-29
306
-
307
- * Add BankAccount#verify convenience method
308
-
309
- === 1.30.3 2015-10-28
310
-
311
- * Fix bug where arrays that were not `additional_owners` were not properly encoded for requests
312
-
313
- === 1.30.2 2015-10-12
314
-
315
- * Fix bug where `opts` didn't properly propagate to descendant `StripeObjects`
316
-
317
- === 1.30.1 2015-10-10
318
-
319
- * Fix bug that prevent lists of hashes from being URI-encoded properly
320
- * Fix bug where filter conditions were not making it past the first instantiated `ListObject`
321
-
322
- === 1.30.0 2015-10-09
323
-
324
- * Add `StripeObject#deleted?` for a reliable way to check whether an object is alive
325
- * Deprecate `StripeObject#refresh_from`
326
- * New parameter encoding scheme that doesn't use `URI.escape`
327
-
328
- === 1.29.1 2015-10-06
329
-
330
- * Fix bug where ampersands were not being properly encoded
331
-
332
- === 1.29.0 2015-10-05
333
-
334
- * Add pagination helpers `#auto_paging_each`, `#previous_page`, and `#next_page`
335
-
336
- === 1.28.1 2015-10-05
337
-
338
- * Fix URI being referenced by file upload resources
339
-
340
- === 1.28.0 2015-10-05
341
-
342
- * Make StripeObject's #save "upsert"-like; creates an object if new
343
- * Add #update_attributes to StripeObject for safe mass assignment
344
- * Properly mass assign attributes on calls to #save
345
- * Add question mark helpers for boolean fields (e.g. #paid? as well as old #paid)
346
- * Fix a bug that broke the API for StripeObject initialization
347
- * Remove use of deprecated URI.escape
348
-
349
- === 1.27.2 2015-09-25
350
-
351
- * Correct the URLs used to fetch Bitcoin transactions.
352
-
353
- === 1.27.1 2015-09-20
354
-
355
- * Use hash rockets for backwards compatibility.
356
-
357
- === 1.27.0 2015-09-14
358
-
359
- * Add Orders, Products, and SKUs for Relay.
360
-
361
- === 1.26.0 2015-09-11
362
-
363
- * Add support for 429 Rate Limited response
364
-
365
- === 1.25.0 2015-08-17
366
-
367
- * Added support for refund listing and retrieval without an associated charge
368
-
369
- === 1.24.0 2015-08-03
370
-
371
- * Added support for deleting managed accounts
372
- * Added support for dispute listing and retrieval
373
- * Bugfix: token objects now are the correct class
374
-
375
- === 1.23.0 2015-07-06
376
-
377
- * Added request IDs and HTTP headers to errors.
378
-
379
- === 1.22.0 2015-06-10
380
-
381
- * Added support for bank accounts and debit cards in managed accounts (via the `external_accounts` param)
382
-
383
- === 1.21.0 2015-04-14
384
-
385
- * Remove TLS cert revocation check. (All pre-heartbleed certs have expired.)
386
- * Bugfix: don't unset keys when they don't exist on StripeObject.
387
-
388
- === 1.20.4 2015-03-26
389
-
390
- * Raise an error when explicitly passing nil as the API key on resource methods
391
- * Fix error when passing an API key to Balance.retrieve (github issue #232)
392
-
393
- === 1.20.3 2015-03-13
394
-
395
- * Fixed error when updating certain resources (github issue #224)
396
-
397
- === 1.20.2 2015-03-10
398
-
399
- * Added support for updating nested hashes besides `metadata` (which was already supported)
400
- * Fixed bug in balance retrieval
401
-
402
- === 1.20.1 2015-02-26
403
-
404
- * Updated Card to point to customer sources endpoint when customer property is set
405
-
406
- === 1.20.0 2015-02-19
407
-
408
- * Added Update & Delete operations to Bitcoin Receivers
409
-
410
- === 1.19.1 2015-02-18
411
-
412
- * Fixed fetching upcoming invoice/paying invoice methods
413
-
414
- === 1.19.0 2015-02-15
415
-
416
- * Support for new Transfers /reversals endpoint
417
- * Account retrieval now optionally accepts an account ID
418
- * Better support for passing custom headers, like Stripe-Account, through requests
419
-
420
- === 1.18.0 2015-01-21
421
-
422
- * 1 major enhancement:
423
- * Added support for making bitcoin charges through BitcoinReceiver source object
424
-
425
- === 1.17.3 2015-01-12
426
-
427
- * 1 bugfix:
428
- * Fixed API key propagation for ApplicationFee#refund
429
-
430
- === 1.17.2 2015-01-08
431
-
432
- * 1 bugfix:
433
- * Fixed API key propagation for child resources
434
-
435
- === 1.17.1 2015-01-07
436
-
437
- * 2 minor enhacements:
438
- * Fixed dependencies for Ruby versions less than 1.9.3
439
- * Added deauthorize method to Account object
440
-
441
- === 1.17.0 2014-12-15
442
-
443
- * 1 major enhacement:
444
- * File uploads resource was added (for uploading pdf or image documents for
445
- disputes)
446
-
447
- === 1.16.1 2014-12-19
448
-
449
- * 2 minor enhancements:
450
- * Ability to send idempotent requests
451
- * Ability to specify stripe account as a header.
452
-
453
- === 1.16.0 2014-10-08
454
-
455
- * 1 minor enhacement:
456
- * Coupons now support update operations - useful for manipulating metadata.
457
-
458
- === 1.15.0 2014-07-26
459
-
460
- * 1 major enhacement:
461
- * Application Fee refunds now a list instead of array
462
-
463
- === 1.14.0 2014-06-17
464
-
465
- * 1 major enhancement:
466
- * Add metadata for refunds and disputes
467
-
468
- === 1.13.0 2014-05-28
469
-
470
- * 1 major enhancement:
471
- * Support for canceling transfers
472
-
473
- === 1.12.0 2014-05-21
474
-
475
- * 1 major enhancement:
476
- * Support for cards for recipients.
477
-
478
- === 1.11.0 2014-04-09
479
-
480
- * 2 minor enhancements:
481
- * Update included ca bundles
482
- * Implement certificate blacklisting
483
-
484
- === 1.10.2 2014-02-18
485
-
486
- * 1 minor enhancement:
487
- * Add create_subscription on Customer resources, so you can create
488
- subscriptions without needing to retrieve the customer first (github
489
- issue #120)
490
-
491
- === 1.10.1 2014-02-03
492
-
493
- * 1 bugfix:
494
- * Fix marshaling of StripeObjects
495
-
496
- === 1.10.0 2014-01-29
497
-
498
- * 2 major enhancements
499
- * Support for multiple subscriptions per customer
500
- * Testing ruby 2.1.0
501
-
502
- * 2 minor enhancements
503
- * Replace multi_json with json
504
- * Allow #save to take opts (for :expand)
505
-
506
- * 1 bugfix
507
- * Fix #try and #respond_to? on StripeObjects
508
-
509
- === 1.9.9 2013-12-02
510
-
511
- * 1 major enhancement
512
- * Add ApplicationFee resource
513
-
514
- === 1.8.9 2013-11-14
515
-
516
- * 2 bugfixes:
517
- * Fix gemspec dependencies so the gem doesn't break for Ruby 1.8 users
518
- * Fix api_resource_test to not use returns as a way of testing rescue behavior
519
-
520
- === 1.8.8 2013-10-3
521
-
522
- * 1 major enhancement
523
- * Add support for metadata on resources
524
-
525
- === 1.8.7 2013-08-18
526
-
527
- * 1 minor enhancement
528
- * Add support for closing disputes.
529
-
530
- === 1.8.6 2013-08-13
531
-
532
- * 1 major enhancement
533
- * Add Balance and BalanceTransaction resources
534
-
535
- === 1.8.5 2013-08-12
536
-
537
- * 1 major enhancement
538
- * Add support for unsetting attributes by setting to nil. This permits
539
- unsetting email and description on customers and description on charges.
540
- Setting properties to a blank string is now an error.
541
- * Attempting to set an object's id is now an error.
542
-
543
- === 1.8.4 2013-07-11
544
-
545
- * 1 major enhancement
546
- * Add support for new cards API (Stripe API version 2013-07-05)
547
-
548
- === 1.8.3 2013-05-06
549
-
550
- * 1 bugfix:
551
- * Fix handling of per-call API keys (github issue #67)
552
-
553
- === 1.8.2 2013-05-01
554
-
555
- * 3 minor enhancements:
556
- * Use to_sym instead of type checking for minor performance
557
- improvement (github issue #59)
558
- * Handle low-memory situations without throwing an exception (github
559
- issue #61)
560
- * Add an Customer#upcoming_invoice convenience method (github issue
561
- #65)
562
-
563
- * 1 bugfix:
564
- * Allow updating resources without first retrieving them (github
565
- issue #60)
566
-
567
- === 1.8.1 2013-04-19
568
-
569
- * 1 minor enhancement:
570
- * Add support for specifying an API key when retrieving an upcoming invoice
571
-
572
- === 1.8.0 2013-04-11
573
-
574
- * 1 major enhancement:
575
- * Add new Recipient resource
576
- * Allow Transfers to be createable
577
-
578
- === 1.7.11 2013-02-21
579
-
580
- * 1 minor enhancement
581
- * Add 'id' to the list of permanent attributes
582
-
583
- === 1.7.10 2013-02-01
584
-
585
- * 1 major enhancement
586
- * Add support for passing options when retrieving Stripe objects
587
- e.g., Stripe::Charge.retrieve({id:"foo", expand:["customer"]})
588
- Stripe::Charge("foo") is still supported as well
589
-
590
- === 1.7.9 2013-01-15
591
-
592
- * 1 major enhancement
593
- * Add support for setting a Stripe API version override.
594
-
595
- === 1.7.8 2012-11-21
596
-
597
- * 1 bugfix
598
- * Relax the version constraint on multi_json (github issue #44)
599
-
600
- === 1.7.7 2012-11-07
601
-
602
- * 1 minor enhancement:
603
- * Add support for updating charge disputes
604
-
605
- * 1 bugfix
606
- * Fix Account API resource bug
607
-
608
- === 1.7.6 2012-10-30
609
-
610
- * 1 major enhancement
611
- * Add support for creating invoices
612
-
613
- === 1.7.5 2012-10-25
614
-
615
- * 1 major enhancement
616
- * Add support for new API lists
617
-
618
- === 1.7.4 2012-10-08
619
-
620
- * 1 bugfix
621
- * Fix bug introduced in 1.7.3 calling API methods that take no
622
- arguments, like Stripe::Invoice#pay (github issue #42)
623
-
624
- === 1.7.3 2012-09-14
625
-
626
- * 2 bugfixes
627
- * Make sure that both keys and values of GET params are
628
- URL-encoded. NOTE: If you were previously URL-encoding values
629
- yourself, you may need to adjust your code.
630
- * URL-encode POST params directly, instead of allowing rest-client to
631
- do it to work around an unfortunate interaction with the hashery gem
632
- (github issue #38)
633
-
634
- === 1.7.2 2012-08-31
635
-
636
- * 1 major enhancement
637
- * Add support for new pay and update methods for Invoice objects
638
-
639
- === 1.7.1 2012-08-15
640
-
641
- * 1 major enhancement
642
- * Add new Account API resource
643
-
644
- === 1.7.0 2012-05-17
645
-
646
- * 3 major enhancements:
647
- * Switch from vendored stripe-json to multi_json for all JSON
648
- parsing and rendering. This should not impact programmatic usage
649
- of the library, but may cause small rendering differences from,
650
- e.g., StripeObject#inspect (github issue #22)
651
- * Add new delete_discount method to Customer objects
652
- * Add new Transfer API resource
653
-
654
- * 2 minor enhancements:
655
- * Switch from HTTP Basic auth to Bearer auth (Note: Stripe will
656
- support Basic auth for the indefinite future, but recommends
657
- Bearer auth when possible going forward)
658
- * Numerous test suite improvements
659
-
660
- === 1.6.3 2012-03-22
661
-
662
- * 1 bugfix:
663
- * Encode GET query strings ourselves instead of using rest-client to
664
- work around a bug
665
-
666
- === 1.6.2 2012-02-24
667
-
668
- * 1 bugfix:
669
- * Correct argument handling in StripeObject#as_json
670
-
671
- === 1.6.1 2012-02-22
672
-
673
- * 1 bugfix:
674
- * Fix StripeObject#inspect when ActiveSupport 3.0 is loaded
675
-
676
- === 1.6.0 2012-02-01
677
-
678
- * A whole bunch of releases between 1.5.0 and 1.6.0, but few changes, mainly
679
- the addition of:
680
- - plans
681
- - coupons
682
- - events
683
- - tokens
684
- * 1.6.0 also contains a new inspect/to_string implementation
685
-
686
- === 1.5.0 2011-05-09
687
-
688
- * 1 major enhancement:
689
- * Update for new RESTful API
690
-
691
- === 1.3.4 2011-01-07
692
-
693
- * 1 major enhancement:
694
- * Rename to Stripe
695
-
696
- === 1.2 2010-06-06
697
-
698
- * 1 major enhancement:
699
- * Support for the set_customer_subscription and delete_customer API methods
700
-
701
- === 1.1 2010-03-14
702
-
703
- * 1 major enhancement:
704
- * Support for recurring billing
705
-
706
- === 1.0 2010-01-05
707
-
708
- * 1 major enhancement:
709
- * Initial release
710
-
711
- # vim: set tw=79:
1
+ History.txt has been converted to a formal changelog. Please see CHANGELOG.md.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.5.1
1
+ 3.5.2
@@ -144,6 +144,28 @@ module Stripe
144
144
  end
145
145
  end
146
146
 
147
+ # Implements custom encoding for Ruby's Marshal. The data produced by this
148
+ # method should be comprehendable by #marshal_load.
149
+ #
150
+ # This allows us to remove certain features that cannot or should not be
151
+ # serialized.
152
+ def marshal_dump
153
+ # The StripeClient instance in @opts is not serializable and is not
154
+ # really a property of the StripeObject, so we exclude it when
155
+ # dumping
156
+ opts = @opts.clone
157
+ opts.delete(:client)
158
+ [@values, opts]
159
+ end
160
+
161
+ # Implements custom decoding for Ruby's Marshal. Consumes data that's
162
+ # produced by #marshal_dump.
163
+ def marshal_load(data)
164
+ values, opts = data
165
+ initialize(values[:id])
166
+ initialize_from(values, opts)
167
+ end
168
+
147
169
  def serialize_params(options = {})
148
170
  update_hash = {}
149
171
 
@@ -1,3 +1,3 @@
1
1
  module Stripe
2
- VERSION = "3.5.1".freeze
2
+ VERSION = "3.5.2".freeze
3
3
  end
@@ -410,5 +410,18 @@ module Stripe
410
410
  end
411
411
  assert_match(/\(object\).foo = nil/, e.message)
412
412
  end
413
+
414
+ should "marshal and unmarshal using custom encoder and decoder" do
415
+ obj = Stripe::StripeObject.construct_from(
416
+ { id: 1, name: "Stripe" },
417
+ api_key: "apikey",
418
+ client: StripeClient.active_client
419
+ )
420
+ m = Marshal.load(Marshal.dump(obj))
421
+ assert_equal 1, m.id
422
+ assert_equal "Stripe", m.name
423
+ expected_hash = { api_key: "apikey" }
424
+ assert_equal expected_hash, m.instance_variable_get("@opts")
425
+ end
413
426
  end
414
427
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-12 00:00:00.000000000 Z
11
+ date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -38,6 +38,7 @@ files:
38
38
  - ".rubocop.yml"
39
39
  - ".rubocop_todo.yml"
40
40
  - ".travis.yml"
41
+ - CHANGELOG.md
41
42
  - CONTRIBUTORS
42
43
  - Gemfile
43
44
  - History.txt