stripe 6.4.0 → 6.5.0
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 +4 -4
- data/CHANGELOG.md +5 -0
- data/OPENAPI_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/stripe/api_version.rb +8 -0
- data/lib/stripe/resources/issuing/card.rb +80 -0
- data/lib/stripe/util.rb +9 -0
- data/lib/stripe/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9caf7ea4880e640abafdc479409834db2818e273e5c7df45e0361e408a8c5154
|
4
|
+
data.tar.gz: ad4d2c14acc5d21b13b9b8c0bc620bfbbcc545e5975bc34af692aa0d6605ecd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c0e4509534cccee655e56a503b55f2920610dc1f913d0cab401e6758be76558ce3e68246043dfa1c845d0f82af9b2b12b3ba00830750e06e99cf750446bfe1
|
7
|
+
data.tar.gz: b93b322c10df5cd0eaff00e833f051fc18a47b0c0dd5251ce07ec523829b98e0cd4201e45f7aef49b0dca7ecbebf12d6b94fc31af27483ce3fade05ec0adb9a0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 6.5.0 - 2022-06-29
|
4
|
+
* [#1084](https://github.com/stripe/stripe-ruby/pull/1084) API Updates
|
5
|
+
* Add support for `deliver_card`, `fail_card`, `return_card`, and `ship_card` test helper methods on resource `Issuing.Card`
|
6
|
+
* [#1076](https://github.com/stripe/stripe-ruby/pull/1076) fix: Update logging to coerce ASCII-8BIT into UTF-8.
|
7
|
+
|
3
8
|
## 6.4.0 - 2022-06-17
|
4
9
|
* [#1073](https://github.com/stripe/stripe-ruby/pull/1073) API Updates
|
5
10
|
* Add support for `fund_cash_balance` test helper method on resource `Customer`
|
data/OPENAPI_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v161
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
6.
|
1
|
+
6.5.0
|
@@ -27,6 +27,86 @@ module Stripe
|
|
27
27
|
opts: opts
|
28
28
|
)
|
29
29
|
end
|
30
|
+
|
31
|
+
def test_helpers
|
32
|
+
TestHelpers.new(self)
|
33
|
+
end
|
34
|
+
|
35
|
+
class TestHelpers < APIResourceTestHelpers
|
36
|
+
RESOURCE_CLASS = Card
|
37
|
+
|
38
|
+
def self.deliver_card(card, params = {}, opts = {})
|
39
|
+
request_stripe_object(
|
40
|
+
method: :post,
|
41
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(card) }),
|
42
|
+
params: params,
|
43
|
+
opts: opts
|
44
|
+
)
|
45
|
+
end
|
46
|
+
|
47
|
+
def self.fail_card(card, params = {}, opts = {})
|
48
|
+
request_stripe_object(
|
49
|
+
method: :post,
|
50
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(card) }),
|
51
|
+
params: params,
|
52
|
+
opts: opts
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.return_card(card, params = {}, opts = {})
|
57
|
+
request_stripe_object(
|
58
|
+
method: :post,
|
59
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(card) }),
|
60
|
+
params: params,
|
61
|
+
opts: opts
|
62
|
+
)
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.ship_card(card, params = {}, opts = {})
|
66
|
+
request_stripe_object(
|
67
|
+
method: :post,
|
68
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(card) }),
|
69
|
+
params: params,
|
70
|
+
opts: opts
|
71
|
+
)
|
72
|
+
end
|
73
|
+
|
74
|
+
def deliver_card(params = {}, opts = {})
|
75
|
+
@resource.request_stripe_object(
|
76
|
+
method: :post,
|
77
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/deliver", { card: CGI.escape(@resource["id"]) }),
|
78
|
+
params: params,
|
79
|
+
opts: opts
|
80
|
+
)
|
81
|
+
end
|
82
|
+
|
83
|
+
def fail_card(params = {}, opts = {})
|
84
|
+
@resource.request_stripe_object(
|
85
|
+
method: :post,
|
86
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/fail", { card: CGI.escape(@resource["id"]) }),
|
87
|
+
params: params,
|
88
|
+
opts: opts
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
92
|
+
def return_card(params = {}, opts = {})
|
93
|
+
@resource.request_stripe_object(
|
94
|
+
method: :post,
|
95
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/return", { card: CGI.escape(@resource["id"]) }),
|
96
|
+
params: params,
|
97
|
+
opts: opts
|
98
|
+
)
|
99
|
+
end
|
100
|
+
|
101
|
+
def ship_card(params = {}, opts = {})
|
102
|
+
@resource.request_stripe_object(
|
103
|
+
method: :post,
|
104
|
+
path: format("/v1/test_helpers/issuing/cards/%<card>s/shipping/ship", { card: CGI.escape(@resource["id"]) }),
|
105
|
+
params: params,
|
106
|
+
opts: opts
|
107
|
+
)
|
108
|
+
end
|
109
|
+
end
|
30
110
|
end
|
31
111
|
end
|
32
112
|
end
|
data/lib/stripe/util.rb
CHANGED
@@ -416,6 +416,15 @@ module Stripe
|
|
416
416
|
# Hopefully val is a string, but protect in case it's not.
|
417
417
|
val = val.to_s
|
418
418
|
|
419
|
+
# Some values returned by the server are encoded in ASCII-8BIT before
|
420
|
+
# being parsed as UTF-8 by Marshal. If we don't transform these here, then
|
421
|
+
# puts will fail as it tries to render UTF-8 characters as ASCII-8BIT
|
422
|
+
# which is not valid.
|
423
|
+
if val && val.encoding == Encoding::ASCII_8BIT
|
424
|
+
# Dup the string as it is a frozen literal.
|
425
|
+
val = val.dup.force_encoding("UTF-8")
|
426
|
+
end
|
427
|
+
|
419
428
|
if %r{[^\w\-/]} =~ val
|
420
429
|
# If the string contains any special characters, escape any double
|
421
430
|
# quotes it has, remove newlines, and wrap the whole thing in quotes.
|
data/lib/stripe/version.rb
CHANGED
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: 6.
|
4
|
+
version: 6.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Stripe is the easiest way to accept payments online. See https://stripe.com
|
14
14
|
for details.
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/stripe/api_operations/search.rb
|
42
42
|
- lib/stripe/api_resource.rb
|
43
43
|
- lib/stripe/api_resource_test_helpers.rb
|
44
|
+
- lib/stripe/api_version.rb
|
44
45
|
- lib/stripe/connection_manager.rb
|
45
46
|
- lib/stripe/error_object.rb
|
46
47
|
- lib/stripe/errors.rb
|