mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-06-23 00:00:29 -04:00
Compare commits
573 Commits
master
...
v13.4.0-be
Author | SHA1 | Date | |
---|---|---|---|
|
012de92b7b | ||
|
601cc26a05 | ||
|
5b20aabff0 | ||
|
e0474fc6ee | ||
|
baba14ba6f | ||
|
9896232084 | ||
|
6dba00fabf | ||
|
d9118a2be2 | ||
|
1e9681fece | ||
|
43e3ecd280 | ||
|
1402ac7e17 | ||
|
7ec394e5ce | ||
|
c1ca97215b | ||
|
4c7a2891f1 | ||
|
f21e023bb2 | ||
|
39283a358d | ||
|
9d54b5cfdf | ||
|
7daac5c78b | ||
|
80c41a768b | ||
|
463efa561b | ||
|
467e034676 | ||
|
17457e0ff5 | ||
|
097e25fb6a | ||
|
3fe258ae9a | ||
|
52ee306b24 | ||
|
60114d2d8c | ||
|
f5a9fea082 | ||
|
2cef804a3d | ||
|
37da195da5 | ||
|
a63e70c63f | ||
|
fc2f62322f | ||
|
c37e8c0ea1 | ||
|
2a80b4cfa4 | ||
|
bc1d5a8721 | ||
|
beda56c945 | ||
|
dfa3166559 | ||
|
aa58664f71 | ||
|
4ca1162115 | ||
|
03f7e8b424 | ||
|
d708979899 | ||
|
d8d9367c97 | ||
|
ee1b40e2a4 | ||
|
a6fb7c989d | ||
|
4b790c6f66 | ||
|
bff038c787 | ||
|
c1846fa90f | ||
|
3e2a9a3e44 | ||
|
15059f9b07 | ||
|
0473767568 | ||
|
5a2738c473 | ||
|
a3b68600bc | ||
|
20f88738f3 | ||
|
e8534041dd | ||
|
1c83fd3827 | ||
|
f5930cbf05 | ||
|
05b04762f7 | ||
|
4345d6c4b3 | ||
|
8564329082 | ||
|
0ffd089cab | ||
|
afa823dfcb | ||
|
e98f2280b7 | ||
|
45ea7c1dcd | ||
|
b6c3993328 | ||
|
76a6c402e6 | ||
|
f6a53cf830 | ||
|
51983ebd07 | ||
|
44e28a3c97 | ||
|
e30dd59b19 | ||
|
70dae52d5c | ||
|
37eeea65aa | ||
|
c1a67e7b6f | ||
|
4217591d6f | ||
|
f8d2d6d808 | ||
|
3baa3bb485 | ||
|
0a92bde7ef | ||
|
8efdc5fa03 | ||
|
8408fe0e5d | ||
|
6b8c0fe7a2 | ||
|
14ec67c5e5 | ||
|
2cc89bdf57 | ||
|
ea01a5f86a | ||
|
abe64d9057 | ||
|
7475e76249 | ||
|
b0baf7dcf5 | ||
|
164c41f4c2 | ||
|
ad79e5ddec | ||
|
6637663560 | ||
|
c751d28679 | ||
|
abb7f96f7e | ||
|
f5b1550a4d | ||
|
f00e7b755e | ||
|
6043574338 | ||
|
9ba520b192 | ||
|
5e3db6ff02 | ||
|
41f5d0a594 | ||
|
be974ad4a2 | ||
|
d28d37fe3e | ||
|
910162ef12 | ||
|
6a1332d803 | ||
|
8b34c0f101 | ||
|
9cc7023598 | ||
|
79daac7bcf | ||
|
b1dc11f8c0 | ||
|
1d21518d1f | ||
|
2a6f80ab14 | ||
|
7616bf9e25 | ||
|
bee43846c7 | ||
|
c9d24fd3ed | ||
|
e0f699be5d | ||
|
d1d589ddde | ||
|
961c39195d | ||
|
b4f0f7a47a | ||
|
7ea397e89a | ||
|
9c4b2ba949 | ||
|
174a13d131 | ||
|
fa6fe2c58e | ||
|
731bf9f3ac | ||
|
ae6f89d29a | ||
|
bef2a670dd | ||
|
3a3f21eb6e | ||
|
1d25994ec2 | ||
|
36d12fd7a4 | ||
|
da3439f464 | ||
|
87190ffac5 | ||
|
10babebbf6 | ||
|
6e65602f6e | ||
|
1e6e4c2c84 | ||
|
f4ced072fd | ||
|
006dd567fc | ||
|
4151971cc2 | ||
|
787d71ed67 | ||
|
f9cf82d23f | ||
|
83404d14f9 | ||
|
7b693ab18c | ||
|
dbed1a3a59 | ||
|
28f0ff6120 | ||
|
d402193c93 | ||
|
4427ba0f2a | ||
|
f8aa5a4fa6 | ||
|
8be3c30e4a | ||
|
8ee88fefc7 | ||
|
b3a7a47917 | ||
|
4659c14672 | ||
|
3e340c4153 | ||
|
0229ed0e95 | ||
|
1e5edb7386 | ||
|
478d6888aa | ||
|
349acd2adf | ||
|
3871745743 | ||
|
59c82e3d4b | ||
|
6a4d2d1570 | ||
|
5669ab4d5c | ||
|
78e3166e20 | ||
|
318bed2067 | ||
|
0c44569639 | ||
|
65c85f45b3 | ||
|
f858c6a959 | ||
|
1fadafb39c | ||
|
4ce9e74bf5 | ||
|
b7d691bafd | ||
|
ee9ea1595a | ||
|
a802c007b2 | ||
|
d8701e8749 | ||
|
c83c27da74 | ||
|
fa02db50ab | ||
|
663d1460ef | ||
|
9716565a2d | ||
|
99c81c7074 | ||
|
16c779cdea | ||
|
f832bff64a | ||
|
d9f19ec10f | ||
|
20ae76545b | ||
|
59863ea3aa | ||
|
a49aa2d18c | ||
|
61aba5d027 | ||
|
3d2ad3d61c | ||
|
ab7d3a61d1 | ||
|
e5ec8c1ebf | ||
|
8558e0ee2e | ||
|
8c3b51769f | ||
|
4c4485185c | ||
|
df7f3fad50 | ||
|
b9597e5eac | ||
|
83463f167e | ||
|
abcc296f24 | ||
|
7eea258347 | ||
|
b66f178666 | ||
|
4ffefec536 | ||
|
7f957926c0 | ||
|
9f5e950493 | ||
|
c4f115226f | ||
|
c9c0acf980 | ||
|
3822030694 | ||
|
287b1fab65 | ||
|
6a0feb8f7d | ||
|
3f60df3581 | ||
|
c2f09bc395 | ||
|
626b576a34 | ||
|
27987ef78e | ||
|
4888991c70 | ||
|
4f0f1ee5f9 | ||
|
f825a94c1c | ||
|
9bfea77b37 | ||
|
929b50a836 | ||
|
e14fff4431 | ||
|
bc3e460aae | ||
|
3ed806c90b | ||
|
c4dd22825e | ||
|
b594bd5c21 | ||
|
7ddec7d6d8 | ||
|
f6a388be06 | ||
|
a8aac472ec | ||
|
0b3c0f3244 | ||
|
cece539ed7 | ||
|
22693301eb | ||
|
c36c240108 | ||
|
ec694bbd05 | ||
|
56039702e9 | ||
|
5edc3708fc | ||
|
0d0cead582 | ||
|
b7a9871e6a | ||
|
e511e2fb8b | ||
|
e37031ef1f | ||
|
d699593ea5 | ||
|
4632b7c9da | ||
|
418d79de1b | ||
|
b1e351f235 | ||
|
2c260289f2 | ||
|
d249b5f78b | ||
|
816f8ad435 | ||
|
02a733676e | ||
|
0e96318130 | ||
|
2e0b17a3dc | ||
|
8c91e40f29 | ||
|
4617b3fbd1 | ||
|
da70f0cfc8 | ||
|
a00f541a93 | ||
|
cbe61d7d38 | ||
|
3fe63202e3 | ||
|
3921d9b812 | ||
|
b39af8a58b | ||
|
6e62bca84a | ||
|
a7d998ab2d | ||
|
479d17b26a | ||
|
1bcb4bc058 | ||
|
b399f87064 | ||
|
a1ce673f62 | ||
|
4ccbe90069 | ||
|
5da74143e8 | ||
|
41ba199775 | ||
|
6897561e00 | ||
|
33e217ba15 | ||
|
dfa7994d04 | ||
|
34ff3ed2ca | ||
|
fe66019c7d | ||
|
f84e1154b1 | ||
|
afa13a53b0 | ||
|
a1deb162d0 | ||
|
499d0605d0 | ||
|
1705995709 | ||
|
452f8ca43d | ||
|
4902b4c49d | ||
|
ad26ff3fca | ||
|
86ac5fd329 | ||
|
ee9b5c7ead | ||
|
083c3a104e | ||
|
354b6a92a3 | ||
|
c48a5e30cf | ||
|
71b8f84574 | ||
|
d353c130bc | ||
|
8bda0900f3 | ||
|
3cecb75d46 | ||
|
18fef16be2 | ||
|
783bcb163f | ||
|
3e5b22eeae | ||
|
452e0c4485 | ||
|
cb256e8e1c | ||
|
90aa83239b | ||
|
ab5266188f | ||
|
e8f3b94a9d | ||
|
52e17ef8ea | ||
|
16227fe1e6 | ||
|
0e8df39594 | ||
|
98fbfb8012 | ||
|
8acad71c3f | ||
|
3b4f6e4bcb | ||
|
e1017fb6ef | ||
|
4933ab3111 | ||
|
b06b78aa85 | ||
|
fb0f82090c | ||
|
7c14c42072 | ||
|
78032b72f5 | ||
|
446f6ec55c | ||
|
7567bd2cb7 | ||
|
002767748d | ||
|
92bad8eeee | ||
|
3d3552e00d | ||
|
5af00f12a2 | ||
|
208ead7817 | ||
|
cca659d7b3 | ||
|
8c0015fb2c | ||
|
5ece384518 | ||
|
d936ddcff1 | ||
|
77d8304c54 | ||
|
6ba63d9a87 | ||
|
0d538ab0f1 | ||
|
6a5b89c99d | ||
|
b036d14d27 | ||
|
eeaa682877 | ||
|
a9611340a4 | ||
|
fee677de9e | ||
|
08400e8df9 | ||
|
b62018ee93 | ||
|
d4e469fa3c | ||
|
cfd9943c83 | ||
|
6d82ac4b56 | ||
|
aeb1b59206 | ||
|
a7f1c57f2c | ||
|
7be7413461 | ||
|
42f0c2c9d4 | ||
|
0055df9a63 | ||
|
4638712b2b | ||
|
86f5a8ac5c | ||
|
5443a95598 | ||
|
bc3cd13405 | ||
|
02c47fd5f0 | ||
|
9a92aa9c72 | ||
|
0030faf88f | ||
|
3285671c8f | ||
|
119802aaf2 | ||
|
d7a09671d1 | ||
|
05ee1f8fd4 | ||
|
72ce4e5f83 | ||
|
7dbfa2b4c4 | ||
|
0d02750915 | ||
|
1e13984787 | ||
|
5a2cf963ec | ||
|
176f13b832 | ||
|
9f77cb9c05 | ||
|
12da6ae2a8 | ||
|
aed8e679c5 | ||
|
a11a923b23 | ||
|
ac980c4216 | ||
|
7852b2faeb | ||
|
0a0374b0a1 | ||
|
2e533be04d | ||
|
e058a85fe7 | ||
|
6bf2eaf832 | ||
|
fb6f536d00 | ||
|
f97b214181 | ||
|
7066d7d3a1 | ||
|
147e25b288 | ||
|
568b3191c4 | ||
|
1ef9ff4b88 | ||
|
3165ed5905 | ||
|
be4388721d | ||
|
6ed6014b89 | ||
|
0ea7c61bcf | ||
|
f94c2cb45c | ||
|
c4bdddbe3c | ||
|
81b5190aed | ||
|
3fd4e48999 | ||
|
44a1547344 | ||
|
65768f9ee1 | ||
|
2ebd8cc795 | ||
|
206c80733f | ||
|
600c5fb883 | ||
|
8dfa6f6eaa | ||
|
c3b05c5e71 | ||
|
fee9143bb1 | ||
|
bd62fe08d6 | ||
|
658a0b786a | ||
|
84bf38a606 | ||
|
882c2a8c36 | ||
|
f7d4abdb5f | ||
|
8977ca553f | ||
|
e8f09f4001 | ||
|
4430246744 | ||
|
e9b70ffd51 | ||
|
b578ab2eb3 | ||
|
79dee2ae96 | ||
|
e0cfc89447 | ||
|
37b1db8140 | ||
|
ce925ab7a4 | ||
|
d604af0247 | ||
|
078adfcc37 | ||
|
e6ff2138c6 | ||
|
5609c6ce72 | ||
|
2227067f71 | ||
|
4981cc844d | ||
|
7e2a036dc5 | ||
|
900ecf2db9 | ||
|
8d5a5ef183 | ||
|
5bf957f53e | ||
|
0e5e7b8647 | ||
|
a334cb5fb4 | ||
|
801b65759e | ||
|
3d772067d1 | ||
|
6db03363ff | ||
|
1af83889bb | ||
|
e6b3043f66 | ||
|
e74bd2e7f7 | ||
|
bc924840dd | ||
|
456f10ab93 | ||
|
96b7453ee9 | ||
|
c0310bc4a7 | ||
|
a2806aca65 | ||
|
2f7ede30d1 | ||
|
4eae12c528 | ||
|
24801210b9 | ||
|
88ef71cf32 | ||
|
50c64e6c06 | ||
|
91015aa41c | ||
|
17619449ed | ||
|
a22bc332ad | ||
|
a5519a6a57 | ||
|
90a2a55687 | ||
|
6e2e8c757d | ||
|
c7a26629e6 | ||
|
62c0f898c3 | ||
|
cd0e601188 | ||
|
43f6318ebd | ||
|
150be92efc | ||
|
99dbffb9c6 | ||
|
a77bbab966 | ||
|
4d5a2aab6e | ||
|
7356579799 | ||
|
23cbd8fc82 | ||
|
adc0ccf8e7 | ||
|
d9118a7dfe | ||
|
f33553bef2 | ||
|
1d1d8a90f0 | ||
|
943dd4b020 | ||
|
6366593ed5 | ||
|
8cdb85cb36 | ||
|
9990e2b8b1 | ||
|
d600f2e9a1 | ||
|
c3cc36ed12 | ||
|
00077b44d8 | ||
|
2c06e9c83e | ||
|
4b74f4c93f | ||
|
e3f0da227f | ||
|
3ac330785f | ||
|
0075550ff8 | ||
|
890cdae767 | ||
|
732a1467b5 | ||
|
d39dcb4a81 | ||
|
fb655489eb | ||
|
4143d3930d | ||
|
23bc1b1f3b | ||
|
fe73975f07 | ||
|
24f8480c71 | ||
|
9d8ca624e3 | ||
|
105506a7fd | ||
|
75b29c3484 | ||
|
a6614ee701 | ||
|
33544c7c25 | ||
|
8f210e251a | ||
|
3b31fb29a6 | ||
|
4519e8fa19 | ||
|
f471a2c6a4 | ||
|
1e3428e87d | ||
|
7233155b42 | ||
|
cbfe81107a | ||
|
0b6cffde22 | ||
|
1be10ae4fc | ||
|
167daeaf62 | ||
|
080fddce5a | ||
|
466824d0af | ||
|
945e691968 | ||
|
f8a9a287ab | ||
|
92083a8615 | ||
|
705078e2cf | ||
|
29d8261b17 | ||
|
3958d6a9df | ||
|
696be38196 | ||
|
ff853fda95 | ||
|
d10398a825 | ||
|
6f70bd8696 | ||
|
1d21c60802 | ||
|
b9c10b9c2f | ||
|
446ffc7a22 | ||
|
58db6d32ef | ||
|
9a4dfdcb2f | ||
|
50bbc0df17 | ||
|
8226f0ad99 | ||
|
43fa8f5af7 | ||
|
0e61789557 | ||
|
cfe69c131e | ||
|
7bf9cace9e | ||
|
d7eac6010d | ||
|
7d91cb83d9 | ||
|
ce4946f5d8 | ||
|
15415fcbf3 | ||
|
f8acdb5f6a | ||
|
fe794f4868 | ||
|
2b841bc109 | ||
|
1835883848 | ||
|
e11400adc8 | ||
|
5ea85d0867 | ||
|
600b1965f6 | ||
|
5fdd180667 | ||
|
97e24e9e57 | ||
|
9531f57236 | ||
|
094574d2fe | ||
|
cff25d0c8b | ||
|
0795c1d3d0 | ||
|
802a1a7aa6 | ||
|
13b0bca995 | ||
|
51d364c844 | ||
|
f4c6f2b304 | ||
|
b64fe42043 | ||
|
586e685e63 | ||
|
3b5c725539 | ||
|
ea91a6f0b9 | ||
|
21f31edff4 | ||
|
a11f1ffd2a | ||
|
4bd92239d5 | ||
|
c261f6bbb6 | ||
|
f45fc7d703 | ||
|
5cd522c007 | ||
|
e6bda8356d | ||
|
2354633a92 | ||
|
549a73544f | ||
|
25833c1408 | ||
|
a59b57c3d1 | ||
|
63d447df77 | ||
|
5cd6f9f9bc | ||
|
ffa3747bdf | ||
|
ddf79610d9 | ||
|
edad946244 | ||
|
e3785d5893 | ||
|
2062e988eb | ||
|
0bdc688516 | ||
|
82ac9f2720 | ||
|
7381eb02a6 | ||
|
6720fc8d3f | ||
|
35a29332c5 | ||
|
519d68ce10 | ||
|
b95ea4ba27 | ||
|
318e244a76 | ||
|
bb1c995e93 | ||
|
0f12721697 | ||
|
671163245a | ||
|
486bee15a8 | ||
|
fdf5be66f5 | ||
|
c732841fd3 | ||
|
22db70b479 | ||
|
2db4fd9d06 | ||
|
6797f906e1 | ||
|
59f2d4d0fe | ||
|
0d1b570bfa | ||
|
d7d3c1b425 | ||
|
7df619de69 | ||
|
f649ed3824 | ||
|
32a95902cc | ||
|
bdcfe6cc33 | ||
|
5e1c4a2302 | ||
|
54a073783f | ||
|
e6a07ae658 | ||
|
588ed3b5e7 | ||
|
de33cde125 | ||
|
d849ec3b14 | ||
|
8b5f78aa6a | ||
|
7f6ba1c35c | ||
|
e55a2559ae | ||
|
0b00266be1 | ||
|
d0cd4fbaa6 | ||
|
979da6f84b | ||
|
d95c518a3c | ||
|
83c773f61e | ||
|
d9f719ba01 | ||
|
73d10e8557 |
25
.rubocop.yml
25
.rubocop.yml
@ -21,6 +21,13 @@ Layout/LineLength:
|
||||
- "lib/stripe/services/**/*.rb"
|
||||
- "test/**/*.rb"
|
||||
|
||||
|
||||
Lint/MissingSuper:
|
||||
Exclude:
|
||||
- "lib/stripe/resources/**/*.rb"
|
||||
- "lib/stripe/services/**/*.rb"
|
||||
- "test/stripe/request_params_test.rb"
|
||||
|
||||
Metrics/AbcSize:
|
||||
Enabled: false
|
||||
|
||||
@ -53,18 +60,34 @@ Metrics/MethodLength:
|
||||
Max: 55
|
||||
Exclude:
|
||||
- "lib/stripe/services/v1_services.rb"
|
||||
AllowedMethods:
|
||||
- initialize
|
||||
|
||||
Metrics/ModuleLength:
|
||||
Enabled: false
|
||||
|
||||
Metrics/ParameterLists:
|
||||
# There's 2 methods in `StripeClient` that have long parameter lists.
|
||||
Max: 8
|
||||
# Optional parameters should be consistent across libraries, we need not be
|
||||
# concerned about this. Was introduced with adding `base_address`
|
||||
Exclude:
|
||||
- "lib/stripe/api_operations/request.rb"
|
||||
- "lib/stripe/stripe_object.rb"
|
||||
- "lib/stripe/stripe_client.rb"
|
||||
- "lib/stripe/resources/**/*.rb"
|
||||
- "lib/stripe/services/**/*.rb"
|
||||
|
||||
Naming/MethodParameterName:
|
||||
# We have many parameters that are less than 3 characters for tax codes
|
||||
Exclude:
|
||||
- "lib/stripe/resources/**/*.rb"
|
||||
- "lib/stripe/services/**/*.rb"
|
||||
|
||||
Naming/VariableNumber:
|
||||
# We use a variety of variable number syntaxes
|
||||
Exclude:
|
||||
- "lib/stripe/resources/**/*.rb"
|
||||
- "lib/stripe/services/**/*.rb"
|
||||
|
||||
Style/AccessModifierDeclarations:
|
||||
EnforcedStyle: inline
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2023-11-28 01:02:03 UTC using RuboCop version 1.57.2.
|
||||
# on 2023-11-29 18:39:02 UTC using RuboCop version 1.57.2.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
@ -11,15 +11,15 @@ Lint/HashCompareByIdentity:
|
||||
Exclude:
|
||||
- 'lib/stripe/api_requestor.rb'
|
||||
|
||||
# Offense count: 26
|
||||
# Offense count: 27
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
|
||||
Metrics/AbcSize:
|
||||
Max: 50
|
||||
Max: 55
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 10
|
||||
# Configuration parameters: CountComments, CountAsOne.
|
||||
Metrics/ClassLength:
|
||||
Max: 592
|
||||
Max: 618
|
||||
|
||||
# Offense count: 12
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
@ -27,14 +27,9 @@ Metrics/CyclomaticComplexity:
|
||||
Max: 12
|
||||
|
||||
# Offense count: 9
|
||||
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
||||
Metrics/ParameterLists:
|
||||
Max: 7
|
||||
|
||||
# Offense count: 8
|
||||
# Configuration parameters: AllowedMethods, AllowedPatterns.
|
||||
Metrics/PerceivedComplexity:
|
||||
Max: 12
|
||||
Max: 13
|
||||
|
||||
# Offense count: 1
|
||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||
@ -49,7 +44,7 @@ Style/CombinableLoops:
|
||||
Exclude:
|
||||
- 'lib/stripe/api_requestor.rb'
|
||||
|
||||
# Offense count: 39
|
||||
# Offense count: 44
|
||||
# Configuration parameters: AllowedConstants.
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
|
2065
CHANGELOG.md
2065
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@ -1,25 +0,0 @@
|
||||
|
||||
# Contributing
|
||||
|
||||
We welcome bug reports, feature requests, and code contributions in a pull request.
|
||||
|
||||
For most pull requests, we request that you identify or create an associated issue that has the necessary context. We use these issues to reach agreement on an approach and save the PR author from having to redo work. Fixing typos or documentation issues likely do not need an issue; for any issue that introduces substantial code changes, changes the public interface, or if you aren't sure, please find or [create an issue](https://www.github.com/stripe/stripe-ruby/issues/new/choose).
|
||||
|
||||
## Contributor License Agreement
|
||||
|
||||
All contributors must sign the Contributor License Agreement (CLA) before we can accept their contribution. If you have not yet signed the agreement, you will be given an option to do so when you open a pull request. You can then sign by clicking on the badge in the comment from @CLAassistant.
|
||||
|
||||
## Generated code
|
||||
|
||||
This project has a combination of manually maintained code and code generated from our private code generator. If your contribution involves changes to generated code, please call this out in the issue or pull request as we will likely need to make a change to our code generator before accepting the contribution.
|
||||
|
||||
To identify files with purely generated code, look for the comment `File generated from our OpenAPI spec.` at the start of the file. Generated blocks of code within hand-written files will be between comments that say `The beginning of the section generated from our OpenAPI spec` and `The end of the section generated from our OpenAPI spec`.
|
||||
|
||||
## Compatibility with supported language and runtime versions
|
||||
|
||||
This project supports [many different langauge and runtime versions](README.md#requirements) and we are unable to accept any contribution that does not work on _all_ supported versions. If, after discussing the approach in the associated issue, your change must use an API / feature that isn't available in all supported versions, please call this out explicitly in the issue or pull request so we can help figure out the best way forward.
|
||||
|
||||
## Set up your dev environment
|
||||
|
||||
Please refer to this project's [README.md](README.md#development) for instructions on how to set up your development environment.
|
||||
|
@ -1 +1 @@
|
||||
v1412
|
||||
v1460
|
@ -13,6 +13,7 @@ require "set"
|
||||
require "socket"
|
||||
require "uri"
|
||||
require "forwardable"
|
||||
require "base64"
|
||||
|
||||
# Version
|
||||
require "stripe/api_version"
|
||||
@ -33,6 +34,7 @@ require "stripe/errors"
|
||||
require "stripe/object_types"
|
||||
require "stripe/event_types"
|
||||
require "stripe/request_options"
|
||||
require "stripe/request_params"
|
||||
require "stripe/util"
|
||||
require "stripe/connection_manager"
|
||||
require "stripe/multipart_encoder"
|
||||
@ -50,6 +52,7 @@ require "stripe/api_resource_test_helpers"
|
||||
require "stripe/singleton_api_resource"
|
||||
require "stripe/webhook"
|
||||
require "stripe/stripe_configuration"
|
||||
require "stripe/request_signing_authenticator"
|
||||
require "stripe/thin_event"
|
||||
|
||||
# Named API resources
|
||||
@ -107,6 +110,7 @@ module Stripe
|
||||
|
||||
# User configurable options
|
||||
def_delegators :@config, :api_key, :api_key=
|
||||
def_delegators :@config, :authenticator, :authenticator=
|
||||
def_delegators :@config, :api_version, :api_version=
|
||||
def_delegators :@config, :stripe_account, :stripe_account=
|
||||
def_delegators :@config, :api_base, :api_base=
|
||||
@ -154,6 +158,48 @@ module Stripe
|
||||
version: version,
|
||||
}
|
||||
end
|
||||
|
||||
def self.add_beta_version(beta_name, version)
|
||||
if api_version.include?("; #{beta_name}=")
|
||||
raise "Stripe version header #{api_version} already contains entry for beta #{beta_name}"
|
||||
end
|
||||
|
||||
self.api_version = "#{api_version}; #{beta_name}=#{version}"
|
||||
end
|
||||
|
||||
class RawRequest
|
||||
def initialize
|
||||
@opts = {}
|
||||
end
|
||||
|
||||
def execute(method, url, base_address: :api, params: {}, opts: {}, usage: [])
|
||||
opts = Util.normalize_opts(opts)
|
||||
req_opts = RequestOptions.extract_opts_from_hash(opts)
|
||||
|
||||
requestor = APIRequestor.active_requestor
|
||||
resp, = requestor.send(:execute_request_internal, method, url, base_address, params, req_opts,
|
||||
usage)
|
||||
|
||||
requestor.interpret_response(resp)
|
||||
end
|
||||
end
|
||||
|
||||
# Sends a request to Stripe REST API
|
||||
def self.raw_request(method, url, params = {}, opts = {}, base_address: :api)
|
||||
req = RawRequest.new
|
||||
req.execute(method, url, base_address: base_address, params: params, opts: opts,
|
||||
usage: ["raw_request"])
|
||||
end
|
||||
|
||||
def self.deserialize(data, api_mode: :v1)
|
||||
data = JSON.parse(data) if data.is_a?(String)
|
||||
Util.convert_to_stripe_object(data, {}, api_mode: api_mode)
|
||||
end
|
||||
class << self
|
||||
extend Gem::Deprecate
|
||||
deprecate :raw_request, "StripeClient#raw_request", 2024, 9
|
||||
deprecate :deserialize, "StripeClient#deserialize", 2024, 9
|
||||
end
|
||||
end
|
||||
|
||||
Stripe.log_level = ENV["STRIPE_LOG"] unless ENV["STRIPE_LOG"].nil?
|
||||
|
@ -34,6 +34,7 @@ module Stripe
|
||||
method, url, base_address,
|
||||
params, opts, usage,
|
||||
&read_body_chunk_block)
|
||||
params = params.to_h if params.is_a?(Stripe::RequestParams)
|
||||
params ||= {}
|
||||
|
||||
error_on_invalid_params(params)
|
||||
|
@ -196,6 +196,7 @@ module Stripe
|
||||
|
||||
def execute_request(method, path, base_address,
|
||||
params: {}, opts: {}, usage: [])
|
||||
params = params.to_h if params.is_a?(RequestParams)
|
||||
http_resp, req_opts = execute_request_internal(
|
||||
method, path, base_address, params, opts, usage
|
||||
)
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
module Stripe
|
||||
module ApiVersion
|
||||
CURRENT = "2024-12-18.acacia"
|
||||
CURRENT = "2025-01-27.acacia"
|
||||
end
|
||||
end
|
||||
|
@ -14,8 +14,10 @@ module Stripe
|
||||
# object classes: The beginning of the section generated from our OpenAPI spec
|
||||
Account.object_name => Account,
|
||||
AccountLink.object_name => AccountLink,
|
||||
AccountNotice.object_name => AccountNotice,
|
||||
AccountSession.object_name => AccountSession,
|
||||
ApplePayDomain.object_name => ApplePayDomain,
|
||||
Application.object_name => Application,
|
||||
ApplicationFee.object_name => ApplicationFee,
|
||||
ApplicationFeeRefund.object_name => ApplicationFeeRefund,
|
||||
Apps::Secret.object_name => Apps::Secret,
|
||||
@ -23,16 +25,21 @@ module Stripe
|
||||
BalanceTransaction.object_name => BalanceTransaction,
|
||||
BankAccount.object_name => BankAccount,
|
||||
Billing::Alert.object_name => Billing::Alert,
|
||||
Billing::AlertTriggered.object_name => Billing::AlertTriggered,
|
||||
Billing::CreditBalanceSummary.object_name => Billing::CreditBalanceSummary,
|
||||
Billing::CreditBalanceTransaction.object_name => Billing::CreditBalanceTransaction,
|
||||
Billing::CreditGrant.object_name => Billing::CreditGrant,
|
||||
Billing::Meter.object_name => Billing::Meter,
|
||||
Billing::MeterErrorReport.object_name => Billing::MeterErrorReport,
|
||||
Billing::MeterEvent.object_name => Billing::MeterEvent,
|
||||
Billing::MeterEventAdjustment.object_name => Billing::MeterEventAdjustment,
|
||||
Billing::MeterEventSummary.object_name => Billing::MeterEventSummary,
|
||||
BillingPortal::Configuration.object_name => BillingPortal::Configuration,
|
||||
BillingPortal::Session.object_name => BillingPortal::Session,
|
||||
Capability.object_name => Capability,
|
||||
Capital::FinancingOffer.object_name => Capital::FinancingOffer,
|
||||
Capital::FinancingSummary.object_name => Capital::FinancingSummary,
|
||||
Capital::FinancingTransaction.object_name => Capital::FinancingTransaction,
|
||||
Card.object_name => Card,
|
||||
CashBalance.object_name => CashBalance,
|
||||
Charge.object_name => Charge,
|
||||
@ -41,6 +48,7 @@ module Stripe
|
||||
Climate::Product.object_name => Climate::Product,
|
||||
Climate::Supplier.object_name => Climate::Supplier,
|
||||
ConfirmationToken.object_name => ConfirmationToken,
|
||||
ConnectCollectionTransfer.object_name => ConnectCollectionTransfer,
|
||||
CountrySpec.object_name => CountrySpec,
|
||||
Coupon.object_name => Coupon,
|
||||
CreditNote.object_name => CreditNote,
|
||||
@ -52,6 +60,7 @@ module Stripe
|
||||
Discount.object_name => Discount,
|
||||
Dispute.object_name => Dispute,
|
||||
Entitlements::ActiveEntitlement.object_name => Entitlements::ActiveEntitlement,
|
||||
Entitlements::ActiveEntitlementSummary.object_name => Entitlements::ActiveEntitlementSummary,
|
||||
Entitlements::Feature.object_name => Entitlements::Feature,
|
||||
EphemeralKey.object_name => EphemeralKey,
|
||||
Event.object_name => Event,
|
||||
@ -59,34 +68,48 @@ module Stripe
|
||||
File.object_name => File,
|
||||
FileLink.object_name => FileLink,
|
||||
FinancialConnections::Account.object_name => FinancialConnections::Account,
|
||||
FinancialConnections::AccountInferredBalance.object_name =>
|
||||
FinancialConnections::AccountInferredBalance,
|
||||
FinancialConnections::AccountOwner.object_name => FinancialConnections::AccountOwner,
|
||||
FinancialConnections::AccountOwnership.object_name => FinancialConnections::AccountOwnership,
|
||||
FinancialConnections::Institution.object_name => FinancialConnections::Institution,
|
||||
FinancialConnections::Session.object_name => FinancialConnections::Session,
|
||||
FinancialConnections::Transaction.object_name => FinancialConnections::Transaction,
|
||||
Forwarding::Request.object_name => Forwarding::Request,
|
||||
FundingInstructions.object_name => FundingInstructions,
|
||||
GiftCards::Card.object_name => GiftCards::Card,
|
||||
GiftCards::Transaction.object_name => GiftCards::Transaction,
|
||||
Identity::VerificationReport.object_name => Identity::VerificationReport,
|
||||
Identity::VerificationSession.object_name => Identity::VerificationSession,
|
||||
Invoice.object_name => Invoice,
|
||||
InvoiceItem.object_name => InvoiceItem,
|
||||
InvoiceLineItem.object_name => InvoiceLineItem,
|
||||
InvoicePayment.object_name => InvoicePayment,
|
||||
InvoiceRenderingTemplate.object_name => InvoiceRenderingTemplate,
|
||||
Issuing::Authorization.object_name => Issuing::Authorization,
|
||||
Issuing::Card.object_name => Issuing::Card,
|
||||
Issuing::Cardholder.object_name => Issuing::Cardholder,
|
||||
Issuing::CreditUnderwritingRecord.object_name => Issuing::CreditUnderwritingRecord,
|
||||
Issuing::Dispute.object_name => Issuing::Dispute,
|
||||
Issuing::DisputeSettlementDetail.object_name => Issuing::DisputeSettlementDetail,
|
||||
Issuing::FraudLiabilityDebit.object_name => Issuing::FraudLiabilityDebit,
|
||||
Issuing::PersonalizationDesign.object_name => Issuing::PersonalizationDesign,
|
||||
Issuing::PhysicalBundle.object_name => Issuing::PhysicalBundle,
|
||||
Issuing::Settlement.object_name => Issuing::Settlement,
|
||||
Issuing::Token.object_name => Issuing::Token,
|
||||
Issuing::Transaction.object_name => Issuing::Transaction,
|
||||
LineItem.object_name => LineItem,
|
||||
LoginLink.object_name => LoginLink,
|
||||
Mandate.object_name => Mandate,
|
||||
Margin.object_name => Margin,
|
||||
Order.object_name => Order,
|
||||
PaymentAttemptRecord.object_name => PaymentAttemptRecord,
|
||||
PaymentIntent.object_name => PaymentIntent,
|
||||
PaymentLink.object_name => PaymentLink,
|
||||
PaymentMethod.object_name => PaymentMethod,
|
||||
PaymentMethodConfiguration.object_name => PaymentMethodConfiguration,
|
||||
PaymentMethodDomain.object_name => PaymentMethodDomain,
|
||||
PaymentRecord.object_name => PaymentRecord,
|
||||
Payout.object_name => Payout,
|
||||
Person.object_name => Person,
|
||||
Plan.object_name => Plan,
|
||||
@ -95,12 +118,16 @@ module Stripe
|
||||
ProductFeature.object_name => ProductFeature,
|
||||
PromotionCode.object_name => PromotionCode,
|
||||
Quote.object_name => Quote,
|
||||
QuoteLine.object_name => QuoteLine,
|
||||
QuotePreviewInvoice.object_name => QuotePreviewInvoice,
|
||||
QuotePreviewSubscriptionSchedule.object_name => QuotePreviewSubscriptionSchedule,
|
||||
Radar::EarlyFraudWarning.object_name => Radar::EarlyFraudWarning,
|
||||
Radar::ValueList.object_name => Radar::ValueList,
|
||||
Radar::ValueListItem.object_name => Radar::ValueListItem,
|
||||
Refund.object_name => Refund,
|
||||
Reporting::ReportRun.object_name => Reporting::ReportRun,
|
||||
Reporting::ReportType.object_name => Reporting::ReportType,
|
||||
ReserveTransaction.object_name => ReserveTransaction,
|
||||
Reversal.object_name => Reversal,
|
||||
Review.object_name => Review,
|
||||
SetupAttempt.object_name => SetupAttempt,
|
||||
@ -108,23 +135,28 @@ module Stripe
|
||||
ShippingRate.object_name => ShippingRate,
|
||||
Sigma::ScheduledQueryRun.object_name => Sigma::ScheduledQueryRun,
|
||||
Source.object_name => Source,
|
||||
SourceMandateNotification.object_name => SourceMandateNotification,
|
||||
SourceTransaction.object_name => SourceTransaction,
|
||||
Subscription.object_name => Subscription,
|
||||
SubscriptionItem.object_name => SubscriptionItem,
|
||||
SubscriptionSchedule.object_name => SubscriptionSchedule,
|
||||
Tax::Association.object_name => Tax::Association,
|
||||
Tax::Calculation.object_name => Tax::Calculation,
|
||||
Tax::CalculationLineItem.object_name => Tax::CalculationLineItem,
|
||||
Tax::Form.object_name => Tax::Form,
|
||||
Tax::Registration.object_name => Tax::Registration,
|
||||
Tax::Settings.object_name => Tax::Settings,
|
||||
Tax::Transaction.object_name => Tax::Transaction,
|
||||
Tax::TransactionLineItem.object_name => Tax::TransactionLineItem,
|
||||
TaxCode.object_name => TaxCode,
|
||||
TaxDeductedAtSource.object_name => TaxDeductedAtSource,
|
||||
TaxId.object_name => TaxId,
|
||||
TaxRate.object_name => TaxRate,
|
||||
Terminal::Configuration.object_name => Terminal::Configuration,
|
||||
Terminal::ConnectionToken.object_name => Terminal::ConnectionToken,
|
||||
Terminal::Location.object_name => Terminal::Location,
|
||||
Terminal::Reader.object_name => Terminal::Reader,
|
||||
Terminal::ReaderCollectedData.object_name => Terminal::ReaderCollectedData,
|
||||
TestHelpers::TestClock.object_name => TestHelpers::TestClock,
|
||||
Token.object_name => Token,
|
||||
Topup.object_name => Topup,
|
||||
|
24
lib/stripe/request_params.rb
Normal file
24
lib/stripe/request_params.rb
Normal file
@ -0,0 +1,24 @@
|
||||
# frozen_string_literal: true
|
||||
# typed: true
|
||||
|
||||
module Stripe
|
||||
# For internal use only. Does not provide a stable API and may be broken
|
||||
# with future non-major changes.
|
||||
class RequestParams
|
||||
def to_h
|
||||
instance_variables.each_with_object({}) do |var, hash|
|
||||
key = var.to_s.delete("@").to_sym
|
||||
value = instance_variable_get(var)
|
||||
|
||||
hash[key] = if value.is_a?(RequestParams)
|
||||
value.to_h
|
||||
# Check if value is an array and contains RequestParams objects
|
||||
elsif value.is_a?(Array)
|
||||
value.map { |item| item.is_a?(RequestParams) ? item.to_h : item }
|
||||
else
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
79
lib/stripe/request_signing_authenticator.rb
Normal file
79
lib/stripe/request_signing_authenticator.rb
Normal file
@ -0,0 +1,79 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
class RequestSigningAuthenticator
|
||||
AUTHORIZATION_HEADER_NAME = "Authorization"
|
||||
CONTENT_TYPE_HEADER_NAME = "Content-Type"
|
||||
STRIPE_CONTEXT_HEADER_NAME = "Stripe-Context"
|
||||
STRIPE_ACCOUNT_HEADER_NAME = "Stripe-Account"
|
||||
CONTENT_DIGEST_HEADER_NAME = "Content-Digest"
|
||||
SIGNATURE_INPUT_HEADER_NAME = "Signature-Input"
|
||||
SIGNATURE_HEADER_NAME = "Signature"
|
||||
|
||||
attr_reader :auth_token, :sign_lambda
|
||||
|
||||
def initialize(auth_token, sign_lambda)
|
||||
raise ArgumentError, "auth_token must be a string" unless auth_token.is_a?(String)
|
||||
raise ArgumentError, "sign_lambda must be a lambda" unless sign_lambda.is_a?(Proc)
|
||||
|
||||
@auth_token = auth_token
|
||||
@sign_lambda = sign_lambda
|
||||
end
|
||||
|
||||
def authenticate(method, headers, body)
|
||||
covered_headers = [CONTENT_TYPE_HEADER_NAME,
|
||||
CONTENT_DIGEST_HEADER_NAME,
|
||||
STRIPE_CONTEXT_HEADER_NAME,
|
||||
STRIPE_ACCOUNT_HEADER_NAME,
|
||||
AUTHORIZATION_HEADER_NAME,]
|
||||
|
||||
headers[AUTHORIZATION_HEADER_NAME] = "STRIPE-V2-SIG #{auth_token}"
|
||||
|
||||
if method == :get
|
||||
covered_headers -= [CONTENT_TYPE_HEADER_NAME,
|
||||
CONTENT_DIGEST_HEADER_NAME,]
|
||||
else
|
||||
content = body || ""
|
||||
headers[CONTENT_DIGEST_HEADER_NAME] =
|
||||
%(sha-256=:#{content_digest(content)}:)
|
||||
end
|
||||
|
||||
covered_headers_formatted = covered_headers
|
||||
.map { |string| %("#{string.downcase}") }
|
||||
.join(" ")
|
||||
|
||||
signature_input = "(#{covered_headers_formatted});created=#{created_time}"
|
||||
|
||||
inputs = covered_headers
|
||||
.map { |header| %("#{header.downcase}": #{headers[header]}) }
|
||||
.join("\n")
|
||||
|
||||
signature_base = %(#{inputs}\n"@signature-params": #{signature_input})
|
||||
.encode(Encoding::UTF_8)
|
||||
|
||||
headers[SIGNATURE_INPUT_HEADER_NAME] = "sig1=#{signature_input}"
|
||||
|
||||
headers[SIGNATURE_HEADER_NAME] =
|
||||
"sig1=:#{encoded_signature(signature_base)}:"
|
||||
end
|
||||
|
||||
private def sign(signature_base)
|
||||
@sign_lambda.call(signature_base)
|
||||
end
|
||||
|
||||
private def encoded_signature(signature_base)
|
||||
Base64.strict_encode64(sign(signature_base))
|
||||
rescue StandardError
|
||||
raise AuthenticationError, "Encountered '#{e.message} (#{e.class})' " \
|
||||
"when calculating request signature."
|
||||
end
|
||||
|
||||
private def content_digest(content)
|
||||
Base64.strict_encode64(OpenSSL::Digest.new("SHA256").digest(content))
|
||||
end
|
||||
|
||||
private def created_time
|
||||
Time.now.to_i
|
||||
end
|
||||
end
|
||||
end
|
@ -3,8 +3,10 @@
|
||||
|
||||
require "stripe/resources/account"
|
||||
require "stripe/resources/account_link"
|
||||
require "stripe/resources/account_notice"
|
||||
require "stripe/resources/account_session"
|
||||
require "stripe/resources/apple_pay_domain"
|
||||
require "stripe/resources/application"
|
||||
require "stripe/resources/application_fee"
|
||||
require "stripe/resources/application_fee_refund"
|
||||
require "stripe/resources/apps/secret"
|
||||
@ -12,16 +14,21 @@ require "stripe/resources/balance"
|
||||
require "stripe/resources/balance_transaction"
|
||||
require "stripe/resources/bank_account"
|
||||
require "stripe/resources/billing/alert"
|
||||
require "stripe/resources/billing/alert_triggered"
|
||||
require "stripe/resources/billing/credit_balance_summary"
|
||||
require "stripe/resources/billing/credit_balance_transaction"
|
||||
require "stripe/resources/billing/credit_grant"
|
||||
require "stripe/resources/billing/meter"
|
||||
require "stripe/resources/billing/meter_error_report"
|
||||
require "stripe/resources/billing/meter_event"
|
||||
require "stripe/resources/billing/meter_event_adjustment"
|
||||
require "stripe/resources/billing/meter_event_summary"
|
||||
require "stripe/resources/billing_portal/configuration"
|
||||
require "stripe/resources/billing_portal/session"
|
||||
require "stripe/resources/capability"
|
||||
require "stripe/resources/capital/financing_offer"
|
||||
require "stripe/resources/capital/financing_summary"
|
||||
require "stripe/resources/capital/financing_transaction"
|
||||
require "stripe/resources/card"
|
||||
require "stripe/resources/cash_balance"
|
||||
require "stripe/resources/charge"
|
||||
@ -30,6 +37,7 @@ require "stripe/resources/climate/order"
|
||||
require "stripe/resources/climate/product"
|
||||
require "stripe/resources/climate/supplier"
|
||||
require "stripe/resources/confirmation_token"
|
||||
require "stripe/resources/connect_collection_transfer"
|
||||
require "stripe/resources/country_spec"
|
||||
require "stripe/resources/coupon"
|
||||
require "stripe/resources/credit_note"
|
||||
@ -41,6 +49,7 @@ require "stripe/resources/customer_session"
|
||||
require "stripe/resources/discount"
|
||||
require "stripe/resources/dispute"
|
||||
require "stripe/resources/entitlements/active_entitlement"
|
||||
require "stripe/resources/entitlements/active_entitlement_summary"
|
||||
require "stripe/resources/entitlements/feature"
|
||||
require "stripe/resources/ephemeral_key"
|
||||
require "stripe/resources/event"
|
||||
@ -48,34 +57,47 @@ require "stripe/resources/exchange_rate"
|
||||
require "stripe/resources/file"
|
||||
require "stripe/resources/file_link"
|
||||
require "stripe/resources/financial_connections/account"
|
||||
require "stripe/resources/financial_connections/account_inferred_balance"
|
||||
require "stripe/resources/financial_connections/account_owner"
|
||||
require "stripe/resources/financial_connections/account_ownership"
|
||||
require "stripe/resources/financial_connections/institution"
|
||||
require "stripe/resources/financial_connections/session"
|
||||
require "stripe/resources/financial_connections/transaction"
|
||||
require "stripe/resources/forwarding/request"
|
||||
require "stripe/resources/funding_instructions"
|
||||
require "stripe/resources/gift_cards/card"
|
||||
require "stripe/resources/gift_cards/transaction"
|
||||
require "stripe/resources/identity/verification_report"
|
||||
require "stripe/resources/identity/verification_session"
|
||||
require "stripe/resources/invoice"
|
||||
require "stripe/resources/invoice_item"
|
||||
require "stripe/resources/invoice_line_item"
|
||||
require "stripe/resources/invoice_payment"
|
||||
require "stripe/resources/invoice_rendering_template"
|
||||
require "stripe/resources/issuing/authorization"
|
||||
require "stripe/resources/issuing/card"
|
||||
require "stripe/resources/issuing/cardholder"
|
||||
require "stripe/resources/issuing/credit_underwriting_record"
|
||||
require "stripe/resources/issuing/dispute"
|
||||
require "stripe/resources/issuing/dispute_settlement_detail"
|
||||
require "stripe/resources/issuing/fraud_liability_debit"
|
||||
require "stripe/resources/issuing/personalization_design"
|
||||
require "stripe/resources/issuing/physical_bundle"
|
||||
require "stripe/resources/issuing/settlement"
|
||||
require "stripe/resources/issuing/token"
|
||||
require "stripe/resources/issuing/transaction"
|
||||
require "stripe/resources/line_item"
|
||||
require "stripe/resources/login_link"
|
||||
require "stripe/resources/mandate"
|
||||
require "stripe/resources/margin"
|
||||
require "stripe/resources/order"
|
||||
require "stripe/resources/payment_attempt_record"
|
||||
require "stripe/resources/payment_intent"
|
||||
require "stripe/resources/payment_link"
|
||||
require "stripe/resources/payment_method"
|
||||
require "stripe/resources/payment_method_configuration"
|
||||
require "stripe/resources/payment_method_domain"
|
||||
require "stripe/resources/payment_record"
|
||||
require "stripe/resources/payout"
|
||||
require "stripe/resources/person"
|
||||
require "stripe/resources/plan"
|
||||
@ -84,12 +106,16 @@ require "stripe/resources/product"
|
||||
require "stripe/resources/product_feature"
|
||||
require "stripe/resources/promotion_code"
|
||||
require "stripe/resources/quote"
|
||||
require "stripe/resources/quote_line"
|
||||
require "stripe/resources/quote_preview_invoice"
|
||||
require "stripe/resources/quote_preview_subscription_schedule"
|
||||
require "stripe/resources/radar/early_fraud_warning"
|
||||
require "stripe/resources/radar/value_list"
|
||||
require "stripe/resources/radar/value_list_item"
|
||||
require "stripe/resources/refund"
|
||||
require "stripe/resources/reporting/report_run"
|
||||
require "stripe/resources/reporting/report_type"
|
||||
require "stripe/resources/reserve_transaction"
|
||||
require "stripe/resources/reversal"
|
||||
require "stripe/resources/review"
|
||||
require "stripe/resources/setup_attempt"
|
||||
@ -97,23 +123,28 @@ require "stripe/resources/setup_intent"
|
||||
require "stripe/resources/shipping_rate"
|
||||
require "stripe/resources/sigma/scheduled_query_run"
|
||||
require "stripe/resources/source"
|
||||
require "stripe/resources/source_mandate_notification"
|
||||
require "stripe/resources/source_transaction"
|
||||
require "stripe/resources/subscription"
|
||||
require "stripe/resources/subscription_item"
|
||||
require "stripe/resources/subscription_schedule"
|
||||
require "stripe/resources/tax/association"
|
||||
require "stripe/resources/tax/calculation"
|
||||
require "stripe/resources/tax/calculation_line_item"
|
||||
require "stripe/resources/tax/form"
|
||||
require "stripe/resources/tax/registration"
|
||||
require "stripe/resources/tax/settings"
|
||||
require "stripe/resources/tax/transaction"
|
||||
require "stripe/resources/tax/transaction_line_item"
|
||||
require "stripe/resources/tax_code"
|
||||
require "stripe/resources/tax_deducted_at_source"
|
||||
require "stripe/resources/tax_id"
|
||||
require "stripe/resources/tax_rate"
|
||||
require "stripe/resources/terminal/configuration"
|
||||
require "stripe/resources/terminal/connection_token"
|
||||
require "stripe/resources/terminal/location"
|
||||
require "stripe/resources/terminal/reader"
|
||||
require "stripe/resources/terminal/reader_collected_data"
|
||||
require "stripe/resources/test_helpers/test_clock"
|
||||
require "stripe/resources/token"
|
||||
require "stripe/resources/topup"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,60 @@ module Stripe
|
||||
"account_link"
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class CollectionOptions < Stripe::RequestParams
|
||||
# Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`.
|
||||
attr_accessor :fields
|
||||
# Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`.
|
||||
attr_accessor :future_requirements
|
||||
|
||||
def initialize(fields: nil, future_requirements: nil)
|
||||
@fields = fields
|
||||
@future_requirements = future_requirements
|
||||
end
|
||||
end
|
||||
# The identifier of the account to create an account link for.
|
||||
attr_accessor :account
|
||||
# The collect parameter is deprecated. Use `collection_options` instead.
|
||||
attr_accessor :collect
|
||||
# Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow.
|
||||
attr_accessor :collection_options
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user.
|
||||
attr_accessor :refresh_url
|
||||
# The URL that the user will be redirected to upon leaving or completing the linked flow.
|
||||
attr_accessor :return_url
|
||||
# The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
account: nil,
|
||||
collect: nil,
|
||||
collection_options: nil,
|
||||
expand: nil,
|
||||
refresh_url: nil,
|
||||
return_url: nil,
|
||||
type: nil
|
||||
)
|
||||
@account = account
|
||||
@collect = collect
|
||||
@collection_options = collection_options
|
||||
@expand = expand
|
||||
@refresh_url = refresh_url
|
||||
@return_url = return_url
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The timestamp at which this account link will expire.
|
||||
attr_reader :expires_at
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The URL for the account link.
|
||||
attr_reader :url
|
||||
|
||||
# Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/account_links", params: params, opts: opts)
|
||||
|
132
lib/stripe/resources/account_notice.rb
Normal file
132
lib/stripe/resources/account_notice.rb
Normal file
@ -0,0 +1,132 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
# A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself.
|
||||
#
|
||||
# See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts.
|
||||
class AccountNotice < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
include Stripe::APIOperations::Save
|
||||
|
||||
OBJECT_NAME = "account_notice"
|
||||
def self.object_name
|
||||
"account_notice"
|
||||
end
|
||||
|
||||
class Email < Stripe::StripeObject
|
||||
# Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use.
|
||||
attr_reader :plain_text
|
||||
# Email address of the recipient.
|
||||
attr_reader :recipient
|
||||
# Subject of the email.
|
||||
attr_reader :subject
|
||||
end
|
||||
|
||||
class LinkedObjects < Stripe::StripeObject
|
||||
# Associated [Capability](https://stripe.com/docs/api/capabilities)
|
||||
attr_reader :capability
|
||||
# Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record)
|
||||
attr_reader :issuing_credit_underwriting_record
|
||||
# Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes)
|
||||
attr_reader :issuing_dispute
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Set to false to only return unsent AccountNotices.
|
||||
attr_accessor :sent
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, sent: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@sent = sent
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Email < Stripe::RequestParams
|
||||
# Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use.
|
||||
attr_accessor :plain_text
|
||||
# Email address of the recipient.
|
||||
attr_accessor :recipient
|
||||
# Subject of the email.
|
||||
attr_accessor :subject
|
||||
|
||||
def initialize(plain_text: nil, recipient: nil, subject: nil)
|
||||
@plain_text = plain_text
|
||||
@recipient = recipient
|
||||
@subject = subject
|
||||
end
|
||||
end
|
||||
# Information about the email you sent.
|
||||
attr_accessor :email
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Date when you sent the notice.
|
||||
attr_accessor :sent_at
|
||||
|
||||
def initialize(email: nil, expand: nil, metadata: nil, sent_at: nil)
|
||||
@email = email
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@sent_at = sent_at
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# When present, the deadline for sending the notice to meet the relevant regulations.
|
||||
attr_reader :deadline
|
||||
# Information about the email when sent.
|
||||
attr_reader :email
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Information about objects related to the notice.
|
||||
attr_reader :linked_objects
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason.
|
||||
attr_reader :reason
|
||||
# Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent.
|
||||
attr_reader :sent_at
|
||||
|
||||
# Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/account_notices", params: params, opts: opts)
|
||||
end
|
||||
|
||||
# Updates an AccountNotice object.
|
||||
def self.update(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/account_notices/%<id>s", { id: CGI.escape(id) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
@ -17,6 +17,973 @@ module Stripe
|
||||
"account_session"
|
||||
end
|
||||
|
||||
class Components < Stripe::StripeObject
|
||||
class AccountManagement < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_reader :external_account_collection
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class AccountOnboarding < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_reader :external_account_collection
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class Balances < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :edit_payout_schedule
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_reader :external_account_collection
|
||||
# Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :instant_payouts
|
||||
# Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :standard_payouts
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class CapitalFinancing < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class CapitalFinancingApplication < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class CapitalFinancingPromotion < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class Documents < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class FinancialAccount < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow external accounts to be linked for money transfer.
|
||||
attr_reader :external_account_collection
|
||||
# Whether to allow sending money.
|
||||
attr_reader :send_money
|
||||
# Whether to allow transferring balance.
|
||||
attr_reader :transfer_balance
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class FinancialAccountTransactions < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_reader :card_spend_dispute_management
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class IssuingCard < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Whether to allow card management features.
|
||||
attr_reader :card_management
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_reader :card_spend_dispute_management
|
||||
# Whether to allow cardholder management features.
|
||||
attr_reader :cardholder_management
|
||||
# Whether to allow spend control management features.
|
||||
attr_reader :spend_control_management
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class IssuingCardsList < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Whether to allow card management features.
|
||||
attr_reader :card_management
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_reader :card_spend_dispute_management
|
||||
# Whether to allow cardholder management features.
|
||||
attr_reader :cardholder_management
|
||||
# Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow spend control management features.
|
||||
attr_reader :spend_control_management
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class NotificationBanner < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_reader :external_account_collection
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class PaymentDetails < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Whether to allow capturing and cancelling payment intents. This is `true` by default.
|
||||
attr_reader :capture_payments
|
||||
# Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
|
||||
attr_reader :destination_on_behalf_of_charge_management
|
||||
# Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
|
||||
attr_reader :dispute_management
|
||||
# Whether to allow sending refunds. This is `true` by default.
|
||||
attr_reader :refund_management
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class Payments < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Whether to allow capturing and cancelling payment intents. This is `true` by default.
|
||||
attr_reader :capture_payments
|
||||
# Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
|
||||
attr_reader :destination_on_behalf_of_charge_management
|
||||
# Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
|
||||
attr_reader :dispute_management
|
||||
# Whether to allow sending refunds. This is `true` by default.
|
||||
attr_reader :refund_management
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class Payouts < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_reader :disable_stripe_user_authentication
|
||||
# Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :edit_payout_schedule
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_reader :external_account_collection
|
||||
# Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :instant_payouts
|
||||
# Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_reader :standard_payouts
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class PayoutsList < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class TaxRegistrations < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class TaxSettings < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject; end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_reader :enabled
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
end
|
||||
# Attribute for field account_management
|
||||
attr_reader :account_management
|
||||
# Attribute for field account_onboarding
|
||||
attr_reader :account_onboarding
|
||||
# Attribute for field balances
|
||||
attr_reader :balances
|
||||
# Attribute for field capital_financing
|
||||
attr_reader :capital_financing
|
||||
# Attribute for field capital_financing_application
|
||||
attr_reader :capital_financing_application
|
||||
# Attribute for field capital_financing_promotion
|
||||
attr_reader :capital_financing_promotion
|
||||
# Attribute for field documents
|
||||
attr_reader :documents
|
||||
# Attribute for field financial_account
|
||||
attr_reader :financial_account
|
||||
# Attribute for field financial_account_transactions
|
||||
attr_reader :financial_account_transactions
|
||||
# Attribute for field issuing_card
|
||||
attr_reader :issuing_card
|
||||
# Attribute for field issuing_cards_list
|
||||
attr_reader :issuing_cards_list
|
||||
# Attribute for field notification_banner
|
||||
attr_reader :notification_banner
|
||||
# Attribute for field payment_details
|
||||
attr_reader :payment_details
|
||||
# Attribute for field payments
|
||||
attr_reader :payments
|
||||
# Attribute for field payouts
|
||||
attr_reader :payouts
|
||||
# Attribute for field payouts_list
|
||||
attr_reader :payouts_list
|
||||
# Attribute for field tax_registrations
|
||||
attr_reader :tax_registrations
|
||||
# Attribute for field tax_settings
|
||||
attr_reader :tax_settings
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Components < Stripe::RequestParams
|
||||
class AccountManagement < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_accessor :external_account_collection
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
external_account_collection: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@external_account_collection = external_account_collection
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class AccountOnboarding < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_accessor :external_account_collection
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
external_account_collection: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@external_account_collection = external_account_collection
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class AppInstall < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# List of apps allowed to be enabled for this account session.
|
||||
attr_accessor :allowed_apps
|
||||
|
||||
def initialize(allowed_apps: nil)
|
||||
@allowed_apps = allowed_apps
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class AppViewport < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# List of apps allowed to be enabled for this account session.
|
||||
attr_accessor :allowed_apps
|
||||
|
||||
def initialize(allowed_apps: nil)
|
||||
@allowed_apps = allowed_apps
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class Balances < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :edit_payout_schedule
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_accessor :external_account_collection
|
||||
# Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :instant_payouts
|
||||
# Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :standard_payouts
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
edit_payout_schedule: nil,
|
||||
external_account_collection: nil,
|
||||
instant_payouts: nil,
|
||||
standard_payouts: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@edit_payout_schedule = edit_payout_schedule
|
||||
@external_account_collection = external_account_collection
|
||||
@instant_payouts = instant_payouts
|
||||
@standard_payouts = standard_payouts
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class CapitalFinancing < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class CapitalFinancingApplication < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class CapitalFinancingPromotion < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class CapitalOverview < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class Documents < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class FinancialAccount < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow external accounts to be linked for money transfer.
|
||||
attr_accessor :external_account_collection
|
||||
# Whether to allow sending money.
|
||||
attr_accessor :send_money
|
||||
# Whether to allow transferring balance.
|
||||
attr_accessor :transfer_balance
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
external_account_collection: nil,
|
||||
send_money: nil,
|
||||
transfer_balance: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@external_account_collection = external_account_collection
|
||||
@send_money = send_money
|
||||
@transfer_balance = transfer_balance
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class FinancialAccountTransactions < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_accessor :card_spend_dispute_management
|
||||
|
||||
def initialize(card_spend_dispute_management: nil)
|
||||
@card_spend_dispute_management = card_spend_dispute_management
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class IssuingCard < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow card management features.
|
||||
attr_accessor :card_management
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_accessor :card_spend_dispute_management
|
||||
# Whether to allow cardholder management features.
|
||||
attr_accessor :cardholder_management
|
||||
# Whether to allow spend control management features.
|
||||
attr_accessor :spend_control_management
|
||||
|
||||
def initialize(
|
||||
card_management: nil,
|
||||
card_spend_dispute_management: nil,
|
||||
cardholder_management: nil,
|
||||
spend_control_management: nil
|
||||
)
|
||||
@card_management = card_management
|
||||
@card_spend_dispute_management = card_spend_dispute_management
|
||||
@cardholder_management = cardholder_management
|
||||
@spend_control_management = spend_control_management
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class IssuingCardsList < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow card management features.
|
||||
attr_accessor :card_management
|
||||
# Whether to allow card spend dispute management features.
|
||||
attr_accessor :card_spend_dispute_management
|
||||
# Whether to allow cardholder management features.
|
||||
attr_accessor :cardholder_management
|
||||
# Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow spend control management features.
|
||||
attr_accessor :spend_control_management
|
||||
|
||||
def initialize(
|
||||
card_management: nil,
|
||||
card_spend_dispute_management: nil,
|
||||
cardholder_management: nil,
|
||||
disable_stripe_user_authentication: nil,
|
||||
spend_control_management: nil
|
||||
)
|
||||
@card_management = card_management
|
||||
@card_spend_dispute_management = card_spend_dispute_management
|
||||
@cardholder_management = cardholder_management
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@spend_control_management = spend_control_management
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class NotificationBanner < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_accessor :external_account_collection
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
external_account_collection: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@external_account_collection = external_account_collection
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class PaymentDetails < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow capturing and cancelling payment intents. This is `true` by default.
|
||||
attr_accessor :capture_payments
|
||||
# Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
|
||||
attr_accessor :destination_on_behalf_of_charge_management
|
||||
# Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
|
||||
attr_accessor :dispute_management
|
||||
# Whether to allow sending refunds. This is `true` by default.
|
||||
attr_accessor :refund_management
|
||||
|
||||
def initialize(
|
||||
capture_payments: nil,
|
||||
destination_on_behalf_of_charge_management: nil,
|
||||
dispute_management: nil,
|
||||
refund_management: nil
|
||||
)
|
||||
@capture_payments = capture_payments
|
||||
@destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
|
||||
@dispute_management = dispute_management
|
||||
@refund_management = refund_management
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class PaymentMethodSettings < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class Payments < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow capturing and cancelling payment intents. This is `true` by default.
|
||||
attr_accessor :capture_payments
|
||||
# Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
|
||||
attr_accessor :destination_on_behalf_of_charge_management
|
||||
# Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
|
||||
attr_accessor :dispute_management
|
||||
# Whether to allow sending refunds. This is `true` by default.
|
||||
attr_accessor :refund_management
|
||||
|
||||
def initialize(
|
||||
capture_payments: nil,
|
||||
destination_on_behalf_of_charge_management: nil,
|
||||
dispute_management: nil,
|
||||
refund_management: nil
|
||||
)
|
||||
@capture_payments = capture_payments
|
||||
@destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management
|
||||
@dispute_management = dispute_management
|
||||
@refund_management = refund_management
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class Payouts < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false.
|
||||
attr_accessor :disable_stripe_user_authentication
|
||||
# Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :edit_payout_schedule
|
||||
# Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`.
|
||||
attr_accessor :external_account_collection
|
||||
# Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :instant_payouts
|
||||
# Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise.
|
||||
attr_accessor :standard_payouts
|
||||
|
||||
def initialize(
|
||||
disable_stripe_user_authentication: nil,
|
||||
edit_payout_schedule: nil,
|
||||
external_account_collection: nil,
|
||||
instant_payouts: nil,
|
||||
standard_payouts: nil
|
||||
)
|
||||
@disable_stripe_user_authentication = disable_stripe_user_authentication
|
||||
@edit_payout_schedule = edit_payout_schedule
|
||||
@external_account_collection = external_account_collection
|
||||
@instant_payouts = instant_payouts
|
||||
@standard_payouts = standard_payouts
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class PayoutsList < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class Recipients < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# Whether to allow sending money.
|
||||
attr_accessor :send_money
|
||||
|
||||
def initialize(send_money: nil)
|
||||
@send_money = send_money
|
||||
end
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# Attribute for param field features
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class ReportingChart < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class TaxRegistrations < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class TaxSettings < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class TaxThresholdMonitoring < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
end
|
||||
# Whether the embedded component is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of features enabled in the embedded component.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
# Configuration for the account management embedded component.
|
||||
attr_accessor :account_management
|
||||
# Configuration for the account onboarding embedded component.
|
||||
attr_accessor :account_onboarding
|
||||
# Configuration for the app install component.
|
||||
attr_accessor :app_install
|
||||
# Configuration for the app viewport component.
|
||||
attr_accessor :app_viewport
|
||||
# Configuration for the balances embedded component.
|
||||
attr_accessor :balances
|
||||
# Configuration for the capital financing embedded component.
|
||||
attr_accessor :capital_financing
|
||||
# Configuration for the capital financing application embedded component.
|
||||
attr_accessor :capital_financing_application
|
||||
# Configuration for the capital financing promotion embedded component.
|
||||
attr_accessor :capital_financing_promotion
|
||||
# Configuration for the capital overview embedded component.
|
||||
attr_accessor :capital_overview
|
||||
# Configuration for the documents embedded component.
|
||||
attr_accessor :documents
|
||||
# Configuration for the financial account embedded component.
|
||||
attr_accessor :financial_account
|
||||
# Configuration for the financial account transactions embedded component.
|
||||
attr_accessor :financial_account_transactions
|
||||
# Configuration for the issuing card embedded component.
|
||||
attr_accessor :issuing_card
|
||||
# Configuration for the issuing cards list embedded component.
|
||||
attr_accessor :issuing_cards_list
|
||||
# Configuration for the notification banner embedded component.
|
||||
attr_accessor :notification_banner
|
||||
# Configuration for the payment details embedded component.
|
||||
attr_accessor :payment_details
|
||||
# Configuration for the payment method settings embedded component.
|
||||
attr_accessor :payment_method_settings
|
||||
# Configuration for the payments embedded component.
|
||||
attr_accessor :payments
|
||||
# Configuration for the payouts embedded component.
|
||||
attr_accessor :payouts
|
||||
# Configuration for the payouts list embedded component.
|
||||
attr_accessor :payouts_list
|
||||
# Configuration for the recipients component.
|
||||
attr_accessor :recipients
|
||||
# Configuration for the reporting chart embedded component.
|
||||
attr_accessor :reporting_chart
|
||||
# Configuration for the tax registrations embedded component.
|
||||
attr_accessor :tax_registrations
|
||||
# Configuration for the tax settings embedded component.
|
||||
attr_accessor :tax_settings
|
||||
# Configuration for the tax threshold monitoring embedded component.
|
||||
attr_accessor :tax_threshold_monitoring
|
||||
|
||||
def initialize(
|
||||
account_management: nil,
|
||||
account_onboarding: nil,
|
||||
app_install: nil,
|
||||
app_viewport: nil,
|
||||
balances: nil,
|
||||
capital_financing: nil,
|
||||
capital_financing_application: nil,
|
||||
capital_financing_promotion: nil,
|
||||
capital_overview: nil,
|
||||
documents: nil,
|
||||
financial_account: nil,
|
||||
financial_account_transactions: nil,
|
||||
issuing_card: nil,
|
||||
issuing_cards_list: nil,
|
||||
notification_banner: nil,
|
||||
payment_details: nil,
|
||||
payment_method_settings: nil,
|
||||
payments: nil,
|
||||
payouts: nil,
|
||||
payouts_list: nil,
|
||||
recipients: nil,
|
||||
reporting_chart: nil,
|
||||
tax_registrations: nil,
|
||||
tax_settings: nil,
|
||||
tax_threshold_monitoring: nil
|
||||
)
|
||||
@account_management = account_management
|
||||
@account_onboarding = account_onboarding
|
||||
@app_install = app_install
|
||||
@app_viewport = app_viewport
|
||||
@balances = balances
|
||||
@capital_financing = capital_financing
|
||||
@capital_financing_application = capital_financing_application
|
||||
@capital_financing_promotion = capital_financing_promotion
|
||||
@capital_overview = capital_overview
|
||||
@documents = documents
|
||||
@financial_account = financial_account
|
||||
@financial_account_transactions = financial_account_transactions
|
||||
@issuing_card = issuing_card
|
||||
@issuing_cards_list = issuing_cards_list
|
||||
@notification_banner = notification_banner
|
||||
@payment_details = payment_details
|
||||
@payment_method_settings = payment_method_settings
|
||||
@payments = payments
|
||||
@payouts = payouts
|
||||
@payouts_list = payouts_list
|
||||
@recipients = recipients
|
||||
@reporting_chart = reporting_chart
|
||||
@tax_registrations = tax_registrations
|
||||
@tax_settings = tax_settings
|
||||
@tax_threshold_monitoring = tax_threshold_monitoring
|
||||
end
|
||||
end
|
||||
# The identifier of the account to create an Account Session for.
|
||||
attr_accessor :account
|
||||
# Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not).
|
||||
attr_accessor :components
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(account: nil, components: nil, expand: nil)
|
||||
@account = account
|
||||
@components = components
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The ID of the account the AccountSession was created for
|
||||
attr_reader :account
|
||||
# The client secret of this AccountSession. Used on the client to set up secure access to the given `account`.
|
||||
#
|
||||
# The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.
|
||||
#
|
||||
# Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled.
|
||||
attr_reader :client_secret
|
||||
# Attribute for field components
|
||||
attr_reader :components
|
||||
# The timestamp at which this AccountSession will expire.
|
||||
attr_reader :expires_at
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
# Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/account_sessions", params: params, opts: opts)
|
||||
|
@ -13,6 +13,69 @@ module Stripe
|
||||
"apple_pay_domain"
|
||||
end
|
||||
|
||||
class DeleteParams < Stripe::RequestParams
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# Attribute for param field domain_name
|
||||
attr_accessor :domain_name
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
domain_name: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@domain_name = domain_name
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
# Attribute for param field domain_name
|
||||
attr_accessor :domain_name
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(domain_name: nil, expand: nil)
|
||||
@domain_name = domain_name
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Attribute for field domain_name
|
||||
attr_reader :domain_name
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
# Create an apple pay domain.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
20
lib/stripe/resources/application.rb
Normal file
20
lib/stripe/resources/application.rb
Normal file
@ -0,0 +1,20 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
class Application < APIResource
|
||||
OBJECT_NAME = "application"
|
||||
def self.object_name
|
||||
"application"
|
||||
end
|
||||
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The name of the application.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
end
|
||||
end
|
@ -13,6 +13,102 @@ module Stripe
|
||||
|
||||
nested_resource_class_methods :refund, operations: %i[create retrieve update list]
|
||||
|
||||
class FeeSource < Stripe::StripeObject
|
||||
# Charge ID that created this application fee.
|
||||
attr_reader :charge
|
||||
# Payout ID that created this application fee.
|
||||
attr_reader :payout
|
||||
# Type of object that created the application fee, either `charge` or `payout`.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return application fees for the charge specified by this charge ID.
|
||||
attr_accessor :charge
|
||||
# Only return applications fees that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
charge: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@charge = charge
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# ID of the Stripe account this fee was taken from.
|
||||
attr_reader :account
|
||||
# Amount earned, in cents (or local equivalent).
|
||||
attr_reader :amount
|
||||
# Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)
|
||||
attr_reader :amount_refunded
|
||||
# ID of the Connect application that earned the fee.
|
||||
attr_reader :application
|
||||
# Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds).
|
||||
attr_reader :balance_transaction
|
||||
# ID of the charge that the application fee was taken from.
|
||||
attr_reader :charge
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Polymorphic source of the application fee. Includes the ID of the object the application fee was created from.
|
||||
attr_reader :fee_source
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter.
|
||||
attr_reader :originating_transaction
|
||||
# Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false.
|
||||
attr_reader :refunded
|
||||
# A list of refunds that have been applied to the fee.
|
||||
attr_reader :refunds
|
||||
|
||||
# Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts)
|
||||
|
@ -15,6 +15,23 @@ module Stripe
|
||||
"fee_refund"
|
||||
end
|
||||
|
||||
# Amount, in cents (or local equivalent).
|
||||
attr_reader :amount
|
||||
# Balance transaction that describes the impact on your account balance.
|
||||
attr_reader :balance_transaction
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# ID of the application fee that was refunded.
|
||||
attr_reader :fee
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
def resource_url
|
||||
"#{ApplicationFee.resource_url}/#{CGI.escape(fee)}/refunds" \
|
||||
"/#{CGI.escape(id)}"
|
||||
|
@ -21,6 +21,147 @@ module Stripe
|
||||
"apps.secret"
|
||||
end
|
||||
|
||||
class Scope < Stripe::StripeObject
|
||||
# The secret scope type.
|
||||
attr_reader :type
|
||||
# The user ID, if type is set to "user"
|
||||
attr_reader :user
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Scope < Stripe::RequestParams
|
||||
# The secret scope type.
|
||||
attr_accessor :type
|
||||
# The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(type: nil, user: nil)
|
||||
@type = type
|
||||
@user = user
|
||||
end
|
||||
end
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
|
||||
attr_accessor :scope
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, scope: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@scope = scope
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Scope < Stripe::RequestParams
|
||||
# The secret scope type.
|
||||
attr_accessor :type
|
||||
# The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(type: nil, user: nil)
|
||||
@type = type
|
||||
@user = user
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The Unix timestamp for the expiry time of the secret, after which the secret deletes.
|
||||
attr_accessor :expires_at
|
||||
# A name for the secret that's unique within the scope.
|
||||
attr_accessor :name
|
||||
# The plaintext secret value to be stored.
|
||||
attr_accessor :payload
|
||||
# Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
|
||||
attr_accessor :scope
|
||||
|
||||
def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil)
|
||||
@expand = expand
|
||||
@expires_at = expires_at
|
||||
@name = name
|
||||
@payload = payload
|
||||
@scope = scope
|
||||
end
|
||||
end
|
||||
|
||||
class FindParams < Stripe::RequestParams
|
||||
class Scope < Stripe::RequestParams
|
||||
# The secret scope type.
|
||||
attr_accessor :type
|
||||
# The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(type: nil, user: nil)
|
||||
@type = type
|
||||
@user = user
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A name for the secret that's unique within the scope.
|
||||
attr_accessor :name
|
||||
# Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
|
||||
attr_accessor :scope
|
||||
|
||||
def initialize(expand: nil, name: nil, scope: nil)
|
||||
@expand = expand
|
||||
@name = name
|
||||
@scope = scope
|
||||
end
|
||||
end
|
||||
|
||||
class DeleteWhereParams < Stripe::RequestParams
|
||||
class Scope < Stripe::RequestParams
|
||||
# The secret scope type.
|
||||
attr_accessor :type
|
||||
# The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`.
|
||||
attr_accessor :user
|
||||
|
||||
def initialize(type: nil, user: nil)
|
||||
@type = type
|
||||
@user = user
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A name for the secret that's unique within the scope.
|
||||
attr_accessor :name
|
||||
# Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user.
|
||||
attr_accessor :scope
|
||||
|
||||
def initialize(expand: nil, name: nil, scope: nil)
|
||||
@expand = expand
|
||||
@name = name
|
||||
@scope = scope
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# If true, indicates that this secret has been deleted
|
||||
attr_reader :deleted
|
||||
# The Unix timestamp for the expiry time of the secret, after which the secret deletes.
|
||||
attr_reader :expires_at
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# A name for the secret that's unique within the scope.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The plaintext secret value to be stored.
|
||||
attr_reader :payload
|
||||
# Attribute for field scope
|
||||
attr_reader :scope
|
||||
|
||||
# Create or replace a secret in the secret store.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/apps/secrets", params: params, opts: opts)
|
||||
|
@ -18,5 +18,136 @@ module Stripe
|
||||
def self.object_name
|
||||
"balance"
|
||||
end
|
||||
|
||||
class Available < Stripe::StripeObject
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Balance amount.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
|
||||
class ConnectReserved < Stripe::StripeObject
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Balance amount.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
|
||||
class InstantAvailable < Stripe::StripeObject
|
||||
class NetAvailable < Stripe::StripeObject
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Net balance amount, subtracting fees from platform-set pricing.
|
||||
attr_reader :amount
|
||||
# ID of the external account for this net balance (not expandable).
|
||||
attr_reader :destination
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Balance amount.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Breakdown of balance by destination.
|
||||
attr_reader :net_available
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
|
||||
class Issuing < Stripe::StripeObject
|
||||
class Available < Stripe::StripeObject
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Balance amount.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
# Funds that are available for use.
|
||||
attr_reader :available
|
||||
end
|
||||
|
||||
class Pending < Stripe::StripeObject
|
||||
class SourceTypes < Stripe::StripeObject
|
||||
# Amount for bank account.
|
||||
attr_reader :bank_account
|
||||
# Amount for card.
|
||||
attr_reader :card
|
||||
# Amount for FPX.
|
||||
attr_reader :fpx
|
||||
end
|
||||
# Balance amount.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Attribute for field source_types
|
||||
attr_reader :source_types
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
|
||||
attr_reader :available
|
||||
# Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
|
||||
attr_reader :connect_reserved
|
||||
# Funds that you can pay out using Instant Payouts.
|
||||
attr_reader :instant_available
|
||||
# Attribute for field issuing
|
||||
attr_reader :issuing
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
|
||||
attr_reader :pending
|
||||
end
|
||||
end
|
||||
|
@ -14,6 +14,118 @@ module Stripe
|
||||
"balance_transaction"
|
||||
end
|
||||
|
||||
class FeeDetail < Stripe::StripeObject
|
||||
# Amount of the fee, in cents.
|
||||
attr_reader :amount
|
||||
# ID of the Connect application that earned the fee.
|
||||
attr_reader :application
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return transactions that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID.
|
||||
attr_accessor :payout
|
||||
# Only returns the original transaction.
|
||||
attr_accessor :source
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
currency: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
payout: nil,
|
||||
source: nil,
|
||||
starting_after: nil,
|
||||
type: nil
|
||||
)
|
||||
@created = created
|
||||
@currency = currency
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@payout = payout
|
||||
@source = source
|
||||
@starting_after = starting_after
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party.
|
||||
attr_reader :amount
|
||||
# The date that the transaction's net funds become available in the Stripe balance.
|
||||
attr_reader :available_on
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
|
||||
attr_reader :exchange_rate
|
||||
# Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed.
|
||||
attr_reader :fee
|
||||
# Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
|
||||
attr_reader :fee_details
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee`
|
||||
attr_reader :net
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
|
||||
attr_reader :reporting_category
|
||||
# This transaction relates to the Stripe object.
|
||||
attr_reader :source
|
||||
# The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
|
||||
attr_reader :status
|
||||
# Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
|
||||
attr_reader :type
|
||||
|
||||
# Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.
|
||||
#
|
||||
# Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.
|
||||
|
@ -19,6 +19,86 @@ module Stripe
|
||||
"bank_account"
|
||||
end
|
||||
|
||||
class FutureRequirements < Stripe::StripeObject
|
||||
class Error < Stripe::StripeObject
|
||||
# The code for the type of error.
|
||||
attr_reader :code
|
||||
# An informative message that indicates the error type and provides additional details about the error.
|
||||
attr_reader :reason
|
||||
# The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
|
||||
attr_reader :requirement
|
||||
end
|
||||
# Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
|
||||
attr_reader :currently_due
|
||||
# Fields that are `currently_due` and need to be collected again because validation or verification failed.
|
||||
attr_reader :errors
|
||||
# Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
|
||||
attr_reader :past_due
|
||||
# Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
|
||||
attr_reader :pending_verification
|
||||
end
|
||||
|
||||
class Requirements < Stripe::StripeObject
|
||||
class Error < Stripe::StripeObject
|
||||
# The code for the type of error.
|
||||
attr_reader :code
|
||||
# An informative message that indicates the error type and provides additional details about the error.
|
||||
attr_reader :reason
|
||||
# The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
|
||||
attr_reader :requirement
|
||||
end
|
||||
# Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled.
|
||||
attr_reader :currently_due
|
||||
# Fields that are `currently_due` and need to be collected again because validation or verification failed.
|
||||
attr_reader :errors
|
||||
# Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account.
|
||||
attr_reader :past_due
|
||||
# Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
|
||||
attr_reader :pending_verification
|
||||
end
|
||||
# The ID of the account that the bank account is associated with.
|
||||
attr_reader :account
|
||||
# The name of the person or business that owns the bank account.
|
||||
attr_reader :account_holder_name
|
||||
# The type of entity that holds the account. This can be either `individual` or `company`.
|
||||
attr_reader :account_holder_type
|
||||
# The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`.
|
||||
attr_reader :account_type
|
||||
# A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout.
|
||||
attr_reader :available_payout_methods
|
||||
# Name of the bank associated with the routing number (e.g., `WELLS FARGO`).
|
||||
attr_reader :bank_name
|
||||
# Two-letter ISO code representing the country the bank account is located in.
|
||||
attr_reader :country
|
||||
# Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account.
|
||||
attr_reader :currency
|
||||
# The ID of the customer that the bank account is associated with.
|
||||
attr_reader :customer
|
||||
# Whether this bank account is the default external account for its currency.
|
||||
attr_reader :default_for_currency
|
||||
# Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.
|
||||
attr_reader :fingerprint
|
||||
# Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
|
||||
attr_reader :future_requirements
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The last four digits of the bank account number.
|
||||
attr_reader :last4
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Information about the requirements for the bank account, including what information needs to be collected.
|
||||
attr_reader :requirements
|
||||
# The routing transit number for the bank account.
|
||||
attr_reader :routing_number
|
||||
# For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated.
|
||||
#
|
||||
# For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.
|
||||
attr_reader :status
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
def verify(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
@ -38,10 +118,12 @@ module Stripe
|
||||
end
|
||||
|
||||
def resource_url
|
||||
if respond_to?(:customer)
|
||||
if !customer.nil?
|
||||
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
|
||||
elsif respond_to?(:account)
|
||||
elsif !account.nil?
|
||||
"#{Account.resource_url}/#{CGI.escape(account)}/external_accounts/#{CGI.escape(id)}"
|
||||
else
|
||||
raise InvalidRequestError, "Could not determine which URL to request: [account, customer] fields are all null"
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -13,6 +13,150 @@ module Stripe
|
||||
"billing.alert"
|
||||
end
|
||||
|
||||
class UsageThreshold < Stripe::StripeObject
|
||||
class Filter < Stripe::StripeObject
|
||||
# Limit the scope of the alert to this customer ID
|
||||
attr_reader :customer
|
||||
# Attribute for field type
|
||||
attr_reader :type
|
||||
end
|
||||
# The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time.
|
||||
attr_reader :filters
|
||||
# The value at which this alert will trigger.
|
||||
attr_reader :gte
|
||||
# The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
|
||||
attr_reader :meter
|
||||
# Defines how the alert will behave.
|
||||
attr_reader :recurrence
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# Filter results to only include this type of alert.
|
||||
attr_accessor :alert_type
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Filter results to only include alerts with the given meter.
|
||||
attr_accessor :meter
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
alert_type: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
meter: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@alert_type = alert_type
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@meter = meter
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class UsageThreshold < Stripe::RequestParams
|
||||
class Filter < Stripe::RequestParams
|
||||
# Limit the scope to this usage alert only to this customer.
|
||||
attr_accessor :customer
|
||||
# What type of filter is being applied to this usage alert.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(customer: nil, type: nil)
|
||||
@customer = customer
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
|
||||
attr_accessor :filters
|
||||
# Defines at which value the alert will fire.
|
||||
attr_accessor :gte
|
||||
# The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
|
||||
attr_accessor :meter
|
||||
# Whether the alert should only fire only once, or once per billing cycle.
|
||||
attr_accessor :recurrence
|
||||
|
||||
def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil)
|
||||
@filters = filters
|
||||
@gte = gte
|
||||
@meter = meter
|
||||
@recurrence = recurrence
|
||||
end
|
||||
end
|
||||
# The type of alert to create.
|
||||
attr_accessor :alert_type
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The title of the alert.
|
||||
attr_accessor :title
|
||||
# The configuration of the usage threshold.
|
||||
attr_accessor :usage_threshold
|
||||
|
||||
def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil)
|
||||
@alert_type = alert_type
|
||||
@expand = expand
|
||||
@title = title
|
||||
@usage_threshold = usage_threshold
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ActivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ArchiveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class DeactivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Defines the type of the alert.
|
||||
attr_reader :alert_type
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Status of the alert. This can be active, inactive or archived.
|
||||
attr_reader :status
|
||||
# Title of the alert.
|
||||
attr_reader :title
|
||||
# Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter).
|
||||
attr_reader :usage_threshold
|
||||
|
||||
# Reactivates this alert, allowing it to trigger again.
|
||||
def activate(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
26
lib/stripe/resources/billing/alert_triggered.rb
Normal file
26
lib/stripe/resources/billing/alert_triggered.rb
Normal file
@ -0,0 +1,26 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Billing
|
||||
class AlertTriggered < APIResource
|
||||
OBJECT_NAME = "billing.alert_triggered"
|
||||
def self.object_name
|
||||
"billing.alert_triggered"
|
||||
end
|
||||
|
||||
# A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests.
|
||||
attr_reader :alert
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# ID of customer for which the alert triggered
|
||||
attr_reader :customer
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The value triggering the alert
|
||||
attr_reader :value
|
||||
end
|
||||
end
|
||||
end
|
@ -9,6 +9,83 @@ module Stripe
|
||||
def self.object_name
|
||||
"billing.credit_balance_summary"
|
||||
end
|
||||
|
||||
class Balance < Stripe::StripeObject
|
||||
class AvailableBalance < Stripe::StripeObject
|
||||
class Monetary < Stripe::StripeObject
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# A positive integer representing the amount.
|
||||
attr_reader :value
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_reader :monetary
|
||||
# The type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class LedgerBalance < Stripe::StripeObject
|
||||
class Monetary < Stripe::StripeObject
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# A positive integer representing the amount.
|
||||
attr_reader :value
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_reader :monetary
|
||||
# The type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_reader :type
|
||||
end
|
||||
# Attribute for field available_balance
|
||||
attr_reader :available_balance
|
||||
# Attribute for field ledger_balance
|
||||
attr_reader :ledger_balance
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
class Filter < Stripe::RequestParams
|
||||
class ApplicabilityScope < Stripe::RequestParams
|
||||
# The price type that credit grants can apply to. We currently only support the `metered` price type.
|
||||
attr_accessor :price_type
|
||||
|
||||
def initialize(price_type: nil)
|
||||
@price_type = price_type
|
||||
end
|
||||
end
|
||||
# The billing credit applicability scope for which to fetch credit balance summary.
|
||||
attr_accessor :applicability_scope
|
||||
# The credit grant for which to fetch credit balance summary.
|
||||
attr_accessor :credit_grant
|
||||
# Specify the type of this filter.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(applicability_scope: nil, credit_grant: nil, type: nil)
|
||||
@applicability_scope = applicability_scope
|
||||
@credit_grant = credit_grant
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# The customer for which to fetch credit balance summary.
|
||||
attr_accessor :customer
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The filter criteria for the credit balance summary.
|
||||
attr_accessor :filter
|
||||
|
||||
def initialize(customer: nil, expand: nil, filter: nil)
|
||||
@customer = customer
|
||||
@expand = expand
|
||||
@filter = filter
|
||||
end
|
||||
end
|
||||
# The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry.
|
||||
attr_reader :balances
|
||||
# The customer the balance is for.
|
||||
attr_reader :customer
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -12,6 +12,122 @@ module Stripe
|
||||
"billing.credit_balance_transaction"
|
||||
end
|
||||
|
||||
class Credit < Stripe::StripeObject
|
||||
class Amount < Stripe::StripeObject
|
||||
class Monetary < Stripe::StripeObject
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# A positive integer representing the amount.
|
||||
attr_reader :value
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_reader :monetary
|
||||
# The type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class CreditsApplicationInvoiceVoided < Stripe::StripeObject
|
||||
# The invoice to which the reinstated billing credits were originally applied.
|
||||
attr_reader :invoice
|
||||
# The invoice line item to which the reinstated billing credits were originally applied.
|
||||
attr_reader :invoice_line_item
|
||||
end
|
||||
# Attribute for field amount
|
||||
attr_reader :amount
|
||||
# Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`.
|
||||
attr_reader :credits_application_invoice_voided
|
||||
# The type of credit transaction.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Debit < Stripe::StripeObject
|
||||
class Amount < Stripe::StripeObject
|
||||
class Monetary < Stripe::StripeObject
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# A positive integer representing the amount.
|
||||
attr_reader :value
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_reader :monetary
|
||||
# The type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class CreditsApplied < Stripe::StripeObject
|
||||
# The invoice to which the billing credits were applied.
|
||||
attr_reader :invoice
|
||||
# The invoice line item to which the billing credits were applied.
|
||||
attr_reader :invoice_line_item
|
||||
end
|
||||
# Attribute for field amount
|
||||
attr_reader :amount
|
||||
# Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`.
|
||||
attr_reader :credits_applied
|
||||
# The type of debit transaction.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# The credit grant for which to fetch credit balance transactions.
|
||||
attr_accessor :credit_grant
|
||||
# The customer for which to fetch credit balance transactions.
|
||||
attr_accessor :customer
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
credit_grant: nil,
|
||||
customer: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@credit_grant = credit_grant
|
||||
@customer = customer
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Credit details for this credit balance transaction. Only present if type is `credit`.
|
||||
attr_reader :credit
|
||||
# The credit grant associated with this credit balance transaction.
|
||||
attr_reader :credit_grant
|
||||
# Debit details for this credit balance transaction. Only present if type is `debit`.
|
||||
attr_reader :debit
|
||||
# The effective time of this credit balance transaction.
|
||||
attr_reader :effective_at
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# ID of the test clock this credit balance transaction belongs to.
|
||||
attr_reader :test_clock
|
||||
# The type of credit balance transaction (credit or debit).
|
||||
attr_reader :type
|
||||
|
||||
# Retrieve a list of credit balance transactions.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -16,6 +16,209 @@ module Stripe
|
||||
"billing.credit_grant"
|
||||
end
|
||||
|
||||
class Amount < Stripe::StripeObject
|
||||
class Monetary < Stripe::StripeObject
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# A positive integer representing the amount.
|
||||
attr_reader :value
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_reader :monetary
|
||||
# The type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ApplicabilityConfig < Stripe::StripeObject
|
||||
class Scope < Stripe::StripeObject
|
||||
# The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
|
||||
attr_reader :price_type
|
||||
end
|
||||
# Attribute for field scope
|
||||
attr_reader :scope
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# Only return credit grants for this customer.
|
||||
attr_accessor :customer
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
customer: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@customer = customer
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Amount < Stripe::RequestParams
|
||||
class Monetary < Stripe::RequestParams
|
||||
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
|
||||
attr_accessor :currency
|
||||
# A positive integer representing the amount of the credit grant.
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(currency: nil, value: nil)
|
||||
@currency = currency
|
||||
@value = value
|
||||
end
|
||||
end
|
||||
# The monetary amount.
|
||||
attr_accessor :monetary
|
||||
# Specify the type of this amount. We currently only support `monetary` billing credits.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(monetary: nil, type: nil)
|
||||
@monetary = monetary
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class ApplicabilityConfig < Stripe::RequestParams
|
||||
class Scope < Stripe::RequestParams
|
||||
# The price type that credit grants can apply to. We currently only support the `metered` price type.
|
||||
attr_accessor :price_type
|
||||
|
||||
def initialize(price_type: nil)
|
||||
@price_type = price_type
|
||||
end
|
||||
end
|
||||
# Specify the scope of this applicability config.
|
||||
attr_accessor :scope
|
||||
|
||||
def initialize(scope: nil)
|
||||
@scope = scope
|
||||
end
|
||||
end
|
||||
# Amount of this credit grant.
|
||||
attr_accessor :amount
|
||||
# Configuration specifying what this credit grant applies to.
|
||||
attr_accessor :applicability_config
|
||||
# The category of this credit grant.
|
||||
attr_accessor :category
|
||||
# ID of the customer to receive the billing credits.
|
||||
attr_accessor :customer
|
||||
# The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified.
|
||||
attr_accessor :effective_at
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The time when the billing credits expire. If not specified, the billing credits don't expire.
|
||||
attr_accessor :expires_at
|
||||
# Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
|
||||
attr_accessor :metadata
|
||||
# A descriptive name shown in the Dashboard.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
applicability_config: nil,
|
||||
category: nil,
|
||||
customer: nil,
|
||||
effective_at: nil,
|
||||
expand: nil,
|
||||
expires_at: nil,
|
||||
metadata: nil,
|
||||
name: nil
|
||||
)
|
||||
@amount = amount
|
||||
@applicability_config = applicability_config
|
||||
@category = category
|
||||
@customer = customer
|
||||
@effective_at = effective_at
|
||||
@expand = expand
|
||||
@expires_at = expires_at
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
|
||||
attr_accessor :expires_at
|
||||
# Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, expires_at: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@expires_at = expires_at
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class ExpireParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class VoidGrantParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Attribute for field amount
|
||||
attr_reader :amount
|
||||
# Attribute for field applicability_config
|
||||
attr_reader :applicability_config
|
||||
# The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
|
||||
attr_reader :category
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# ID of the customer receiving the billing credits.
|
||||
attr_reader :customer
|
||||
# The time when the billing credits become effective-when they're eligible for use.
|
||||
attr_reader :effective_at
|
||||
# The time when the billing credits expire. If not present, the billing credits don't expire.
|
||||
attr_reader :expires_at
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# A descriptive name shown in dashboard.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# ID of the test clock this credit grant belongs to.
|
||||
attr_reader :test_clock
|
||||
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :updated
|
||||
# The time when this credit grant was voided. If not present, the credit grant hasn't been voided.
|
||||
attr_reader :voided_at
|
||||
|
||||
# Creates a credit grant.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -21,6 +21,184 @@ module Stripe
|
||||
operations: %i[list],
|
||||
resource_plural: "event_summaries"
|
||||
|
||||
class CustomerMapping < Stripe::StripeObject
|
||||
# The key in the meter event payload to use for mapping the event to a customer.
|
||||
attr_reader :event_payload_key
|
||||
# The method for mapping a meter event to a customer.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class DefaultAggregation < Stripe::StripeObject
|
||||
# Specifies how events are aggregated.
|
||||
attr_reader :formula
|
||||
end
|
||||
|
||||
class StatusTransitions < Stripe::StripeObject
|
||||
# The time the meter was deactivated, if any. Measured in seconds since Unix epoch.
|
||||
attr_reader :deactivated_at
|
||||
end
|
||||
|
||||
class ValueSettings < Stripe::StripeObject
|
||||
# The key in the meter event payload to use as the value for this meter.
|
||||
attr_reader :event_payload_key
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Filter results to only include meters with the given status.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
status: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class CustomerMapping < Stripe::RequestParams
|
||||
# The key in the meter event payload to use for mapping the event to a customer.
|
||||
attr_accessor :event_payload_key
|
||||
# The method for mapping a meter event to a customer. Must be `by_id`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(event_payload_key: nil, type: nil)
|
||||
@event_payload_key = event_payload_key
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class DefaultAggregation < Stripe::RequestParams
|
||||
# Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value.
|
||||
attr_accessor :formula
|
||||
|
||||
def initialize(formula: nil)
|
||||
@formula = formula
|
||||
end
|
||||
end
|
||||
|
||||
class ValueSettings < Stripe::RequestParams
|
||||
# The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used".
|
||||
attr_accessor :event_payload_key
|
||||
|
||||
def initialize(event_payload_key: nil)
|
||||
@event_payload_key = event_payload_key
|
||||
end
|
||||
end
|
||||
# Fields that specify how to map a meter event to a customer.
|
||||
attr_accessor :customer_mapping
|
||||
# The default settings to aggregate a meter's events with.
|
||||
attr_accessor :default_aggregation
|
||||
# The meter’s name. Not visible to the customer.
|
||||
attr_accessor :display_name
|
||||
# The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
|
||||
attr_accessor :event_name
|
||||
# The time window to pre-aggregate meter events for, if any.
|
||||
attr_accessor :event_time_window
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Fields that specify how to calculate a meter event's value.
|
||||
attr_accessor :value_settings
|
||||
|
||||
def initialize(
|
||||
customer_mapping: nil,
|
||||
default_aggregation: nil,
|
||||
display_name: nil,
|
||||
event_name: nil,
|
||||
event_time_window: nil,
|
||||
expand: nil,
|
||||
value_settings: nil
|
||||
)
|
||||
@customer_mapping = customer_mapping
|
||||
@default_aggregation = default_aggregation
|
||||
@display_name = display_name
|
||||
@event_name = event_name
|
||||
@event_time_window = event_time_window
|
||||
@expand = expand
|
||||
@value_settings = value_settings
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# The meter’s name. Not visible to the customer.
|
||||
attr_accessor :display_name
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(display_name: nil, expand: nil)
|
||||
@display_name = display_name
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class DeactivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ReactivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Attribute for field customer_mapping
|
||||
attr_reader :customer_mapping
|
||||
# Attribute for field default_aggregation
|
||||
attr_reader :default_aggregation
|
||||
# The meter's name.
|
||||
attr_reader :display_name
|
||||
# The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events.
|
||||
attr_reader :event_name
|
||||
# The time window to pre-aggregate meter events for, if any.
|
||||
attr_reader :event_time_window
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The meter's status.
|
||||
attr_reader :status
|
||||
# Attribute for field status_transitions
|
||||
attr_reader :status_transitions
|
||||
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :updated
|
||||
# Attribute for field value_settings
|
||||
attr_reader :value_settings
|
||||
|
||||
# Creates a billing meter.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/billing/meters", params: params, opts: opts)
|
||||
|
59
lib/stripe/resources/billing/meter_error_report.rb
Normal file
59
lib/stripe/resources/billing/meter_error_report.rb
Normal file
@ -0,0 +1,59 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Billing
|
||||
class MeterErrorReport < APIResource
|
||||
OBJECT_NAME = "billing.meter_error_report"
|
||||
def self.object_name
|
||||
"billing.meter_error_report"
|
||||
end
|
||||
|
||||
class Reason < Stripe::StripeObject
|
||||
class ErrorType < Stripe::StripeObject
|
||||
class SampleError < Stripe::StripeObject
|
||||
class ApiRequest < Stripe::StripeObject
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# idempotency_key of the request
|
||||
attr_reader :idempotency_key
|
||||
end
|
||||
# Attribute for field api_request
|
||||
attr_reader :api_request
|
||||
# message of the error
|
||||
attr_reader :error_message
|
||||
end
|
||||
# Attribute for field sample_errors
|
||||
attr_reader :sample_errors
|
||||
end
|
||||
# The number of errors generated
|
||||
attr_reader :error_count
|
||||
# More information about errors
|
||||
attr_reader :error_types
|
||||
end
|
||||
|
||||
class RelatedObject < Stripe::StripeObject
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The type of meter error related object. Should be 'meter'
|
||||
attr_reader :object
|
||||
# The url of the meter object
|
||||
attr_reader :url
|
||||
end
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field reason
|
||||
attr_reader :reason
|
||||
# The related objects about the error
|
||||
attr_reader :related_object
|
||||
# Summary of invalid events
|
||||
attr_reader :summary
|
||||
# Time when validation ended. Measured in seconds since the Unix epoch
|
||||
attr_reader :validation_end
|
||||
# Time when validation started. Measured in seconds since the Unix epoch
|
||||
attr_reader :validation_start
|
||||
end
|
||||
end
|
||||
end
|
@ -12,6 +12,41 @@ module Stripe
|
||||
"billing.meter_event"
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
# The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
attr_accessor :event_name
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations.
|
||||
attr_accessor :identifier
|
||||
# The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
|
||||
attr_accessor :payload
|
||||
# The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified.
|
||||
attr_accessor :timestamp
|
||||
|
||||
def initialize(event_name: nil, expand: nil, identifier: nil, payload: nil, timestamp: nil)
|
||||
@event_name = event_name
|
||||
@expand = expand
|
||||
@identifier = identifier
|
||||
@payload = payload
|
||||
@timestamp = timestamp
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
attr_reader :event_name
|
||||
# A unique identifier for the event.
|
||||
attr_reader :identifier
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides).
|
||||
attr_reader :payload
|
||||
# The timestamp passed in when creating the event. Measured in seconds since the Unix epoch.
|
||||
attr_reader :timestamp
|
||||
|
||||
# Creates a billing meter event.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -12,6 +12,49 @@ module Stripe
|
||||
"billing.meter_event_adjustment"
|
||||
end
|
||||
|
||||
class Cancel < Stripe::StripeObject
|
||||
# Unique identifier for the event.
|
||||
attr_reader :identifier
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Cancel < Stripe::RequestParams
|
||||
# Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them.
|
||||
attr_accessor :identifier
|
||||
|
||||
def initialize(identifier: nil)
|
||||
@identifier = identifier
|
||||
end
|
||||
end
|
||||
# Specifies which event to cancel.
|
||||
attr_accessor :cancel
|
||||
# The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
attr_accessor :event_name
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(cancel: nil, event_name: nil, expand: nil, type: nil)
|
||||
@cancel = cancel
|
||||
@event_name = event_name
|
||||
@expand = expand
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# Specifies which event to cancel.
|
||||
attr_reader :cancel
|
||||
# The name of the meter event. Corresponds with the `event_name` field on a meter.
|
||||
attr_reader :event_name
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The meter event adjustment's status.
|
||||
attr_reader :status
|
||||
# Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet.
|
||||
attr_reader :type
|
||||
|
||||
# Creates a billing meter event adjustment.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -10,6 +10,21 @@ module Stripe
|
||||
def self.object_name
|
||||
"billing.meter_event_summary"
|
||||
end
|
||||
|
||||
# Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`.
|
||||
attr_reader :aggregated_value
|
||||
# End timestamp for this event summary (exclusive). Must be aligned with minute boundaries.
|
||||
attr_reader :end_time
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The meter associated with this event summary.
|
||||
attr_reader :meter
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries.
|
||||
attr_reader :start_time
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -14,6 +14,568 @@ module Stripe
|
||||
"billing_portal.configuration"
|
||||
end
|
||||
|
||||
class BusinessProfile < Stripe::StripeObject
|
||||
# The messaging shown to customers in the portal.
|
||||
attr_reader :headline
|
||||
# A link to the business’s publicly available privacy policy.
|
||||
attr_reader :privacy_policy_url
|
||||
# A link to the business’s publicly available terms of service.
|
||||
attr_reader :terms_of_service_url
|
||||
end
|
||||
|
||||
class Features < Stripe::StripeObject
|
||||
class CustomerUpdate < Stripe::StripeObject
|
||||
# The types of customer updates that are supported. When empty, customers are not updateable.
|
||||
attr_reader :allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
end
|
||||
|
||||
class InvoiceHistory < Stripe::StripeObject
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
end
|
||||
|
||||
class PaymentMethodUpdate < Stripe::StripeObject
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
end
|
||||
|
||||
class SubscriptionCancel < Stripe::StripeObject
|
||||
class CancellationReason < Stripe::StripeObject
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
# Which cancellation reasons will be given as options to the customer.
|
||||
attr_reader :options
|
||||
end
|
||||
# Attribute for field cancellation_reason
|
||||
attr_reader :cancellation_reason
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
# Whether to cancel subscriptions immediately or at the end of the billing period.
|
||||
attr_reader :mode
|
||||
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`.
|
||||
attr_reader :proration_behavior
|
||||
end
|
||||
|
||||
class SubscriptionUpdate < Stripe::StripeObject
|
||||
class Product < Stripe::StripeObject
|
||||
# The list of price IDs which, when subscribed to, a subscription can be updated.
|
||||
attr_reader :prices
|
||||
# The product ID.
|
||||
attr_reader :product
|
||||
end
|
||||
|
||||
class ScheduleAtPeriodEnd < Stripe::StripeObject
|
||||
class Condition < Stripe::StripeObject
|
||||
# The type of condition.
|
||||
attr_reader :type
|
||||
end
|
||||
# List of conditions. When any condition is true, an update will be scheduled at the end of the current period.
|
||||
attr_reader :conditions
|
||||
end
|
||||
# The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable.
|
||||
attr_reader :default_allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_reader :enabled
|
||||
# The list of up to 10 products that support subscription updates.
|
||||
attr_reader :products
|
||||
# Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation.
|
||||
attr_reader :proration_behavior
|
||||
# Attribute for field schedule_at_period_end
|
||||
attr_reader :schedule_at_period_end
|
||||
end
|
||||
# Attribute for field customer_update
|
||||
attr_reader :customer_update
|
||||
# Attribute for field invoice_history
|
||||
attr_reader :invoice_history
|
||||
# Attribute for field payment_method_update
|
||||
attr_reader :payment_method_update
|
||||
# Attribute for field subscription_cancel
|
||||
attr_reader :subscription_cancel
|
||||
# Attribute for field subscription_update
|
||||
attr_reader :subscription_update
|
||||
end
|
||||
|
||||
class LoginPage < Stripe::StripeObject
|
||||
# If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.
|
||||
#
|
||||
# If `false`, the previously generated `url`, if any, will be deactivated.
|
||||
attr_reader :enabled
|
||||
# A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.
|
||||
attr_reader :url
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations).
|
||||
attr_accessor :active
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration).
|
||||
attr_accessor :is_default
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
active: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
is_default: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@active = active
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@is_default = is_default
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class BusinessProfile < Stripe::RequestParams
|
||||
# The messaging shown to customers in the portal.
|
||||
attr_accessor :headline
|
||||
# A link to the business’s publicly available privacy policy.
|
||||
attr_accessor :privacy_policy_url
|
||||
# A link to the business’s publicly available terms of service.
|
||||
attr_accessor :terms_of_service_url
|
||||
|
||||
def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
|
||||
@headline = headline
|
||||
@privacy_policy_url = privacy_policy_url
|
||||
@terms_of_service_url = terms_of_service_url
|
||||
end
|
||||
end
|
||||
|
||||
class Features < Stripe::RequestParams
|
||||
class CustomerUpdate < Stripe::RequestParams
|
||||
# The types of customer updates that are supported. When empty, customers are not updateable.
|
||||
attr_accessor :allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(allowed_updates: nil, enabled: nil)
|
||||
@allowed_updates = allowed_updates
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class InvoiceHistory < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class PaymentMethodUpdate < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionCancel < Stripe::RequestParams
|
||||
class CancellationReason < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# Which cancellation reasons will be given as options to the customer.
|
||||
attr_accessor :options
|
||||
|
||||
def initialize(enabled: nil, options: nil)
|
||||
@enabled = enabled
|
||||
@options = options
|
||||
end
|
||||
end
|
||||
# Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
|
||||
attr_accessor :cancellation_reason
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# Whether to cancel subscriptions immediately or at the end of the billing period.
|
||||
attr_accessor :mode
|
||||
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
|
||||
attr_accessor :proration_behavior
|
||||
|
||||
def initialize(
|
||||
cancellation_reason: nil,
|
||||
enabled: nil,
|
||||
mode: nil,
|
||||
proration_behavior: nil
|
||||
)
|
||||
@cancellation_reason = cancellation_reason
|
||||
@enabled = enabled
|
||||
@mode = mode
|
||||
@proration_behavior = proration_behavior
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionUpdate < Stripe::RequestParams
|
||||
class Product < Stripe::RequestParams
|
||||
# The list of price IDs for the product that a subscription can be updated to.
|
||||
attr_accessor :prices
|
||||
# The product id.
|
||||
attr_accessor :product
|
||||
|
||||
def initialize(prices: nil, product: nil)
|
||||
@prices = prices
|
||||
@product = product
|
||||
end
|
||||
end
|
||||
|
||||
class ScheduleAtPeriodEnd < Stripe::RequestParams
|
||||
class Condition < Stripe::RequestParams
|
||||
# The type of condition.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(type: nil)
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
|
||||
attr_accessor :conditions
|
||||
|
||||
def initialize(conditions: nil)
|
||||
@conditions = conditions
|
||||
end
|
||||
end
|
||||
# The types of subscription updates that are supported. When empty, subscriptions are not updateable.
|
||||
attr_accessor :default_allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of up to 10 products that support subscription updates.
|
||||
attr_accessor :products
|
||||
# Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
|
||||
attr_accessor :proration_behavior
|
||||
# Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
|
||||
attr_accessor :schedule_at_period_end
|
||||
|
||||
def initialize(
|
||||
default_allowed_updates: nil,
|
||||
enabled: nil,
|
||||
products: nil,
|
||||
proration_behavior: nil,
|
||||
schedule_at_period_end: nil
|
||||
)
|
||||
@default_allowed_updates = default_allowed_updates
|
||||
@enabled = enabled
|
||||
@products = products
|
||||
@proration_behavior = proration_behavior
|
||||
@schedule_at_period_end = schedule_at_period_end
|
||||
end
|
||||
end
|
||||
# Information about updating the customer details in the portal.
|
||||
attr_accessor :customer_update
|
||||
# Information about showing the billing history in the portal.
|
||||
attr_accessor :invoice_history
|
||||
# Information about updating payment methods in the portal.
|
||||
attr_accessor :payment_method_update
|
||||
# Information about canceling subscriptions in the portal.
|
||||
attr_accessor :subscription_cancel
|
||||
# Information about updating subscriptions in the portal.
|
||||
attr_accessor :subscription_update
|
||||
|
||||
def initialize(
|
||||
customer_update: nil,
|
||||
invoice_history: nil,
|
||||
payment_method_update: nil,
|
||||
subscription_cancel: nil,
|
||||
subscription_update: nil
|
||||
)
|
||||
@customer_update = customer_update
|
||||
@invoice_history = invoice_history
|
||||
@payment_method_update = payment_method_update
|
||||
@subscription_cancel = subscription_cancel
|
||||
@subscription_update = subscription_update
|
||||
end
|
||||
end
|
||||
|
||||
class LoginPage < Stripe::RequestParams
|
||||
# Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
# The business information shown to customers in the portal.
|
||||
attr_accessor :business_profile
|
||||
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
|
||||
attr_accessor :default_return_url
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Information about the features available in the portal.
|
||||
attr_accessor :features
|
||||
# The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
|
||||
attr_accessor :login_page
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(
|
||||
business_profile: nil,
|
||||
default_return_url: nil,
|
||||
expand: nil,
|
||||
features: nil,
|
||||
login_page: nil,
|
||||
metadata: nil
|
||||
)
|
||||
@business_profile = business_profile
|
||||
@default_return_url = default_return_url
|
||||
@expand = expand
|
||||
@features = features
|
||||
@login_page = login_page
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class BusinessProfile < Stripe::RequestParams
|
||||
# The messaging shown to customers in the portal.
|
||||
attr_accessor :headline
|
||||
# A link to the business’s publicly available privacy policy.
|
||||
attr_accessor :privacy_policy_url
|
||||
# A link to the business’s publicly available terms of service.
|
||||
attr_accessor :terms_of_service_url
|
||||
|
||||
def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil)
|
||||
@headline = headline
|
||||
@privacy_policy_url = privacy_policy_url
|
||||
@terms_of_service_url = terms_of_service_url
|
||||
end
|
||||
end
|
||||
|
||||
class Features < Stripe::RequestParams
|
||||
class CustomerUpdate < Stripe::RequestParams
|
||||
# The types of customer updates that are supported. When empty, customers are not updateable.
|
||||
attr_accessor :allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(allowed_updates: nil, enabled: nil)
|
||||
@allowed_updates = allowed_updates
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class InvoiceHistory < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class PaymentMethodUpdate < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionCancel < Stripe::RequestParams
|
||||
class CancellationReason < Stripe::RequestParams
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# Which cancellation reasons will be given as options to the customer.
|
||||
attr_accessor :options
|
||||
|
||||
def initialize(enabled: nil, options: nil)
|
||||
@enabled = enabled
|
||||
@options = options
|
||||
end
|
||||
end
|
||||
# Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
|
||||
attr_accessor :cancellation_reason
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# Whether to cancel subscriptions immediately or at the end of the billing period.
|
||||
attr_accessor :mode
|
||||
# Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
|
||||
attr_accessor :proration_behavior
|
||||
|
||||
def initialize(
|
||||
cancellation_reason: nil,
|
||||
enabled: nil,
|
||||
mode: nil,
|
||||
proration_behavior: nil
|
||||
)
|
||||
@cancellation_reason = cancellation_reason
|
||||
@enabled = enabled
|
||||
@mode = mode
|
||||
@proration_behavior = proration_behavior
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionUpdate < Stripe::RequestParams
|
||||
class Product < Stripe::RequestParams
|
||||
# The list of price IDs for the product that a subscription can be updated to.
|
||||
attr_accessor :prices
|
||||
# The product id.
|
||||
attr_accessor :product
|
||||
|
||||
def initialize(prices: nil, product: nil)
|
||||
@prices = prices
|
||||
@product = product
|
||||
end
|
||||
end
|
||||
|
||||
class ScheduleAtPeriodEnd < Stripe::RequestParams
|
||||
class Condition < Stripe::RequestParams
|
||||
# The type of condition.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(type: nil)
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# List of conditions. When any condition is true, the update will be scheduled at the end of the current period.
|
||||
attr_accessor :conditions
|
||||
|
||||
def initialize(conditions: nil)
|
||||
@conditions = conditions
|
||||
end
|
||||
end
|
||||
# The types of subscription updates that are supported. When empty, subscriptions are not updateable.
|
||||
attr_accessor :default_allowed_updates
|
||||
# Whether the feature is enabled.
|
||||
attr_accessor :enabled
|
||||
# The list of up to 10 products that support subscription updates.
|
||||
attr_accessor :products
|
||||
# Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`.
|
||||
attr_accessor :proration_behavior
|
||||
# Setting to control when an update should be scheduled at the end of the period instead of applying immediately.
|
||||
attr_accessor :schedule_at_period_end
|
||||
|
||||
def initialize(
|
||||
default_allowed_updates: nil,
|
||||
enabled: nil,
|
||||
products: nil,
|
||||
proration_behavior: nil,
|
||||
schedule_at_period_end: nil
|
||||
)
|
||||
@default_allowed_updates = default_allowed_updates
|
||||
@enabled = enabled
|
||||
@products = products
|
||||
@proration_behavior = proration_behavior
|
||||
@schedule_at_period_end = schedule_at_period_end
|
||||
end
|
||||
end
|
||||
# Information about updating the customer details in the portal.
|
||||
attr_accessor :customer_update
|
||||
# Information about showing the billing history in the portal.
|
||||
attr_accessor :invoice_history
|
||||
# Information about updating payment methods in the portal.
|
||||
attr_accessor :payment_method_update
|
||||
# Information about canceling subscriptions in the portal.
|
||||
attr_accessor :subscription_cancel
|
||||
# Information about updating subscriptions in the portal.
|
||||
attr_accessor :subscription_update
|
||||
|
||||
def initialize(
|
||||
customer_update: nil,
|
||||
invoice_history: nil,
|
||||
payment_method_update: nil,
|
||||
subscription_cancel: nil,
|
||||
subscription_update: nil
|
||||
)
|
||||
@customer_update = customer_update
|
||||
@invoice_history = invoice_history
|
||||
@payment_method_update = payment_method_update
|
||||
@subscription_cancel = subscription_cancel
|
||||
@subscription_update = subscription_update
|
||||
end
|
||||
end
|
||||
|
||||
class LoginPage < Stripe::RequestParams
|
||||
# Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
|
||||
#
|
||||
# Set to `false` to deactivate the `login_page.url`.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
# Whether the configuration is active and can be used to create portal sessions.
|
||||
attr_accessor :active
|
||||
# The business information shown to customers in the portal.
|
||||
attr_accessor :business_profile
|
||||
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
|
||||
attr_accessor :default_return_url
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Information about the features available in the portal.
|
||||
attr_accessor :features
|
||||
# The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
|
||||
attr_accessor :login_page
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(
|
||||
active: nil,
|
||||
business_profile: nil,
|
||||
default_return_url: nil,
|
||||
expand: nil,
|
||||
features: nil,
|
||||
login_page: nil,
|
||||
metadata: nil
|
||||
)
|
||||
@active = active
|
||||
@business_profile = business_profile
|
||||
@default_return_url = default_return_url
|
||||
@expand = expand
|
||||
@features = features
|
||||
@login_page = login_page
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
# Whether the configuration is active and can be used to create portal sessions.
|
||||
attr_reader :active
|
||||
# ID of the Connect Application that created the configuration.
|
||||
attr_reader :application
|
||||
# Attribute for field business_profile
|
||||
attr_reader :business_profile
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session.
|
||||
attr_reader :default_return_url
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
|
||||
attr_reader :is_default
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Attribute for field login_page
|
||||
attr_reader :login_page
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :updated
|
||||
|
||||
# Creates a configuration that describes the functionality and behavior of a PortalSession
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -25,6 +25,277 @@ module Stripe
|
||||
"billing_portal.session"
|
||||
end
|
||||
|
||||
class Flow < Stripe::StripeObject
|
||||
class AfterCompletion < Stripe::StripeObject
|
||||
class HostedConfirmation < Stripe::StripeObject
|
||||
# A custom message to display to the customer after the flow is completed.
|
||||
attr_reader :custom_message
|
||||
end
|
||||
|
||||
class Redirect < Stripe::StripeObject
|
||||
# The URL the customer will be redirected to after the flow is completed.
|
||||
attr_reader :return_url
|
||||
end
|
||||
# Configuration when `after_completion.type=hosted_confirmation`.
|
||||
attr_reader :hosted_confirmation
|
||||
# Configuration when `after_completion.type=redirect`.
|
||||
attr_reader :redirect
|
||||
# The specified type of behavior after the flow is completed.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class SubscriptionCancel < Stripe::StripeObject
|
||||
class Retention < Stripe::StripeObject
|
||||
class CouponOffer < Stripe::StripeObject
|
||||
# The ID of the coupon to be offered.
|
||||
attr_reader :coupon
|
||||
end
|
||||
# Configuration when `retention.type=coupon_offer`.
|
||||
attr_reader :coupon_offer
|
||||
# Type of retention strategy that will be used.
|
||||
attr_reader :type
|
||||
end
|
||||
# Specify a retention strategy to be used in the cancellation flow.
|
||||
attr_reader :retention
|
||||
# The ID of the subscription to be canceled.
|
||||
attr_reader :subscription
|
||||
end
|
||||
|
||||
class SubscriptionUpdate < Stripe::StripeObject
|
||||
# The ID of the subscription to be updated.
|
||||
attr_reader :subscription
|
||||
end
|
||||
|
||||
class SubscriptionUpdateConfirm < Stripe::StripeObject
|
||||
class Discount < Stripe::StripeObject
|
||||
# The ID of the coupon to apply to this subscription update.
|
||||
attr_reader :coupon
|
||||
# The ID of a promotion code to apply to this subscription update.
|
||||
attr_reader :promotion_code
|
||||
end
|
||||
|
||||
class Item < Stripe::StripeObject
|
||||
# The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
|
||||
attr_reader :id
|
||||
# The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
|
||||
attr_reader :price
|
||||
# [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
|
||||
attr_reader :quantity
|
||||
end
|
||||
# The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
|
||||
attr_reader :discounts
|
||||
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
|
||||
attr_reader :items
|
||||
# The ID of the subscription to be updated.
|
||||
attr_reader :subscription
|
||||
end
|
||||
# Attribute for field after_completion
|
||||
attr_reader :after_completion
|
||||
# Configuration when `flow.type=subscription_cancel`.
|
||||
attr_reader :subscription_cancel
|
||||
# Configuration when `flow.type=subscription_update`.
|
||||
attr_reader :subscription_update
|
||||
# Configuration when `flow.type=subscription_update_confirm`.
|
||||
attr_reader :subscription_update_confirm
|
||||
# Type of flow that the customer will go through.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class FlowData < Stripe::RequestParams
|
||||
class AfterCompletion < Stripe::RequestParams
|
||||
class HostedConfirmation < Stripe::RequestParams
|
||||
# A custom message to display to the customer after the flow is completed.
|
||||
attr_accessor :custom_message
|
||||
|
||||
def initialize(custom_message: nil)
|
||||
@custom_message = custom_message
|
||||
end
|
||||
end
|
||||
|
||||
class Redirect < Stripe::RequestParams
|
||||
# The URL the customer will be redirected to after the flow is completed.
|
||||
attr_accessor :return_url
|
||||
|
||||
def initialize(return_url: nil)
|
||||
@return_url = return_url
|
||||
end
|
||||
end
|
||||
# Configuration when `after_completion.type=hosted_confirmation`.
|
||||
attr_accessor :hosted_confirmation
|
||||
# Configuration when `after_completion.type=redirect`.
|
||||
attr_accessor :redirect
|
||||
# The specified behavior after the flow is completed.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(hosted_confirmation: nil, redirect: nil, type: nil)
|
||||
@hosted_confirmation = hosted_confirmation
|
||||
@redirect = redirect
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionCancel < Stripe::RequestParams
|
||||
class Retention < Stripe::RequestParams
|
||||
class CouponOffer < Stripe::RequestParams
|
||||
# The ID of the coupon to be offered.
|
||||
attr_accessor :coupon
|
||||
|
||||
def initialize(coupon: nil)
|
||||
@coupon = coupon
|
||||
end
|
||||
end
|
||||
# Configuration when `retention.type=coupon_offer`.
|
||||
attr_accessor :coupon_offer
|
||||
# Type of retention strategy to use with the customer.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(coupon_offer: nil, type: nil)
|
||||
@coupon_offer = coupon_offer
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# Specify a retention strategy to be used in the cancellation flow.
|
||||
attr_accessor :retention
|
||||
# The ID of the subscription to be canceled.
|
||||
attr_accessor :subscription
|
||||
|
||||
def initialize(retention: nil, subscription: nil)
|
||||
@retention = retention
|
||||
@subscription = subscription
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionUpdate < Stripe::RequestParams
|
||||
# The ID of the subscription to be updated.
|
||||
attr_accessor :subscription
|
||||
|
||||
def initialize(subscription: nil)
|
||||
@subscription = subscription
|
||||
end
|
||||
end
|
||||
|
||||
class SubscriptionUpdateConfirm < Stripe::RequestParams
|
||||
class Discount < Stripe::RequestParams
|
||||
# The ID of the coupon to apply to this subscription update.
|
||||
attr_accessor :coupon
|
||||
# The ID of a promotion code to apply to this subscription update.
|
||||
attr_accessor :promotion_code
|
||||
|
||||
def initialize(coupon: nil, promotion_code: nil)
|
||||
@coupon = coupon
|
||||
@promotion_code = promotion_code
|
||||
end
|
||||
end
|
||||
|
||||
class Item < Stripe::RequestParams
|
||||
# The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated.
|
||||
attr_accessor :id
|
||||
# The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products).
|
||||
attr_accessor :price
|
||||
# [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
|
||||
attr_accessor :quantity
|
||||
|
||||
def initialize(id: nil, price: nil, quantity: nil)
|
||||
@id = id
|
||||
@price = price
|
||||
@quantity = quantity
|
||||
end
|
||||
end
|
||||
# The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
|
||||
attr_accessor :discounts
|
||||
# The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
|
||||
attr_accessor :items
|
||||
# The ID of the subscription to be updated.
|
||||
attr_accessor :subscription
|
||||
|
||||
def initialize(discounts: nil, items: nil, subscription: nil)
|
||||
@discounts = discounts
|
||||
@items = items
|
||||
@subscription = subscription
|
||||
end
|
||||
end
|
||||
# Behavior after the flow is completed.
|
||||
attr_accessor :after_completion
|
||||
# Configuration when `flow_data.type=subscription_cancel`.
|
||||
attr_accessor :subscription_cancel
|
||||
# Configuration when `flow_data.type=subscription_update`.
|
||||
attr_accessor :subscription_update
|
||||
# Configuration when `flow_data.type=subscription_update_confirm`.
|
||||
attr_accessor :subscription_update_confirm
|
||||
# Type of flow that the customer will go through.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
after_completion: nil,
|
||||
subscription_cancel: nil,
|
||||
subscription_update: nil,
|
||||
subscription_update_confirm: nil,
|
||||
type: nil
|
||||
)
|
||||
@after_completion = after_completion
|
||||
@subscription_cancel = subscription_cancel
|
||||
@subscription_update = subscription_update
|
||||
@subscription_update_confirm = subscription_update_confirm
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration.
|
||||
attr_accessor :configuration
|
||||
# The ID of an existing customer.
|
||||
attr_accessor :customer
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
|
||||
attr_accessor :flow_data
|
||||
# The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
|
||||
attr_accessor :locale
|
||||
# The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
|
||||
attr_accessor :on_behalf_of
|
||||
# The default URL to redirect customers to when they click on the portal's link to return to your website.
|
||||
attr_accessor :return_url
|
||||
|
||||
def initialize(
|
||||
configuration: nil,
|
||||
customer: nil,
|
||||
expand: nil,
|
||||
flow_data: nil,
|
||||
locale: nil,
|
||||
on_behalf_of: nil,
|
||||
return_url: nil
|
||||
)
|
||||
@configuration = configuration
|
||||
@customer = customer
|
||||
@expand = expand
|
||||
@flow_data = flow_data
|
||||
@locale = locale
|
||||
@on_behalf_of = on_behalf_of
|
||||
@return_url = return_url
|
||||
end
|
||||
end
|
||||
# The configuration used by this session, describing the features available.
|
||||
attr_reader :configuration
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The ID of the customer for this session.
|
||||
attr_reader :customer
|
||||
# Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows.
|
||||
attr_reader :flow
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used.
|
||||
attr_reader :locale
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays.
|
||||
attr_reader :on_behalf_of
|
||||
# The URL to redirect customers to when they click on the portal's link to return to your website.
|
||||
attr_reader :return_url
|
||||
# The short-lived URL of the session that gives customers access to the customer portal.
|
||||
attr_reader :url
|
||||
|
||||
# Creates a session of the customer portal.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -13,6 +13,90 @@ module Stripe
|
||||
"capability"
|
||||
end
|
||||
|
||||
class FutureRequirements < Stripe::StripeObject
|
||||
class Alternative < Stripe::StripeObject
|
||||
# Fields that can be provided to satisfy all fields in `original_fields_due`.
|
||||
attr_reader :alternative_fields_due
|
||||
# Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
|
||||
attr_reader :original_fields_due
|
||||
end
|
||||
|
||||
class Error < Stripe::StripeObject
|
||||
# The code for the type of error.
|
||||
attr_reader :code
|
||||
# An informative message that indicates the error type and provides additional details about the error.
|
||||
attr_reader :reason
|
||||
# The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
|
||||
attr_reader :requirement
|
||||
end
|
||||
# Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
|
||||
attr_reader :alternatives
|
||||
# Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning.
|
||||
attr_reader :current_deadline
|
||||
# Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash.
|
||||
attr_reader :currently_due
|
||||
# This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account.
|
||||
attr_reader :disabled_reason
|
||||
# Fields that are `currently_due` and need to be collected again because validation or verification failed.
|
||||
attr_reader :errors
|
||||
# Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well.
|
||||
attr_reader :eventually_due
|
||||
# Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`.
|
||||
attr_reader :past_due
|
||||
# Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending.
|
||||
attr_reader :pending_verification
|
||||
end
|
||||
|
||||
class Requirements < Stripe::StripeObject
|
||||
class Alternative < Stripe::StripeObject
|
||||
# Fields that can be provided to satisfy all fields in `original_fields_due`.
|
||||
attr_reader :alternative_fields_due
|
||||
# Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`.
|
||||
attr_reader :original_fields_due
|
||||
end
|
||||
|
||||
class Error < Stripe::StripeObject
|
||||
# The code for the type of error.
|
||||
attr_reader :code
|
||||
# An informative message that indicates the error type and provides additional details about the error.
|
||||
attr_reader :reason
|
||||
# The specific user onboarding requirement field (in the requirements hash) that needs to be resolved.
|
||||
attr_reader :requirement
|
||||
end
|
||||
# Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
|
||||
attr_reader :alternatives
|
||||
# Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
|
||||
attr_reader :current_deadline
|
||||
# Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
|
||||
attr_reader :currently_due
|
||||
# Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification).
|
||||
attr_reader :disabled_reason
|
||||
# Fields that are `currently_due` and need to be collected again because validation or verification failed.
|
||||
attr_reader :errors
|
||||
# Fields you must collect when all thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set.
|
||||
attr_reader :eventually_due
|
||||
# Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account.
|
||||
attr_reader :past_due
|
||||
# Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending.
|
||||
attr_reader :pending_verification
|
||||
end
|
||||
# The account for which the capability enables functionality.
|
||||
attr_reader :account
|
||||
# Attribute for field future_requirements
|
||||
attr_reader :future_requirements
|
||||
# The identifier for the capability.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Whether the capability has been requested.
|
||||
attr_reader :requested
|
||||
# Time at which the capability was requested. Measured in seconds since the Unix epoch.
|
||||
attr_reader :requested_at
|
||||
# Attribute for field requirements
|
||||
attr_reader :requirements
|
||||
# The status of the capability.
|
||||
attr_reader :status
|
||||
|
||||
def resource_url
|
||||
if !respond_to?(:account) || account.nil?
|
||||
raise NotImplementedError,
|
||||
|
188
lib/stripe/resources/capital/financing_offer.rb
Normal file
188
lib/stripe/resources/capital/financing_offer.rb
Normal file
@ -0,0 +1,188 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Capital
|
||||
# This is an object representing an offer of financing from
|
||||
# Stripe Capital to a Connect subaccount.
|
||||
class FinancingOffer < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "capital.financing_offer"
|
||||
def self.object_name
|
||||
"capital.financing_offer"
|
||||
end
|
||||
|
||||
class AcceptedTerms < Stripe::StripeObject
|
||||
# Amount of financing offered, in minor units.
|
||||
attr_reader :advance_amount
|
||||
# Currency that the financing offer is transacted in. For example, `usd`.
|
||||
attr_reader :currency
|
||||
# Fixed fee amount, in minor units.
|
||||
attr_reader :fee_amount
|
||||
# Populated when the `product_type` of the `financingoffer` is `refill`.
|
||||
# Represents the discount amount on remaining premium for the existing loan at payout time.
|
||||
attr_reader :previous_financing_fee_discount_amount
|
||||
# Per-transaction rate at which Stripe will withhold funds to repay the financing.
|
||||
attr_reader :withhold_rate
|
||||
end
|
||||
|
||||
class OfferedTerms < Stripe::StripeObject
|
||||
# Amount of financing offered, in minor units.
|
||||
attr_reader :advance_amount
|
||||
# Describes the type of user the offer is being extended to.
|
||||
attr_reader :campaign_type
|
||||
# Currency that the financing offer is transacted in. For example, `usd`.
|
||||
attr_reader :currency
|
||||
# Fixed fee amount, in minor units.
|
||||
attr_reader :fee_amount
|
||||
# Populated when the `product_type` of the `financingoffer` is `refill`.
|
||||
# Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer`
|
||||
# is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate
|
||||
# and the remaining fee.
|
||||
attr_reader :previous_financing_fee_discount_rate
|
||||
# Per-transaction rate at which Stripe will withhold funds to repay the financing.
|
||||
attr_reader :withhold_rate
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# limit list to offers belonging to given connected account
|
||||
attr_accessor :connected_account
|
||||
# Only return offers that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# limit list to offers with given status
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
connected_account: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
status: nil
|
||||
)
|
||||
@connected_account = connected_account
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class MarkDeliveredParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# This is an object representing the terms of an offer of financing from
|
||||
# Stripe Capital to a Connected account. This resource represents
|
||||
# the terms accepted by the Connected account, which may differ from those
|
||||
# offered.
|
||||
attr_reader :accepted_terms
|
||||
# The ID of the merchant associated with this financing object.
|
||||
attr_reader :account
|
||||
# The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch.
|
||||
attr_reader :charged_off_at
|
||||
# Time at which the offer was created. Given in seconds since unix epoch.
|
||||
attr_reader :created
|
||||
# Time at which the offer expires. Given in seconds since unix epoch.
|
||||
attr_reader :expires_after
|
||||
# The type of financing being offered.
|
||||
attr_reader :financing_type
|
||||
# A unique identifier for the financing object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The object type: financing_offer.
|
||||
attr_reader :object
|
||||
# This is an object representing the terms of an offer of financing from
|
||||
# Stripe Capital to a Connected account. This resource represents
|
||||
# both the terms offered to the Connected account.
|
||||
attr_reader :offered_terms
|
||||
# Financing product identifier.
|
||||
attr_reader :product_type
|
||||
# The ID of the financing offer that replaced this offer.
|
||||
attr_reader :replacement
|
||||
# The ID of the financing offer that this offer is a replacement for.
|
||||
attr_reader :replacement_for
|
||||
# The current status of the offer.
|
||||
attr_reader :status
|
||||
# See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type).
|
||||
attr_reader :type
|
||||
|
||||
# Retrieves the financing offers available for Connected accounts that belong to your platform.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/capital/financing_offers",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Acknowledges that platform has received and delivered the financing_offer to
|
||||
# the intended merchant recipient.
|
||||
def mark_delivered(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Acknowledges that platform has received and delivered the financing_offer to
|
||||
# the intended merchant recipient.
|
||||
def self.mark_delivered(financing_offer, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/capital/financing_offers/%<financing_offer>s/mark_delivered", { financing_offer: CGI.escape(financing_offer) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
64
lib/stripe/resources/capital/financing_summary.rb
Normal file
64
lib/stripe/resources/capital/financing_summary.rb
Normal file
@ -0,0 +1,64 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Capital
|
||||
# A financing object describes an account's current financing state. Used by Connect
|
||||
# platforms to read the state of Capital offered to their connected accounts.
|
||||
class FinancingSummary < SingletonAPIResource
|
||||
OBJECT_NAME = "capital.financing_summary"
|
||||
def self.object_name
|
||||
"capital.financing_summary"
|
||||
end
|
||||
|
||||
class Details < Stripe::StripeObject
|
||||
class CurrentRepaymentInterval < Stripe::StripeObject
|
||||
# The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited.
|
||||
# Given in seconds since unix epoch.
|
||||
attr_reader :due_at
|
||||
# The amount that has already been paid in the current repayment interval.
|
||||
attr_reader :paid_amount
|
||||
# The amount that is yet to be paid in the current repayment interval.
|
||||
attr_reader :remaining_amount
|
||||
end
|
||||
# Amount of financing offered, in minor units.
|
||||
attr_reader :advance_amount
|
||||
# The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch.
|
||||
attr_reader :advance_paid_out_at
|
||||
# Currency that the financing offer is transacted in. For example, `usd`.
|
||||
attr_reader :currency
|
||||
# The chronologically current repayment interval for the financing offer.
|
||||
attr_reader :current_repayment_interval
|
||||
# Fixed fee amount, in minor units.
|
||||
attr_reader :fee_amount
|
||||
# The amount the Connected account has paid toward the financing debt so far.
|
||||
attr_reader :paid_amount
|
||||
# The balance remaining to be paid on the financing, in minor units.
|
||||
attr_reader :remaining_amount
|
||||
# The time at which Capital will begin withholding from payments. Given in seconds since unix epoch.
|
||||
attr_reader :repayments_begin_at
|
||||
# Per-transaction rate at which Stripe will withhold funds to repay the financing.
|
||||
attr_reader :withhold_rate
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Additional information about the financing summary. Describes currency, advance amount,
|
||||
# fee amount, withhold rate, remaining amount, paid amount, current repayment interval,
|
||||
# repayment start date, and advance payout date.
|
||||
attr_reader :details
|
||||
# The Financing Offer ID this Financing Summary corresponds to
|
||||
attr_reader :financing_offer
|
||||
# The object type: financing_summary
|
||||
attr_reader :object
|
||||
# Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing.
|
||||
attr_reader :status
|
||||
end
|
||||
end
|
||||
end
|
123
lib/stripe/resources/capital/financing_transaction.rb
Normal file
123
lib/stripe/resources/capital/financing_transaction.rb
Normal file
@ -0,0 +1,123 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Capital
|
||||
# This is an object representing the details of a transaction on a Capital financing object.
|
||||
class FinancingTransaction < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "capital.financing_transaction"
|
||||
def self.object_name
|
||||
"capital.financing_transaction"
|
||||
end
|
||||
|
||||
class Details < Stripe::StripeObject
|
||||
class Transaction < Stripe::StripeObject
|
||||
# The linked payment ID.
|
||||
attr_reader :charge
|
||||
# The linked Treasury Financing Transaction ID.
|
||||
attr_reader :treasury_transaction
|
||||
end
|
||||
# The advance amount being repaid, paid out, or reversed in minor units.
|
||||
attr_reader :advance_amount
|
||||
# The currency of the financing transaction.
|
||||
attr_reader :currency
|
||||
# The fee amount being repaid, paid out, or reversed in minor units.
|
||||
attr_reader :fee_amount
|
||||
# The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`.
|
||||
attr_reader :linked_payment
|
||||
# The reason for the financing transaction (if applicable).
|
||||
attr_reader :reason
|
||||
# The reversed transaction. This field only applies to financing
|
||||
# transactions of type `reversal`.
|
||||
attr_reader :reversed_transaction
|
||||
# The advance and fee amount being repaid, paid out, or reversed in minor units.
|
||||
attr_reader :total_amount
|
||||
# This is an object representing a linked transaction on a Capital Financing Transaction.
|
||||
attr_reader :transaction
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge.
|
||||
attr_accessor :charge
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Returns transactions that were created that apply to this financing offer ID.
|
||||
attr_accessor :financing_offer
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Only returns transactions that are responsible for reversing this financing transaction ID.
|
||||
attr_accessor :reversed_transaction
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction.
|
||||
attr_accessor :treasury_transaction
|
||||
|
||||
def initialize(
|
||||
charge: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
financing_offer: nil,
|
||||
limit: nil,
|
||||
reversed_transaction: nil,
|
||||
starting_after: nil,
|
||||
treasury_transaction: nil
|
||||
)
|
||||
@charge = charge
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@financing_offer = financing_offer
|
||||
@limit = limit
|
||||
@reversed_transaction = reversed_transaction
|
||||
@starting_after = starting_after
|
||||
@treasury_transaction = treasury_transaction
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The ID of the merchant associated with this financing transaction.
|
||||
attr_reader :account
|
||||
# Time at which the financing transaction was created. Given in seconds since unix epoch.
|
||||
attr_reader :created_at
|
||||
# This is an object representing a transaction on a Capital financing offer.
|
||||
attr_reader :details
|
||||
# The Capital financing offer for this financing transaction.
|
||||
attr_reader :financing_offer
|
||||
# A unique identifier for the financing transaction object.
|
||||
attr_reader :id
|
||||
# The Capital transaction object that predates the Financing Transactions API and
|
||||
# corresponds with the balance transaction that was created as a result of this
|
||||
# financing transaction.
|
||||
attr_reader :legacy_balance_transaction_source
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The object type: financing_transaction
|
||||
attr_reader :object
|
||||
# The type of the financing transaction.
|
||||
attr_reader :type
|
||||
# A human-friendly description of the financing transaction.
|
||||
attr_reader :user_facing_description
|
||||
|
||||
# Returns a list of financing transactions. The transactions are returned in sorted order,
|
||||
# with the most recent transactions appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/capital/financing_transactions",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -17,6 +17,85 @@ module Stripe
|
||||
"card"
|
||||
end
|
||||
|
||||
class Networks < Stripe::StripeObject
|
||||
# The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card.
|
||||
attr_reader :preferred
|
||||
end
|
||||
# The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
|
||||
attr_reader :account
|
||||
# City/District/Suburb/Town/Village.
|
||||
attr_reader :address_city
|
||||
# Billing address country, if provided when creating card.
|
||||
attr_reader :address_country
|
||||
# Address line 1 (Street address/PO Box/Company name).
|
||||
attr_reader :address_line1
|
||||
# If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
|
||||
attr_reader :address_line1_check
|
||||
# Address line 2 (Apartment/Suite/Unit/Building).
|
||||
attr_reader :address_line2
|
||||
# State/County/Province/Region.
|
||||
attr_reader :address_state
|
||||
# ZIP or postal code.
|
||||
attr_reader :address_zip
|
||||
# If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
|
||||
attr_reader :address_zip_check
|
||||
# This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
|
||||
attr_reader :allow_redisplay
|
||||
# A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
|
||||
attr_reader :available_payout_methods
|
||||
# Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
|
||||
attr_reader :brand
|
||||
# The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. (For internal use only and not typically available in standard API requests.)
|
||||
attr_reader :brand_product
|
||||
# Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
|
||||
attr_reader :country
|
||||
# Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
|
||||
attr_reader :currency
|
||||
# The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
|
||||
attr_reader :customer
|
||||
# If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
|
||||
attr_reader :cvc_check
|
||||
# Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
|
||||
attr_reader :default_for_currency
|
||||
# A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.)
|
||||
attr_reader :description
|
||||
# (For tokenized numbers only.) The last four digits of the device account number.
|
||||
attr_reader :dynamic_last4
|
||||
# Two-digit number representing the card's expiration month.
|
||||
attr_reader :exp_month
|
||||
# Four-digit number representing the card's expiration year.
|
||||
attr_reader :exp_year
|
||||
# Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.
|
||||
#
|
||||
# *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
|
||||
attr_reader :fingerprint
|
||||
# Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
|
||||
attr_reader :funding
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Issuer identification number of the card. (For internal use only and not typically available in standard API requests.)
|
||||
attr_reader :iin
|
||||
# The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.)
|
||||
attr_reader :issuer
|
||||
# The last four digits of the card.
|
||||
attr_reader :last4
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Cardholder name.
|
||||
attr_reader :name
|
||||
# Attribute for field networks
|
||||
attr_reader :networks
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Status of a card based on the card issuer.
|
||||
attr_reader :regulated_status
|
||||
# For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
|
||||
attr_reader :status
|
||||
# If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
|
||||
attr_reader :tokenization_method
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
def resource_url
|
||||
if respond_to?(:customer) && !customer.nil? && !customer.empty?
|
||||
"#{Customer.resource_url}/#{CGI.escape(customer)}/sources/#{CGI.escape(id)}"
|
||||
|
@ -9,6 +9,23 @@ module Stripe
|
||||
"cash_balance"
|
||||
end
|
||||
|
||||
class Settings < Stripe::StripeObject
|
||||
# The configuration for how funds that land in the customer cash balance are reconciled.
|
||||
attr_reader :reconciliation_mode
|
||||
# A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance
|
||||
attr_reader :using_merchant_default
|
||||
end
|
||||
# A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :available
|
||||
# The ID of the customer whose cash balance this object represents.
|
||||
attr_reader :customer
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field settings
|
||||
attr_reader :settings
|
||||
|
||||
def resource_url
|
||||
if !respond_to?(:customer) || customer.nil?
|
||||
raise NotImplementedError,
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -15,6 +15,182 @@ module Stripe
|
||||
"climate.order"
|
||||
end
|
||||
|
||||
class Beneficiary < Stripe::StripeObject
|
||||
# Publicly displayable name for the end beneficiary of carbon removal.
|
||||
attr_reader :public_name
|
||||
end
|
||||
|
||||
class DeliveryDetail < Stripe::StripeObject
|
||||
class Location < Stripe::StripeObject
|
||||
# The city where the supplier is located.
|
||||
attr_reader :city
|
||||
# Two-letter ISO code representing the country where the supplier is located.
|
||||
attr_reader :country
|
||||
# The geographic latitude where the supplier is located.
|
||||
attr_reader :latitude
|
||||
# The geographic longitude where the supplier is located.
|
||||
attr_reader :longitude
|
||||
# The state/county/province/region where the supplier is located.
|
||||
attr_reader :region
|
||||
end
|
||||
# Time at which the delivery occurred. Measured in seconds since the Unix epoch.
|
||||
attr_reader :delivered_at
|
||||
# Specific location of this delivery.
|
||||
attr_reader :location
|
||||
# Quantity of carbon removal supplied by this delivery.
|
||||
attr_reader :metric_tons
|
||||
# Once retired, a URL to the registry entry for the tons from this delivery.
|
||||
attr_reader :registry_url
|
||||
# A supplier of carbon removal.
|
||||
attr_reader :supplier
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Beneficiary < Stripe::RequestParams
|
||||
# Publicly displayable name for the end beneficiary of carbon removal.
|
||||
attr_accessor :public_name
|
||||
|
||||
def initialize(public_name: nil)
|
||||
@public_name = public_name
|
||||
end
|
||||
end
|
||||
# Requested amount of carbon removal units. Either this or `metric_tons` must be specified.
|
||||
attr_accessor :amount
|
||||
# Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
|
||||
attr_accessor :beneficiary
|
||||
# Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used.
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Requested number of tons for the order. Either this or `amount` must be specified.
|
||||
attr_accessor :metric_tons
|
||||
# Unique identifier of the Climate product.
|
||||
attr_accessor :product
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
beneficiary: nil,
|
||||
currency: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
metric_tons: nil,
|
||||
product: nil
|
||||
)
|
||||
@amount = amount
|
||||
@beneficiary = beneficiary
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@metric_tons = metric_tons
|
||||
@product = product
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Beneficiary < Stripe::RequestParams
|
||||
# Publicly displayable name for the end beneficiary of carbon removal.
|
||||
attr_accessor :public_name
|
||||
|
||||
def initialize(public_name: nil)
|
||||
@public_name = public_name
|
||||
end
|
||||
end
|
||||
# Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set.
|
||||
attr_accessor :beneficiary
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(beneficiary: nil, expand: nil, metadata: nil)
|
||||
@beneficiary = beneficiary
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class CancelParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit.
|
||||
attr_reader :amount_fees
|
||||
# Total amount of the carbon removal in the currency's smallest unit.
|
||||
attr_reader :amount_subtotal
|
||||
# Total amount of the order including fees in the currency's smallest unit.
|
||||
attr_reader :amount_total
|
||||
# Attribute for field beneficiary
|
||||
attr_reader :beneficiary
|
||||
# Time at which the order was canceled. Measured in seconds since the Unix epoch.
|
||||
attr_reader :canceled_at
|
||||
# Reason for the cancellation of this order.
|
||||
attr_reader :cancellation_reason
|
||||
# For delivered orders, a URL to a delivery certificate for the order.
|
||||
attr_reader :certificate
|
||||
# Time at which the order was confirmed. Measured in seconds since the Unix epoch.
|
||||
attr_reader :confirmed_at
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order.
|
||||
attr_reader :currency
|
||||
# Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch.
|
||||
attr_reader :delayed_at
|
||||
# Time at which the order was delivered. Measured in seconds since the Unix epoch.
|
||||
attr_reader :delivered_at
|
||||
# Details about the delivery of carbon removal for this order.
|
||||
attr_reader :delivery_details
|
||||
# The year this order is expected to be delivered.
|
||||
attr_reader :expected_delivery_year
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Quantity of carbon removal that is included in this order.
|
||||
attr_reader :metric_tons
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Unique ID for the Climate `Product` this order is purchasing.
|
||||
attr_reader :product
|
||||
# Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch.
|
||||
attr_reader :product_substituted_at
|
||||
# The current status of this order.
|
||||
attr_reader :status
|
||||
|
||||
# Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the
|
||||
# reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier
|
||||
# might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe
|
||||
|
@ -13,6 +13,62 @@ module Stripe
|
||||
"climate.product"
|
||||
end
|
||||
|
||||
class CurrentPricesPerMetricTon < Stripe::StripeObject
|
||||
# Fees for one metric ton of carbon removal in the currency's smallest unit.
|
||||
attr_reader :amount_fees
|
||||
# Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit.
|
||||
attr_reader :amount_subtotal
|
||||
# Total for one metric ton of carbon removal (including fees) in the currency's smallest unit.
|
||||
attr_reader :amount_total
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Current prices for a metric ton of carbon removal in a currency's smallest unit.
|
||||
attr_reader :current_prices_per_metric_ton
|
||||
# The year in which the carbon removal is expected to be delivered.
|
||||
attr_reader :delivery_year
|
||||
# Unique identifier for the object. For convenience, Climate product IDs are human-readable strings
|
||||
# that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory)
|
||||
# for a list of available carbon removal products.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The quantity of metric tons available for reservation.
|
||||
attr_reader :metric_tons_available
|
||||
# The Climate product's name.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The carbon removal suppliers that fulfill orders for this Climate product.
|
||||
attr_reader :suppliers
|
||||
|
||||
# Lists all available Climate product objects.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -12,6 +12,60 @@ module Stripe
|
||||
"climate.supplier"
|
||||
end
|
||||
|
||||
class Location < Stripe::StripeObject
|
||||
# The city where the supplier is located.
|
||||
attr_reader :city
|
||||
# Two-letter ISO code representing the country where the supplier is located.
|
||||
attr_reader :country
|
||||
# The geographic latitude where the supplier is located.
|
||||
attr_reader :latitude
|
||||
# The geographic longitude where the supplier is located.
|
||||
attr_reader :longitude
|
||||
# The state/county/province/region where the supplier is located.
|
||||
attr_reader :region
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Link to a webpage to learn more about the supplier.
|
||||
attr_reader :info_url
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The locations in which this supplier operates.
|
||||
attr_reader :locations
|
||||
# Name of this carbon removal supplier.
|
||||
attr_reader :name
|
||||
# String representing the object’s type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The scientific pathway used for carbon removal.
|
||||
attr_reader :removal_pathway
|
||||
|
||||
# Lists all available Climate supplier objects.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
File diff suppressed because it is too large
Load Diff
24
lib/stripe/resources/connect_collection_transfer.rb
Normal file
24
lib/stripe/resources/connect_collection_transfer.rb
Normal file
@ -0,0 +1,24 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
class ConnectCollectionTransfer < APIResource
|
||||
OBJECT_NAME = "connect_collection_transfer"
|
||||
def self.object_name
|
||||
"connect_collection_transfer"
|
||||
end
|
||||
|
||||
# Amount transferred, in cents (or local equivalent).
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# ID of the account that funds are being collected for.
|
||||
attr_reader :destination
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
end
|
||||
end
|
@ -16,6 +16,69 @@ module Stripe
|
||||
"country_spec"
|
||||
end
|
||||
|
||||
class VerificationFields < Stripe::StripeObject
|
||||
class Company < Stripe::StripeObject
|
||||
# Additional fields which are only required for some users.
|
||||
attr_reader :additional
|
||||
# Fields which every account must eventually provide.
|
||||
attr_reader :minimum
|
||||
end
|
||||
|
||||
class Individual < Stripe::StripeObject
|
||||
# Additional fields which are only required for some users.
|
||||
attr_reader :additional
|
||||
# Fields which every account must eventually provide.
|
||||
attr_reader :minimum
|
||||
end
|
||||
# Attribute for field company
|
||||
attr_reader :company
|
||||
# Attribute for field individual
|
||||
attr_reader :individual
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The default currency for this country. This applies to both payment methods and bank accounts.
|
||||
attr_reader :default_currency
|
||||
# Unique identifier for the object. Represented as the ISO country code for this country.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Currencies that can be accepted in the specific country (for transfers).
|
||||
attr_reader :supported_bank_account_currencies
|
||||
# Currencies that can be accepted in the specified country (for payments).
|
||||
attr_reader :supported_payment_currencies
|
||||
# Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges).
|
||||
attr_reader :supported_payment_methods
|
||||
# Countries that can accept transfers from the specified country.
|
||||
attr_reader :supported_transfer_countries
|
||||
# Attribute for field verification_fields
|
||||
attr_reader :verification_fields
|
||||
|
||||
# Lists all Country Spec objects available in the API.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts)
|
||||
|
@ -16,6 +16,204 @@ module Stripe
|
||||
"coupon"
|
||||
end
|
||||
|
||||
class AppliesTo < Stripe::StripeObject
|
||||
# A list of product IDs this coupon applies to
|
||||
attr_reader :products
|
||||
end
|
||||
|
||||
class CurrencyOptions < Stripe::StripeObject
|
||||
# Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
|
||||
attr_reader :amount_off
|
||||
end
|
||||
|
||||
class DeleteParams < Stripe::RequestParams
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class CurrencyOptions < Stripe::RequestParams
|
||||
# A positive integer representing the amount to subtract from an invoice total.
|
||||
attr_accessor :amount_off
|
||||
|
||||
def initialize(amount_off: nil)
|
||||
@amount_off = amount_off
|
||||
end
|
||||
end
|
||||
# Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency_options
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil)
|
||||
@currency_options = currency_options
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class AppliesTo < Stripe::RequestParams
|
||||
# An array of Product IDs that this Coupon will apply to.
|
||||
attr_accessor :products
|
||||
|
||||
def initialize(products: nil)
|
||||
@products = products
|
||||
end
|
||||
end
|
||||
|
||||
class CurrencyOptions < Stripe::RequestParams
|
||||
# A positive integer representing the amount to subtract from an invoice total.
|
||||
attr_accessor :amount_off
|
||||
|
||||
def initialize(amount_off: nil)
|
||||
@amount_off = amount_off
|
||||
end
|
||||
end
|
||||
# A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed).
|
||||
attr_accessor :amount_off
|
||||
# A hash containing directions for what this Coupon will apply discounts to.
|
||||
attr_accessor :applies_to
|
||||
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed).
|
||||
attr_accessor :currency
|
||||
# Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency_options
|
||||
# Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`.
|
||||
attr_accessor :duration
|
||||
# Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
|
||||
attr_accessor :duration_in_months
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you.
|
||||
attr_accessor :id
|
||||
# A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use.
|
||||
attr_accessor :max_redemptions
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set.
|
||||
attr_accessor :name
|
||||
# A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed).
|
||||
attr_accessor :percent_off
|
||||
# Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers.
|
||||
attr_accessor :redeem_by
|
||||
|
||||
def initialize(
|
||||
amount_off: nil,
|
||||
applies_to: nil,
|
||||
currency: nil,
|
||||
currency_options: nil,
|
||||
duration: nil,
|
||||
duration_in_months: nil,
|
||||
expand: nil,
|
||||
id: nil,
|
||||
max_redemptions: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
percent_off: nil,
|
||||
redeem_by: nil
|
||||
)
|
||||
@amount_off = amount_off
|
||||
@applies_to = applies_to
|
||||
@currency = currency
|
||||
@currency_options = currency_options
|
||||
@duration = duration
|
||||
@duration_in_months = duration_in_months
|
||||
@expand = expand
|
||||
@id = id
|
||||
@max_redemptions = max_redemptions
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@percent_off = percent_off
|
||||
@redeem_by = redeem_by
|
||||
end
|
||||
end
|
||||
# Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer.
|
||||
attr_reader :amount_off
|
||||
# Attribute for field applies_to
|
||||
attr_reader :applies_to
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off.
|
||||
attr_reader :currency
|
||||
# Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency_options
|
||||
# One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount.
|
||||
attr_reader :duration
|
||||
# If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`.
|
||||
attr_reader :duration_in_months
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid.
|
||||
attr_reader :max_redemptions
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Name of the coupon displayed to customers on for instance invoices or receipts.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
|
||||
attr_reader :percent_off
|
||||
# Date after which the coupon can no longer be redeemed.
|
||||
attr_reader :redeem_by
|
||||
# Number of times this coupon has been applied to a customer.
|
||||
attr_reader :times_redeemed
|
||||
# Taking account of the above properties, whether this coupon can still be applied to a customer.
|
||||
attr_reader :valid
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
# You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly.
|
||||
#
|
||||
# A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it.
|
||||
|
@ -15,6 +15,666 @@ module Stripe
|
||||
"credit_note"
|
||||
end
|
||||
|
||||
class DiscountAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the discount.
|
||||
attr_reader :amount
|
||||
# The discount that was applied to get this discount amount.
|
||||
attr_reader :discount
|
||||
end
|
||||
|
||||
class PretaxCreditAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
||||
attr_reader :amount
|
||||
# The credit balance transaction that was applied to get this pretax credit amount.
|
||||
attr_reader :credit_balance_transaction
|
||||
# The discount that was applied to get this pretax credit amount.
|
||||
attr_reader :discount
|
||||
# Type of the pretax credit amount referenced.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Refund < Stripe::StripeObject
|
||||
# Amount of the refund that applies to this credit note, in cents (or local equivalent).
|
||||
attr_reader :amount_refunded
|
||||
# ID of the refund.
|
||||
attr_reader :refund
|
||||
end
|
||||
|
||||
class ShippingCost < Stripe::StripeObject
|
||||
class Tax < Stripe::StripeObject
|
||||
# Amount of tax applied for this rate.
|
||||
attr_reader :amount
|
||||
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
||||
#
|
||||
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
||||
attr_reader :rate
|
||||
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
attr_reader :taxability_reason
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_reader :taxable_amount
|
||||
end
|
||||
# Total shipping cost before any taxes are applied.
|
||||
attr_reader :amount_subtotal
|
||||
# Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0.
|
||||
attr_reader :amount_tax
|
||||
# Total shipping cost after taxes are applied.
|
||||
attr_reader :amount_total
|
||||
# The ID of the ShippingRate for this invoice.
|
||||
attr_reader :shipping_rate
|
||||
# The taxes applied to the shipping rate.
|
||||
attr_reader :taxes
|
||||
end
|
||||
|
||||
class TaxAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_reader :amount
|
||||
# Whether this tax amount is inclusive or exclusive.
|
||||
attr_reader :inclusive
|
||||
# The tax rate that was applied to get this tax amount.
|
||||
attr_reader :tax_rate
|
||||
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
attr_reader :taxability_reason
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_reader :taxable_amount
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return credit notes that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# Only return credit notes for the customer specified by this customer ID.
|
||||
attr_accessor :customer
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Only return credit notes for the invoice specified by this invoice ID.
|
||||
attr_accessor :invoice
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
customer: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@customer = customer
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Line < Stripe::RequestParams
|
||||
class TaxAmount < Stripe::RequestParams
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_accessor :amount
|
||||
# The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
|
||||
attr_accessor :tax_rate
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_accessor :taxable_amount
|
||||
|
||||
def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
|
||||
@amount = amount
|
||||
@tax_rate = tax_rate
|
||||
@taxable_amount = taxable_amount
|
||||
end
|
||||
end
|
||||
# The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
|
||||
attr_accessor :amount
|
||||
# The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
|
||||
attr_accessor :description
|
||||
# The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
|
||||
attr_accessor :invoice_line_item
|
||||
# The line item quantity to credit.
|
||||
attr_accessor :quantity
|
||||
# A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
|
||||
attr_accessor :tax_amounts
|
||||
# The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
|
||||
attr_accessor :tax_rates
|
||||
# Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
|
||||
attr_accessor :type
|
||||
# The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
description: nil,
|
||||
invoice_line_item: nil,
|
||||
quantity: nil,
|
||||
tax_amounts: nil,
|
||||
tax_rates: nil,
|
||||
type: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@amount = amount
|
||||
@description = description
|
||||
@invoice_line_item = invoice_line_item
|
||||
@quantity = quantity
|
||||
@tax_amounts = tax_amounts
|
||||
@tax_rates = tax_rates
|
||||
@type = type
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Refund < Stripe::RequestParams
|
||||
# Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
|
||||
attr_accessor :amount_refunded
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
|
||||
def initialize(amount_refunded: nil, refund: nil)
|
||||
@amount_refunded = amount_refunded
|
||||
@refund = refund
|
||||
end
|
||||
end
|
||||
|
||||
class ShippingCost < Stripe::RequestParams
|
||||
# The ID of the shipping rate to use for this order.
|
||||
attr_accessor :shipping_rate
|
||||
|
||||
def initialize(shipping_rate: nil)
|
||||
@shipping_rate = shipping_rate
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
||||
attr_accessor :amount
|
||||
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
|
||||
attr_accessor :credit_amount
|
||||
# The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
|
||||
attr_accessor :effective_at
|
||||
# Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
|
||||
attr_accessor :email_type
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# ID of the invoice.
|
||||
attr_accessor :invoice
|
||||
# Line items that make up the credit note.
|
||||
attr_accessor :lines
|
||||
# The credit note's memo appears on the credit note PDF.
|
||||
attr_accessor :memo
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
|
||||
attr_accessor :out_of_band_amount
|
||||
# Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
|
||||
attr_accessor :reason
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
# The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
|
||||
attr_accessor :refund_amount
|
||||
# Refunds to link to this credit note.
|
||||
attr_accessor :refunds
|
||||
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
||||
attr_accessor :shipping_cost
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
credit_amount: nil,
|
||||
effective_at: nil,
|
||||
email_type: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
lines: nil,
|
||||
memo: nil,
|
||||
metadata: nil,
|
||||
out_of_band_amount: nil,
|
||||
reason: nil,
|
||||
refund: nil,
|
||||
refund_amount: nil,
|
||||
refunds: nil,
|
||||
shipping_cost: nil
|
||||
)
|
||||
@amount = amount
|
||||
@credit_amount = credit_amount
|
||||
@effective_at = effective_at
|
||||
@email_type = email_type
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@lines = lines
|
||||
@memo = memo
|
||||
@metadata = metadata
|
||||
@out_of_band_amount = out_of_band_amount
|
||||
@reason = reason
|
||||
@refund = refund
|
||||
@refund_amount = refund_amount
|
||||
@refunds = refunds
|
||||
@shipping_cost = shipping_cost
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Credit note memo.
|
||||
attr_accessor :memo
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, memo: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@memo = memo
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class PreviewParams < Stripe::RequestParams
|
||||
class Line < Stripe::RequestParams
|
||||
class TaxAmount < Stripe::RequestParams
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_accessor :amount
|
||||
# The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
|
||||
attr_accessor :tax_rate
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_accessor :taxable_amount
|
||||
|
||||
def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
|
||||
@amount = amount
|
||||
@tax_rate = tax_rate
|
||||
@taxable_amount = taxable_amount
|
||||
end
|
||||
end
|
||||
# The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
|
||||
attr_accessor :amount
|
||||
# The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
|
||||
attr_accessor :description
|
||||
# The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
|
||||
attr_accessor :invoice_line_item
|
||||
# The line item quantity to credit.
|
||||
attr_accessor :quantity
|
||||
# A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
|
||||
attr_accessor :tax_amounts
|
||||
# The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
|
||||
attr_accessor :tax_rates
|
||||
# Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
|
||||
attr_accessor :type
|
||||
# The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
description: nil,
|
||||
invoice_line_item: nil,
|
||||
quantity: nil,
|
||||
tax_amounts: nil,
|
||||
tax_rates: nil,
|
||||
type: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@amount = amount
|
||||
@description = description
|
||||
@invoice_line_item = invoice_line_item
|
||||
@quantity = quantity
|
||||
@tax_amounts = tax_amounts
|
||||
@tax_rates = tax_rates
|
||||
@type = type
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Refund < Stripe::RequestParams
|
||||
# Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
|
||||
attr_accessor :amount_refunded
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
|
||||
def initialize(amount_refunded: nil, refund: nil)
|
||||
@amount_refunded = amount_refunded
|
||||
@refund = refund
|
||||
end
|
||||
end
|
||||
|
||||
class ShippingCost < Stripe::RequestParams
|
||||
# The ID of the shipping rate to use for this order.
|
||||
attr_accessor :shipping_rate
|
||||
|
||||
def initialize(shipping_rate: nil)
|
||||
@shipping_rate = shipping_rate
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
||||
attr_accessor :amount
|
||||
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
|
||||
attr_accessor :credit_amount
|
||||
# The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
|
||||
attr_accessor :effective_at
|
||||
# Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
|
||||
attr_accessor :email_type
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# ID of the invoice.
|
||||
attr_accessor :invoice
|
||||
# Line items that make up the credit note.
|
||||
attr_accessor :lines
|
||||
# The credit note's memo appears on the credit note PDF.
|
||||
attr_accessor :memo
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
|
||||
attr_accessor :out_of_band_amount
|
||||
# Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
|
||||
attr_accessor :reason
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
# The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
|
||||
attr_accessor :refund_amount
|
||||
# Refunds to link to this credit note.
|
||||
attr_accessor :refunds
|
||||
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
||||
attr_accessor :shipping_cost
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
credit_amount: nil,
|
||||
effective_at: nil,
|
||||
email_type: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
lines: nil,
|
||||
memo: nil,
|
||||
metadata: nil,
|
||||
out_of_band_amount: nil,
|
||||
reason: nil,
|
||||
refund: nil,
|
||||
refund_amount: nil,
|
||||
refunds: nil,
|
||||
shipping_cost: nil
|
||||
)
|
||||
@amount = amount
|
||||
@credit_amount = credit_amount
|
||||
@effective_at = effective_at
|
||||
@email_type = email_type
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@lines = lines
|
||||
@memo = memo
|
||||
@metadata = metadata
|
||||
@out_of_band_amount = out_of_band_amount
|
||||
@reason = reason
|
||||
@refund = refund
|
||||
@refund_amount = refund_amount
|
||||
@refunds = refunds
|
||||
@shipping_cost = shipping_cost
|
||||
end
|
||||
end
|
||||
|
||||
class ListPreviewLineItemsParams < Stripe::RequestParams
|
||||
class Line < Stripe::RequestParams
|
||||
class TaxAmount < Stripe::RequestParams
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_accessor :amount
|
||||
# The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe.
|
||||
attr_accessor :tax_rate
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_accessor :taxable_amount
|
||||
|
||||
def initialize(amount: nil, tax_rate: nil, taxable_amount: nil)
|
||||
@amount = amount
|
||||
@tax_rate = tax_rate
|
||||
@taxable_amount = taxable_amount
|
||||
end
|
||||
end
|
||||
# The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive
|
||||
attr_accessor :amount
|
||||
# The description of the credit note line item. Only valid when the `type` is `custom_line_item`.
|
||||
attr_accessor :description
|
||||
# The invoice line item to credit. Only valid when the `type` is `invoice_line_item`.
|
||||
attr_accessor :invoice_line_item
|
||||
# The line item quantity to credit.
|
||||
attr_accessor :quantity
|
||||
# A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`.
|
||||
attr_accessor :tax_amounts
|
||||
# The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`.
|
||||
attr_accessor :tax_rates
|
||||
# Type of the credit note line item, one of `invoice_line_item` or `custom_line_item`
|
||||
attr_accessor :type
|
||||
# The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
description: nil,
|
||||
invoice_line_item: nil,
|
||||
quantity: nil,
|
||||
tax_amounts: nil,
|
||||
tax_rates: nil,
|
||||
type: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@amount = amount
|
||||
@description = description
|
||||
@invoice_line_item = invoice_line_item
|
||||
@quantity = quantity
|
||||
@tax_amounts = tax_amounts
|
||||
@tax_rates = tax_rates
|
||||
@type = type
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Refund < Stripe::RequestParams
|
||||
# Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount.
|
||||
attr_accessor :amount_refunded
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
|
||||
def initialize(amount_refunded: nil, refund: nil)
|
||||
@amount_refunded = amount_refunded
|
||||
@refund = refund
|
||||
end
|
||||
end
|
||||
|
||||
class ShippingCost < Stripe::RequestParams
|
||||
# The ID of the shipping rate to use for this order.
|
||||
attr_accessor :shipping_rate
|
||||
|
||||
def initialize(shipping_rate: nil)
|
||||
@shipping_rate = shipping_rate
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note.
|
||||
attr_accessor :amount
|
||||
# The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
|
||||
attr_accessor :credit_amount
|
||||
# The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
|
||||
attr_accessor :effective_at
|
||||
# Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`.
|
||||
attr_accessor :email_type
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# ID of the invoice.
|
||||
attr_accessor :invoice
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Line items that make up the credit note.
|
||||
attr_accessor :lines
|
||||
# The credit note's memo appears on the credit note PDF.
|
||||
attr_accessor :memo
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe.
|
||||
attr_accessor :out_of_band_amount
|
||||
# Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
|
||||
attr_accessor :reason
|
||||
# ID of an existing refund to link this credit note to.
|
||||
attr_accessor :refund
|
||||
# The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
|
||||
attr_accessor :refund_amount
|
||||
# Refunds to link to this credit note.
|
||||
attr_accessor :refunds
|
||||
# When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note.
|
||||
attr_accessor :shipping_cost
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
credit_amount: nil,
|
||||
effective_at: nil,
|
||||
email_type: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
limit: nil,
|
||||
lines: nil,
|
||||
memo: nil,
|
||||
metadata: nil,
|
||||
out_of_band_amount: nil,
|
||||
reason: nil,
|
||||
refund: nil,
|
||||
refund_amount: nil,
|
||||
refunds: nil,
|
||||
shipping_cost: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@amount = amount
|
||||
@credit_amount = credit_amount
|
||||
@effective_at = effective_at
|
||||
@email_type = email_type
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@limit = limit
|
||||
@lines = lines
|
||||
@memo = memo
|
||||
@metadata = metadata
|
||||
@out_of_band_amount = out_of_band_amount
|
||||
@reason = reason
|
||||
@refund = refund
|
||||
@refund_amount = refund_amount
|
||||
@refunds = refunds
|
||||
@shipping_cost = shipping_cost
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class VoidCreditNoteParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
|
||||
attr_reader :amount
|
||||
# This is the sum of all the shipping amounts.
|
||||
attr_reader :amount_shipping
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# ID of the customer.
|
||||
attr_reader :customer
|
||||
# Customer balance transaction related to this credit note.
|
||||
attr_reader :customer_balance_transaction
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
|
||||
attr_reader :discount_amount
|
||||
# The aggregate amounts calculated per discount for all line items.
|
||||
attr_reader :discount_amounts
|
||||
# The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF.
|
||||
attr_reader :effective_at
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# ID of the invoice.
|
||||
attr_reader :invoice
|
||||
# Line items that make up the credit note
|
||||
attr_reader :lines
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Customer-facing text that appears on the credit note PDF.
|
||||
attr_reader :memo
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
|
||||
attr_reader :number
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Amount that was credited outside of Stripe.
|
||||
attr_reader :out_of_band_amount
|
||||
# The link to download the PDF of the credit note.
|
||||
attr_reader :pdf
|
||||
# Attribute for field post_payment_amount
|
||||
attr_reader :post_payment_amount
|
||||
# Attribute for field pre_payment_amount
|
||||
attr_reader :pre_payment_amount
|
||||
# The pretax credit amounts (ex: discount, credit grants, etc) for all line items.
|
||||
attr_reader :pretax_credit_amounts
|
||||
# Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory`
|
||||
attr_reader :reason
|
||||
# Refund related to this credit note.
|
||||
attr_reader :refund
|
||||
# Refunds related to this credit note.
|
||||
attr_reader :refunds
|
||||
# The details of the cost of shipping, including the ShippingRate applied to the invoice.
|
||||
attr_reader :shipping_cost
|
||||
# Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
|
||||
attr_reader :status
|
||||
# The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
|
||||
attr_reader :subtotal
|
||||
# The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
|
||||
attr_reader :subtotal_excluding_tax
|
||||
# The aggregate amounts calculated per tax rate for all line items.
|
||||
attr_reader :tax_amounts
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
|
||||
attr_reader :total
|
||||
# The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
|
||||
attr_reader :total_excluding_tax
|
||||
# Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
|
||||
attr_reader :type
|
||||
# The time that the credit note was voided.
|
||||
attr_reader :voided_at
|
||||
|
||||
# Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces
|
||||
# its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result
|
||||
# in any combination of the following:
|
||||
|
@ -8,5 +8,70 @@ module Stripe
|
||||
def self.object_name
|
||||
"credit_note_line_item"
|
||||
end
|
||||
|
||||
class DiscountAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the discount.
|
||||
attr_reader :amount
|
||||
# The discount that was applied to get this discount amount.
|
||||
attr_reader :discount
|
||||
end
|
||||
|
||||
class PretaxCreditAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
||||
attr_reader :amount
|
||||
# The credit balance transaction that was applied to get this pretax credit amount.
|
||||
attr_reader :credit_balance_transaction
|
||||
# The discount that was applied to get this pretax credit amount.
|
||||
attr_reader :discount
|
||||
# Type of the pretax credit amount referenced.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class TaxAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_reader :amount
|
||||
# Whether this tax amount is inclusive or exclusive.
|
||||
attr_reader :inclusive
|
||||
# The tax rate that was applied to get this tax amount.
|
||||
attr_reader :tax_rate
|
||||
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
attr_reader :taxability_reason
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_reader :taxable_amount
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
|
||||
attr_reader :amount
|
||||
# The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
|
||||
attr_reader :amount_excluding_tax
|
||||
# Description of the item being credited.
|
||||
attr_reader :description
|
||||
# The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
|
||||
attr_reader :discount_amount
|
||||
# The amount of discount calculated per discount for this line item
|
||||
attr_reader :discount_amounts
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# ID of the invoice line item being credited
|
||||
attr_reader :invoice_line_item
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The pretax credit amounts (ex: discount, credit grants, etc) for this line item.
|
||||
attr_reader :pretax_credit_amounts
|
||||
# The number of units of product being credited.
|
||||
attr_reader :quantity
|
||||
# The amount of tax calculated per tax rate for this line item
|
||||
attr_reader :tax_amounts
|
||||
# The tax rates which apply to the line item.
|
||||
attr_reader :tax_rates
|
||||
# The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.
|
||||
attr_reader :type
|
||||
# The cost of each unit of product being credited.
|
||||
attr_reader :unit_amount
|
||||
# Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
|
||||
attr_reader :unit_amount_decimal
|
||||
# The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
|
||||
attr_reader :unit_amount_excluding_tax
|
||||
end
|
||||
end
|
||||
|
@ -22,6 +22,846 @@ module Stripe
|
||||
nested_resource_class_methods :source, operations: %i[create retrieve update delete list]
|
||||
nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list]
|
||||
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class InvoiceSettings < Stripe::StripeObject
|
||||
class CustomField < Stripe::StripeObject
|
||||
# The name of the custom field.
|
||||
attr_reader :name
|
||||
# The value of the custom field.
|
||||
attr_reader :value
|
||||
end
|
||||
|
||||
class RenderingOptions < Stripe::StripeObject
|
||||
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs.
|
||||
attr_reader :amount_tax_display
|
||||
# ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice.
|
||||
attr_reader :template
|
||||
end
|
||||
# Default custom fields to be displayed on invoices for this customer.
|
||||
attr_reader :custom_fields
|
||||
# ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
|
||||
attr_reader :default_payment_method
|
||||
# Default footer to be displayed on invoices for this customer.
|
||||
attr_reader :footer
|
||||
# Default options for invoice PDF rendering for this customer.
|
||||
attr_reader :rendering_options
|
||||
end
|
||||
|
||||
class Shipping < Stripe::StripeObject
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field address
|
||||
attr_reader :address
|
||||
# The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc.
|
||||
attr_reader :carrier
|
||||
# Recipient name.
|
||||
attr_reader :name
|
||||
# Recipient phone (including extension).
|
||||
attr_reader :phone
|
||||
# The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
|
||||
attr_reader :tracking_number
|
||||
end
|
||||
|
||||
class Tax < Stripe::StripeObject
|
||||
class Location < Stripe::StripeObject
|
||||
# The customer's country as identified by Stripe Tax.
|
||||
attr_reader :country
|
||||
# The data source used to infer the customer's location.
|
||||
attr_reader :source
|
||||
# The customer's state, county, province, or region as identified by Stripe Tax.
|
||||
attr_reader :state
|
||||
end
|
||||
# Surfaces if automatic tax computation is possible given the current customer location information.
|
||||
attr_reader :automatic_tax
|
||||
# A recent IP address of the customer used for tax reporting and tax location inference.
|
||||
attr_reader :ip_address
|
||||
# The customer's location as identified by Stripe Tax.
|
||||
attr_reader :location
|
||||
end
|
||||
|
||||
class DeleteParams < Stripe::RequestParams
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
|
||||
class CashBalance < Stripe::RequestParams
|
||||
class Settings < Stripe::RequestParams
|
||||
# Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
|
||||
attr_accessor :reconciliation_mode
|
||||
|
||||
def initialize(reconciliation_mode: nil)
|
||||
@reconciliation_mode = reconciliation_mode
|
||||
end
|
||||
end
|
||||
# Settings controlling the behavior of the customer's cash balance,
|
||||
# such as reconciliation of funds received.
|
||||
attr_accessor :settings
|
||||
|
||||
def initialize(settings: nil)
|
||||
@settings = settings
|
||||
end
|
||||
end
|
||||
|
||||
class InvoiceSettings < Stripe::RequestParams
|
||||
class CustomField < Stripe::RequestParams
|
||||
# The name of the custom field. This may be up to 40 characters.
|
||||
attr_accessor :name
|
||||
# The value of the custom field. This may be up to 140 characters.
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(name: nil, value: nil)
|
||||
@name = name
|
||||
@value = value
|
||||
end
|
||||
end
|
||||
|
||||
class RenderingOptions < Stripe::RequestParams
|
||||
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
||||
attr_accessor :amount_tax_display
|
||||
# ID of the invoice rendering template to use for future invoices.
|
||||
attr_accessor :template
|
||||
|
||||
def initialize(amount_tax_display: nil, template: nil)
|
||||
@amount_tax_display = amount_tax_display
|
||||
@template = template
|
||||
end
|
||||
end
|
||||
# The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
|
||||
attr_accessor :custom_fields
|
||||
# ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
|
||||
attr_accessor :default_payment_method
|
||||
# Default footer to be displayed on invoices for this customer.
|
||||
attr_accessor :footer
|
||||
# Default options for invoice PDF rendering for this customer.
|
||||
attr_accessor :rendering_options
|
||||
|
||||
def initialize(
|
||||
custom_fields: nil,
|
||||
default_payment_method: nil,
|
||||
footer: nil,
|
||||
rendering_options: nil
|
||||
)
|
||||
@custom_fields = custom_fields
|
||||
@default_payment_method = default_payment_method
|
||||
@footer = footer
|
||||
@rendering_options = rendering_options
|
||||
end
|
||||
end
|
||||
|
||||
class Shipping < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# Customer shipping address.
|
||||
attr_accessor :address
|
||||
# Customer name.
|
||||
attr_accessor :name
|
||||
# Customer phone (including extension).
|
||||
attr_accessor :phone
|
||||
|
||||
def initialize(address: nil, name: nil, phone: nil)
|
||||
@address = address
|
||||
@name = name
|
||||
@phone = phone
|
||||
end
|
||||
end
|
||||
|
||||
class Tax < Stripe::RequestParams
|
||||
# A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
|
||||
attr_accessor :ip_address
|
||||
# A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`.
|
||||
attr_accessor :validate_location
|
||||
|
||||
def initialize(ip_address: nil, validate_location: nil)
|
||||
@ip_address = ip_address
|
||||
@validate_location = validate_location
|
||||
end
|
||||
end
|
||||
# The customer's address.
|
||||
attr_accessor :address
|
||||
# An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
|
||||
attr_accessor :balance
|
||||
# Balance information and default balance settings for this customer.
|
||||
attr_accessor :cash_balance
|
||||
# Attribute for param field coupon
|
||||
attr_accessor :coupon
|
||||
# If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter.
|
||||
#
|
||||
# Provide the ID of a payment source already attached to this customer to make it this customer's default payment source.
|
||||
#
|
||||
# If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property.
|
||||
attr_accessor :default_source
|
||||
# An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
|
||||
attr_accessor :description
|
||||
# Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
|
||||
attr_accessor :email
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
|
||||
attr_accessor :invoice_prefix
|
||||
# Default invoice settings for this customer.
|
||||
attr_accessor :invoice_settings
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The customer's full name or business name.
|
||||
attr_accessor :name
|
||||
# The sequence to be used on the customer's next invoice. Defaults to 1.
|
||||
attr_accessor :next_invoice_sequence
|
||||
# The customer's phone number.
|
||||
attr_accessor :phone
|
||||
# Customer's preferred languages, ordered by preference.
|
||||
attr_accessor :preferred_locales
|
||||
# The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
|
||||
attr_accessor :promotion_code
|
||||
# The customer's shipping information. Appears on invoices emailed to this customer.
|
||||
attr_accessor :shipping
|
||||
# Attribute for param field source
|
||||
attr_accessor :source
|
||||
# Tax details about the customer.
|
||||
attr_accessor :tax
|
||||
# The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
|
||||
attr_accessor :tax_exempt
|
||||
# Attribute for param field validate
|
||||
attr_accessor :validate
|
||||
|
||||
def initialize(
|
||||
address: nil,
|
||||
balance: nil,
|
||||
cash_balance: nil,
|
||||
coupon: nil,
|
||||
default_source: nil,
|
||||
description: nil,
|
||||
email: nil,
|
||||
expand: nil,
|
||||
invoice_prefix: nil,
|
||||
invoice_settings: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
next_invoice_sequence: nil,
|
||||
phone: nil,
|
||||
preferred_locales: nil,
|
||||
promotion_code: nil,
|
||||
shipping: nil,
|
||||
source: nil,
|
||||
tax: nil,
|
||||
tax_exempt: nil,
|
||||
validate: nil
|
||||
)
|
||||
@address = address
|
||||
@balance = balance
|
||||
@cash_balance = cash_balance
|
||||
@coupon = coupon
|
||||
@default_source = default_source
|
||||
@description = description
|
||||
@email = email
|
||||
@expand = expand
|
||||
@invoice_prefix = invoice_prefix
|
||||
@invoice_settings = invoice_settings
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@next_invoice_sequence = next_invoice_sequence
|
||||
@phone = phone
|
||||
@preferred_locales = preferred_locales
|
||||
@promotion_code = promotion_code
|
||||
@shipping = shipping
|
||||
@source = source
|
||||
@tax = tax
|
||||
@tax_exempt = tax_exempt
|
||||
@validate = validate
|
||||
end
|
||||
end
|
||||
|
||||
class DeleteDiscountParams < Stripe::RequestParams
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return customers that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A case-sensitive filter on the list based on the customer's `email` field. The value must be a string.
|
||||
attr_accessor :email
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set.
|
||||
attr_accessor :test_clock
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
email: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
test_clock: nil
|
||||
)
|
||||
@created = created
|
||||
@email = email
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@test_clock = test_clock
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
|
||||
class CashBalance < Stripe::RequestParams
|
||||
class Settings < Stripe::RequestParams
|
||||
# Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation).
|
||||
attr_accessor :reconciliation_mode
|
||||
|
||||
def initialize(reconciliation_mode: nil)
|
||||
@reconciliation_mode = reconciliation_mode
|
||||
end
|
||||
end
|
||||
# Settings controlling the behavior of the customer's cash balance,
|
||||
# such as reconciliation of funds received.
|
||||
attr_accessor :settings
|
||||
|
||||
def initialize(settings: nil)
|
||||
@settings = settings
|
||||
end
|
||||
end
|
||||
|
||||
class InvoiceSettings < Stripe::RequestParams
|
||||
class CustomField < Stripe::RequestParams
|
||||
# The name of the custom field. This may be up to 40 characters.
|
||||
attr_accessor :name
|
||||
# The value of the custom field. This may be up to 140 characters.
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(name: nil, value: nil)
|
||||
@name = name
|
||||
@value = value
|
||||
end
|
||||
end
|
||||
|
||||
class RenderingOptions < Stripe::RequestParams
|
||||
# How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts.
|
||||
attr_accessor :amount_tax_display
|
||||
# ID of the invoice rendering template to use for future invoices.
|
||||
attr_accessor :template
|
||||
|
||||
def initialize(amount_tax_display: nil, template: nil)
|
||||
@amount_tax_display = amount_tax_display
|
||||
@template = template
|
||||
end
|
||||
end
|
||||
# The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields.
|
||||
attr_accessor :custom_fields
|
||||
# ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices.
|
||||
attr_accessor :default_payment_method
|
||||
# Default footer to be displayed on invoices for this customer.
|
||||
attr_accessor :footer
|
||||
# Default options for invoice PDF rendering for this customer.
|
||||
attr_accessor :rendering_options
|
||||
|
||||
def initialize(
|
||||
custom_fields: nil,
|
||||
default_payment_method: nil,
|
||||
footer: nil,
|
||||
rendering_options: nil
|
||||
)
|
||||
@custom_fields = custom_fields
|
||||
@default_payment_method = default_payment_method
|
||||
@footer = footer
|
||||
@rendering_options = rendering_options
|
||||
end
|
||||
end
|
||||
|
||||
class Shipping < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# Customer shipping address.
|
||||
attr_accessor :address
|
||||
# Customer name.
|
||||
attr_accessor :name
|
||||
# Customer phone (including extension).
|
||||
attr_accessor :phone
|
||||
|
||||
def initialize(address: nil, name: nil, phone: nil)
|
||||
@address = address
|
||||
@name = name
|
||||
@phone = phone
|
||||
end
|
||||
end
|
||||
|
||||
class Tax < Stripe::RequestParams
|
||||
# A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes.
|
||||
attr_accessor :ip_address
|
||||
# A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`.
|
||||
attr_accessor :validate_location
|
||||
|
||||
def initialize(ip_address: nil, validate_location: nil)
|
||||
@ip_address = ip_address
|
||||
@validate_location = validate_location
|
||||
end
|
||||
end
|
||||
|
||||
class TaxIdDatum < Stripe::RequestParams
|
||||
# Type of the tax ID, one of `ad_nrt`, `ae_trn`, `al_tin`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`
|
||||
attr_accessor :type
|
||||
# Value of the tax ID.
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(type: nil, value: nil)
|
||||
@type = type
|
||||
@value = value
|
||||
end
|
||||
end
|
||||
# The customer's address.
|
||||
attr_accessor :address
|
||||
# An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
|
||||
attr_accessor :balance
|
||||
# Balance information and default balance settings for this customer.
|
||||
attr_accessor :cash_balance
|
||||
# Attribute for param field coupon
|
||||
attr_accessor :coupon
|
||||
# An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
|
||||
attr_accessor :description
|
||||
# Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*.
|
||||
attr_accessor :email
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers.
|
||||
attr_accessor :invoice_prefix
|
||||
# Default invoice settings for this customer.
|
||||
attr_accessor :invoice_settings
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The customer's full name or business name.
|
||||
attr_accessor :name
|
||||
# The sequence to be used on the customer's next invoice. Defaults to 1.
|
||||
attr_accessor :next_invoice_sequence
|
||||
# Attribute for param field payment_method
|
||||
attr_accessor :payment_method
|
||||
# The customer's phone number.
|
||||
attr_accessor :phone
|
||||
# Customer's preferred languages, ordered by preference.
|
||||
attr_accessor :preferred_locales
|
||||
# The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
|
||||
attr_accessor :promotion_code
|
||||
# The customer's shipping information. Appears on invoices emailed to this customer.
|
||||
attr_accessor :shipping
|
||||
# Attribute for param field source
|
||||
attr_accessor :source
|
||||
# Tax details about the customer.
|
||||
attr_accessor :tax
|
||||
# The customer's tax exemption. One of `none`, `exempt`, or `reverse`.
|
||||
attr_accessor :tax_exempt
|
||||
# The customer's tax IDs.
|
||||
attr_accessor :tax_id_data
|
||||
# ID of the test clock to attach to the customer.
|
||||
attr_accessor :test_clock
|
||||
# Attribute for param field validate
|
||||
attr_accessor :validate
|
||||
|
||||
def initialize(
|
||||
address: nil,
|
||||
balance: nil,
|
||||
cash_balance: nil,
|
||||
coupon: nil,
|
||||
description: nil,
|
||||
email: nil,
|
||||
expand: nil,
|
||||
invoice_prefix: nil,
|
||||
invoice_settings: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
next_invoice_sequence: nil,
|
||||
payment_method: nil,
|
||||
phone: nil,
|
||||
preferred_locales: nil,
|
||||
promotion_code: nil,
|
||||
shipping: nil,
|
||||
source: nil,
|
||||
tax: nil,
|
||||
tax_exempt: nil,
|
||||
tax_id_data: nil,
|
||||
test_clock: nil,
|
||||
validate: nil
|
||||
)
|
||||
@address = address
|
||||
@balance = balance
|
||||
@cash_balance = cash_balance
|
||||
@coupon = coupon
|
||||
@description = description
|
||||
@email = email
|
||||
@expand = expand
|
||||
@invoice_prefix = invoice_prefix
|
||||
@invoice_settings = invoice_settings
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@next_invoice_sequence = next_invoice_sequence
|
||||
@payment_method = payment_method
|
||||
@phone = phone
|
||||
@preferred_locales = preferred_locales
|
||||
@promotion_code = promotion_code
|
||||
@shipping = shipping
|
||||
@source = source
|
||||
@tax = tax
|
||||
@tax_exempt = tax_exempt
|
||||
@tax_id_data = tax_id_data
|
||||
@test_clock = test_clock
|
||||
@validate = validate
|
||||
end
|
||||
end
|
||||
|
||||
class ListPaymentMethodsParams < Stripe::RequestParams
|
||||
# This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
|
||||
attr_accessor :allow_redisplay
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
allow_redisplay: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
type: nil
|
||||
)
|
||||
@allow_redisplay = allow_redisplay
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrievePaymentMethodParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class SearchParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results.
|
||||
attr_accessor :page
|
||||
# The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers).
|
||||
attr_accessor :query
|
||||
|
||||
def initialize(expand: nil, limit: nil, page: nil, query: nil)
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@page = page
|
||||
@query = query
|
||||
end
|
||||
end
|
||||
|
||||
class CreateFundingInstructionsParams < Stripe::RequestParams
|
||||
class BankTransfer < Stripe::RequestParams
|
||||
class EuBankTransfer < Stripe::RequestParams
|
||||
# The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`.
|
||||
attr_accessor :country
|
||||
|
||||
def initialize(country: nil)
|
||||
@country = country
|
||||
end
|
||||
end
|
||||
# Configuration for eu_bank_transfer funding type.
|
||||
attr_accessor :eu_bank_transfer
|
||||
# List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned.
|
||||
#
|
||||
# Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`.
|
||||
attr_accessor :requested_address_types
|
||||
# The type of the `bank_transfer`
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil)
|
||||
@eu_bank_transfer = eu_bank_transfer
|
||||
@requested_address_types = requested_address_types
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# Additional parameters for `bank_transfer` funding types
|
||||
attr_accessor :bank_transfer
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The `funding_type` to get the instructions for.
|
||||
attr_accessor :funding_type
|
||||
|
||||
def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil)
|
||||
@bank_transfer = bank_transfer
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@funding_type = funding_type
|
||||
end
|
||||
end
|
||||
|
||||
class FundCashBalanceParams < Stripe::RequestParams
|
||||
# Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency).
|
||||
attr_accessor :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs.
|
||||
attr_accessor :reference
|
||||
|
||||
def initialize(amount: nil, currency: nil, expand: nil, reference: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@reference = reference
|
||||
end
|
||||
end
|
||||
# The customer's address.
|
||||
attr_reader :address
|
||||
# The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize.
|
||||
attr_reader :balance
|
||||
# The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically.
|
||||
attr_reader :cash_balance
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes.
|
||||
attr_reader :currency
|
||||
# ID of the default payment source for the customer.
|
||||
#
|
||||
# If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead.
|
||||
attr_reader :default_source
|
||||
# Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`.
|
||||
#
|
||||
# If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`.
|
||||
#
|
||||
# If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`.
|
||||
attr_reader :delinquent
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# Describes the current discount active on the customer, if there is one.
|
||||
attr_reader :discount
|
||||
# The customer's email address.
|
||||
attr_reader :email
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes.
|
||||
attr_reader :invoice_credit_balance
|
||||
# The prefix for the customer used to generate unique invoice numbers.
|
||||
attr_reader :invoice_prefix
|
||||
# Attribute for field invoice_settings
|
||||
attr_reader :invoice_settings
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The customer's full name or business name.
|
||||
attr_reader :name
|
||||
# The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses.
|
||||
attr_reader :next_invoice_sequence
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The customer's phone number.
|
||||
attr_reader :phone
|
||||
# The customer's preferred locales (languages), ordered by preference.
|
||||
attr_reader :preferred_locales
|
||||
# Mailing and shipping address for the customer. Appears on invoices emailed to this customer.
|
||||
attr_reader :shipping
|
||||
# The customer's payment sources, if any.
|
||||
attr_reader :sources
|
||||
# The customer's current subscriptions, if any.
|
||||
attr_reader :subscriptions
|
||||
# Attribute for field tax
|
||||
attr_reader :tax
|
||||
# Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**.
|
||||
attr_reader :tax_exempt
|
||||
# The customer's tax IDs.
|
||||
attr_reader :tax_ids
|
||||
# ID of the test clock that this customer belongs to.
|
||||
attr_reader :test_clock
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
# Creates a new customer object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/customers", params: params, opts: opts)
|
||||
|
@ -16,6 +16,33 @@ module Stripe
|
||||
"customer_balance_transaction"
|
||||
end
|
||||
|
||||
# The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
|
||||
attr_reader :amount
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The ID of the credit note (if any) related to the transaction.
|
||||
attr_reader :credit_note
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The ID of the customer the transaction belongs to.
|
||||
attr_reader :customer
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
|
||||
attr_reader :ending_balance
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The ID of the invoice (if any) related to the transaction.
|
||||
attr_reader :invoice
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types.
|
||||
attr_reader :type
|
||||
|
||||
def resource_url
|
||||
if !respond_to?(:customer) || customer.nil?
|
||||
raise NotImplementedError,
|
||||
|
@ -11,5 +11,114 @@ module Stripe
|
||||
def self.object_name
|
||||
"customer_cash_balance_transaction"
|
||||
end
|
||||
|
||||
class AdjustedForOverdraft < Stripe::StripeObject
|
||||
# The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance.
|
||||
attr_reader :balance_transaction
|
||||
# The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
|
||||
attr_reader :linked_transaction
|
||||
end
|
||||
|
||||
class AppliedToPayment < Stripe::StripeObject
|
||||
# The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
|
||||
attr_reader :payment_intent
|
||||
end
|
||||
|
||||
class Funded < Stripe::StripeObject
|
||||
class BankTransfer < Stripe::StripeObject
|
||||
class EuBankTransfer < Stripe::StripeObject
|
||||
# The BIC of the bank of the sender of the funding.
|
||||
attr_reader :bic
|
||||
# The last 4 digits of the IBAN of the sender of the funding.
|
||||
attr_reader :iban_last4
|
||||
# The full name of the sender, as supplied by the sending bank.
|
||||
attr_reader :sender_name
|
||||
end
|
||||
|
||||
class GbBankTransfer < Stripe::StripeObject
|
||||
# The last 4 digits of the account number of the sender of the funding.
|
||||
attr_reader :account_number_last4
|
||||
# The full name of the sender, as supplied by the sending bank.
|
||||
attr_reader :sender_name
|
||||
# The sort code of the bank of the sender of the funding
|
||||
attr_reader :sort_code
|
||||
end
|
||||
|
||||
class JpBankTransfer < Stripe::StripeObject
|
||||
# The name of the bank of the sender of the funding.
|
||||
attr_reader :sender_bank
|
||||
# The name of the bank branch of the sender of the funding.
|
||||
attr_reader :sender_branch
|
||||
# The full name of the sender, as supplied by the sending bank.
|
||||
attr_reader :sender_name
|
||||
end
|
||||
|
||||
class UsBankTransfer < Stripe::StripeObject
|
||||
# The banking network used for this funding.
|
||||
attr_reader :network
|
||||
# The full name of the sender, as supplied by the sending bank.
|
||||
attr_reader :sender_name
|
||||
end
|
||||
# Attribute for field eu_bank_transfer
|
||||
attr_reader :eu_bank_transfer
|
||||
# Attribute for field gb_bank_transfer
|
||||
attr_reader :gb_bank_transfer
|
||||
# Attribute for field jp_bank_transfer
|
||||
attr_reader :jp_bank_transfer
|
||||
# The user-supplied reference field on the bank transfer.
|
||||
attr_reader :reference
|
||||
# The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`.
|
||||
attr_reader :type
|
||||
# Attribute for field us_bank_transfer
|
||||
attr_reader :us_bank_transfer
|
||||
end
|
||||
# Attribute for field bank_transfer
|
||||
attr_reader :bank_transfer
|
||||
end
|
||||
|
||||
class RefundedFromPayment < Stripe::StripeObject
|
||||
# The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance.
|
||||
attr_reader :refund
|
||||
end
|
||||
|
||||
class TransferredToBalance < Stripe::StripeObject
|
||||
# The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance.
|
||||
attr_reader :balance_transaction
|
||||
end
|
||||
|
||||
class UnappliedFromPayment < Stripe::StripeObject
|
||||
# The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from.
|
||||
attr_reader :payment_intent
|
||||
end
|
||||
# Attribute for field adjusted_for_overdraft
|
||||
attr_reader :adjusted_for_overdraft
|
||||
# Attribute for field applied_to_payment
|
||||
attr_reader :applied_to_payment
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The customer whose available cash balance changed as a result of this transaction.
|
||||
attr_reader :customer
|
||||
# The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :ending_balance
|
||||
# Attribute for field funded
|
||||
attr_reader :funded
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance.
|
||||
attr_reader :net_amount
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field refunded_from_payment
|
||||
attr_reader :refunded_from_payment
|
||||
# Attribute for field transferred_to_balance
|
||||
attr_reader :transferred_to_balance
|
||||
# The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types.
|
||||
attr_reader :type
|
||||
# Attribute for field unapplied_from_payment
|
||||
attr_reader :unapplied_from_payment
|
||||
end
|
||||
end
|
||||
|
@ -16,6 +16,165 @@ module Stripe
|
||||
"customer_session"
|
||||
end
|
||||
|
||||
class Components < Stripe::StripeObject
|
||||
class BuyButton < Stripe::StripeObject
|
||||
# Whether the buy button is enabled.
|
||||
attr_reader :enabled
|
||||
end
|
||||
|
||||
class PaymentElement < Stripe::StripeObject
|
||||
class Features < Stripe::StripeObject
|
||||
# A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
|
||||
#
|
||||
# If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
|
||||
attr_reader :payment_method_allow_redisplay_filters
|
||||
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
||||
attr_reader :payment_method_redisplay
|
||||
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
||||
attr_reader :payment_method_redisplay_limit
|
||||
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
||||
#
|
||||
# Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
|
||||
attr_reader :payment_method_remove
|
||||
# Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
|
||||
#
|
||||
# If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
|
||||
attr_reader :payment_method_save
|
||||
# When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
|
||||
#
|
||||
# When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
|
||||
attr_reader :payment_method_save_usage
|
||||
end
|
||||
# Whether the Payment Element is enabled.
|
||||
attr_reader :enabled
|
||||
# This hash defines whether the Payment Element supports certain features.
|
||||
attr_reader :features
|
||||
end
|
||||
|
||||
class PricingTable < Stripe::StripeObject
|
||||
# Whether the pricing table is enabled.
|
||||
attr_reader :enabled
|
||||
end
|
||||
# This hash contains whether the buy button is enabled.
|
||||
attr_reader :buy_button
|
||||
# This hash contains whether the Payment Element is enabled and the features it supports.
|
||||
attr_reader :payment_element
|
||||
# This hash contains whether the pricing table is enabled.
|
||||
attr_reader :pricing_table
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Components < Stripe::RequestParams
|
||||
class BuyButton < Stripe::RequestParams
|
||||
# Whether the buy button is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
|
||||
class PaymentElement < Stripe::RequestParams
|
||||
class Features < Stripe::RequestParams
|
||||
# A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list.
|
||||
#
|
||||
# If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"].
|
||||
attr_accessor :payment_method_allow_redisplay_filters
|
||||
# Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`.
|
||||
attr_accessor :payment_method_redisplay
|
||||
# Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`.
|
||||
attr_accessor :payment_method_redisplay_limit
|
||||
# Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`.
|
||||
#
|
||||
# Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods).
|
||||
attr_accessor :payment_method_remove
|
||||
# Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`.
|
||||
#
|
||||
# If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`.
|
||||
attr_accessor :payment_method_save
|
||||
# When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent.
|
||||
#
|
||||
# When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation.
|
||||
attr_accessor :payment_method_save_usage
|
||||
|
||||
def initialize(
|
||||
payment_method_allow_redisplay_filters: nil,
|
||||
payment_method_redisplay: nil,
|
||||
payment_method_redisplay_limit: nil,
|
||||
payment_method_remove: nil,
|
||||
payment_method_save: nil,
|
||||
payment_method_save_usage: nil
|
||||
)
|
||||
@payment_method_allow_redisplay_filters = payment_method_allow_redisplay_filters
|
||||
@payment_method_redisplay = payment_method_redisplay
|
||||
@payment_method_redisplay_limit = payment_method_redisplay_limit
|
||||
@payment_method_remove = payment_method_remove
|
||||
@payment_method_save = payment_method_save
|
||||
@payment_method_save_usage = payment_method_save_usage
|
||||
end
|
||||
end
|
||||
# Whether the Payment Element is enabled.
|
||||
attr_accessor :enabled
|
||||
# This hash defines whether the Payment Element supports certain features.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(enabled: nil, features: nil)
|
||||
@enabled = enabled
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class PricingTable < Stripe::RequestParams
|
||||
# Whether the pricing table is enabled.
|
||||
attr_accessor :enabled
|
||||
|
||||
def initialize(enabled: nil)
|
||||
@enabled = enabled
|
||||
end
|
||||
end
|
||||
# Configuration for buy button.
|
||||
attr_accessor :buy_button
|
||||
# Configuration for the Payment Element.
|
||||
attr_accessor :payment_element
|
||||
# Configuration for the pricing table.
|
||||
attr_accessor :pricing_table
|
||||
|
||||
def initialize(buy_button: nil, payment_element: nil, pricing_table: nil)
|
||||
@buy_button = buy_button
|
||||
@payment_element = payment_element
|
||||
@pricing_table = pricing_table
|
||||
end
|
||||
end
|
||||
# Configuration for each component. Exactly 1 component must be enabled.
|
||||
attr_accessor :components
|
||||
# The ID of an existing customer for which to create the Customer Session.
|
||||
attr_accessor :customer
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(components: nil, customer: nil, expand: nil)
|
||||
@components = components
|
||||
@customer = customer
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`.
|
||||
#
|
||||
# The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret.
|
||||
attr_reader :client_secret
|
||||
# Configuration for the components supported by this Customer Session.
|
||||
attr_reader :components
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The Customer the Customer Session was created for.
|
||||
attr_reader :customer
|
||||
# The timestamp at which this Customer Session will expire.
|
||||
attr_reader :expires_at
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
# Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -11,5 +11,34 @@ module Stripe
|
||||
def self.object_name
|
||||
"discount"
|
||||
end
|
||||
|
||||
# The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
|
||||
attr_reader :checkout_session
|
||||
# A coupon contains information about a percent-off or amount-off discount you
|
||||
# might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices),
|
||||
# [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents).
|
||||
attr_reader :coupon
|
||||
# The ID of the customer associated with this discount.
|
||||
attr_reader :customer
|
||||
# If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null.
|
||||
attr_reader :end
|
||||
# The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array.
|
||||
attr_reader :id
|
||||
# The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice.
|
||||
attr_reader :invoice
|
||||
# The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item.
|
||||
attr_reader :invoice_item
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The promotion code applied to create this discount.
|
||||
attr_reader :promotion_code
|
||||
# Date that the coupon was applied.
|
||||
attr_reader :start
|
||||
# The subscription that this coupon is applied to, if it is applied to a particular subscription.
|
||||
attr_reader :subscription
|
||||
# The subscription item that this coupon is applied to, if it is applied to a particular subscription item.
|
||||
attr_reader :subscription_item
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
end
|
||||
end
|
||||
|
@ -16,6 +16,625 @@ module Stripe
|
||||
"dispute"
|
||||
end
|
||||
|
||||
class Evidence < Stripe::StripeObject
|
||||
class EnhancedEvidence < Stripe::StripeObject
|
||||
class VisaCompellingEvidence3 < Stripe::StripeObject
|
||||
class DisputedTransaction < Stripe::StripeObject
|
||||
class ShippingAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# User Account ID used to log into business platform. Must be recognizable by the user.
|
||||
attr_reader :customer_account_id
|
||||
# Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
|
||||
attr_reader :customer_device_fingerprint
|
||||
# Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
|
||||
attr_reader :customer_device_id
|
||||
# The email address of the customer.
|
||||
attr_reader :customer_email_address
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_reader :customer_purchase_ip
|
||||
# Categorization of disputed payment.
|
||||
attr_reader :merchandise_or_services
|
||||
# A description of the product or service that was sold.
|
||||
attr_reader :product_description
|
||||
# The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_reader :shipping_address
|
||||
end
|
||||
|
||||
class PriorUndisputedTransaction < Stripe::StripeObject
|
||||
class ShippingAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
|
||||
attr_reader :charge
|
||||
# User Account ID used to log into business platform. Must be recognizable by the user.
|
||||
attr_reader :customer_account_id
|
||||
# Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
|
||||
attr_reader :customer_device_fingerprint
|
||||
# Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
|
||||
attr_reader :customer_device_id
|
||||
# The email address of the customer.
|
||||
attr_reader :customer_email_address
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_reader :customer_purchase_ip
|
||||
# A description of the product or service that was sold.
|
||||
attr_reader :product_description
|
||||
# The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_reader :shipping_address
|
||||
end
|
||||
# Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_reader :disputed_transaction
|
||||
# List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_reader :prior_undisputed_transactions
|
||||
end
|
||||
|
||||
class VisaCompliance < Stripe::StripeObject
|
||||
# A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
|
||||
attr_reader :fee_acknowledged
|
||||
end
|
||||
# Attribute for field visa_compelling_evidence_3
|
||||
attr_reader :visa_compelling_evidence_3
|
||||
# Attribute for field visa_compliance
|
||||
attr_reader :visa_compliance
|
||||
end
|
||||
# Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity.
|
||||
attr_reader :access_activity_log
|
||||
# The billing address provided by the customer.
|
||||
attr_reader :billing_address
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
|
||||
attr_reader :cancellation_policy
|
||||
# An explanation of how and when the customer was shown your refund policy prior to purchase.
|
||||
attr_reader :cancellation_policy_disclosure
|
||||
# A justification for why the customer's subscription was not canceled.
|
||||
attr_reader :cancellation_rebuttal
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
|
||||
attr_reader :customer_communication
|
||||
# The email address of the customer.
|
||||
attr_reader :customer_email_address
|
||||
# The name of the customer.
|
||||
attr_reader :customer_name
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_reader :customer_purchase_ip
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
|
||||
attr_reader :customer_signature
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
|
||||
attr_reader :duplicate_charge_documentation
|
||||
# An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate.
|
||||
attr_reader :duplicate_charge_explanation
|
||||
# The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
|
||||
attr_reader :duplicate_charge_id
|
||||
# Attribute for field enhanced_evidence
|
||||
attr_reader :enhanced_evidence
|
||||
# A description of the product or service that was sold.
|
||||
attr_reader :product_description
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
|
||||
attr_reader :receipt
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
|
||||
attr_reader :refund_policy
|
||||
# Documentation demonstrating that the customer was shown your refund policy prior to purchase.
|
||||
attr_reader :refund_policy_disclosure
|
||||
# A justification for why the customer is not entitled to a refund.
|
||||
attr_reader :refund_refusal_explanation
|
||||
# The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
|
||||
attr_reader :service_date
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
|
||||
attr_reader :service_documentation
|
||||
# The address to which a physical product was shipped. You should try to include as complete address information as possible.
|
||||
attr_reader :shipping_address
|
||||
# The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
|
||||
attr_reader :shipping_carrier
|
||||
# The date on which a physical product began its route to the shipping address, in a clear human-readable format.
|
||||
attr_reader :shipping_date
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
|
||||
attr_reader :shipping_documentation
|
||||
# The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
|
||||
attr_reader :shipping_tracking_number
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
|
||||
attr_reader :uncategorized_file
|
||||
# Any additional evidence or statements.
|
||||
attr_reader :uncategorized_text
|
||||
end
|
||||
|
||||
class EvidenceDetails < Stripe::StripeObject
|
||||
class EnhancedEligibility < Stripe::StripeObject
|
||||
class VisaCompellingEvidence3 < Stripe::StripeObject
|
||||
# List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_reader :required_actions
|
||||
# Visa Compelling Evidence 3.0 eligibility status.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class VisaCompliance < Stripe::StripeObject
|
||||
# Visa compliance eligibility status.
|
||||
attr_reader :status
|
||||
end
|
||||
# Attribute for field visa_compelling_evidence_3
|
||||
attr_reader :visa_compelling_evidence_3
|
||||
# Attribute for field visa_compliance
|
||||
attr_reader :visa_compliance
|
||||
end
|
||||
# Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute.
|
||||
attr_reader :due_by
|
||||
# Attribute for field enhanced_eligibility
|
||||
attr_reader :enhanced_eligibility
|
||||
# Whether evidence has been staged for this dispute.
|
||||
attr_reader :has_evidence
|
||||
# Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed.
|
||||
attr_reader :past_due
|
||||
# The number of times evidence has been submitted. Typically, you may only submit evidence once.
|
||||
attr_reader :submission_count
|
||||
end
|
||||
|
||||
class PaymentMethodDetails < Stripe::StripeObject
|
||||
class AmazonPay < Stripe::StripeObject
|
||||
# The AmazonPay dispute type, chargeback or claim
|
||||
attr_reader :dispute_type
|
||||
end
|
||||
|
||||
class Card < Stripe::StripeObject
|
||||
# Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`.
|
||||
attr_reader :brand
|
||||
# The type of dispute opened. Different case types may have varying fees and financial impact.
|
||||
attr_reader :case_type
|
||||
# The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network.
|
||||
attr_reader :network_reason_code
|
||||
end
|
||||
|
||||
class Klarna < Stripe::StripeObject
|
||||
# The reason for the dispute as defined by Klarna
|
||||
attr_reader :reason_code
|
||||
end
|
||||
|
||||
class Paypal < Stripe::StripeObject
|
||||
# The ID of the dispute in PayPal.
|
||||
attr_reader :case_id
|
||||
# The reason for the dispute as defined by PayPal
|
||||
attr_reader :reason_code
|
||||
end
|
||||
# Attribute for field amazon_pay
|
||||
attr_reader :amazon_pay
|
||||
# Attribute for field card
|
||||
attr_reader :card
|
||||
# Attribute for field klarna
|
||||
attr_reader :klarna
|
||||
# Attribute for field paypal
|
||||
attr_reader :paypal
|
||||
# Payment method type.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return disputes associated to the charge specified by this charge ID.
|
||||
attr_accessor :charge
|
||||
# Only return disputes that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID.
|
||||
attr_accessor :payment_intent
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
charge: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
payment_intent: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@charge = charge
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@payment_intent = payment_intent
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Evidence < Stripe::RequestParams
|
||||
class EnhancedEvidence < Stripe::RequestParams
|
||||
class VisaCompellingEvidence3 < Stripe::RequestParams
|
||||
class DisputedTransaction < Stripe::RequestParams
|
||||
class ShippingAddress < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# User Account ID used to log into business platform. Must be recognizable by the user.
|
||||
attr_accessor :customer_account_id
|
||||
# Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
|
||||
attr_accessor :customer_device_fingerprint
|
||||
# Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
|
||||
attr_accessor :customer_device_id
|
||||
# The email address of the customer.
|
||||
attr_accessor :customer_email_address
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_accessor :customer_purchase_ip
|
||||
# Categorization of disputed payment.
|
||||
attr_accessor :merchandise_or_services
|
||||
# A description of the product or service that was sold.
|
||||
attr_accessor :product_description
|
||||
# The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_accessor :shipping_address
|
||||
|
||||
def initialize(
|
||||
customer_account_id: nil,
|
||||
customer_device_fingerprint: nil,
|
||||
customer_device_id: nil,
|
||||
customer_email_address: nil,
|
||||
customer_purchase_ip: nil,
|
||||
merchandise_or_services: nil,
|
||||
product_description: nil,
|
||||
shipping_address: nil
|
||||
)
|
||||
@customer_account_id = customer_account_id
|
||||
@customer_device_fingerprint = customer_device_fingerprint
|
||||
@customer_device_id = customer_device_id
|
||||
@customer_email_address = customer_email_address
|
||||
@customer_purchase_ip = customer_purchase_ip
|
||||
@merchandise_or_services = merchandise_or_services
|
||||
@product_description = product_description
|
||||
@shipping_address = shipping_address
|
||||
end
|
||||
end
|
||||
|
||||
class PriorUndisputedTransaction < Stripe::RequestParams
|
||||
class ShippingAddress < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge.
|
||||
attr_accessor :charge
|
||||
# User Account ID used to log into business platform. Must be recognizable by the user.
|
||||
attr_accessor :customer_account_id
|
||||
# Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters.
|
||||
attr_accessor :customer_device_fingerprint
|
||||
# Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters.
|
||||
attr_accessor :customer_device_id
|
||||
# The email address of the customer.
|
||||
attr_accessor :customer_email_address
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_accessor :customer_purchase_ip
|
||||
# A description of the product or service that was sold.
|
||||
attr_accessor :product_description
|
||||
# The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_accessor :shipping_address
|
||||
|
||||
def initialize(
|
||||
charge: nil,
|
||||
customer_account_id: nil,
|
||||
customer_device_fingerprint: nil,
|
||||
customer_device_id: nil,
|
||||
customer_email_address: nil,
|
||||
customer_purchase_ip: nil,
|
||||
product_description: nil,
|
||||
shipping_address: nil
|
||||
)
|
||||
@charge = charge
|
||||
@customer_account_id = customer_account_id
|
||||
@customer_device_fingerprint = customer_device_fingerprint
|
||||
@customer_device_id = customer_device_id
|
||||
@customer_email_address = customer_email_address
|
||||
@customer_purchase_ip = customer_purchase_ip
|
||||
@product_description = product_description
|
||||
@shipping_address = shipping_address
|
||||
end
|
||||
end
|
||||
# Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_accessor :disputed_transaction
|
||||
# List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_accessor :prior_undisputed_transactions
|
||||
|
||||
def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil)
|
||||
@disputed_transaction = disputed_transaction
|
||||
@prior_undisputed_transactions = prior_undisputed_transactions
|
||||
end
|
||||
end
|
||||
|
||||
class VisaCompliance < Stripe::RequestParams
|
||||
# A field acknowledging the fee incurred when countering a Visa compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute. Stripe collects a 500 USD (or local equivalent) amount to cover the network costs associated with resolving compliance disputes. Stripe refunds the 500 USD network fee if you win the dispute.
|
||||
attr_accessor :fee_acknowledged
|
||||
|
||||
def initialize(fee_acknowledged: nil)
|
||||
@fee_acknowledged = fee_acknowledged
|
||||
end
|
||||
end
|
||||
# Evidence provided for Visa Compelling Evidence 3.0 evidence submission.
|
||||
attr_accessor :visa_compelling_evidence_3
|
||||
# Evidence provided for Visa compliance evidence submission.
|
||||
attr_accessor :visa_compliance
|
||||
|
||||
def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil)
|
||||
@visa_compelling_evidence_3 = visa_compelling_evidence_3
|
||||
@visa_compliance = visa_compliance
|
||||
end
|
||||
end
|
||||
# Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000.
|
||||
attr_accessor :access_activity_log
|
||||
# The billing address provided by the customer.
|
||||
attr_accessor :billing_address
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer.
|
||||
attr_accessor :cancellation_policy
|
||||
# An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
|
||||
attr_accessor :cancellation_policy_disclosure
|
||||
# A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000.
|
||||
attr_accessor :cancellation_rebuttal
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service.
|
||||
attr_accessor :customer_communication
|
||||
# The email address of the customer.
|
||||
attr_accessor :customer_email_address
|
||||
# The name of the customer.
|
||||
attr_accessor :customer_name
|
||||
# The IP address that the customer used when making the purchase.
|
||||
attr_accessor :customer_purchase_ip
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature.
|
||||
attr_accessor :customer_signature
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate.
|
||||
attr_accessor :duplicate_charge_documentation
|
||||
# An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000.
|
||||
attr_accessor :duplicate_charge_explanation
|
||||
# The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge.
|
||||
attr_accessor :duplicate_charge_id
|
||||
# Additional evidence for qualifying evidence programs.
|
||||
attr_accessor :enhanced_evidence
|
||||
# A description of the product or service that was sold. Has a maximum character count of 20,000.
|
||||
attr_accessor :product_description
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge.
|
||||
attr_accessor :receipt
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer.
|
||||
attr_accessor :refund_policy
|
||||
# Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000.
|
||||
attr_accessor :refund_policy_disclosure
|
||||
# A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000.
|
||||
attr_accessor :refund_refusal_explanation
|
||||
# The date on which the customer received or began receiving the purchased service, in a clear human-readable format.
|
||||
attr_accessor :service_date
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement.
|
||||
attr_accessor :service_documentation
|
||||
# The address to which a physical product was shipped. You should try to include as complete address information as possible.
|
||||
attr_accessor :shipping_address
|
||||
# The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas.
|
||||
attr_accessor :shipping_carrier
|
||||
# The date on which a physical product began its route to the shipping address, in a clear human-readable format.
|
||||
attr_accessor :shipping_date
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible.
|
||||
attr_accessor :shipping_documentation
|
||||
# The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas.
|
||||
attr_accessor :shipping_tracking_number
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements.
|
||||
attr_accessor :uncategorized_file
|
||||
# Any additional evidence or statements. Has a maximum character count of 20,000.
|
||||
attr_accessor :uncategorized_text
|
||||
|
||||
def initialize(
|
||||
access_activity_log: nil,
|
||||
billing_address: nil,
|
||||
cancellation_policy: nil,
|
||||
cancellation_policy_disclosure: nil,
|
||||
cancellation_rebuttal: nil,
|
||||
customer_communication: nil,
|
||||
customer_email_address: nil,
|
||||
customer_name: nil,
|
||||
customer_purchase_ip: nil,
|
||||
customer_signature: nil,
|
||||
duplicate_charge_documentation: nil,
|
||||
duplicate_charge_explanation: nil,
|
||||
duplicate_charge_id: nil,
|
||||
enhanced_evidence: nil,
|
||||
product_description: nil,
|
||||
receipt: nil,
|
||||
refund_policy: nil,
|
||||
refund_policy_disclosure: nil,
|
||||
refund_refusal_explanation: nil,
|
||||
service_date: nil,
|
||||
service_documentation: nil,
|
||||
shipping_address: nil,
|
||||
shipping_carrier: nil,
|
||||
shipping_date: nil,
|
||||
shipping_documentation: nil,
|
||||
shipping_tracking_number: nil,
|
||||
uncategorized_file: nil,
|
||||
uncategorized_text: nil
|
||||
)
|
||||
@access_activity_log = access_activity_log
|
||||
@billing_address = billing_address
|
||||
@cancellation_policy = cancellation_policy
|
||||
@cancellation_policy_disclosure = cancellation_policy_disclosure
|
||||
@cancellation_rebuttal = cancellation_rebuttal
|
||||
@customer_communication = customer_communication
|
||||
@customer_email_address = customer_email_address
|
||||
@customer_name = customer_name
|
||||
@customer_purchase_ip = customer_purchase_ip
|
||||
@customer_signature = customer_signature
|
||||
@duplicate_charge_documentation = duplicate_charge_documentation
|
||||
@duplicate_charge_explanation = duplicate_charge_explanation
|
||||
@duplicate_charge_id = duplicate_charge_id
|
||||
@enhanced_evidence = enhanced_evidence
|
||||
@product_description = product_description
|
||||
@receipt = receipt
|
||||
@refund_policy = refund_policy
|
||||
@refund_policy_disclosure = refund_policy_disclosure
|
||||
@refund_refusal_explanation = refund_refusal_explanation
|
||||
@service_date = service_date
|
||||
@service_documentation = service_documentation
|
||||
@shipping_address = shipping_address
|
||||
@shipping_carrier = shipping_carrier
|
||||
@shipping_date = shipping_date
|
||||
@shipping_documentation = shipping_documentation
|
||||
@shipping_tracking_number = shipping_tracking_number
|
||||
@uncategorized_file = uncategorized_file
|
||||
@uncategorized_text = uncategorized_text
|
||||
end
|
||||
end
|
||||
# Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000.
|
||||
attr_accessor :evidence
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default).
|
||||
attr_accessor :submit
|
||||
|
||||
def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil)
|
||||
@evidence = evidence
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@submit = submit
|
||||
end
|
||||
end
|
||||
|
||||
class CloseParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
|
||||
attr_reader :amount
|
||||
# List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
|
||||
attr_reader :balance_transactions
|
||||
# ID of the charge that's disputed.
|
||||
attr_reader :charge
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# List of eligibility types that are included in `enhanced_evidence`.
|
||||
attr_reader :enhanced_eligibility_types
|
||||
# Attribute for field evidence
|
||||
attr_reader :evidence
|
||||
# Attribute for field evidence_details
|
||||
attr_reader :evidence_details
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
|
||||
attr_reader :is_charge_refundable
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Network-dependent reason code for the dispute.
|
||||
attr_reader :network_reason_code
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# ID of the PaymentIntent that's disputed.
|
||||
attr_reader :payment_intent
|
||||
# Attribute for field payment_method_details
|
||||
attr_reader :payment_method_details
|
||||
# Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories).
|
||||
attr_reader :reason
|
||||
# Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`.
|
||||
attr_reader :status
|
||||
|
||||
# Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.
|
||||
#
|
||||
# The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.
|
||||
|
@ -12,6 +12,52 @@ module Stripe
|
||||
"entitlements.active_entitlement"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# The ID of the customer.
|
||||
attr_accessor :customer
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
customer: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@customer = customer
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to.
|
||||
attr_reader :feature
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# A unique key you provide as your own system identifier. This may be up to 80 characters.
|
||||
attr_reader :lookup_key
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
# Retrieve a list of active entitlements for a customer
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -0,0 +1,23 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Entitlements
|
||||
# A summary of a customer's active entitlements.
|
||||
class ActiveEntitlementSummary < APIResource
|
||||
OBJECT_NAME = "entitlements.active_entitlement_summary"
|
||||
def self.object_name
|
||||
"entitlements.active_entitlement_summary"
|
||||
end
|
||||
|
||||
# The customer that is entitled to this feature.
|
||||
attr_reader :customer
|
||||
# The list of entitlements this customer has.
|
||||
attr_reader :entitlements
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
end
|
||||
end
|
||||
end
|
@ -15,6 +15,96 @@ module Stripe
|
||||
"entitlements.feature"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# If set, filter results to only include features with the given archive status.
|
||||
attr_accessor :archived
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# If set, filter results to only include features with the given lookup_key.
|
||||
attr_accessor :lookup_key
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
archived: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
lookup_key: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@archived = archived
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@lookup_key = lookup_key
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A unique key you provide as your own system identifier. This may be up to 80 characters.
|
||||
attr_accessor :lookup_key
|
||||
# Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_accessor :metadata
|
||||
# The feature's name, for your own purpose, not meant to be displayable to the customer.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil)
|
||||
@expand = expand
|
||||
@lookup_key = lookup_key
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
|
||||
attr_accessor :active
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_accessor :metadata
|
||||
# The feature's name, for your own purpose, not meant to be displayable to the customer.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(active: nil, expand: nil, metadata: nil, name: nil)
|
||||
@active = active
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
# Inactive features cannot be attached to new products and will not be returned from the features list endpoint.
|
||||
attr_reader :active
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# A unique key you provide as your own system identifier. This may be up to 80 characters.
|
||||
attr_reader :lookup_key
|
||||
# Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The feature's name, for your own purpose, not meant to be displayable to the customer.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
# Creates a feature
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -11,6 +11,27 @@ module Stripe
|
||||
"ephemeral_key"
|
||||
end
|
||||
|
||||
class DeleteParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Time at which the key will expire. Measured in seconds since the Unix epoch.
|
||||
attr_reader :expires
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The key's secret. You can use this value to make authorized requests to the Stripe API.
|
||||
attr_reader :secret
|
||||
|
||||
# Invalidates a short-lived API key for a given resource.
|
||||
def self.delete(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -40,6 +40,136 @@ module Stripe
|
||||
"event"
|
||||
end
|
||||
|
||||
class Data < Stripe::StripeObject
|
||||
# Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key.
|
||||
attr_reader :object
|
||||
# Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements.
|
||||
attr_reader :previous_attributes
|
||||
end
|
||||
|
||||
class Reason < Stripe::StripeObject
|
||||
class AutomationAction < Stripe::StripeObject
|
||||
class StripeSendWebhookCustomEvent < Stripe::StripeObject
|
||||
# Set of key-value pairs attached to the action when creating an Automation.
|
||||
attr_reader :custom_data
|
||||
end
|
||||
# Attribute for field stripe_send_webhook_custom_event
|
||||
attr_reader :stripe_send_webhook_custom_event
|
||||
# The trigger name of the automation that triggered this action.
|
||||
# Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names.
|
||||
attr_reader :trigger
|
||||
# The type of the `automation_action`.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Request < Stripe::StripeObject
|
||||
# ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
|
||||
attr_reader :id
|
||||
# The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
|
||||
attr_reader :idempotency_key
|
||||
end
|
||||
# Attribute for field automation_action
|
||||
attr_reader :automation_action
|
||||
# Attribute for field request
|
||||
attr_reader :request
|
||||
# The type of the reason for the event.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Request < Stripe::StripeObject
|
||||
# ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API.
|
||||
attr_reader :id
|
||||
# The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*.
|
||||
attr_reader :idempotency_key
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return events that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned.
|
||||
attr_accessor :delivery_success
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property.
|
||||
attr_accessor :type
|
||||
# An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both.
|
||||
attr_accessor :types
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
delivery_success: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
type: nil,
|
||||
types: nil
|
||||
)
|
||||
@created = created
|
||||
@delivery_success = delivery_success
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@type = type
|
||||
@types = types
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The connected account that originates the event.
|
||||
attr_reader :account
|
||||
# The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014.
|
||||
attr_reader :api_version
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Attribute for field data
|
||||
attr_reader :data
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify.
|
||||
attr_reader :pending_webhooks
|
||||
# Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action.
|
||||
attr_reader :reason
|
||||
# Information on the API request that triggers the event.
|
||||
attr_reader :request
|
||||
# Description of the event (for example, `invoice.created` or `charge.refunded`).
|
||||
attr_reader :type
|
||||
|
||||
# List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header).
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts)
|
||||
|
@ -36,6 +36,39 @@ module Stripe
|
||||
"exchange_rate"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency.
|
||||
attr_reader :rates
|
||||
|
||||
# Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/exchange_rates", params: params, opts: opts)
|
||||
|
@ -18,6 +18,117 @@ module Stripe
|
||||
"file"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return files that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files.
|
||||
attr_accessor :purpose
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
purpose: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@purpose = purpose
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class FileLinkData < Stripe::RequestParams
|
||||
# Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
|
||||
attr_accessor :create
|
||||
# The link isn't available after this future timestamp.
|
||||
attr_accessor :expires_at
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(create: nil, expires_at: nil, metadata: nil)
|
||||
@create = create
|
||||
@expires_at = expires_at
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol.
|
||||
attr_accessor :file
|
||||
# Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file.
|
||||
attr_accessor :file_link_data
|
||||
# The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
|
||||
attr_accessor :purpose
|
||||
|
||||
def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil)
|
||||
@expand = expand
|
||||
@file = file
|
||||
@file_link_data = file_link_data
|
||||
@purpose = purpose
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The file expires and isn't available at this time in epoch seconds.
|
||||
attr_reader :expires_at
|
||||
# The suitable name for saving the file to a filesystem.
|
||||
attr_reader :filename
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# A list of [file links](https://stripe.com/docs/api#file_links) that point at this file.
|
||||
attr_reader :links
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file.
|
||||
attr_reader :purpose
|
||||
# The size of the file object in bytes.
|
||||
attr_reader :size
|
||||
# A suitable title for the document.
|
||||
attr_reader :title
|
||||
# The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`).
|
||||
attr_reader :type
|
||||
# Use your live secret API key to download the file from this URL.
|
||||
attr_reader :url
|
||||
|
||||
# To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file.
|
||||
#
|
||||
# All of Stripe's officially supported Client libraries support sending multipart/form-data.
|
||||
|
@ -15,6 +15,118 @@ module Stripe
|
||||
"file_link"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return links that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Filter links by their expiration status. By default, Stripe returns all links.
|
||||
attr_accessor :expired
|
||||
# Only return links for the given file.
|
||||
attr_accessor :file
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
expired: nil,
|
||||
file: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@expired = expired
|
||||
@file = file
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The link isn't usable after this future timestamp.
|
||||
attr_accessor :expires_at
|
||||
# The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`.
|
||||
attr_accessor :file
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@expires_at = expires_at
|
||||
@file = file
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately.
|
||||
attr_accessor :expires_at
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, expires_at: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@expires_at = expires_at
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Returns if the link is already expired.
|
||||
attr_reader :expired
|
||||
# Time that the link expires.
|
||||
attr_reader :expires_at
|
||||
# The file object this link points to.
|
||||
attr_reader :file
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The publicly accessible URL to download the file.
|
||||
attr_reader :url
|
||||
|
||||
# Creates a new file link object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/file_links", params: params, opts: opts)
|
||||
|
@ -6,12 +6,272 @@ module Stripe
|
||||
# A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access.
|
||||
class Account < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
extend Stripe::APIOperations::NestedResource
|
||||
|
||||
OBJECT_NAME = "financial_connections.account"
|
||||
def self.object_name
|
||||
"financial_connections.account"
|
||||
end
|
||||
|
||||
nested_resource_class_methods :inferred_balance, operations: %i[list]
|
||||
|
||||
class AccountHolder < Stripe::StripeObject
|
||||
# The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
|
||||
attr_reader :account
|
||||
# ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
|
||||
attr_reader :customer
|
||||
# Type of account holder that this account belongs to.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Balance < Stripe::StripeObject
|
||||
class Cash < Stripe::StripeObject
|
||||
# The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions.
|
||||
#
|
||||
# Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
|
||||
#
|
||||
# Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
|
||||
attr_reader :available
|
||||
end
|
||||
|
||||
class Credit < Stripe::StripeObject
|
||||
# The credit that has been used by the account holder.
|
||||
#
|
||||
# Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
|
||||
#
|
||||
# Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
|
||||
attr_reader :used
|
||||
end
|
||||
# The time that the external institution calculated this balance. Measured in seconds since the Unix epoch.
|
||||
attr_reader :as_of
|
||||
# Attribute for field cash
|
||||
attr_reader :cash
|
||||
# Attribute for field credit
|
||||
attr_reader :credit
|
||||
# The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
|
||||
#
|
||||
# Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
|
||||
#
|
||||
# Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
|
||||
attr_reader :current
|
||||
# The `type` of the balance. An additional hash is included on the balance with a name matching this value.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class BalanceRefresh < Stripe::StripeObject
|
||||
# The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :last_attempted_at
|
||||
# Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
|
||||
attr_reader :next_refresh_available_at
|
||||
# The status of the last refresh attempt.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class InferredBalancesRefresh < Stripe::StripeObject
|
||||
# The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :last_attempted_at
|
||||
# Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
|
||||
attr_reader :next_refresh_available_at
|
||||
# The status of the last refresh attempt.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class OwnershipRefresh < Stripe::StripeObject
|
||||
# The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :last_attempted_at
|
||||
# Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
|
||||
attr_reader :next_refresh_available_at
|
||||
# The status of the last refresh attempt.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class TransactionRefresh < Stripe::StripeObject
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :last_attempted_at
|
||||
# Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch.
|
||||
attr_reader :next_refresh_available_at
|
||||
# The status of the last refresh attempt.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class AccountHolder < Stripe::RequestParams
|
||||
# The ID of the Stripe account whose accounts will be retrieved.
|
||||
attr_accessor :account
|
||||
# The ID of the Stripe customer whose accounts will be retrieved.
|
||||
attr_accessor :customer
|
||||
|
||||
def initialize(account: nil, customer: nil)
|
||||
@account = account
|
||||
@customer = customer
|
||||
end
|
||||
end
|
||||
# If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive.
|
||||
attr_accessor :account_holder
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# If present, only return accounts that were collected as part of the given session.
|
||||
attr_accessor :session
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
account_holder: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
session: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@account_holder = account_holder
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@session = session
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ListOwnersParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# The ID of the ownership object to fetch owners from.
|
||||
attr_accessor :ownership
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
ownership: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@ownership = ownership
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class DisconnectParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class RefreshAccountParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The list of account features that you would like to refresh.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(expand: nil, features: nil)
|
||||
@expand = expand
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class SubscribeParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The list of account features to which you would like to subscribe.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(expand: nil, features: nil)
|
||||
@expand = expand
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
|
||||
class UnsubscribeParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The list of account features from which you would like to unsubscribe.
|
||||
attr_accessor :features
|
||||
|
||||
def initialize(expand: nil, features: nil)
|
||||
@expand = expand
|
||||
@features = features
|
||||
end
|
||||
end
|
||||
# The account holder that this account belongs to.
|
||||
attr_reader :account_holder
|
||||
# The most recent information about the account's balance.
|
||||
attr_reader :balance
|
||||
# The state of the most recent attempt to refresh the account balance.
|
||||
attr_reader :balance_refresh
|
||||
# The type of the account. Account category is further divided in `subcategory`.
|
||||
attr_reader :category
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# A human-readable name that has been assigned to this account, either by the account holder or by the institution.
|
||||
attr_reader :display_name
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The state of the most recent attempt to refresh the account's inferred balance history.
|
||||
attr_reader :inferred_balances_refresh
|
||||
# The name of the institution that holds this account.
|
||||
attr_reader :institution_name
|
||||
# The last 4 digits of the account number. If present, this will be 4 numeric characters.
|
||||
attr_reader :last4
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The most recent information about the account's owners.
|
||||
attr_reader :ownership
|
||||
# The state of the most recent attempt to refresh the account owners.
|
||||
attr_reader :ownership_refresh
|
||||
# The list of permissions granted by this account.
|
||||
attr_reader :permissions
|
||||
# The status of the link to the account.
|
||||
attr_reader :status
|
||||
# If `category` is `cash`, one of:
|
||||
#
|
||||
# - `checking`
|
||||
# - `savings`
|
||||
# - `other`
|
||||
#
|
||||
# If `category` is `credit`, one of:
|
||||
#
|
||||
# - `mortgage`
|
||||
# - `line_of_credit`
|
||||
# - `credit_card`
|
||||
# - `other`
|
||||
#
|
||||
# If `category` is `investment` or `other`, this will be `other`.
|
||||
attr_reader :subcategory
|
||||
# The list of data refresh subscriptions requested on this account.
|
||||
attr_reader :subscriptions
|
||||
# The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account.
|
||||
attr_reader :supported_payment_method_types
|
||||
# The state of the most recent attempt to refresh the account transactions.
|
||||
attr_reader :transaction_refresh
|
||||
|
||||
# Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).
|
||||
def disconnect(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -0,0 +1,27 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module FinancialConnections
|
||||
# A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data.
|
||||
class AccountInferredBalance < APIResource
|
||||
OBJECT_NAME = "financial_connections.account_inferred_balance"
|
||||
def self.object_name
|
||||
"financial_connections.account_inferred_balance"
|
||||
end
|
||||
|
||||
# The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC.
|
||||
attr_reader :as_of
|
||||
# The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions.
|
||||
#
|
||||
# Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase.
|
||||
#
|
||||
# Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder.
|
||||
attr_reader :current
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
end
|
||||
end
|
||||
end
|
@ -9,6 +9,23 @@ module Stripe
|
||||
def self.object_name
|
||||
"financial_connections.account_owner"
|
||||
end
|
||||
|
||||
# The email address of the owner.
|
||||
attr_reader :email
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The full name of the owner.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The ownership object that this owner belongs to.
|
||||
attr_reader :ownership
|
||||
# The raw phone number of the owner.
|
||||
attr_reader :phone
|
||||
# The raw physical address of the owner.
|
||||
attr_reader :raw_address
|
||||
# The timestamp of the refresh that updated this owner.
|
||||
attr_reader :refreshed_at
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -9,6 +9,15 @@ module Stripe
|
||||
def self.object_name
|
||||
"financial_connections.account_ownership"
|
||||
end
|
||||
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# A paginated list of owners for this account.
|
||||
attr_reader :owners
|
||||
end
|
||||
end
|
||||
end
|
||||
|
99
lib/stripe/resources/financial_connections/institution.rb
Normal file
99
lib/stripe/resources/financial_connections/institution.rb
Normal file
@ -0,0 +1,99 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module FinancialConnections
|
||||
# An institution represents a financial institution to which an end user can connect using the Financial Connections authentication flow.
|
||||
class Institution < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "financial_connections.institution"
|
||||
def self.object_name
|
||||
"financial_connections.institution"
|
||||
end
|
||||
|
||||
class Features < Stripe::StripeObject
|
||||
class Balances < Stripe::StripeObject
|
||||
# Whether the given feature is supported by this institution.
|
||||
attr_reader :supported
|
||||
end
|
||||
|
||||
class Ownership < Stripe::StripeObject
|
||||
# Whether the given feature is supported by this institution.
|
||||
attr_reader :supported
|
||||
end
|
||||
|
||||
class PaymentMethod < Stripe::StripeObject
|
||||
# Whether the given feature is supported by this institution.
|
||||
attr_reader :supported
|
||||
end
|
||||
|
||||
class Transactions < Stripe::StripeObject
|
||||
# Whether the given feature is supported by this institution.
|
||||
attr_reader :supported
|
||||
end
|
||||
# Attribute for field balances
|
||||
attr_reader :balances
|
||||
# Attribute for field ownership
|
||||
attr_reader :ownership
|
||||
# Attribute for field payment_method
|
||||
attr_reader :payment_method
|
||||
# Attribute for field transactions
|
||||
attr_reader :transactions
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The name of this institution.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions.
|
||||
attr_reader :routing_numbers
|
||||
# The status of this institution in the Financial Connections authentication flow.
|
||||
attr_reader :status
|
||||
# A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution.
|
||||
attr_reader :url
|
||||
|
||||
# Returns a list of Financial Connections Institution objects.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/financial_connections/institutions",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -12,6 +12,165 @@ module Stripe
|
||||
"financial_connections.session"
|
||||
end
|
||||
|
||||
class AccountHolder < Stripe::StripeObject
|
||||
# The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`.
|
||||
attr_reader :account
|
||||
# ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`.
|
||||
attr_reader :customer
|
||||
# Type of account holder that this account belongs to.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Filters < Stripe::StripeObject
|
||||
# Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
|
||||
attr_reader :account_subcategories
|
||||
# List of countries from which to filter accounts.
|
||||
attr_reader :countries
|
||||
# Stripe ID of the institution with which the customer should be directed to log in.
|
||||
attr_reader :institution
|
||||
end
|
||||
|
||||
class Limits < Stripe::StripeObject
|
||||
# The number of accounts that can be linked in this Session.
|
||||
attr_reader :accounts
|
||||
end
|
||||
|
||||
class ManualEntry < Stripe::StripeObject; end
|
||||
|
||||
class StatusDetails < Stripe::StripeObject
|
||||
class Cancelled < Stripe::StripeObject
|
||||
# The reason for the Session being cancelled.
|
||||
attr_reader :reason
|
||||
end
|
||||
# Attribute for field cancelled
|
||||
attr_reader :cancelled
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class AccountHolder < Stripe::RequestParams
|
||||
# The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`.
|
||||
attr_accessor :account
|
||||
# The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`.
|
||||
attr_accessor :customer
|
||||
# Type of account holder to collect accounts for.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(account: nil, customer: nil, type: nil)
|
||||
@account = account
|
||||
@customer = customer
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class Filters < Stripe::RequestParams
|
||||
# Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`.
|
||||
attr_accessor :account_subcategories
|
||||
# List of countries from which to collect accounts.
|
||||
attr_accessor :countries
|
||||
# Stripe ID of the institution with which the customer should be directed to log in.
|
||||
attr_accessor :institution
|
||||
|
||||
def initialize(account_subcategories: nil, countries: nil, institution: nil)
|
||||
@account_subcategories = account_subcategories
|
||||
@countries = countries
|
||||
@institution = institution
|
||||
end
|
||||
end
|
||||
|
||||
class Limits < Stripe::RequestParams
|
||||
# The number of accounts that can be linked in this Session.
|
||||
attr_accessor :accounts
|
||||
|
||||
def initialize(accounts: nil)
|
||||
@accounts = accounts
|
||||
end
|
||||
end
|
||||
|
||||
class ManualEntry < Stripe::RequestParams
|
||||
# Whether manual entry will be handled by Stripe during the Session.
|
||||
attr_accessor :mode
|
||||
|
||||
def initialize(mode: nil)
|
||||
@mode = mode
|
||||
end
|
||||
end
|
||||
# The account holder to link accounts for.
|
||||
attr_accessor :account_holder
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Filters to restrict the kinds of accounts to collect.
|
||||
attr_accessor :filters
|
||||
# Settings for configuring Session-specific limits.
|
||||
attr_accessor :limits
|
||||
# Settings for configuring manual entry of account details for this Session.
|
||||
attr_accessor :manual_entry
|
||||
# List of data features that you would like to request access to.
|
||||
#
|
||||
# Possible values are `balances`, `transactions`, `ownership`, and `payment_method`.
|
||||
attr_accessor :permissions
|
||||
# List of data features that you would like to retrieve upon account creation.
|
||||
attr_accessor :prefetch
|
||||
# For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
||||
attr_accessor :return_url
|
||||
|
||||
def initialize(
|
||||
account_holder: nil,
|
||||
expand: nil,
|
||||
filters: nil,
|
||||
limits: nil,
|
||||
manual_entry: nil,
|
||||
permissions: nil,
|
||||
prefetch: nil,
|
||||
return_url: nil
|
||||
)
|
||||
@account_holder = account_holder
|
||||
@expand = expand
|
||||
@filters = filters
|
||||
@limits = limits
|
||||
@manual_entry = manual_entry
|
||||
@permissions = permissions
|
||||
@prefetch = prefetch
|
||||
@return_url = return_url
|
||||
end
|
||||
end
|
||||
# The account holder for whom accounts are collected in this session.
|
||||
attr_reader :account_holder
|
||||
# The accounts that were collected as part of this Session.
|
||||
attr_reader :accounts
|
||||
# A value that will be passed to the client to launch the authentication flow.
|
||||
attr_reader :client_secret
|
||||
# Attribute for field filters
|
||||
attr_reader :filters
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Attribute for field limits
|
||||
attr_reader :limits
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Attribute for field manual_entry
|
||||
attr_reader :manual_entry
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Permissions requested for accounts collected during this session.
|
||||
attr_reader :permissions
|
||||
# Data features requested to be retrieved upon account creation.
|
||||
attr_reader :prefetch
|
||||
# For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app.
|
||||
attr_reader :return_url
|
||||
# The current state of the session.
|
||||
attr_reader :status
|
||||
# Attribute for field status_details
|
||||
attr_reader :status_details
|
||||
|
||||
# To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -12,6 +12,107 @@ module Stripe
|
||||
"financial_connections.transaction"
|
||||
end
|
||||
|
||||
class StatusTransitions < Stripe::StripeObject
|
||||
# Time at which this transaction posted. Measured in seconds since the Unix epoch.
|
||||
attr_reader :posted_at
|
||||
# Time at which this transaction was voided. Measured in seconds since the Unix epoch.
|
||||
attr_reader :void_at
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class TransactedAt < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
|
||||
class TransactionRefresh < Stripe::RequestParams
|
||||
# Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive).
|
||||
attr_accessor :after
|
||||
|
||||
def initialize(after: nil)
|
||||
@after = after
|
||||
end
|
||||
end
|
||||
# The ID of the Financial Connections Account whose transactions will be retrieved.
|
||||
attr_accessor :account
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options:
|
||||
attr_accessor :transacted_at
|
||||
# A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options:
|
||||
attr_accessor :transaction_refresh
|
||||
|
||||
def initialize(
|
||||
account: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
transacted_at: nil,
|
||||
transaction_refresh: nil
|
||||
)
|
||||
@account = account
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@transacted_at = transacted_at
|
||||
@transaction_refresh = transaction_refresh
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The ID of the Financial Connections Account this transaction belongs to.
|
||||
attr_reader :account
|
||||
# The amount of this transaction, in cents (or local equivalent).
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The description of this transaction.
|
||||
attr_reader :description
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The status of the transaction.
|
||||
attr_reader :status
|
||||
# Attribute for field status_transitions
|
||||
attr_reader :status_transitions
|
||||
# Time at which the transaction was transacted. Measured in seconds since the Unix epoch.
|
||||
attr_reader :transacted_at
|
||||
# The token of the transaction refresh that last updated or created this transaction.
|
||||
attr_reader :transaction_refresh
|
||||
# Time at which the object was last updated. Measured in seconds since the Unix epoch.
|
||||
attr_reader :updated
|
||||
|
||||
# Returns a list of Financial Connections Transaction objects.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -28,6 +28,171 @@ module Stripe
|
||||
"forwarding.request"
|
||||
end
|
||||
|
||||
class RequestContext < Stripe::StripeObject
|
||||
# The time it took in milliseconds for the destination endpoint to respond.
|
||||
attr_reader :destination_duration
|
||||
# The IP address of the destination.
|
||||
attr_reader :destination_ip_address
|
||||
end
|
||||
|
||||
class RequestDetails < Stripe::StripeObject
|
||||
class Header < Stripe::StripeObject
|
||||
# The header name.
|
||||
attr_reader :name
|
||||
# The header value.
|
||||
attr_reader :value
|
||||
end
|
||||
# The body payload to send to the destination endpoint.
|
||||
attr_reader :body
|
||||
# The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
|
||||
attr_reader :headers
|
||||
# The HTTP method used to call the destination endpoint.
|
||||
attr_reader :http_method
|
||||
end
|
||||
|
||||
class ResponseDetails < Stripe::StripeObject
|
||||
class Header < Stripe::StripeObject
|
||||
# The header name.
|
||||
attr_reader :name
|
||||
# The header value.
|
||||
attr_reader :value
|
||||
end
|
||||
# The response body from the destination endpoint to Stripe.
|
||||
attr_reader :body
|
||||
# HTTP headers that the destination endpoint returned.
|
||||
attr_reader :headers
|
||||
# The HTTP status code that the destination endpoint returned.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Return results where the `created` field is greater than this value.
|
||||
attr_accessor :gt
|
||||
# Return results where the `created` field is greater than or equal to this value.
|
||||
attr_accessor :gte
|
||||
# Return results where the `created` field is less than this value.
|
||||
attr_accessor :lt
|
||||
# Return results where the `created` field is less than or equal to this value.
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values.
|
||||
attr_accessor :created
|
||||
# A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Request < Stripe::RequestParams
|
||||
class Header < Stripe::RequestParams
|
||||
# The header name.
|
||||
attr_accessor :name
|
||||
# The header value.
|
||||
attr_accessor :value
|
||||
|
||||
def initialize(name: nil, value: nil)
|
||||
@name = name
|
||||
@value = value
|
||||
end
|
||||
end
|
||||
# The body payload to send to the destination endpoint.
|
||||
attr_accessor :body
|
||||
# The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included.
|
||||
attr_accessor :headers
|
||||
|
||||
def initialize(body: nil, headers: nil)
|
||||
@body = body
|
||||
@headers = headers
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
|
||||
attr_accessor :payment_method
|
||||
# The field kinds to be replaced in the forwarded request.
|
||||
attr_accessor :replacements
|
||||
# The request body and headers to be sent to the destination endpoint.
|
||||
attr_accessor :request
|
||||
# The destination URL for the forwarded request. Must be supported by the config.
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
payment_method: nil,
|
||||
replacements: nil,
|
||||
request: nil,
|
||||
url: nil
|
||||
)
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@payment_method = payment_method
|
||||
@replacements = replacements
|
||||
@request = request
|
||||
@url = url
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed.
|
||||
attr_reader :payment_method
|
||||
# The field kinds to be replaced in the forwarded request.
|
||||
attr_reader :replacements
|
||||
# Context about the request from Stripe's servers to the destination endpoint.
|
||||
attr_reader :request_context
|
||||
# The request that was sent to the destination endpoint. We redact any sensitive fields.
|
||||
attr_reader :request_details
|
||||
# The response that the destination endpoint returned to us. We redact any sensitive fields.
|
||||
attr_reader :response_details
|
||||
# The destination URL for the forwarded request. Must be supported by the config.
|
||||
attr_reader :url
|
||||
|
||||
# Creates a ForwardingRequest object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -13,6 +13,314 @@ module Stripe
|
||||
"funding_instructions"
|
||||
end
|
||||
|
||||
class BankTransfer < Stripe::StripeObject
|
||||
class FinancialAddress < Stripe::StripeObject
|
||||
class Aba < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The account holder name
|
||||
attr_reader :account_holder_name
|
||||
# The ABA account number
|
||||
attr_reader :account_number
|
||||
# The account type
|
||||
attr_reader :account_type
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The bank name
|
||||
attr_reader :bank_name
|
||||
# The ABA routing number
|
||||
attr_reader :routing_number
|
||||
end
|
||||
|
||||
class Iban < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The name of the person or business that owns the bank account
|
||||
attr_reader :account_holder_name
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The BIC/SWIFT code of the account.
|
||||
attr_reader :bic
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# The IBAN of the account.
|
||||
attr_reader :iban
|
||||
end
|
||||
|
||||
class SortCode < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The name of the person or business that owns the bank account
|
||||
attr_reader :account_holder_name
|
||||
# The account number
|
||||
attr_reader :account_number
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The six-digit sort code
|
||||
attr_reader :sort_code
|
||||
end
|
||||
|
||||
class Spei < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The account holder name
|
||||
attr_reader :account_holder_name
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The three-digit bank code
|
||||
attr_reader :bank_code
|
||||
# The short banking institution name
|
||||
attr_reader :bank_name
|
||||
# The CLABE number
|
||||
attr_reader :clabe
|
||||
end
|
||||
|
||||
class Swift < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The account holder name
|
||||
attr_reader :account_holder_name
|
||||
# The account number
|
||||
attr_reader :account_number
|
||||
# The account type
|
||||
attr_reader :account_type
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The bank name
|
||||
attr_reader :bank_name
|
||||
# The SWIFT code
|
||||
attr_reader :swift_code
|
||||
end
|
||||
|
||||
class Zengin < Stripe::StripeObject
|
||||
class AccountHolderAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class BankAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field account_holder_address
|
||||
attr_reader :account_holder_address
|
||||
# The account holder name
|
||||
attr_reader :account_holder_name
|
||||
# The account number
|
||||
attr_reader :account_number
|
||||
# The bank account type. In Japan, this can only be `futsu` or `toza`.
|
||||
attr_reader :account_type
|
||||
# Attribute for field bank_address
|
||||
attr_reader :bank_address
|
||||
# The bank code of the account
|
||||
attr_reader :bank_code
|
||||
# The bank name of the account
|
||||
attr_reader :bank_name
|
||||
# The branch code of the account
|
||||
attr_reader :branch_code
|
||||
# The branch name of the account
|
||||
attr_reader :branch_name
|
||||
end
|
||||
# ABA Records contain U.S. bank account details per the ABA format.
|
||||
attr_reader :aba
|
||||
# Iban Records contain E.U. bank account details per the SEPA format.
|
||||
attr_reader :iban
|
||||
# Sort Code Records contain U.K. bank account details per the sort code format.
|
||||
attr_reader :sort_code
|
||||
# SPEI Records contain Mexico bank account details per the SPEI format.
|
||||
attr_reader :spei
|
||||
# The payment networks supported by this FinancialAddress
|
||||
attr_reader :supported_networks
|
||||
# SWIFT Records contain U.S. bank account details per the SWIFT format.
|
||||
attr_reader :swift
|
||||
# The type of financial address
|
||||
attr_reader :type
|
||||
# Zengin Records contain Japan bank account details per the Zengin format.
|
||||
attr_reader :zengin
|
||||
end
|
||||
# The country of the bank account to fund
|
||||
attr_reader :country
|
||||
# A list of financial addresses that can be used to fund a particular balance
|
||||
attr_reader :financial_addresses
|
||||
# The bank_transfer type
|
||||
attr_reader :type
|
||||
end
|
||||
# Attribute for field bank_transfer
|
||||
attr_reader :bank_transfer
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The `funding_type` of the returned instructions
|
||||
attr_reader :funding_type
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
def resource_url
|
||||
if !respond_to?(:customer) || customer.nil?
|
||||
raise NotImplementedError,
|
||||
|
217
lib/stripe/resources/gift_cards/card.rb
Normal file
217
lib/stripe/resources/gift_cards/card.rb
Normal file
@ -0,0 +1,217 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module GiftCards
|
||||
# A gift card represents a single gift card owned by a customer, including the
|
||||
# remaining balance, gift card code, and whether or not it is active.
|
||||
class Card < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
include Stripe::APIOperations::Save
|
||||
|
||||
OBJECT_NAME = "gift_cards.card"
|
||||
def self.object_name
|
||||
"gift_cards.card"
|
||||
end
|
||||
|
||||
class CreatedBy < Stripe::StripeObject
|
||||
class Checkout < Stripe::StripeObject
|
||||
# The Stripe CheckoutSession that created this object.
|
||||
attr_reader :checkout_session
|
||||
# The Stripe CheckoutSession LineItem that created this object.
|
||||
attr_reader :line_item
|
||||
end
|
||||
|
||||
class Order < Stripe::StripeObject
|
||||
# The Stripe Order LineItem that created this object.
|
||||
attr_reader :line_item
|
||||
# The Stripe Order that created this object.
|
||||
attr_reader :order
|
||||
end
|
||||
|
||||
class Payment < Stripe::StripeObject
|
||||
# The PaymentIntent that created this object.
|
||||
attr_reader :payment_intent
|
||||
end
|
||||
# Attribute for field checkout
|
||||
attr_reader :checkout
|
||||
# Attribute for field order
|
||||
attr_reader :order
|
||||
# Attribute for field payment
|
||||
attr_reader :payment
|
||||
# The type of event that created this object.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class CreatedBy < Stripe::RequestParams
|
||||
class Payment < Stripe::RequestParams
|
||||
# The PaymentIntent used to collect payment for this object.
|
||||
attr_accessor :payment_intent
|
||||
|
||||
def initialize(payment_intent: nil)
|
||||
@payment_intent = payment_intent
|
||||
end
|
||||
end
|
||||
# The details for the payment that created this object.
|
||||
attr_accessor :payment
|
||||
# The type of event that created this object.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(payment: nil, type: nil)
|
||||
@payment = payment
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# The active state for the new gift card, defaults to false. The active state can be updated after creation.
|
||||
attr_accessor :active
|
||||
# Related objects which created this gift card.
|
||||
attr_accessor :created_by
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The initial amount to load onto the new gift card, defaults to 0.
|
||||
attr_accessor :initial_amount
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(
|
||||
active: nil,
|
||||
created_by: nil,
|
||||
currency: nil,
|
||||
expand: nil,
|
||||
initial_amount: nil,
|
||||
metadata: nil
|
||||
)
|
||||
@active = active
|
||||
@created_by = created_by
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@initial_amount = initial_amount
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# The new active state for the gift card.
|
||||
attr_accessor :active
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(active: nil, expand: nil, metadata: nil)
|
||||
@active = active
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class ValidateParams < Stripe::RequestParams
|
||||
# The gift card code to be validated.
|
||||
attr_accessor :code
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The pin associated with the gift card. Not all gift cards have pins.
|
||||
attr_accessor :giftcard_pin
|
||||
|
||||
def initialize(code: nil, expand: nil, giftcard_pin: nil)
|
||||
@code = code
|
||||
@expand = expand
|
||||
@giftcard_pin = giftcard_pin
|
||||
end
|
||||
end
|
||||
# Whether this gift card can be used or not.
|
||||
attr_reader :active
|
||||
# The amount of funds available for new transactions.
|
||||
attr_reader :amount_available
|
||||
# The amount of funds marked as held.
|
||||
attr_reader :amount_held
|
||||
# Code used to redeem this gift card.
|
||||
attr_reader :code
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The related Stripe objects that created this gift card.
|
||||
attr_reader :created_by
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Transactions on this gift card.
|
||||
attr_reader :transactions
|
||||
|
||||
# Creates a new gift card object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/gift_cards/cards",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# List gift cards for an account
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/gift_cards/cards",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Update a gift card
|
||||
def self.update(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/cards/%<id>s", { id: CGI.escape(id) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Validates a gift card code, returning the matching gift card object if it exists.
|
||||
def self.validate(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/gift_cards/cards/validate",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
281
lib/stripe/resources/gift_cards/transaction.rb
Normal file
281
lib/stripe/resources/gift_cards/transaction.rb
Normal file
@ -0,0 +1,281 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module GiftCards
|
||||
# A gift card transaction represents a single transaction on a referenced gift card.
|
||||
# A transaction is in one of three states, `confirmed`, `held` or `canceled`. A `confirmed`
|
||||
# transaction is one that has added/deducted funds. A `held` transaction has created a
|
||||
# temporary hold on funds, which can then be cancelled or confirmed. A `held` transaction
|
||||
# can be confirmed into a `confirmed` transaction, or canceled into a `canceled` transaction.
|
||||
# A `canceled` transaction has no effect on a gift card's balance.
|
||||
class Transaction < APIResource
|
||||
extend Stripe::APIOperations::Create
|
||||
extend Stripe::APIOperations::List
|
||||
include Stripe::APIOperations::Save
|
||||
|
||||
OBJECT_NAME = "gift_cards.transaction"
|
||||
def self.object_name
|
||||
"gift_cards.transaction"
|
||||
end
|
||||
|
||||
class CreatedBy < Stripe::StripeObject
|
||||
class Checkout < Stripe::StripeObject
|
||||
# The Stripe CheckoutSession that created this object.
|
||||
attr_reader :checkout_session
|
||||
# The Stripe CheckoutSession LineItem that created this object.
|
||||
attr_reader :line_item
|
||||
end
|
||||
|
||||
class Order < Stripe::StripeObject
|
||||
# The Stripe Order LineItem that created this object.
|
||||
attr_reader :line_item
|
||||
# The Stripe Order that created this object.
|
||||
attr_reader :order
|
||||
end
|
||||
|
||||
class Payment < Stripe::StripeObject
|
||||
# The PaymentIntent that created this object.
|
||||
attr_reader :payment_intent
|
||||
end
|
||||
# Attribute for field checkout
|
||||
attr_reader :checkout
|
||||
# Attribute for field order
|
||||
attr_reader :order
|
||||
# Attribute for field payment
|
||||
attr_reader :payment
|
||||
# The type of event that created this object.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The gift card to list transactions for.
|
||||
attr_accessor :gift_card
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
|
||||
attr_accessor :transfer_group
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
gift_card: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
transfer_group: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@gift_card = gift_card
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@transfer_group = transfer_group
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class CreatedBy < Stripe::RequestParams
|
||||
class Payment < Stripe::RequestParams
|
||||
# The PaymentIntent used to collect payment for this object.
|
||||
attr_accessor :payment_intent
|
||||
|
||||
def initialize(payment_intent: nil)
|
||||
@payment_intent = payment_intent
|
||||
end
|
||||
end
|
||||
# The details for the payment that created this object.
|
||||
attr_accessor :payment
|
||||
# The type of event that created this object.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(payment: nil, type: nil)
|
||||
@payment = payment
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds.
|
||||
attr_accessor :amount
|
||||
# Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card.
|
||||
attr_accessor :confirm
|
||||
# Related objects which created this transaction.
|
||||
attr_accessor :created_by
|
||||
# The currency of the transaction. This must match the currency of the gift card.
|
||||
attr_accessor :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_accessor :description
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The gift card to create a new transaction on.
|
||||
attr_accessor :gift_card
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
|
||||
attr_accessor :transfer_group
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
confirm: nil,
|
||||
created_by: nil,
|
||||
currency: nil,
|
||||
description: nil,
|
||||
expand: nil,
|
||||
gift_card: nil,
|
||||
metadata: nil,
|
||||
transfer_group: nil
|
||||
)
|
||||
@amount = amount
|
||||
@confirm = confirm
|
||||
@created_by = created_by
|
||||
@currency = currency
|
||||
@description = description
|
||||
@expand = expand
|
||||
@gift_card = gift_card
|
||||
@metadata = metadata
|
||||
@transfer_group = transfer_group
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_accessor :description
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(description: nil, expand: nil, metadata: nil)
|
||||
@description = description
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class CancelParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ConfirmParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card.
|
||||
attr_reader :amount
|
||||
# Time at which the transaction was confirmed. Measured in seconds since the Unix epoch.
|
||||
attr_reader :confirmed_at
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The related Stripe objects that created this gift card transaction.
|
||||
attr_reader :created_by
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# The gift card that this transaction occurred on
|
||||
attr_reader :gift_card
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Status of this transaction, one of `held`, `confirmed`, or `canceled`.
|
||||
attr_reader :status
|
||||
# A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details.
|
||||
attr_reader :transfer_group
|
||||
|
||||
# Cancel a gift card transaction
|
||||
def cancel(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Cancel a gift card transaction
|
||||
def self.cancel(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/transactions/%<id>s/cancel", { id: CGI.escape(id) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Confirm a gift card transaction
|
||||
def confirm(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Confirm a gift card transaction
|
||||
def self.confirm(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/transactions/%<id>s/confirm", { id: CGI.escape(id) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Create a gift card transaction
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/gift_cards/transactions",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# List gift card transactions for a gift card
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/gift_cards/transactions",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Update a gift card transaction
|
||||
def self.update(id, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/gift_cards/transactions/%<id>s", { id: CGI.escape(id) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -22,6 +22,272 @@ module Stripe
|
||||
"identity.verification_report"
|
||||
end
|
||||
|
||||
class Document < Stripe::StripeObject
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class Dob < Stripe::StripeObject
|
||||
# Numerical day between 1 and 31.
|
||||
attr_reader :day
|
||||
# Numerical month between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year.
|
||||
attr_reader :year
|
||||
end
|
||||
|
||||
class Error < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification failure.
|
||||
attr_reader :code
|
||||
# A human-readable message giving the reason for the failure. These messages can be shown to your users.
|
||||
attr_reader :reason
|
||||
end
|
||||
|
||||
class ExpirationDate < Stripe::StripeObject
|
||||
# Numerical day between 1 and 31.
|
||||
attr_reader :day
|
||||
# Numerical month between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year.
|
||||
attr_reader :year
|
||||
end
|
||||
|
||||
class IssuedDate < Stripe::StripeObject
|
||||
# Numerical day between 1 and 31.
|
||||
attr_reader :day
|
||||
# Numerical month between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year.
|
||||
attr_reader :year
|
||||
end
|
||||
# Address as it appears in the document.
|
||||
attr_reader :address
|
||||
# Date of birth as it appears in the document.
|
||||
attr_reader :dob
|
||||
# Details on the verification error. Present when status is `unverified`.
|
||||
attr_reader :error
|
||||
# Expiration date of the document.
|
||||
attr_reader :expiration_date
|
||||
# Array of [File](https://stripe.com/docs/api/files) ids containing images for this document.
|
||||
attr_reader :files
|
||||
# First name as it appears in the document.
|
||||
attr_reader :first_name
|
||||
# Issued date of the document.
|
||||
attr_reader :issued_date
|
||||
# Issuing country of the document.
|
||||
attr_reader :issuing_country
|
||||
# Last name as it appears in the document.
|
||||
attr_reader :last_name
|
||||
# Document ID number.
|
||||
attr_reader :number
|
||||
# Status of this `document` check.
|
||||
attr_reader :status
|
||||
# Type of the document.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Email < Stripe::StripeObject
|
||||
class Error < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification failure.
|
||||
attr_reader :code
|
||||
# A human-readable message giving the reason for the failure. These messages can be shown to your users.
|
||||
attr_reader :reason
|
||||
end
|
||||
# Email to be verified.
|
||||
attr_reader :email
|
||||
# Details on the verification error. Present when status is `unverified`.
|
||||
attr_reader :error
|
||||
# Status of this `email` check.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class IdNumber < Stripe::StripeObject
|
||||
class Dob < Stripe::StripeObject
|
||||
# Numerical day between 1 and 31.
|
||||
attr_reader :day
|
||||
# Numerical month between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year.
|
||||
attr_reader :year
|
||||
end
|
||||
|
||||
class Error < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification failure.
|
||||
attr_reader :code
|
||||
# A human-readable message giving the reason for the failure. These messages can be shown to your users.
|
||||
attr_reader :reason
|
||||
end
|
||||
# Date of birth.
|
||||
attr_reader :dob
|
||||
# Details on the verification error. Present when status is `unverified`.
|
||||
attr_reader :error
|
||||
# First name.
|
||||
attr_reader :first_name
|
||||
# ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present.
|
||||
attr_reader :id_number
|
||||
# Type of ID number.
|
||||
attr_reader :id_number_type
|
||||
# Last name.
|
||||
attr_reader :last_name
|
||||
# Status of this `id_number` check.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class Options < Stripe::StripeObject
|
||||
class Document < Stripe::StripeObject
|
||||
# Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
|
||||
attr_reader :allowed_types
|
||||
# Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
|
||||
attr_reader :require_id_number
|
||||
# Disable image uploads, identity document images have to be captured using the device’s camera.
|
||||
attr_reader :require_live_capture
|
||||
# Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
|
||||
attr_reader :require_matching_selfie
|
||||
end
|
||||
|
||||
class IdNumber < Stripe::StripeObject; end
|
||||
# Attribute for field document
|
||||
attr_reader :document
|
||||
# Attribute for field id_number
|
||||
attr_reader :id_number
|
||||
end
|
||||
|
||||
class Phone < Stripe::StripeObject
|
||||
class Error < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification failure.
|
||||
attr_reader :code
|
||||
# A human-readable message giving the reason for the failure. These messages can be shown to your users.
|
||||
attr_reader :reason
|
||||
end
|
||||
# Details on the verification error. Present when status is `unverified`.
|
||||
attr_reader :error
|
||||
# Phone to be verified.
|
||||
attr_reader :phone
|
||||
# Status of this `phone` check.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class Selfie < Stripe::StripeObject
|
||||
class Error < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification failure.
|
||||
attr_reader :code
|
||||
# A human-readable message giving the reason for the failure. These messages can be shown to your users.
|
||||
attr_reader :reason
|
||||
end
|
||||
# ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check.
|
||||
attr_reader :document
|
||||
# Details on the verification error. Present when status is `unverified`.
|
||||
attr_reader :error
|
||||
# ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check.
|
||||
attr_reader :selfie
|
||||
# Status of this `selfie` check.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
||||
attr_accessor :client_reference_id
|
||||
# Only return VerificationReports that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return VerificationReports of this type
|
||||
attr_accessor :type
|
||||
# Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID.
|
||||
attr_accessor :verification_session
|
||||
|
||||
def initialize(
|
||||
client_reference_id: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
type: nil,
|
||||
verification_session: nil
|
||||
)
|
||||
@client_reference_id = client_reference_id
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@type = type
|
||||
@verification_session = verification_session
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
||||
attr_reader :client_reference_id
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Result from a document check
|
||||
attr_reader :document
|
||||
# Result from a email check
|
||||
attr_reader :email
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Result from an id_number check
|
||||
attr_reader :id_number
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field options
|
||||
attr_reader :options
|
||||
# Result from a phone check
|
||||
attr_reader :phone
|
||||
# Result from a selfie check
|
||||
attr_reader :selfie
|
||||
# Type of report.
|
||||
attr_reader :type
|
||||
# The configuration token of a verification flow from the dashboard.
|
||||
attr_reader :verification_flow
|
||||
# ID of the VerificationSession that created this report.
|
||||
attr_reader :verification_session
|
||||
|
||||
# List all verification reports.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -24,6 +24,367 @@ module Stripe
|
||||
"identity.verification_session"
|
||||
end
|
||||
|
||||
class LastError < Stripe::StripeObject
|
||||
# A short machine-readable string giving the reason for the verification or user-session failure.
|
||||
attr_reader :code
|
||||
# A message that explains the reason for verification or user-session failure.
|
||||
attr_reader :reason
|
||||
end
|
||||
|
||||
class Options < Stripe::StripeObject
|
||||
class Document < Stripe::StripeObject
|
||||
# Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
|
||||
attr_reader :allowed_types
|
||||
# Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
|
||||
attr_reader :require_id_number
|
||||
# Disable image uploads, identity document images have to be captured using the device’s camera.
|
||||
attr_reader :require_live_capture
|
||||
# Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
|
||||
attr_reader :require_matching_selfie
|
||||
end
|
||||
|
||||
class Email < Stripe::StripeObject
|
||||
# Request one time password verification of `provided_details.email`.
|
||||
attr_reader :require_verification
|
||||
end
|
||||
|
||||
class IdNumber < Stripe::StripeObject; end
|
||||
|
||||
class Phone < Stripe::StripeObject
|
||||
# Request one time password verification of `provided_details.phone`.
|
||||
attr_reader :require_verification
|
||||
end
|
||||
# Attribute for field document
|
||||
attr_reader :document
|
||||
# Attribute for field email
|
||||
attr_reader :email
|
||||
# Attribute for field id_number
|
||||
attr_reader :id_number
|
||||
# Attribute for field phone
|
||||
attr_reader :phone
|
||||
end
|
||||
|
||||
class ProvidedDetails < Stripe::StripeObject
|
||||
# Email of user being verified
|
||||
attr_reader :email
|
||||
# Phone number of user being verified
|
||||
attr_reader :phone
|
||||
end
|
||||
|
||||
class Redaction < Stripe::StripeObject
|
||||
# Indicates whether this object and its related objects have been redacted or not.
|
||||
attr_reader :status
|
||||
end
|
||||
|
||||
class VerifiedOutputs < Stripe::StripeObject
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class Dob < Stripe::StripeObject
|
||||
# Numerical day between 1 and 31.
|
||||
attr_reader :day
|
||||
# Numerical month between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year.
|
||||
attr_reader :year
|
||||
end
|
||||
# The user's verified address.
|
||||
attr_reader :address
|
||||
# The user’s verified date of birth.
|
||||
attr_reader :dob
|
||||
# The user's verified email address
|
||||
attr_reader :email
|
||||
# The user's verified first name.
|
||||
attr_reader :first_name
|
||||
# The user's verified id number.
|
||||
attr_reader :id_number
|
||||
# The user's verified id number type.
|
||||
attr_reader :id_number_type
|
||||
# The user's verified last name.
|
||||
attr_reader :last_name
|
||||
# The user's verified phone number
|
||||
attr_reader :phone
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
||||
attr_accessor :client_reference_id
|
||||
# Only return VerificationSessions that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Attribute for param field related_customer
|
||||
attr_accessor :related_customer
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
client_reference_id: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
related_customer: nil,
|
||||
starting_after: nil,
|
||||
status: nil
|
||||
)
|
||||
@client_reference_id = client_reference_id
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@related_customer = related_customer
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Options < Stripe::RequestParams
|
||||
class Document < Stripe::RequestParams
|
||||
# Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
|
||||
attr_accessor :allowed_types
|
||||
# Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
|
||||
attr_accessor :require_id_number
|
||||
# Disable image uploads, identity document images have to be captured using the device’s camera.
|
||||
attr_accessor :require_live_capture
|
||||
# Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
|
||||
attr_accessor :require_matching_selfie
|
||||
|
||||
def initialize(
|
||||
allowed_types: nil,
|
||||
require_id_number: nil,
|
||||
require_live_capture: nil,
|
||||
require_matching_selfie: nil
|
||||
)
|
||||
@allowed_types = allowed_types
|
||||
@require_id_number = require_id_number
|
||||
@require_live_capture = require_live_capture
|
||||
@require_matching_selfie = require_matching_selfie
|
||||
end
|
||||
end
|
||||
# Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
|
||||
attr_accessor :document
|
||||
|
||||
def initialize(document: nil)
|
||||
@document = document
|
||||
end
|
||||
end
|
||||
|
||||
class ProvidedDetails < Stripe::RequestParams
|
||||
# Email of user being verified
|
||||
attr_accessor :email
|
||||
# Phone number of user being verified
|
||||
attr_accessor :phone
|
||||
|
||||
def initialize(email: nil, phone: nil)
|
||||
@email = email
|
||||
@phone = phone
|
||||
end
|
||||
end
|
||||
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
||||
attr_accessor :client_reference_id
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# A set of options for the session’s verification checks.
|
||||
attr_accessor :options
|
||||
# Details provided about the user being verified. These details may be shown to the user.
|
||||
attr_accessor :provided_details
|
||||
# Token referencing a Customer resource.
|
||||
attr_accessor :related_customer
|
||||
# The URL that the user will be redirected to upon completing the verification flow.
|
||||
attr_accessor :return_url
|
||||
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`.
|
||||
attr_accessor :type
|
||||
# The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows.
|
||||
attr_accessor :verification_flow
|
||||
|
||||
def initialize(
|
||||
client_reference_id: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
options: nil,
|
||||
provided_details: nil,
|
||||
related_customer: nil,
|
||||
return_url: nil,
|
||||
type: nil,
|
||||
verification_flow: nil
|
||||
)
|
||||
@client_reference_id = client_reference_id
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@options = options
|
||||
@provided_details = provided_details
|
||||
@related_customer = related_customer
|
||||
@return_url = return_url
|
||||
@type = type
|
||||
@verification_flow = verification_flow
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Options < Stripe::RequestParams
|
||||
class Document < Stripe::RequestParams
|
||||
# Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code.
|
||||
attr_accessor :allowed_types
|
||||
# Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth.
|
||||
attr_accessor :require_id_number
|
||||
# Disable image uploads, identity document images have to be captured using the device’s camera.
|
||||
attr_accessor :require_live_capture
|
||||
# Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie).
|
||||
attr_accessor :require_matching_selfie
|
||||
|
||||
def initialize(
|
||||
allowed_types: nil,
|
||||
require_id_number: nil,
|
||||
require_live_capture: nil,
|
||||
require_matching_selfie: nil
|
||||
)
|
||||
@allowed_types = allowed_types
|
||||
@require_id_number = require_id_number
|
||||
@require_live_capture = require_live_capture
|
||||
@require_matching_selfie = require_matching_selfie
|
||||
end
|
||||
end
|
||||
# Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document).
|
||||
attr_accessor :document
|
||||
|
||||
def initialize(document: nil)
|
||||
@document = document
|
||||
end
|
||||
end
|
||||
|
||||
class ProvidedDetails < Stripe::RequestParams
|
||||
# Email of user being verified
|
||||
attr_accessor :email
|
||||
# Phone number of user being verified
|
||||
attr_accessor :phone
|
||||
|
||||
def initialize(email: nil, phone: nil)
|
||||
@email = email
|
||||
@phone = phone
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# A set of options for the session’s verification checks.
|
||||
attr_accessor :options
|
||||
# Details provided about the user being verified. These details may be shown to the user.
|
||||
attr_accessor :provided_details
|
||||
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(expand: nil, metadata: nil, options: nil, provided_details: nil, type: nil)
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@options = options
|
||||
@provided_details = provided_details
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class CancelParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class RedactParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems.
|
||||
attr_reader :client_reference_id
|
||||
# The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more.
|
||||
attr_reader :client_secret
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# If present, this property tells you the last error encountered when processing the verification.
|
||||
attr_reader :last_error
|
||||
# ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results)
|
||||
attr_reader :last_verification_report
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# A set of options for the session’s verification checks.
|
||||
attr_reader :options
|
||||
# Details provided about the user being verified. These details may be shown to the user.
|
||||
attr_reader :provided_details
|
||||
# Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null.
|
||||
attr_reader :redaction
|
||||
# Token referencing a Customer resource.
|
||||
attr_reader :related_customer
|
||||
# Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work).
|
||||
attr_reader :status
|
||||
# The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed.
|
||||
attr_reader :type
|
||||
# The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe.
|
||||
attr_reader :url
|
||||
# The configuration token of a verification flow from the dashboard.
|
||||
attr_reader :verification_flow
|
||||
# The user’s verified data.
|
||||
attr_reader :verified_outputs
|
||||
|
||||
# A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work).
|
||||
#
|
||||
# Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel).
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -24,6 +24,451 @@ module Stripe
|
||||
"invoiceitem"
|
||||
end
|
||||
|
||||
class Period < Stripe::StripeObject
|
||||
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
||||
attr_reader :end
|
||||
# The start of the period. This value is inclusive.
|
||||
attr_reader :start
|
||||
end
|
||||
|
||||
class DeleteParams < Stripe::RequestParams
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Discount < Stripe::RequestParams
|
||||
class DiscountEnd < Stripe::RequestParams
|
||||
class Duration < Stripe::RequestParams
|
||||
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
||||
attr_accessor :interval
|
||||
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
||||
attr_accessor :interval_count
|
||||
|
||||
def initialize(interval: nil, interval_count: nil)
|
||||
@interval = interval
|
||||
@interval_count = interval_count
|
||||
end
|
||||
end
|
||||
# Time span for the redeemed discount.
|
||||
attr_accessor :duration
|
||||
# A precise Unix timestamp for the discount to end. Must be in the future.
|
||||
attr_accessor :timestamp
|
||||
# The type of calculation made to determine when the discount ends.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(duration: nil, timestamp: nil, type: nil)
|
||||
@duration = duration
|
||||
@timestamp = timestamp
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# ID of the coupon to create a new discount for.
|
||||
attr_accessor :coupon
|
||||
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
||||
attr_accessor :discount
|
||||
# Details to determine how long the discount should be applied for.
|
||||
attr_accessor :discount_end
|
||||
# ID of the promotion code to create a new discount for.
|
||||
attr_accessor :promotion_code
|
||||
|
||||
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
||||
@coupon = coupon
|
||||
@discount = discount
|
||||
@discount_end = discount_end
|
||||
@promotion_code = promotion_code
|
||||
end
|
||||
end
|
||||
|
||||
class Period < Stripe::RequestParams
|
||||
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
||||
attr_accessor :end
|
||||
# The start of the period. This value is inclusive.
|
||||
attr_accessor :start
|
||||
|
||||
def initialize(end_: nil, start: nil)
|
||||
@end = end_
|
||||
@start = start
|
||||
end
|
||||
end
|
||||
|
||||
class PriceData < Stripe::RequestParams
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# The ID of the product that this price will belong to.
|
||||
attr_accessor :product
|
||||
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
||||
attr_accessor :tax_behavior
|
||||
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
currency: nil,
|
||||
product: nil,
|
||||
tax_behavior: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@currency = currency
|
||||
@product = product
|
||||
@tax_behavior = tax_behavior
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
|
||||
attr_accessor :amount
|
||||
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
||||
attr_accessor :description
|
||||
# Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations.
|
||||
attr_accessor :discountable
|
||||
# The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
|
||||
attr_accessor :discounts
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
||||
attr_accessor :margins
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
||||
attr_accessor :period
|
||||
# The ID of the price object. One of `price` or `price_data` is required.
|
||||
attr_accessor :price
|
||||
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
||||
attr_accessor :price_data
|
||||
# Non-negative integer. The quantity of units for the invoice item.
|
||||
attr_accessor :quantity
|
||||
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
||||
attr_accessor :tax_behavior
|
||||
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
||||
attr_accessor :tax_code
|
||||
# The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
|
||||
attr_accessor :tax_rates
|
||||
# The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
description: nil,
|
||||
discountable: nil,
|
||||
discounts: nil,
|
||||
expand: nil,
|
||||
margins: nil,
|
||||
metadata: nil,
|
||||
period: nil,
|
||||
price: nil,
|
||||
price_data: nil,
|
||||
quantity: nil,
|
||||
tax_behavior: nil,
|
||||
tax_code: nil,
|
||||
tax_rates: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@amount = amount
|
||||
@description = description
|
||||
@discountable = discountable
|
||||
@discounts = discounts
|
||||
@expand = expand
|
||||
@margins = margins
|
||||
@metadata = metadata
|
||||
@period = period
|
||||
@price = price
|
||||
@price_data = price_data
|
||||
@quantity = quantity
|
||||
@tax_behavior = tax_behavior
|
||||
@tax_code = tax_code
|
||||
@tax_rates = tax_rates
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return invoice items that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned.
|
||||
attr_accessor :customer
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed.
|
||||
attr_accessor :invoice
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied.
|
||||
attr_accessor :pending
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
customer: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
limit: nil,
|
||||
pending: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@customer = customer
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@limit = limit
|
||||
@pending = pending
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Discount < Stripe::RequestParams
|
||||
class DiscountEnd < Stripe::RequestParams
|
||||
class Duration < Stripe::RequestParams
|
||||
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
||||
attr_accessor :interval
|
||||
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
||||
attr_accessor :interval_count
|
||||
|
||||
def initialize(interval: nil, interval_count: nil)
|
||||
@interval = interval
|
||||
@interval_count = interval_count
|
||||
end
|
||||
end
|
||||
# Time span for the redeemed discount.
|
||||
attr_accessor :duration
|
||||
# A precise Unix timestamp for the discount to end. Must be in the future.
|
||||
attr_accessor :timestamp
|
||||
# The type of calculation made to determine when the discount ends.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(duration: nil, timestamp: nil, type: nil)
|
||||
@duration = duration
|
||||
@timestamp = timestamp
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# ID of the coupon to create a new discount for.
|
||||
attr_accessor :coupon
|
||||
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
||||
attr_accessor :discount
|
||||
# Details to determine how long the discount should be applied for.
|
||||
attr_accessor :discount_end
|
||||
# ID of the promotion code to create a new discount for.
|
||||
attr_accessor :promotion_code
|
||||
|
||||
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
||||
@coupon = coupon
|
||||
@discount = discount
|
||||
@discount_end = discount_end
|
||||
@promotion_code = promotion_code
|
||||
end
|
||||
end
|
||||
|
||||
class Period < Stripe::RequestParams
|
||||
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
||||
attr_accessor :end
|
||||
# The start of the period. This value is inclusive.
|
||||
attr_accessor :start
|
||||
|
||||
def initialize(end_: nil, start: nil)
|
||||
@end = end_
|
||||
@start = start
|
||||
end
|
||||
end
|
||||
|
||||
class PriceData < Stripe::RequestParams
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# The ID of the product that this price will belong to.
|
||||
attr_accessor :product
|
||||
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
||||
attr_accessor :tax_behavior
|
||||
# A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
currency: nil,
|
||||
product: nil,
|
||||
tax_behavior: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@currency = currency
|
||||
@product = product
|
||||
@tax_behavior = tax_behavior
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
|
||||
attr_accessor :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# The ID of the customer who will be billed when this invoice item is billed.
|
||||
attr_accessor :customer
|
||||
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
||||
attr_accessor :description
|
||||
# Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items.
|
||||
attr_accessor :discountable
|
||||
# The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item.
|
||||
attr_accessor :discounts
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
|
||||
attr_accessor :invoice
|
||||
# The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
||||
attr_accessor :margins
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
||||
attr_accessor :period
|
||||
# The ID of the price object. One of `price` or `price_data` is required.
|
||||
attr_accessor :price
|
||||
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
||||
attr_accessor :price_data
|
||||
# Non-negative integer. The quantity of units for the invoice item.
|
||||
attr_accessor :quantity
|
||||
# The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
|
||||
attr_accessor :subscription
|
||||
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
||||
attr_accessor :tax_behavior
|
||||
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
||||
attr_accessor :tax_code
|
||||
# The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
|
||||
attr_accessor :tax_rates
|
||||
# The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
currency: nil,
|
||||
customer: nil,
|
||||
description: nil,
|
||||
discountable: nil,
|
||||
discounts: nil,
|
||||
expand: nil,
|
||||
invoice: nil,
|
||||
margins: nil,
|
||||
metadata: nil,
|
||||
period: nil,
|
||||
price: nil,
|
||||
price_data: nil,
|
||||
quantity: nil,
|
||||
subscription: nil,
|
||||
tax_behavior: nil,
|
||||
tax_code: nil,
|
||||
tax_rates: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
@customer = customer
|
||||
@description = description
|
||||
@discountable = discountable
|
||||
@discounts = discounts
|
||||
@expand = expand
|
||||
@invoice = invoice
|
||||
@margins = margins
|
||||
@metadata = metadata
|
||||
@period = period
|
||||
@price = price
|
||||
@price_data = price_data
|
||||
@quantity = quantity
|
||||
@subscription = subscription
|
||||
@tax_behavior = tax_behavior
|
||||
@tax_code = tax_code
|
||||
@tax_rates = tax_rates
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
# Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`.
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The ID of the customer who will be billed when this invoice item is billed.
|
||||
attr_reader :customer
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :date
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# If true, discounts will apply to this invoice item. Always false for prorations.
|
||||
attr_reader :discountable
|
||||
# The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
|
||||
attr_reader :discounts
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The ID of the invoice this invoice item belongs to.
|
||||
attr_reader :invoice
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item.
|
||||
attr_reader :margins
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field period
|
||||
attr_reader :period
|
||||
# If the invoice item is a proration, the plan of the subscription that the proration was computed for.
|
||||
attr_reader :plan
|
||||
# The price of the invoice item.
|
||||
attr_reader :price
|
||||
# Whether the invoice item was created automatically as a proration adjustment when the customer switched plans.
|
||||
attr_reader :proration
|
||||
# Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for.
|
||||
attr_reader :quantity
|
||||
# The subscription that this invoice item has been created for, if any.
|
||||
attr_reader :subscription
|
||||
# The subscription item that this invoice item has been created for, if any.
|
||||
attr_reader :subscription_item
|
||||
# The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item.
|
||||
attr_reader :tax_rates
|
||||
# ID of the test clock this invoice item belongs to.
|
||||
attr_reader :test_clock
|
||||
# Unit amount (in the `currency` specified) of the invoice item.
|
||||
attr_reader :unit_amount
|
||||
# Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
|
||||
attr_reader :unit_amount_decimal
|
||||
# Always true for a deleted object
|
||||
attr_reader :deleted
|
||||
|
||||
# Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/invoiceitems", params: params, opts: opts)
|
||||
|
@ -13,6 +13,339 @@ module Stripe
|
||||
"line_item"
|
||||
end
|
||||
|
||||
class DiscountAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the discount.
|
||||
attr_reader :amount
|
||||
# The discount that was applied to get this discount amount.
|
||||
attr_reader :discount
|
||||
end
|
||||
|
||||
class MarginAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the reduction in line item amount.
|
||||
attr_reader :amount
|
||||
# The margin that was applied to get this margin amount.
|
||||
attr_reader :margin
|
||||
end
|
||||
|
||||
class Period < Stripe::StripeObject
|
||||
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
||||
attr_reader :end
|
||||
# The start of the period. This value is inclusive.
|
||||
attr_reader :start
|
||||
end
|
||||
|
||||
class PretaxCreditAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the pretax credit amount.
|
||||
attr_reader :amount
|
||||
# The credit balance transaction that was applied to get this pretax credit amount.
|
||||
attr_reader :credit_balance_transaction
|
||||
# The discount that was applied to get this pretax credit amount.
|
||||
attr_reader :discount
|
||||
# The margin that was applied to get this pretax credit amount.
|
||||
attr_reader :margin
|
||||
# Type of the pretax credit amount referenced.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class ProrationDetails < Stripe::StripeObject
|
||||
class CreditedItems < Stripe::StripeObject
|
||||
# Invoice containing the credited invoice line items
|
||||
attr_reader :invoice
|
||||
# Credited invoice line items
|
||||
attr_reader :invoice_line_items
|
||||
end
|
||||
# For a credit proration `line_item`, the original debit line_items to which the credit proration applies.
|
||||
attr_reader :credited_items
|
||||
end
|
||||
|
||||
class TaxAmount < Stripe::StripeObject
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_reader :amount
|
||||
# Whether this tax amount is inclusive or exclusive.
|
||||
attr_reader :inclusive
|
||||
# The tax rate that was applied to get this tax amount.
|
||||
attr_reader :tax_rate
|
||||
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
attr_reader :taxability_reason
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_reader :taxable_amount
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Discount < Stripe::RequestParams
|
||||
class DiscountEnd < Stripe::RequestParams
|
||||
class Duration < Stripe::RequestParams
|
||||
# Specifies a type of interval unit. Either `day`, `week`, `month` or `year`.
|
||||
attr_accessor :interval
|
||||
# The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration.
|
||||
attr_accessor :interval_count
|
||||
|
||||
def initialize(interval: nil, interval_count: nil)
|
||||
@interval = interval
|
||||
@interval_count = interval_count
|
||||
end
|
||||
end
|
||||
# Time span for the redeemed discount.
|
||||
attr_accessor :duration
|
||||
# A precise Unix timestamp for the discount to end. Must be in the future.
|
||||
attr_accessor :timestamp
|
||||
# The type of calculation made to determine when the discount ends.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(duration: nil, timestamp: nil, type: nil)
|
||||
@duration = duration
|
||||
@timestamp = timestamp
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
# ID of the coupon to create a new discount for.
|
||||
attr_accessor :coupon
|
||||
# ID of an existing discount on the object (or one of its ancestors) to reuse.
|
||||
attr_accessor :discount
|
||||
# Details to determine how long the discount should be applied for.
|
||||
attr_accessor :discount_end
|
||||
# ID of the promotion code to create a new discount for.
|
||||
attr_accessor :promotion_code
|
||||
|
||||
def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil)
|
||||
@coupon = coupon
|
||||
@discount = discount
|
||||
@discount_end = discount_end
|
||||
@promotion_code = promotion_code
|
||||
end
|
||||
end
|
||||
|
||||
class Period < Stripe::RequestParams
|
||||
# The end of the period, which must be greater than or equal to the start. This value is inclusive.
|
||||
attr_accessor :end
|
||||
# The start of the period. This value is inclusive.
|
||||
attr_accessor :start
|
||||
|
||||
def initialize(end_: nil, start: nil)
|
||||
@end = end_
|
||||
@start = start
|
||||
end
|
||||
end
|
||||
|
||||
class PriceData < Stripe::RequestParams
|
||||
class ProductData < Stripe::RequestParams
|
||||
# The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
|
||||
attr_accessor :description
|
||||
# A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
|
||||
attr_accessor :images
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The product's name, meant to be displayable to the customer.
|
||||
attr_accessor :name
|
||||
# A [tax code](https://stripe.com/docs/tax/tax-categories) ID.
|
||||
attr_accessor :tax_code
|
||||
|
||||
def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil)
|
||||
@description = description
|
||||
@images = images
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@tax_code = tax_code
|
||||
end
|
||||
end
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# The ID of the product that this price will belong to. One of `product` or `product_data` is required.
|
||||
attr_accessor :product
|
||||
# Data used to generate a new product object inline. One of `product` or `product_data` is required.
|
||||
attr_accessor :product_data
|
||||
# Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed.
|
||||
attr_accessor :tax_behavior
|
||||
# A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
|
||||
attr_accessor :unit_amount
|
||||
# Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
|
||||
attr_accessor :unit_amount_decimal
|
||||
|
||||
def initialize(
|
||||
currency: nil,
|
||||
product: nil,
|
||||
product_data: nil,
|
||||
tax_behavior: nil,
|
||||
unit_amount: nil,
|
||||
unit_amount_decimal: nil
|
||||
)
|
||||
@currency = currency
|
||||
@product = product
|
||||
@product_data = product_data
|
||||
@tax_behavior = tax_behavior
|
||||
@unit_amount = unit_amount
|
||||
@unit_amount_decimal = unit_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class TaxAmount < Stripe::RequestParams
|
||||
class TaxRateData < Stripe::RequestParams
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers.
|
||||
attr_accessor :description
|
||||
# The display name of the tax rate, which will be shown to users.
|
||||
attr_accessor :display_name
|
||||
# This specifies if the tax rate is inclusive or exclusive.
|
||||
attr_accessor :inclusive
|
||||
# The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice.
|
||||
attr_accessor :jurisdiction
|
||||
# The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero.
|
||||
attr_accessor :percentage
|
||||
# [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States.
|
||||
attr_accessor :state
|
||||
# The high-level tax type, such as `vat` or `sales_tax`.
|
||||
attr_accessor :tax_type
|
||||
|
||||
def initialize(
|
||||
country: nil,
|
||||
description: nil,
|
||||
display_name: nil,
|
||||
inclusive: nil,
|
||||
jurisdiction: nil,
|
||||
percentage: nil,
|
||||
state: nil,
|
||||
tax_type: nil
|
||||
)
|
||||
@country = country
|
||||
@description = description
|
||||
@display_name = display_name
|
||||
@inclusive = inclusive
|
||||
@jurisdiction = jurisdiction
|
||||
@percentage = percentage
|
||||
@state = state
|
||||
@tax_type = tax_type
|
||||
end
|
||||
end
|
||||
# The amount, in cents (or local equivalent), of the tax.
|
||||
attr_accessor :amount
|
||||
# Data to find or create a TaxRate object.
|
||||
#
|
||||
# Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items.
|
||||
attr_accessor :tax_rate_data
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_accessor :taxable_amount
|
||||
|
||||
def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil)
|
||||
@amount = amount
|
||||
@tax_rate_data = tax_rate_data
|
||||
@taxable_amount = taxable_amount
|
||||
end
|
||||
end
|
||||
# The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
|
||||
attr_accessor :amount
|
||||
# An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
|
||||
attr_accessor :description
|
||||
# Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations.
|
||||
attr_accessor :discountable
|
||||
# The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts.
|
||||
attr_accessor :discounts
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item.
|
||||
attr_accessor :margins
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data.
|
||||
attr_accessor :metadata
|
||||
# The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details.
|
||||
attr_accessor :period
|
||||
# The ID of the price object. One of `price` or `price_data` is required.
|
||||
attr_accessor :price
|
||||
# Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required.
|
||||
attr_accessor :price_data
|
||||
# Non-negative integer. The quantity of units for the line item.
|
||||
attr_accessor :quantity
|
||||
# A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts.
|
||||
attr_accessor :tax_amounts
|
||||
# The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
|
||||
attr_accessor :tax_rates
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
description: nil,
|
||||
discountable: nil,
|
||||
discounts: nil,
|
||||
expand: nil,
|
||||
margins: nil,
|
||||
metadata: nil,
|
||||
period: nil,
|
||||
price: nil,
|
||||
price_data: nil,
|
||||
quantity: nil,
|
||||
tax_amounts: nil,
|
||||
tax_rates: nil
|
||||
)
|
||||
@amount = amount
|
||||
@description = description
|
||||
@discountable = discountable
|
||||
@discounts = discounts
|
||||
@expand = expand
|
||||
@margins = margins
|
||||
@metadata = metadata
|
||||
@period = period
|
||||
@price = price
|
||||
@price_data = price_data
|
||||
@quantity = quantity
|
||||
@tax_amounts = tax_amounts
|
||||
@tax_rates = tax_rates
|
||||
end
|
||||
end
|
||||
# The amount, in cents (or local equivalent).
|
||||
attr_reader :amount
|
||||
# The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts.
|
||||
attr_reader :amount_excluding_tax
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users.
|
||||
attr_reader :description
|
||||
# The amount of discount calculated per discount for this line item.
|
||||
attr_reader :discount_amounts
|
||||
# If true, discounts will apply to this line item. Always false for prorations.
|
||||
attr_reader :discountable
|
||||
# The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount.
|
||||
attr_reader :discounts
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The ID of the invoice that contains this line item.
|
||||
attr_reader :invoice
|
||||
# The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any.
|
||||
attr_reader :invoice_item
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The amount of margin calculated per margin for this line item.
|
||||
attr_reader :margin_amounts
|
||||
# The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin.
|
||||
attr_reader :margins
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field period
|
||||
attr_reader :period
|
||||
# The plan of the subscription, if the line item is a subscription or a proration.
|
||||
attr_reader :plan
|
||||
# Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.
|
||||
attr_reader :pretax_credit_amounts
|
||||
# The price of the line item.
|
||||
attr_reader :price
|
||||
# Whether this is a proration.
|
||||
attr_reader :proration
|
||||
# Additional details for proration line items
|
||||
attr_reader :proration_details
|
||||
# The quantity of the subscription, if the line item is a subscription or a proration.
|
||||
attr_reader :quantity
|
||||
# The subscription that the invoice item pertains to, if any.
|
||||
attr_reader :subscription
|
||||
# The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription.
|
||||
attr_reader :subscription_item
|
||||
# The amount of tax calculated per tax rate for this line item
|
||||
attr_reader :tax_amounts
|
||||
# The tax rates which apply to the line item.
|
||||
attr_reader :tax_rates
|
||||
# A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
|
||||
attr_reader :type
|
||||
# The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts.
|
||||
attr_reader :unit_amount_excluding_tax
|
||||
|
||||
# Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item,
|
||||
# so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice
|
||||
# item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
|
||||
|
56
lib/stripe/resources/invoice_payment.rb
Normal file
56
lib/stripe/resources/invoice_payment.rb
Normal file
@ -0,0 +1,56 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
# The invoice payment object
|
||||
class InvoicePayment < APIResource
|
||||
OBJECT_NAME = "invoice_payment"
|
||||
def self.object_name
|
||||
"invoice_payment"
|
||||
end
|
||||
|
||||
class Payment < Stripe::StripeObject
|
||||
# ID of the successful charge for this payment when `type` is `charge`.
|
||||
attr_reader :charge
|
||||
# ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019.
|
||||
attr_reader :payment_intent
|
||||
# ID of the PaymentRecord associated with this payment when `type` is `payment_record`.
|
||||
attr_reader :payment_record
|
||||
# Type of payment object associated with this invoice payment.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class StatusTransitions < Stripe::StripeObject
|
||||
# The time that the payment was canceled.
|
||||
attr_reader :canceled_at
|
||||
# The time that the payment succeeded.
|
||||
attr_reader :paid_at
|
||||
end
|
||||
# Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more.
|
||||
attr_reader :amount_overpaid
|
||||
# Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to.
|
||||
attr_reader :amount_paid
|
||||
# Amount intended to be paid toward this invoice, in cents (or local equivalent)
|
||||
attr_reader :amount_requested
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The invoice that was paid.
|
||||
attr_reader :invoice
|
||||
# Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly.
|
||||
attr_reader :is_default
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Attribute for field payment
|
||||
attr_reader :payment
|
||||
# The status of the payment, one of `open`, `paid`, or `canceled`.
|
||||
attr_reader :status
|
||||
# Attribute for field status_transitions
|
||||
attr_reader :status_transitions
|
||||
end
|
||||
end
|
@ -12,6 +12,73 @@ module Stripe
|
||||
"invoice_rendering_template"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Attribute for param field status
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, status: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Attribute for param field version
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(expand: nil, version: nil)
|
||||
@expand = expand
|
||||
@version = version
|
||||
end
|
||||
end
|
||||
|
||||
class ArchiveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UnarchiveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# A brief description of the template, hidden from customers
|
||||
attr_reader :nickname
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The status of the template, one of `active` or `archived`.
|
||||
attr_reader :status
|
||||
# Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering
|
||||
attr_reader :version
|
||||
|
||||
# Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it.
|
||||
def archive(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -14,6 +14,672 @@ module Stripe
|
||||
"issuing.card"
|
||||
end
|
||||
|
||||
class Shipping < Stripe::StripeObject
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
|
||||
class AddressValidation < Stripe::StripeObject
|
||||
class NormalizedAddress < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# The address validation capabilities to use.
|
||||
attr_reader :mode
|
||||
# The normalized shipping address.
|
||||
attr_reader :normalized_address
|
||||
# The validation result for the shipping address.
|
||||
attr_reader :result
|
||||
end
|
||||
|
||||
class Customs < Stripe::StripeObject
|
||||
# A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU.
|
||||
attr_reader :eori_number
|
||||
end
|
||||
# Attribute for field address
|
||||
attr_reader :address
|
||||
# Address validation details for the shipment.
|
||||
attr_reader :address_validation
|
||||
# The delivery company that shipped a card.
|
||||
attr_reader :carrier
|
||||
# Additional information that may be required for clearing customs.
|
||||
attr_reader :customs
|
||||
# A unix timestamp representing a best estimate of when the card will be delivered.
|
||||
attr_reader :eta
|
||||
# Recipient name.
|
||||
attr_reader :name
|
||||
# The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created.
|
||||
attr_reader :phone_number
|
||||
# Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true.
|
||||
attr_reader :require_signature
|
||||
# Shipment service, such as `standard` or `express`.
|
||||
attr_reader :service
|
||||
# The delivery status of the card.
|
||||
attr_reader :status
|
||||
# A tracking number for a card shipment.
|
||||
attr_reader :tracking_number
|
||||
# A link to the shipping carrier's site where you can view detailed information about a card shipment.
|
||||
attr_reader :tracking_url
|
||||
# Packaging options.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::StripeObject
|
||||
class SpendingLimit < Stripe::StripeObject
|
||||
# Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_reader :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_reader :interval
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_reader :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_reader :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_reader :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_reader :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
|
||||
attr_reader :spending_limits
|
||||
# Currency of the amounts within `spending_limits`. Always the same as the currency of the card.
|
||||
attr_reader :spending_limits_currency
|
||||
end
|
||||
|
||||
class Wallets < Stripe::StripeObject
|
||||
class ApplePay < Stripe::StripeObject
|
||||
# Apple Pay Eligibility
|
||||
attr_reader :eligible
|
||||
# Reason the card is ineligible for Apple Pay
|
||||
attr_reader :ineligible_reason
|
||||
end
|
||||
|
||||
class GooglePay < Stripe::StripeObject
|
||||
# Google Pay Eligibility
|
||||
attr_reader :eligible
|
||||
# Reason the card is ineligible for Google Pay
|
||||
attr_reader :ineligible_reason
|
||||
end
|
||||
# Attribute for field apple_pay
|
||||
attr_reader :apple_pay
|
||||
# Attribute for field google_pay
|
||||
attr_reader :google_pay
|
||||
# Unique identifier for a card used with digital wallets
|
||||
attr_reader :primary_account_identifier
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return cards belonging to the Cardholder with the provided ID.
|
||||
attr_accessor :cardholder
|
||||
# Only return cards that were issued during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Only return cards that have the given expiration month.
|
||||
attr_accessor :exp_month
|
||||
# Only return cards that have the given expiration year.
|
||||
attr_accessor :exp_year
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Only return cards that have the given last four digits.
|
||||
attr_accessor :last4
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Attribute for param field personalization_design
|
||||
attr_accessor :personalization_design
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return cards that have the given status. One of `active`, `inactive`, or `canceled`.
|
||||
attr_accessor :status
|
||||
# Only return cards that have the given type. One of `virtual` or `physical`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
cardholder: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
exp_month: nil,
|
||||
exp_year: nil,
|
||||
expand: nil,
|
||||
last4: nil,
|
||||
limit: nil,
|
||||
personalization_design: nil,
|
||||
starting_after: nil,
|
||||
status: nil,
|
||||
type: nil
|
||||
)
|
||||
@cardholder = cardholder
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@exp_month = exp_month
|
||||
@exp_year = exp_year
|
||||
@expand = expand
|
||||
@last4 = last4
|
||||
@limit = limit
|
||||
@personalization_design = personalization_design
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Pin < Stripe::RequestParams
|
||||
# The card's desired new PIN, encrypted under Stripe's public key.
|
||||
attr_accessor :encrypted_number
|
||||
|
||||
def initialize(encrypted_number: nil)
|
||||
@encrypted_number = encrypted_number
|
||||
end
|
||||
end
|
||||
|
||||
class Shipping < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
|
||||
class AddressValidation < Stripe::RequestParams
|
||||
# The address validation capabilities to use.
|
||||
attr_accessor :mode
|
||||
|
||||
def initialize(mode: nil)
|
||||
@mode = mode
|
||||
end
|
||||
end
|
||||
|
||||
class Customs < Stripe::RequestParams
|
||||
# The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
|
||||
attr_accessor :eori_number
|
||||
|
||||
def initialize(eori_number: nil)
|
||||
@eori_number = eori_number
|
||||
end
|
||||
end
|
||||
# The address that the card is shipped to.
|
||||
attr_accessor :address
|
||||
# Address validation settings.
|
||||
attr_accessor :address_validation
|
||||
# Customs information for the shipment.
|
||||
attr_accessor :customs
|
||||
# The name printed on the shipping label when shipping the card.
|
||||
attr_accessor :name
|
||||
# Phone number of the recipient of the shipment.
|
||||
attr_accessor :phone_number
|
||||
# Whether a signature is required for card delivery.
|
||||
attr_accessor :require_signature
|
||||
# Shipment service.
|
||||
attr_accessor :service
|
||||
# Packaging options.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
address: nil,
|
||||
address_validation: nil,
|
||||
customs: nil,
|
||||
name: nil,
|
||||
phone_number: nil,
|
||||
require_signature: nil,
|
||||
service: nil,
|
||||
type: nil
|
||||
)
|
||||
@address = address
|
||||
@address_validation = address_validation
|
||||
@customs = customs
|
||||
@name = name
|
||||
@phone_number = phone_number
|
||||
@require_signature = require_signature
|
||||
@service = service
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::RequestParams
|
||||
class SpendingLimit < Stripe::RequestParams
|
||||
# Maximum amount allowed to spend per interval.
|
||||
attr_accessor :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_accessor :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_accessor :interval
|
||||
|
||||
def initialize(amount: nil, categories: nil, interval: nil)
|
||||
@amount = amount
|
||||
@categories = categories
|
||||
@interval = interval
|
||||
end
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_accessor :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_accessor :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
|
||||
attr_accessor :spending_limits
|
||||
|
||||
def initialize(
|
||||
allowed_categories: nil,
|
||||
allowed_merchant_countries: nil,
|
||||
blocked_categories: nil,
|
||||
blocked_merchant_countries: nil,
|
||||
spending_limits: nil
|
||||
)
|
||||
@allowed_categories = allowed_categories
|
||||
@allowed_merchant_countries = allowed_merchant_countries
|
||||
@blocked_categories = blocked_categories
|
||||
@blocked_merchant_countries = blocked_merchant_countries
|
||||
@spending_limits = spending_limits
|
||||
end
|
||||
end
|
||||
# The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated.
|
||||
attr_accessor :cardholder
|
||||
# The currency for the card.
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Attribute for param field financial_account
|
||||
attr_accessor :financial_account
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The personalization design object belonging to this card.
|
||||
attr_accessor :personalization_design
|
||||
# The desired PIN for this card.
|
||||
attr_accessor :pin
|
||||
# The card this is meant to be a replacement for (if any).
|
||||
attr_accessor :replacement_for
|
||||
# If `replacement_for` is specified, this should indicate why that card is being replaced.
|
||||
attr_accessor :replacement_reason
|
||||
# The second line to print on the card. Max length: 24 characters.
|
||||
attr_accessor :second_line
|
||||
# The address where the card will be shipped.
|
||||
attr_accessor :shipping
|
||||
# Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
|
||||
attr_accessor :spending_controls
|
||||
# Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
|
||||
attr_accessor :status
|
||||
# The type of card to issue. Possible values are `physical` or `virtual`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
cardholder: nil,
|
||||
currency: nil,
|
||||
expand: nil,
|
||||
financial_account: nil,
|
||||
metadata: nil,
|
||||
personalization_design: nil,
|
||||
pin: nil,
|
||||
replacement_for: nil,
|
||||
replacement_reason: nil,
|
||||
second_line: nil,
|
||||
shipping: nil,
|
||||
spending_controls: nil,
|
||||
status: nil,
|
||||
type: nil
|
||||
)
|
||||
@cardholder = cardholder
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@financial_account = financial_account
|
||||
@metadata = metadata
|
||||
@personalization_design = personalization_design
|
||||
@pin = pin
|
||||
@replacement_for = replacement_for
|
||||
@replacement_reason = replacement_reason
|
||||
@second_line = second_line
|
||||
@shipping = shipping
|
||||
@spending_controls = spending_controls
|
||||
@status = status
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Pin < Stripe::RequestParams
|
||||
# The card's desired new PIN, encrypted under Stripe's public key.
|
||||
attr_accessor :encrypted_number
|
||||
|
||||
def initialize(encrypted_number: nil)
|
||||
@encrypted_number = encrypted_number
|
||||
end
|
||||
end
|
||||
|
||||
class Shipping < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
|
||||
class AddressValidation < Stripe::RequestParams
|
||||
# The address validation capabilities to use.
|
||||
attr_accessor :mode
|
||||
|
||||
def initialize(mode: nil)
|
||||
@mode = mode
|
||||
end
|
||||
end
|
||||
|
||||
class Customs < Stripe::RequestParams
|
||||
# The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
|
||||
attr_accessor :eori_number
|
||||
|
||||
def initialize(eori_number: nil)
|
||||
@eori_number = eori_number
|
||||
end
|
||||
end
|
||||
# The address that the card is shipped to.
|
||||
attr_accessor :address
|
||||
# Address validation settings.
|
||||
attr_accessor :address_validation
|
||||
# Customs information for the shipment.
|
||||
attr_accessor :customs
|
||||
# The name printed on the shipping label when shipping the card.
|
||||
attr_accessor :name
|
||||
# Phone number of the recipient of the shipment.
|
||||
attr_accessor :phone_number
|
||||
# Whether a signature is required for card delivery.
|
||||
attr_accessor :require_signature
|
||||
# Shipment service.
|
||||
attr_accessor :service
|
||||
# Packaging options.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
address: nil,
|
||||
address_validation: nil,
|
||||
customs: nil,
|
||||
name: nil,
|
||||
phone_number: nil,
|
||||
require_signature: nil,
|
||||
service: nil,
|
||||
type: nil
|
||||
)
|
||||
@address = address
|
||||
@address_validation = address_validation
|
||||
@customs = customs
|
||||
@name = name
|
||||
@phone_number = phone_number
|
||||
@require_signature = require_signature
|
||||
@service = service
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::RequestParams
|
||||
class SpendingLimit < Stripe::RequestParams
|
||||
# Maximum amount allowed to spend per interval.
|
||||
attr_accessor :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_accessor :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_accessor :interval
|
||||
|
||||
def initialize(amount: nil, categories: nil, interval: nil)
|
||||
@amount = amount
|
||||
@categories = categories
|
||||
@interval = interval
|
||||
end
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_accessor :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_accessor :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain).
|
||||
attr_accessor :spending_limits
|
||||
|
||||
def initialize(
|
||||
allowed_categories: nil,
|
||||
allowed_merchant_countries: nil,
|
||||
blocked_categories: nil,
|
||||
blocked_merchant_countries: nil,
|
||||
spending_limits: nil
|
||||
)
|
||||
@allowed_categories = allowed_categories
|
||||
@allowed_merchant_countries = allowed_merchant_countries
|
||||
@blocked_categories = blocked_categories
|
||||
@blocked_merchant_countries = blocked_merchant_countries
|
||||
@spending_limits = spending_limits
|
||||
end
|
||||
end
|
||||
# Reason why the `status` of this card is `canceled`.
|
||||
attr_accessor :cancellation_reason
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Attribute for param field personalization_design
|
||||
attr_accessor :personalization_design
|
||||
# The desired new PIN for this card.
|
||||
attr_accessor :pin
|
||||
# Updated shipping information for the card.
|
||||
attr_accessor :shipping
|
||||
# Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
|
||||
attr_accessor :spending_controls
|
||||
# Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
cancellation_reason: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
personalization_design: nil,
|
||||
pin: nil,
|
||||
shipping: nil,
|
||||
spending_controls: nil,
|
||||
status: nil
|
||||
)
|
||||
@cancellation_reason = cancellation_reason
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@personalization_design = personalization_design
|
||||
@pin = pin
|
||||
@shipping = shipping
|
||||
@spending_controls = spending_controls
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class DeliverCardParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class FailCardParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ReturnCardParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class ShipCardParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class SubmitCardParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# The brand of the card.
|
||||
attr_reader :brand
|
||||
# The reason why the card was canceled.
|
||||
attr_reader :cancellation_reason
|
||||
# An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards.
|
||||
#
|
||||
# Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder)
|
||||
attr_reader :cardholder
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
|
||||
attr_reader :currency
|
||||
# The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
|
||||
attr_reader :cvc
|
||||
# The expiration month of the card.
|
||||
attr_reader :exp_month
|
||||
# The expiration year of the card.
|
||||
attr_reader :exp_year
|
||||
# The financial account this card is attached to.
|
||||
attr_reader :financial_account
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The last 4 digits of the card number.
|
||||
attr_reader :last4
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
|
||||
attr_reader :number
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The personalization design object belonging to this card.
|
||||
attr_reader :personalization_design
|
||||
# The latest card that replaces this card, if any.
|
||||
attr_reader :replaced_by
|
||||
# The card this card replaces, if any.
|
||||
attr_reader :replacement_for
|
||||
# The reason why the previous card needed to be replaced.
|
||||
attr_reader :replacement_reason
|
||||
# Where and how the card will be shipped.
|
||||
attr_reader :shipping
|
||||
# Attribute for field spending_controls
|
||||
attr_reader :spending_controls
|
||||
# Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
|
||||
attr_reader :status
|
||||
# The type of the card.
|
||||
attr_reader :type
|
||||
# Information relating to digital wallets (like Apple Pay and Google Pay).
|
||||
attr_reader :wallets
|
||||
|
||||
# Creates an Issuing Card object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(method: :post, path: "/v1/issuing/cards", params: params, opts: opts)
|
||||
|
@ -16,6 +16,664 @@ module Stripe
|
||||
"issuing.cardholder"
|
||||
end
|
||||
|
||||
class Billing < Stripe::StripeObject
|
||||
class Address < Stripe::StripeObject
|
||||
# City, district, suburb, town, or village.
|
||||
attr_reader :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_reader :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_reader :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_reader :line2
|
||||
# ZIP or postal code.
|
||||
attr_reader :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_reader :state
|
||||
end
|
||||
# Attribute for field address
|
||||
attr_reader :address
|
||||
end
|
||||
|
||||
class Company < Stripe::StripeObject
|
||||
# Whether the company's business ID number was provided.
|
||||
attr_reader :tax_id_provided
|
||||
end
|
||||
|
||||
class Individual < Stripe::StripeObject
|
||||
class CardIssuing < Stripe::StripeObject
|
||||
class UserTermsAcceptance < Stripe::StripeObject
|
||||
# The Unix timestamp marking when the cardholder accepted the Authorized User Terms.
|
||||
attr_reader :date
|
||||
# The IP address from which the cardholder accepted the Authorized User Terms.
|
||||
attr_reader :ip
|
||||
# The user agent of the browser from which the cardholder accepted the Authorized User Terms.
|
||||
attr_reader :user_agent
|
||||
end
|
||||
# Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
|
||||
attr_reader :user_terms_acceptance
|
||||
end
|
||||
|
||||
class Dob < Stripe::StripeObject
|
||||
# The day of birth, between 1 and 31.
|
||||
attr_reader :day
|
||||
# The month of birth, between 1 and 12.
|
||||
attr_reader :month
|
||||
# The four-digit year of birth.
|
||||
attr_reader :year
|
||||
end
|
||||
|
||||
class Verification < Stripe::StripeObject
|
||||
class Document < Stripe::StripeObject
|
||||
# The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_reader :back
|
||||
# The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_reader :front
|
||||
end
|
||||
# An identifying document, either a passport or local ID card.
|
||||
attr_reader :document
|
||||
end
|
||||
# Information related to the card_issuing program for this cardholder.
|
||||
attr_reader :card_issuing
|
||||
# The date of birth of this cardholder.
|
||||
attr_reader :dob
|
||||
# The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_reader :first_name
|
||||
# The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_reader :last_name
|
||||
# Government-issued ID document for this cardholder.
|
||||
attr_reader :verification
|
||||
end
|
||||
|
||||
class Requirements < Stripe::StripeObject
|
||||
# If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason.
|
||||
attr_reader :disabled_reason
|
||||
# Array of fields that need to be collected in order to verify and re-enable the cardholder.
|
||||
attr_reader :past_due
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::StripeObject
|
||||
class SpendingLimit < Stripe::StripeObject
|
||||
# Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_reader :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_reader :interval
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_reader :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_reader :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_reader :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_reader :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across this cardholder's cards.
|
||||
attr_reader :spending_limits
|
||||
# Currency of the amounts within `spending_limits`.
|
||||
attr_reader :spending_limits_currency
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return cardholders that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# Only return cardholders that have the given email address.
|
||||
attr_accessor :email
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Only return cardholders that have the given phone number.
|
||||
attr_accessor :phone_number
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`.
|
||||
attr_accessor :status
|
||||
# Only return cardholders that have the given type. One of `individual` or `company`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
email: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
phone_number: nil,
|
||||
starting_after: nil,
|
||||
status: nil,
|
||||
type: nil
|
||||
)
|
||||
@created = created
|
||||
@email = email
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@phone_number = phone_number
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Billing < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# The cardholder’s billing address.
|
||||
attr_accessor :address
|
||||
|
||||
def initialize(address: nil)
|
||||
@address = address
|
||||
end
|
||||
end
|
||||
|
||||
class Company < Stripe::RequestParams
|
||||
# The entity's business ID number.
|
||||
attr_accessor :tax_id
|
||||
|
||||
def initialize(tax_id: nil)
|
||||
@tax_id = tax_id
|
||||
end
|
||||
end
|
||||
|
||||
class Individual < Stripe::RequestParams
|
||||
class CardIssuing < Stripe::RequestParams
|
||||
class UserTermsAcceptance < Stripe::RequestParams
|
||||
# The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
|
||||
attr_accessor :date
|
||||
# The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
|
||||
attr_accessor :ip
|
||||
# The user agent of the browser from which the cardholder accepted the Authorized User Terms.
|
||||
attr_accessor :user_agent
|
||||
|
||||
def initialize(date: nil, ip: nil, user_agent: nil)
|
||||
@date = date
|
||||
@ip = ip
|
||||
@user_agent = user_agent
|
||||
end
|
||||
end
|
||||
# Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
|
||||
attr_accessor :user_terms_acceptance
|
||||
|
||||
def initialize(user_terms_acceptance: nil)
|
||||
@user_terms_acceptance = user_terms_acceptance
|
||||
end
|
||||
end
|
||||
|
||||
class Dob < Stripe::RequestParams
|
||||
# The day of birth, between 1 and 31.
|
||||
attr_accessor :day
|
||||
# The month of birth, between 1 and 12.
|
||||
attr_accessor :month
|
||||
# The four-digit year of birth.
|
||||
attr_accessor :year
|
||||
|
||||
def initialize(day: nil, month: nil, year: nil)
|
||||
@day = day
|
||||
@month = month
|
||||
@year = year
|
||||
end
|
||||
end
|
||||
|
||||
class Verification < Stripe::RequestParams
|
||||
class Document < Stripe::RequestParams
|
||||
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_accessor :back
|
||||
# The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_accessor :front
|
||||
|
||||
def initialize(back: nil, front: nil)
|
||||
@back = back
|
||||
@front = front
|
||||
end
|
||||
end
|
||||
# An identifying document, either a passport or local ID card.
|
||||
attr_accessor :document
|
||||
|
||||
def initialize(document: nil)
|
||||
@document = document
|
||||
end
|
||||
end
|
||||
# Information related to the card_issuing program for this cardholder.
|
||||
attr_accessor :card_issuing
|
||||
# The date of birth of this cardholder. Cardholders must be older than 13 years old.
|
||||
attr_accessor :dob
|
||||
# The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_accessor :first_name
|
||||
# The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_accessor :last_name
|
||||
# Government-issued ID document for this cardholder.
|
||||
attr_accessor :verification
|
||||
|
||||
def initialize(
|
||||
card_issuing: nil,
|
||||
dob: nil,
|
||||
first_name: nil,
|
||||
last_name: nil,
|
||||
verification: nil
|
||||
)
|
||||
@card_issuing = card_issuing
|
||||
@dob = dob
|
||||
@first_name = first_name
|
||||
@last_name = last_name
|
||||
@verification = verification
|
||||
end
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::RequestParams
|
||||
class SpendingLimit < Stripe::RequestParams
|
||||
# Maximum amount allowed to spend per interval.
|
||||
attr_accessor :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_accessor :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_accessor :interval
|
||||
|
||||
def initialize(amount: nil, categories: nil, interval: nil)
|
||||
@amount = amount
|
||||
@categories = categories
|
||||
@interval = interval
|
||||
end
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_accessor :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_accessor :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across this cardholder's cards.
|
||||
attr_accessor :spending_limits
|
||||
# Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
|
||||
attr_accessor :spending_limits_currency
|
||||
|
||||
def initialize(
|
||||
allowed_categories: nil,
|
||||
allowed_merchant_countries: nil,
|
||||
blocked_categories: nil,
|
||||
blocked_merchant_countries: nil,
|
||||
spending_limits: nil,
|
||||
spending_limits_currency: nil
|
||||
)
|
||||
@allowed_categories = allowed_categories
|
||||
@allowed_merchant_countries = allowed_merchant_countries
|
||||
@blocked_categories = blocked_categories
|
||||
@blocked_merchant_countries = blocked_merchant_countries
|
||||
@spending_limits = spending_limits
|
||||
@spending_limits_currency = spending_limits_currency
|
||||
end
|
||||
end
|
||||
# The cardholder's billing address.
|
||||
attr_accessor :billing
|
||||
# Additional information about a `company` cardholder.
|
||||
attr_accessor :company
|
||||
# The cardholder's email address.
|
||||
attr_accessor :email
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Additional information about an `individual` cardholder.
|
||||
attr_accessor :individual
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers.
|
||||
attr_accessor :name
|
||||
# The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards.
|
||||
# While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
|
||||
attr_accessor :phone_number
|
||||
# The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
|
||||
# This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
|
||||
attr_accessor :preferred_locales
|
||||
# Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
|
||||
attr_accessor :spending_controls
|
||||
# Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`.
|
||||
attr_accessor :status
|
||||
# One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
billing: nil,
|
||||
company: nil,
|
||||
email: nil,
|
||||
expand: nil,
|
||||
individual: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
phone_number: nil,
|
||||
preferred_locales: nil,
|
||||
spending_controls: nil,
|
||||
status: nil,
|
||||
type: nil
|
||||
)
|
||||
@billing = billing
|
||||
@company = company
|
||||
@email = email
|
||||
@expand = expand
|
||||
@individual = individual
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@phone_number = phone_number
|
||||
@preferred_locales = preferred_locales
|
||||
@spending_controls = spending_controls
|
||||
@status = status
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Billing < Stripe::RequestParams
|
||||
class Address < Stripe::RequestParams
|
||||
# City, district, suburb, town, or village.
|
||||
attr_accessor :city
|
||||
# Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
|
||||
attr_accessor :country
|
||||
# Address line 1 (e.g., street, PO Box, or company name).
|
||||
attr_accessor :line1
|
||||
# Address line 2 (e.g., apartment, suite, unit, or building).
|
||||
attr_accessor :line2
|
||||
# ZIP or postal code.
|
||||
attr_accessor :postal_code
|
||||
# State, county, province, or region.
|
||||
attr_accessor :state
|
||||
|
||||
def initialize(
|
||||
city: nil,
|
||||
country: nil,
|
||||
line1: nil,
|
||||
line2: nil,
|
||||
postal_code: nil,
|
||||
state: nil
|
||||
)
|
||||
@city = city
|
||||
@country = country
|
||||
@line1 = line1
|
||||
@line2 = line2
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
end
|
||||
end
|
||||
# The cardholder’s billing address.
|
||||
attr_accessor :address
|
||||
|
||||
def initialize(address: nil)
|
||||
@address = address
|
||||
end
|
||||
end
|
||||
|
||||
class Company < Stripe::RequestParams
|
||||
# The entity's business ID number.
|
||||
attr_accessor :tax_id
|
||||
|
||||
def initialize(tax_id: nil)
|
||||
@tax_id = tax_id
|
||||
end
|
||||
end
|
||||
|
||||
class Individual < Stripe::RequestParams
|
||||
class CardIssuing < Stripe::RequestParams
|
||||
class UserTermsAcceptance < Stripe::RequestParams
|
||||
# The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
|
||||
attr_accessor :date
|
||||
# The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users.
|
||||
attr_accessor :ip
|
||||
# The user agent of the browser from which the cardholder accepted the Authorized User Terms.
|
||||
attr_accessor :user_agent
|
||||
|
||||
def initialize(date: nil, ip: nil, user_agent: nil)
|
||||
@date = date
|
||||
@ip = ip
|
||||
@user_agent = user_agent
|
||||
end
|
||||
end
|
||||
# Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program.
|
||||
attr_accessor :user_terms_acceptance
|
||||
|
||||
def initialize(user_terms_acceptance: nil)
|
||||
@user_terms_acceptance = user_terms_acceptance
|
||||
end
|
||||
end
|
||||
|
||||
class Dob < Stripe::RequestParams
|
||||
# The day of birth, between 1 and 31.
|
||||
attr_accessor :day
|
||||
# The month of birth, between 1 and 12.
|
||||
attr_accessor :month
|
||||
# The four-digit year of birth.
|
||||
attr_accessor :year
|
||||
|
||||
def initialize(day: nil, month: nil, year: nil)
|
||||
@day = day
|
||||
@month = month
|
||||
@year = year
|
||||
end
|
||||
end
|
||||
|
||||
class Verification < Stripe::RequestParams
|
||||
class Document < Stripe::RequestParams
|
||||
# The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_accessor :back
|
||||
# The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`.
|
||||
attr_accessor :front
|
||||
|
||||
def initialize(back: nil, front: nil)
|
||||
@back = back
|
||||
@front = front
|
||||
end
|
||||
end
|
||||
# An identifying document, either a passport or local ID card.
|
||||
attr_accessor :document
|
||||
|
||||
def initialize(document: nil)
|
||||
@document = document
|
||||
end
|
||||
end
|
||||
# Information related to the card_issuing program for this cardholder.
|
||||
attr_accessor :card_issuing
|
||||
# The date of birth of this cardholder. Cardholders must be older than 13 years old.
|
||||
attr_accessor :dob
|
||||
# The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_accessor :first_name
|
||||
# The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters.
|
||||
attr_accessor :last_name
|
||||
# Government-issued ID document for this cardholder.
|
||||
attr_accessor :verification
|
||||
|
||||
def initialize(
|
||||
card_issuing: nil,
|
||||
dob: nil,
|
||||
first_name: nil,
|
||||
last_name: nil,
|
||||
verification: nil
|
||||
)
|
||||
@card_issuing = card_issuing
|
||||
@dob = dob
|
||||
@first_name = first_name
|
||||
@last_name = last_name
|
||||
@verification = verification
|
||||
end
|
||||
end
|
||||
|
||||
class SpendingControls < Stripe::RequestParams
|
||||
class SpendingLimit < Stripe::RequestParams
|
||||
# Maximum amount allowed to spend per interval.
|
||||
attr_accessor :amount
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories.
|
||||
attr_accessor :categories
|
||||
# Interval (or event) to which the amount applies.
|
||||
attr_accessor :interval
|
||||
|
||||
def initialize(amount: nil, categories: nil, interval: nil)
|
||||
@amount = amount
|
||||
@categories = categories
|
||||
@interval = interval
|
||||
end
|
||||
end
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`.
|
||||
attr_accessor :allowed_categories
|
||||
# Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :allowed_merchant_countries
|
||||
# Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`.
|
||||
attr_accessor :blocked_categories
|
||||
# Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control.
|
||||
attr_accessor :blocked_merchant_countries
|
||||
# Limit spending with amount-based rules that apply across this cardholder's cards.
|
||||
attr_accessor :spending_limits
|
||||
# Currency of amounts within `spending_limits`. Defaults to your merchant country's currency.
|
||||
attr_accessor :spending_limits_currency
|
||||
|
||||
def initialize(
|
||||
allowed_categories: nil,
|
||||
allowed_merchant_countries: nil,
|
||||
blocked_categories: nil,
|
||||
blocked_merchant_countries: nil,
|
||||
spending_limits: nil,
|
||||
spending_limits_currency: nil
|
||||
)
|
||||
@allowed_categories = allowed_categories
|
||||
@allowed_merchant_countries = allowed_merchant_countries
|
||||
@blocked_categories = blocked_categories
|
||||
@blocked_merchant_countries = blocked_merchant_countries
|
||||
@spending_limits = spending_limits
|
||||
@spending_limits_currency = spending_limits_currency
|
||||
end
|
||||
end
|
||||
# The cardholder's billing address.
|
||||
attr_accessor :billing
|
||||
# Additional information about a `company` cardholder.
|
||||
attr_accessor :company
|
||||
# The cardholder's email address.
|
||||
attr_accessor :email
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Additional information about an `individual` cardholder.
|
||||
attr_accessor :individual
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details.
|
||||
attr_accessor :phone_number
|
||||
# The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
|
||||
# This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
|
||||
attr_accessor :preferred_locales
|
||||
# Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
|
||||
attr_accessor :spending_controls
|
||||
# Specifies whether to permit authorizations on this cardholder's cards.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
billing: nil,
|
||||
company: nil,
|
||||
email: nil,
|
||||
expand: nil,
|
||||
individual: nil,
|
||||
metadata: nil,
|
||||
phone_number: nil,
|
||||
preferred_locales: nil,
|
||||
spending_controls: nil,
|
||||
status: nil
|
||||
)
|
||||
@billing = billing
|
||||
@company = company
|
||||
@email = email
|
||||
@expand = expand
|
||||
@individual = individual
|
||||
@metadata = metadata
|
||||
@phone_number = phone_number
|
||||
@preferred_locales = preferred_locales
|
||||
@spending_controls = spending_controls
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
# Attribute for field billing
|
||||
attr_reader :billing
|
||||
# Additional information about a `company` cardholder.
|
||||
attr_reader :company
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The cardholder's email address.
|
||||
attr_reader :email
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Additional information about an `individual` cardholder.
|
||||
attr_reader :individual
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The cardholder's name. This will be printed on cards issued to them.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details.
|
||||
attr_reader :phone_number
|
||||
# The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`.
|
||||
# This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder.
|
||||
attr_reader :preferred_locales
|
||||
# Attribute for field requirements
|
||||
attr_reader :requirements
|
||||
# Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details.
|
||||
attr_reader :spending_controls
|
||||
# Specifies whether to permit authorizations on this cardholder's cards.
|
||||
attr_reader :status
|
||||
# One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details.
|
||||
attr_reader :type
|
||||
|
||||
# Creates a new Issuing Cardholder object that can be issued cards.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
611
lib/stripe/resources/issuing/credit_underwriting_record.rb
Normal file
611
lib/stripe/resources/issuing/credit_underwriting_record.rb
Normal file
@ -0,0 +1,611 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Issuing
|
||||
# Every time an applicant submits an application for a Charge Card product your platform offers, or every time your platform takes a proactive credit decision on an existing account, you must record the decision by creating a new `CreditUnderwritingRecord` object on a connected account.
|
||||
#
|
||||
# [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform.
|
||||
class CreditUnderwritingRecord < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "issuing.credit_underwriting_record"
|
||||
def self.object_name
|
||||
"issuing.credit_underwriting_record"
|
||||
end
|
||||
|
||||
class Application < Stripe::StripeObject
|
||||
# The channel through which the applicant has submitted their application.
|
||||
attr_reader :application_method
|
||||
# Scope of demand made by the applicant.
|
||||
attr_reader :purpose
|
||||
# Date when the applicant submitted their application.
|
||||
attr_reader :submitted_at
|
||||
end
|
||||
|
||||
class CreditUser < Stripe::StripeObject
|
||||
# Email of the applicant or accountholder.
|
||||
attr_reader :email
|
||||
# Full name of the company or person.
|
||||
attr_reader :name
|
||||
end
|
||||
|
||||
class Decision < Stripe::StripeObject
|
||||
class ApplicationRejected < Stripe::StripeObject
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_reader :reason_other_explanation
|
||||
# List of reasons why the application was rejected up to 4 reasons, in order of importance.
|
||||
attr_reader :reasons
|
||||
end
|
||||
|
||||
class CreditLimitApproved < Stripe::StripeObject
|
||||
# Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy).
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
end
|
||||
|
||||
class CreditLimitDecreased < Stripe::StripeObject
|
||||
# Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy).
|
||||
attr_reader :amount
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_reader :reason_other_explanation
|
||||
# List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance.
|
||||
attr_reader :reasons
|
||||
end
|
||||
|
||||
class CreditLineClosed < Stripe::StripeObject
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_reader :reason_other_explanation
|
||||
# List of reasons why the existing account was closed, up to 4 reasons, in order of importance.
|
||||
attr_reader :reasons
|
||||
end
|
||||
# Details about a decision application_rejected.
|
||||
attr_reader :application_rejected
|
||||
# Details about a decision credit_limit_approved.
|
||||
attr_reader :credit_limit_approved
|
||||
# Details about a decision credit_limit_decreased.
|
||||
attr_reader :credit_limit_decreased
|
||||
# Details about a decision credit_line_closed.
|
||||
attr_reader :credit_line_closed
|
||||
# Outcome of the decision.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class UnderwritingException < Stripe::StripeObject
|
||||
# Written explanation for the exception.
|
||||
attr_reader :explanation
|
||||
# The decision before the exception was applied.
|
||||
attr_reader :original_decision_type
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class CorrectParams < Stripe::RequestParams
|
||||
class Application < Stripe::RequestParams
|
||||
# The channel through which the applicant has submitted their application. Defaults to `online`.
|
||||
attr_accessor :application_method
|
||||
# Scope of demand made by the applicant.
|
||||
attr_accessor :purpose
|
||||
# Date when the applicant submitted their application.
|
||||
attr_accessor :submitted_at
|
||||
|
||||
def initialize(application_method: nil, purpose: nil, submitted_at: nil)
|
||||
@application_method = application_method
|
||||
@purpose = purpose
|
||||
@submitted_at = submitted_at
|
||||
end
|
||||
end
|
||||
|
||||
class CreditUser < Stripe::RequestParams
|
||||
# Email of the applicant or accountholder.
|
||||
attr_accessor :email
|
||||
# Full name of the company or person.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(email: nil, name: nil)
|
||||
@email = email
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
|
||||
class Decision < Stripe::RequestParams
|
||||
class ApplicationRejected < Stripe::RequestParams
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the application was rejected, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(reason_other_explanation: nil, reasons: nil)
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLimitApproved < Stripe::RequestParams
|
||||
# The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# The currency of the credit approved, will default to the Account's Issuing currency.
|
||||
attr_accessor :currency
|
||||
|
||||
def initialize(amount: nil, currency: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLimitDecreased < Stripe::RequestParams
|
||||
# The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# The currency of the credit approved, will default to the Account's Issuing currency.
|
||||
attr_accessor :currency
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLineClosed < Stripe::RequestParams
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the credit line was closed, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(reason_other_explanation: nil, reasons: nil)
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
# Details about the application rejection.
|
||||
attr_accessor :application_rejected
|
||||
# Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/)
|
||||
attr_accessor :credit_limit_approved
|
||||
# Details about the credit limit decreased.
|
||||
attr_accessor :credit_limit_decreased
|
||||
# Details about the credit line closed.
|
||||
attr_accessor :credit_line_closed
|
||||
# Outcome of the decision.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
application_rejected: nil,
|
||||
credit_limit_approved: nil,
|
||||
credit_limit_decreased: nil,
|
||||
credit_line_closed: nil,
|
||||
type: nil
|
||||
)
|
||||
@application_rejected = application_rejected
|
||||
@credit_limit_approved = credit_limit_approved
|
||||
@credit_limit_decreased = credit_limit_decreased
|
||||
@credit_line_closed = credit_line_closed
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class UnderwritingException < Stripe::RequestParams
|
||||
# Written explanation for the exception.
|
||||
attr_accessor :explanation
|
||||
# The decision before the exception was applied.
|
||||
attr_accessor :original_decision_type
|
||||
|
||||
def initialize(explanation: nil, original_decision_type: nil)
|
||||
@explanation = explanation
|
||||
@original_decision_type = original_decision_type
|
||||
end
|
||||
end
|
||||
# Details about the application submission.
|
||||
attr_accessor :application
|
||||
# Information about the company or person applying or holding the account.
|
||||
attr_accessor :credit_user
|
||||
# Date when a decision was made.
|
||||
attr_accessor :decided_at
|
||||
# Details about the decision.
|
||||
attr_accessor :decision
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed.
|
||||
attr_accessor :regulatory_reporting_file
|
||||
# If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance.
|
||||
attr_accessor :underwriting_exception
|
||||
|
||||
def initialize(
|
||||
application: nil,
|
||||
credit_user: nil,
|
||||
decided_at: nil,
|
||||
decision: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
regulatory_reporting_file: nil,
|
||||
underwriting_exception: nil
|
||||
)
|
||||
@application = application
|
||||
@credit_user = credit_user
|
||||
@decided_at = decided_at
|
||||
@decision = decision
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@regulatory_reporting_file = regulatory_reporting_file
|
||||
@underwriting_exception = underwriting_exception
|
||||
end
|
||||
end
|
||||
|
||||
class ReportDecisionParams < Stripe::RequestParams
|
||||
class Decision < Stripe::RequestParams
|
||||
class ApplicationRejected < Stripe::RequestParams
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the application was rejected, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(reason_other_explanation: nil, reasons: nil)
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLimitApproved < Stripe::RequestParams
|
||||
# The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# The currency of the credit approved, will default to the Account's Issuing currency.
|
||||
attr_accessor :currency
|
||||
|
||||
def initialize(amount: nil, currency: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
end
|
||||
end
|
||||
# Details about the application rejection.
|
||||
attr_accessor :application_rejected
|
||||
# Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/)
|
||||
attr_accessor :credit_limit_approved
|
||||
# Outcome of the decision.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(application_rejected: nil, credit_limit_approved: nil, type: nil)
|
||||
@application_rejected = application_rejected
|
||||
@credit_limit_approved = credit_limit_approved
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class UnderwritingException < Stripe::RequestParams
|
||||
# Written explanation for the exception.
|
||||
attr_accessor :explanation
|
||||
# The decision before the exception was applied.
|
||||
attr_accessor :original_decision_type
|
||||
|
||||
def initialize(explanation: nil, original_decision_type: nil)
|
||||
@explanation = explanation
|
||||
@original_decision_type = original_decision_type
|
||||
end
|
||||
end
|
||||
# Date when a decision was made.
|
||||
attr_accessor :decided_at
|
||||
# Details about the decision.
|
||||
attr_accessor :decision
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions).
|
||||
attr_accessor :regulatory_reporting_file
|
||||
# If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance.
|
||||
attr_accessor :underwriting_exception
|
||||
|
||||
def initialize(
|
||||
decided_at: nil,
|
||||
decision: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
regulatory_reporting_file: nil,
|
||||
underwriting_exception: nil
|
||||
)
|
||||
@decided_at = decided_at
|
||||
@decision = decision
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@regulatory_reporting_file = regulatory_reporting_file
|
||||
@underwriting_exception = underwriting_exception
|
||||
end
|
||||
end
|
||||
|
||||
class CreateFromApplicationParams < Stripe::RequestParams
|
||||
class Application < Stripe::RequestParams
|
||||
# The channel through which the applicant has submitted their application. Defaults to `online`.
|
||||
attr_accessor :application_method
|
||||
# Scope of demand made by the applicant.
|
||||
attr_accessor :purpose
|
||||
# Date when the applicant submitted their application.
|
||||
attr_accessor :submitted_at
|
||||
|
||||
def initialize(application_method: nil, purpose: nil, submitted_at: nil)
|
||||
@application_method = application_method
|
||||
@purpose = purpose
|
||||
@submitted_at = submitted_at
|
||||
end
|
||||
end
|
||||
|
||||
class CreditUser < Stripe::RequestParams
|
||||
# Email of the applicant or accountholder.
|
||||
attr_accessor :email
|
||||
# Full name of the company or person.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(email: nil, name: nil)
|
||||
@email = email
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
# Details about the application submission.
|
||||
attr_accessor :application
|
||||
# Information about the company or person applying or holding the account.
|
||||
attr_accessor :credit_user
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(application: nil, credit_user: nil, expand: nil, metadata: nil)
|
||||
@application = application
|
||||
@credit_user = credit_user
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class CreateFromProactiveReviewParams < Stripe::RequestParams
|
||||
class CreditUser < Stripe::RequestParams
|
||||
# Email of the applicant or accountholder.
|
||||
attr_accessor :email
|
||||
# Full name of the company or person.
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(email: nil, name: nil)
|
||||
@email = email
|
||||
@name = name
|
||||
end
|
||||
end
|
||||
|
||||
class Decision < Stripe::RequestParams
|
||||
class CreditLimitApproved < Stripe::RequestParams
|
||||
# The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# The currency of the credit approved, will default to the Account's Issuing currency.
|
||||
attr_accessor :currency
|
||||
|
||||
def initialize(amount: nil, currency: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLimitDecreased < Stripe::RequestParams
|
||||
# The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# The currency of the credit approved, will default to the Account's Issuing currency.
|
||||
attr_accessor :currency
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil)
|
||||
@amount = amount
|
||||
@currency = currency
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
|
||||
class CreditLineClosed < Stripe::RequestParams
|
||||
# Details about the `reasons.other` when present.
|
||||
attr_accessor :reason_other_explanation
|
||||
# List of reasons why the credit line was closed, up to 4 reasons, in order of importance.
|
||||
attr_accessor :reasons
|
||||
|
||||
def initialize(reason_other_explanation: nil, reasons: nil)
|
||||
@reason_other_explanation = reason_other_explanation
|
||||
@reasons = reasons
|
||||
end
|
||||
end
|
||||
# Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/)
|
||||
attr_accessor :credit_limit_approved
|
||||
# Details about the credit limit decreased.
|
||||
attr_accessor :credit_limit_decreased
|
||||
# Details about the credit line closed.
|
||||
attr_accessor :credit_line_closed
|
||||
# Outcome of the decision.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
credit_limit_approved: nil,
|
||||
credit_limit_decreased: nil,
|
||||
credit_line_closed: nil,
|
||||
type: nil
|
||||
)
|
||||
@credit_limit_approved = credit_limit_approved
|
||||
@credit_limit_decreased = credit_limit_decreased
|
||||
@credit_line_closed = credit_line_closed
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class UnderwritingException < Stripe::RequestParams
|
||||
# Written explanation for the exception.
|
||||
attr_accessor :explanation
|
||||
# The decision before the exception was applied.
|
||||
attr_accessor :original_decision_type
|
||||
|
||||
def initialize(explanation: nil, original_decision_type: nil)
|
||||
@explanation = explanation
|
||||
@original_decision_type = original_decision_type
|
||||
end
|
||||
end
|
||||
# Information about the company or person applying or holding the account.
|
||||
attr_accessor :credit_user
|
||||
# Date when a decision was made.
|
||||
attr_accessor :decided_at
|
||||
# Details about the decision.
|
||||
attr_accessor :decision
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions).
|
||||
attr_accessor :regulatory_reporting_file
|
||||
# If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance.
|
||||
attr_accessor :underwriting_exception
|
||||
|
||||
def initialize(
|
||||
credit_user: nil,
|
||||
decided_at: nil,
|
||||
decision: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
regulatory_reporting_file: nil,
|
||||
underwriting_exception: nil
|
||||
)
|
||||
@credit_user = credit_user
|
||||
@decided_at = decided_at
|
||||
@decision = decision
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@regulatory_reporting_file = regulatory_reporting_file
|
||||
@underwriting_exception = underwriting_exception
|
||||
end
|
||||
end
|
||||
# For decisions triggered by an application, details about the submission.
|
||||
attr_reader :application
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The event that triggered the underwriting.
|
||||
attr_reader :created_from
|
||||
# Attribute for field credit_user
|
||||
attr_reader :credit_user
|
||||
# Date when a decision was made.
|
||||
attr_reader :decided_at
|
||||
# Details about the decision.
|
||||
attr_reader :decision
|
||||
# For underwriting initiated by an application, a decision must be taken 30 days after the submission.
|
||||
attr_reader :decision_deadline
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions).
|
||||
attr_reader :regulatory_reporting_file
|
||||
# If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance.
|
||||
attr_reader :underwriting_exception
|
||||
|
||||
# Update a CreditUnderwritingRecord object to correct mistakes.
|
||||
def correct(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/correct", { credit_underwriting_record: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Update a CreditUnderwritingRecord object to correct mistakes.
|
||||
def self.correct(credit_underwriting_record, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/correct", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Creates a CreditUnderwritingRecord object with information about a credit application submission.
|
||||
def self.create_from_application(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/issuing/credit_underwriting_records/create_from_application",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder.
|
||||
def self.create_from_proactive_review(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: "/v1/issuing/credit_underwriting_records/create_from_proactive_review",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/issuing/credit_underwriting_records",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Update a CreditUnderwritingRecord object from a decision made on a credit application.
|
||||
def report_decision(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/report_decision", { credit_underwriting_record: CGI.escape(self["id"]) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
|
||||
# Update a CreditUnderwritingRecord object from a decision made on a credit application.
|
||||
def self.report_decision(credit_underwriting_record, params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :post,
|
||||
path: format("/v1/issuing/credit_underwriting_records/%<credit_underwriting_record>s/report_decision", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }),
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -16,6 +16,796 @@ module Stripe
|
||||
"issuing.dispute"
|
||||
end
|
||||
|
||||
class Evidence < Stripe::StripeObject
|
||||
class Canceled < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_reader :canceled_at
|
||||
# Whether the cardholder was provided with a cancellation policy.
|
||||
attr_reader :cancellation_policy_provided
|
||||
# Reason for canceling the order.
|
||||
attr_reader :cancellation_reason
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_reader :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_reader :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_reader :product_type
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_reader :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_reader :returned_at
|
||||
end
|
||||
|
||||
class Duplicate < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
|
||||
attr_reader :card_statement
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
|
||||
attr_reader :cash_receipt
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
|
||||
attr_reader :check_image
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
|
||||
attr_reader :original_transaction
|
||||
end
|
||||
|
||||
class Fraudulent < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
end
|
||||
|
||||
class MerchandiseNotAsDescribed < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Date when the product was received.
|
||||
attr_reader :received_at
|
||||
# Description of the cardholder's attempt to return the product.
|
||||
attr_reader :return_description
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_reader :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_reader :returned_at
|
||||
end
|
||||
|
||||
class NoValidAuthorization < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
end
|
||||
|
||||
class NotReceived < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_reader :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_reader :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_reader :product_type
|
||||
end
|
||||
|
||||
class Other < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_reader :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_reader :product_type
|
||||
end
|
||||
|
||||
class ServiceNotAsDescribed < Stripe::StripeObject
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_reader :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_reader :canceled_at
|
||||
# Reason for canceling the order.
|
||||
attr_reader :cancellation_reason
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_reader :explanation
|
||||
# Date when the product was received.
|
||||
attr_reader :received_at
|
||||
end
|
||||
# Attribute for field canceled
|
||||
attr_reader :canceled
|
||||
# Attribute for field duplicate
|
||||
attr_reader :duplicate
|
||||
# Attribute for field fraudulent
|
||||
attr_reader :fraudulent
|
||||
# Attribute for field merchandise_not_as_described
|
||||
attr_reader :merchandise_not_as_described
|
||||
# Attribute for field no_valid_authorization
|
||||
attr_reader :no_valid_authorization
|
||||
# Attribute for field not_received
|
||||
attr_reader :not_received
|
||||
# Attribute for field other
|
||||
attr_reader :other
|
||||
# The reason for filing the dispute. Its value will match the field containing the evidence.
|
||||
attr_reader :reason
|
||||
# Attribute for field service_not_as_described
|
||||
attr_reader :service_not_as_described
|
||||
end
|
||||
|
||||
class Treasury < Stripe::StripeObject
|
||||
# The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute
|
||||
attr_reader :debit_reversal
|
||||
# The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed.
|
||||
attr_reader :received_debit
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return Issuing disputes that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Select Issuing disputes with the given status.
|
||||
attr_accessor :status
|
||||
# Select the Issuing dispute for the given transaction.
|
||||
attr_accessor :transaction
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
status: nil,
|
||||
transaction: nil
|
||||
)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
@transaction = transaction
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class Evidence < Stripe::RequestParams
|
||||
class Canceled < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_accessor :canceled_at
|
||||
# Whether the cardholder was provided with a cancellation policy.
|
||||
attr_accessor :cancellation_policy_provided
|
||||
# Reason for canceling the order.
|
||||
attr_accessor :cancellation_reason
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_accessor :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_accessor :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_accessor :returned_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
canceled_at: nil,
|
||||
cancellation_policy_provided: nil,
|
||||
cancellation_reason: nil,
|
||||
expected_at: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil,
|
||||
return_status: nil,
|
||||
returned_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@canceled_at = canceled_at
|
||||
@cancellation_policy_provided = cancellation_policy_provided
|
||||
@cancellation_reason = cancellation_reason
|
||||
@expected_at = expected_at
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
@return_status = return_status
|
||||
@returned_at = returned_at
|
||||
end
|
||||
end
|
||||
|
||||
class Duplicate < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
|
||||
attr_accessor :card_statement
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
|
||||
attr_accessor :cash_receipt
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
|
||||
attr_accessor :check_image
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
|
||||
attr_accessor :original_transaction
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
card_statement: nil,
|
||||
cash_receipt: nil,
|
||||
check_image: nil,
|
||||
explanation: nil,
|
||||
original_transaction: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@card_statement = card_statement
|
||||
@cash_receipt = cash_receipt
|
||||
@check_image = check_image
|
||||
@explanation = explanation
|
||||
@original_transaction = original_transaction
|
||||
end
|
||||
end
|
||||
|
||||
class Fraudulent < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
|
||||
def initialize(additional_documentation: nil, explanation: nil)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
end
|
||||
end
|
||||
|
||||
class MerchandiseNotAsDescribed < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Date when the product was received.
|
||||
attr_accessor :received_at
|
||||
# Description of the cardholder's attempt to return the product.
|
||||
attr_accessor :return_description
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_accessor :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_accessor :returned_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
explanation: nil,
|
||||
received_at: nil,
|
||||
return_description: nil,
|
||||
return_status: nil,
|
||||
returned_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
@received_at = received_at
|
||||
@return_description = return_description
|
||||
@return_status = return_status
|
||||
@returned_at = returned_at
|
||||
end
|
||||
end
|
||||
|
||||
class NoValidAuthorization < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
|
||||
def initialize(additional_documentation: nil, explanation: nil)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
end
|
||||
end
|
||||
|
||||
class NotReceived < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_accessor :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
expected_at: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@expected_at = expected_at
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
end
|
||||
end
|
||||
|
||||
class Other < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
end
|
||||
end
|
||||
|
||||
class ServiceNotAsDescribed < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_accessor :canceled_at
|
||||
# Reason for canceling the order.
|
||||
attr_accessor :cancellation_reason
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Date when the product was received.
|
||||
attr_accessor :received_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
canceled_at: nil,
|
||||
cancellation_reason: nil,
|
||||
explanation: nil,
|
||||
received_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@canceled_at = canceled_at
|
||||
@cancellation_reason = cancellation_reason
|
||||
@explanation = explanation
|
||||
@received_at = received_at
|
||||
end
|
||||
end
|
||||
# Evidence provided when `reason` is 'canceled'.
|
||||
attr_accessor :canceled
|
||||
# Evidence provided when `reason` is 'duplicate'.
|
||||
attr_accessor :duplicate
|
||||
# Evidence provided when `reason` is 'fraudulent'.
|
||||
attr_accessor :fraudulent
|
||||
# Evidence provided when `reason` is 'merchandise_not_as_described'.
|
||||
attr_accessor :merchandise_not_as_described
|
||||
# Evidence provided when `reason` is 'no_valid_authorization'.
|
||||
attr_accessor :no_valid_authorization
|
||||
# Evidence provided when `reason` is 'not_received'.
|
||||
attr_accessor :not_received
|
||||
# Evidence provided when `reason` is 'other'.
|
||||
attr_accessor :other
|
||||
# The reason for filing the dispute. The evidence should be submitted in the field of the same name.
|
||||
attr_accessor :reason
|
||||
# Evidence provided when `reason` is 'service_not_as_described'.
|
||||
attr_accessor :service_not_as_described
|
||||
|
||||
def initialize(
|
||||
canceled: nil,
|
||||
duplicate: nil,
|
||||
fraudulent: nil,
|
||||
merchandise_not_as_described: nil,
|
||||
no_valid_authorization: nil,
|
||||
not_received: nil,
|
||||
other: nil,
|
||||
reason: nil,
|
||||
service_not_as_described: nil
|
||||
)
|
||||
@canceled = canceled
|
||||
@duplicate = duplicate
|
||||
@fraudulent = fraudulent
|
||||
@merchandise_not_as_described = merchandise_not_as_described
|
||||
@no_valid_authorization = no_valid_authorization
|
||||
@not_received = not_received
|
||||
@other = other
|
||||
@reason = reason
|
||||
@service_not_as_described = service_not_as_described
|
||||
end
|
||||
end
|
||||
|
||||
class Treasury < Stripe::RequestParams
|
||||
# The ID of the ReceivedDebit to initiate an Issuings dispute for.
|
||||
attr_accessor :received_debit
|
||||
|
||||
def initialize(received_debit: nil)
|
||||
@received_debit = received_debit
|
||||
end
|
||||
end
|
||||
# The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount.
|
||||
attr_accessor :amount
|
||||
# Evidence provided for the dispute.
|
||||
attr_accessor :evidence
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`.
|
||||
attr_accessor :transaction
|
||||
# Params for disputes related to Treasury FinancialAccounts
|
||||
attr_accessor :treasury
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
evidence: nil,
|
||||
expand: nil,
|
||||
metadata: nil,
|
||||
transaction: nil,
|
||||
treasury: nil
|
||||
)
|
||||
@amount = amount
|
||||
@evidence = evidence
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
@transaction = transaction
|
||||
@treasury = treasury
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class Evidence < Stripe::RequestParams
|
||||
class Canceled < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_accessor :canceled_at
|
||||
# Whether the cardholder was provided with a cancellation policy.
|
||||
attr_accessor :cancellation_policy_provided
|
||||
# Reason for canceling the order.
|
||||
attr_accessor :cancellation_reason
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_accessor :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_accessor :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_accessor :returned_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
canceled_at: nil,
|
||||
cancellation_policy_provided: nil,
|
||||
cancellation_reason: nil,
|
||||
expected_at: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil,
|
||||
return_status: nil,
|
||||
returned_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@canceled_at = canceled_at
|
||||
@cancellation_policy_provided = cancellation_policy_provided
|
||||
@cancellation_reason = cancellation_reason
|
||||
@expected_at = expected_at
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
@return_status = return_status
|
||||
@returned_at = returned_at
|
||||
end
|
||||
end
|
||||
|
||||
class Duplicate < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for.
|
||||
attr_accessor :card_statement
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash.
|
||||
attr_accessor :cash_receipt
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product.
|
||||
attr_accessor :check_image
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one.
|
||||
attr_accessor :original_transaction
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
card_statement: nil,
|
||||
cash_receipt: nil,
|
||||
check_image: nil,
|
||||
explanation: nil,
|
||||
original_transaction: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@card_statement = card_statement
|
||||
@cash_receipt = cash_receipt
|
||||
@check_image = check_image
|
||||
@explanation = explanation
|
||||
@original_transaction = original_transaction
|
||||
end
|
||||
end
|
||||
|
||||
class Fraudulent < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
|
||||
def initialize(additional_documentation: nil, explanation: nil)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
end
|
||||
end
|
||||
|
||||
class MerchandiseNotAsDescribed < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Date when the product was received.
|
||||
attr_accessor :received_at
|
||||
# Description of the cardholder's attempt to return the product.
|
||||
attr_accessor :return_description
|
||||
# Result of cardholder's attempt to return the product.
|
||||
attr_accessor :return_status
|
||||
# Date when the product was returned or attempted to be returned.
|
||||
attr_accessor :returned_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
explanation: nil,
|
||||
received_at: nil,
|
||||
return_description: nil,
|
||||
return_status: nil,
|
||||
returned_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
@received_at = received_at
|
||||
@return_description = return_description
|
||||
@return_status = return_status
|
||||
@returned_at = returned_at
|
||||
end
|
||||
end
|
||||
|
||||
class NoValidAuthorization < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
|
||||
def initialize(additional_documentation: nil, explanation: nil)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
end
|
||||
end
|
||||
|
||||
class NotReceived < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when the cardholder expected to receive the product.
|
||||
attr_accessor :expected_at
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
expected_at: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@expected_at = expected_at
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
end
|
||||
end
|
||||
|
||||
class Other < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Description of the merchandise or service that was purchased.
|
||||
attr_accessor :product_description
|
||||
# Whether the product was a merchandise or service.
|
||||
attr_accessor :product_type
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
explanation: nil,
|
||||
product_description: nil,
|
||||
product_type: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@explanation = explanation
|
||||
@product_description = product_description
|
||||
@product_type = product_type
|
||||
end
|
||||
end
|
||||
|
||||
class ServiceNotAsDescribed < Stripe::RequestParams
|
||||
# (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute.
|
||||
attr_accessor :additional_documentation
|
||||
# Date when order was canceled.
|
||||
attr_accessor :canceled_at
|
||||
# Reason for canceling the order.
|
||||
attr_accessor :cancellation_reason
|
||||
# Explanation of why the cardholder is disputing this transaction.
|
||||
attr_accessor :explanation
|
||||
# Date when the product was received.
|
||||
attr_accessor :received_at
|
||||
|
||||
def initialize(
|
||||
additional_documentation: nil,
|
||||
canceled_at: nil,
|
||||
cancellation_reason: nil,
|
||||
explanation: nil,
|
||||
received_at: nil
|
||||
)
|
||||
@additional_documentation = additional_documentation
|
||||
@canceled_at = canceled_at
|
||||
@cancellation_reason = cancellation_reason
|
||||
@explanation = explanation
|
||||
@received_at = received_at
|
||||
end
|
||||
end
|
||||
# Evidence provided when `reason` is 'canceled'.
|
||||
attr_accessor :canceled
|
||||
# Evidence provided when `reason` is 'duplicate'.
|
||||
attr_accessor :duplicate
|
||||
# Evidence provided when `reason` is 'fraudulent'.
|
||||
attr_accessor :fraudulent
|
||||
# Evidence provided when `reason` is 'merchandise_not_as_described'.
|
||||
attr_accessor :merchandise_not_as_described
|
||||
# Evidence provided when `reason` is 'no_valid_authorization'.
|
||||
attr_accessor :no_valid_authorization
|
||||
# Evidence provided when `reason` is 'not_received'.
|
||||
attr_accessor :not_received
|
||||
# Evidence provided when `reason` is 'other'.
|
||||
attr_accessor :other
|
||||
# The reason for filing the dispute. The evidence should be submitted in the field of the same name.
|
||||
attr_accessor :reason
|
||||
# Evidence provided when `reason` is 'service_not_as_described'.
|
||||
attr_accessor :service_not_as_described
|
||||
|
||||
def initialize(
|
||||
canceled: nil,
|
||||
duplicate: nil,
|
||||
fraudulent: nil,
|
||||
merchandise_not_as_described: nil,
|
||||
no_valid_authorization: nil,
|
||||
not_received: nil,
|
||||
other: nil,
|
||||
reason: nil,
|
||||
service_not_as_described: nil
|
||||
)
|
||||
@canceled = canceled
|
||||
@duplicate = duplicate
|
||||
@fraudulent = fraudulent
|
||||
@merchandise_not_as_described = merchandise_not_as_described
|
||||
@no_valid_authorization = no_valid_authorization
|
||||
@not_received = not_received
|
||||
@other = other
|
||||
@reason = reason
|
||||
@service_not_as_described = service_not_as_described
|
||||
end
|
||||
end
|
||||
# The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# Evidence provided for the dispute.
|
||||
attr_accessor :evidence
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil)
|
||||
@amount = amount
|
||||
@evidence = evidence
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class SubmitParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
# Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation).
|
||||
attr_reader :amount
|
||||
# List of balance transactions associated with the dispute.
|
||||
attr_reader :balance_transactions
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The currency the `transaction` was made in.
|
||||
attr_reader :currency
|
||||
# Attribute for field evidence
|
||||
attr_reader :evidence
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
|
||||
attr_reader :loss_reason
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Current status of the dispute.
|
||||
attr_reader :status
|
||||
# The transaction being disputed.
|
||||
attr_reader :transaction
|
||||
# [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
attr_reader :treasury
|
||||
|
||||
# Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
84
lib/stripe/resources/issuing/dispute_settlement_detail.rb
Normal file
84
lib/stripe/resources/issuing/dispute_settlement_detail.rb
Normal file
@ -0,0 +1,84 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Issuing
|
||||
# Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects.
|
||||
class DisputeSettlementDetail < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "issuing.dispute_settlement_detail"
|
||||
def self.object_name
|
||||
"issuing.dispute_settlement_detail"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Select the Issuing dispute settlement details for the given settlement.
|
||||
attr_accessor :settlement
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
settlement: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@settlement = settlement
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
|
||||
attr_reader :amount
|
||||
# The card used to make the original transaction.
|
||||
attr_reader :card
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The ID of the linked dispute.
|
||||
attr_reader :dispute
|
||||
# The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle.
|
||||
attr_reader :event_type
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"]
|
||||
attr_reader :network
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The ID of the linked card network settlement.
|
||||
attr_reader :settlement
|
||||
|
||||
# Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/issuing/dispute_settlement_details",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
95
lib/stripe/resources/issuing/fraud_liability_debit.rb
Normal file
95
lib/stripe/resources/issuing/fraud_liability_debit.rb
Normal file
@ -0,0 +1,95 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Issuing
|
||||
# A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
|
||||
class FraudLiabilityDebit < APIResource
|
||||
extend Stripe::APIOperations::List
|
||||
|
||||
OBJECT_NAME = "issuing.fraud_liability_debit"
|
||||
def self.object_name
|
||||
"issuing.fraud_liability_debit"
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return Issuing Fraud Liability Debits that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
|
||||
def initialize(
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil
|
||||
)
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit.
|
||||
attr_reader :amount
|
||||
# ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit.
|
||||
attr_reader :balance_transaction
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# The ID of the linked dispute.
|
||||
attr_reader :dispute
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
|
||||
# Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
method: :get,
|
||||
path: "/v1/issuing/fraud_liability_debits",
|
||||
params: params,
|
||||
opts: opts
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
@ -14,6 +14,291 @@ module Stripe
|
||||
"issuing.personalization_design"
|
||||
end
|
||||
|
||||
class CarrierText < Stripe::StripeObject
|
||||
# The footer body text of the carrier letter.
|
||||
attr_reader :footer_body
|
||||
# The footer title text of the carrier letter.
|
||||
attr_reader :footer_title
|
||||
# The header body text of the carrier letter.
|
||||
attr_reader :header_body
|
||||
# The header title text of the carrier letter.
|
||||
attr_reader :header_title
|
||||
end
|
||||
|
||||
class Preferences < Stripe::StripeObject
|
||||
# Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
|
||||
attr_reader :is_default
|
||||
# Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist.
|
||||
attr_reader :is_platform_default
|
||||
end
|
||||
|
||||
class RejectionReasons < Stripe::StripeObject
|
||||
# The reason(s) the card logo was rejected.
|
||||
attr_reader :card_logo
|
||||
# The reason(s) the carrier text was rejected.
|
||||
attr_reader :carrier_text
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Preferences < Stripe::RequestParams
|
||||
# Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default.
|
||||
attr_accessor :is_default
|
||||
# Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts.
|
||||
attr_accessor :is_platform_default
|
||||
|
||||
def initialize(is_default: nil, is_platform_default: nil)
|
||||
@is_default = is_default
|
||||
@is_platform_default = is_platform_default
|
||||
end
|
||||
end
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Only return personalization designs with the given lookup keys.
|
||||
attr_accessor :lookup_keys
|
||||
# Only return personalization designs with the given preferences.
|
||||
attr_accessor :preferences
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return personalization designs with the given status.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
lookup_keys: nil,
|
||||
preferences: nil,
|
||||
starting_after: nil,
|
||||
status: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@lookup_keys = lookup_keys
|
||||
@preferences = preferences
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class CreateParams < Stripe::RequestParams
|
||||
class CarrierText < Stripe::RequestParams
|
||||
# The footer body text of the carrier letter.
|
||||
attr_accessor :footer_body
|
||||
# The footer title text of the carrier letter.
|
||||
attr_accessor :footer_title
|
||||
# The header body text of the carrier letter.
|
||||
attr_accessor :header_body
|
||||
# The header title text of the carrier letter.
|
||||
attr_accessor :header_title
|
||||
|
||||
def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
|
||||
@footer_body = footer_body
|
||||
@footer_title = footer_title
|
||||
@header_body = header_body
|
||||
@header_title = header_title
|
||||
end
|
||||
end
|
||||
|
||||
class Preferences < Stripe::RequestParams
|
||||
# Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
|
||||
attr_accessor :is_default
|
||||
|
||||
def initialize(is_default: nil)
|
||||
@is_default = is_default
|
||||
end
|
||||
end
|
||||
# The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
|
||||
attr_accessor :card_logo
|
||||
# Hash containing carrier text, for use with physical bundles that support carrier text.
|
||||
attr_accessor :carrier_text
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
|
||||
attr_accessor :lookup_key
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Friendly display name.
|
||||
attr_accessor :name
|
||||
# The physical bundle object belonging to this personalization design.
|
||||
attr_accessor :physical_bundle
|
||||
# Information on whether this personalization design is used to create cards when one is not specified.
|
||||
attr_accessor :preferences
|
||||
# If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
|
||||
attr_accessor :transfer_lookup_key
|
||||
|
||||
def initialize(
|
||||
card_logo: nil,
|
||||
carrier_text: nil,
|
||||
expand: nil,
|
||||
lookup_key: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
physical_bundle: nil,
|
||||
preferences: nil,
|
||||
transfer_lookup_key: nil
|
||||
)
|
||||
@card_logo = card_logo
|
||||
@carrier_text = carrier_text
|
||||
@expand = expand
|
||||
@lookup_key = lookup_key
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@physical_bundle = physical_bundle
|
||||
@preferences = preferences
|
||||
@transfer_lookup_key = transfer_lookup_key
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
class CarrierText < Stripe::RequestParams
|
||||
# The footer body text of the carrier letter.
|
||||
attr_accessor :footer_body
|
||||
# The footer title text of the carrier letter.
|
||||
attr_accessor :footer_title
|
||||
# The header body text of the carrier letter.
|
||||
attr_accessor :header_body
|
||||
# The header title text of the carrier letter.
|
||||
attr_accessor :header_title
|
||||
|
||||
def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil)
|
||||
@footer_body = footer_body
|
||||
@footer_title = footer_title
|
||||
@header_body = header_body
|
||||
@header_title = header_title
|
||||
end
|
||||
end
|
||||
|
||||
class Preferences < Stripe::RequestParams
|
||||
# Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design.
|
||||
attr_accessor :is_default
|
||||
|
||||
def initialize(is_default: nil)
|
||||
@is_default = is_default
|
||||
end
|
||||
end
|
||||
# The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
|
||||
attr_accessor :card_logo
|
||||
# Hash containing carrier text, for use with physical bundles that support carrier text.
|
||||
attr_accessor :carrier_text
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
|
||||
attr_accessor :lookup_key
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
# Friendly display name. Providing an empty string will set the field to null.
|
||||
attr_accessor :name
|
||||
# The physical bundle object belonging to this personalization design.
|
||||
attr_accessor :physical_bundle
|
||||
# Information on whether this personalization design is used to create cards when one is not specified.
|
||||
attr_accessor :preferences
|
||||
# If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design.
|
||||
attr_accessor :transfer_lookup_key
|
||||
|
||||
def initialize(
|
||||
card_logo: nil,
|
||||
carrier_text: nil,
|
||||
expand: nil,
|
||||
lookup_key: nil,
|
||||
metadata: nil,
|
||||
name: nil,
|
||||
physical_bundle: nil,
|
||||
preferences: nil,
|
||||
transfer_lookup_key: nil
|
||||
)
|
||||
@card_logo = card_logo
|
||||
@carrier_text = carrier_text
|
||||
@expand = expand
|
||||
@lookup_key = lookup_key
|
||||
@metadata = metadata
|
||||
@name = name
|
||||
@physical_bundle = physical_bundle
|
||||
@preferences = preferences
|
||||
@transfer_lookup_key = transfer_lookup_key
|
||||
end
|
||||
end
|
||||
|
||||
class ActivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class DeactivateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class RejectParams < Stripe::RequestParams
|
||||
class RejectionReasons < Stripe::RequestParams
|
||||
# The reason(s) the card logo was rejected.
|
||||
attr_accessor :card_logo
|
||||
# The reason(s) the carrier text was rejected.
|
||||
attr_accessor :carrier_text
|
||||
|
||||
def initialize(card_logo: nil, carrier_text: nil)
|
||||
@card_logo = card_logo
|
||||
@carrier_text = carrier_text
|
||||
end
|
||||
end
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The reason(s) the personalization design was rejected.
|
||||
attr_accessor :rejection_reasons
|
||||
|
||||
def initialize(expand: nil, rejection_reasons: nil)
|
||||
@expand = expand
|
||||
@rejection_reasons = rejection_reasons
|
||||
end
|
||||
end
|
||||
# The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`.
|
||||
attr_reader :card_logo
|
||||
# Hash containing carrier text, for use with physical bundles that support carrier text.
|
||||
attr_reader :carrier_text
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters.
|
||||
attr_reader :lookup_key
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Friendly display name.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The physical bundle object belonging to this personalization design.
|
||||
attr_reader :physical_bundle
|
||||
# Attribute for field preferences
|
||||
attr_reader :preferences
|
||||
# Attribute for field rejection_reasons
|
||||
attr_reader :rejection_reasons
|
||||
# Whether this personalization design can be used to create cards.
|
||||
attr_reader :status
|
||||
|
||||
# Creates a personalization design object.
|
||||
def self.create(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -12,6 +12,69 @@ module Stripe
|
||||
"issuing.physical_bundle"
|
||||
end
|
||||
|
||||
class Features < Stripe::StripeObject
|
||||
# The policy for how to use card logo images in a card design with this physical bundle.
|
||||
attr_reader :card_logo
|
||||
# The policy for how to use carrier letter text in a card design with this physical bundle.
|
||||
attr_reader :carrier_text
|
||||
# The policy for how to use a second line on a card with this physical bundle.
|
||||
attr_reader :second_line
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return physical bundles with the given status.
|
||||
attr_accessor :status
|
||||
# Only return physical bundles with the given type.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
status: nil,
|
||||
type: nil
|
||||
)
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
# Attribute for field features
|
||||
attr_reader :features
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Friendly display name.
|
||||
attr_reader :name
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Whether this physical bundle can be used to create cards.
|
||||
attr_reader :status
|
||||
# Whether this physical bundle is a standard Stripe offering or custom-made for you.
|
||||
attr_reader :type
|
||||
|
||||
# Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
49
lib/stripe/resources/issuing/settlement.rb
Normal file
49
lib/stripe/resources/issuing/settlement.rb
Normal file
@ -0,0 +1,49 @@
|
||||
# File generated from our OpenAPI spec
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Stripe
|
||||
module Issuing
|
||||
# When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object.
|
||||
class Settlement < APIResource
|
||||
OBJECT_NAME = "issuing.settlement"
|
||||
def self.object_name
|
||||
"issuing.settlement"
|
||||
end
|
||||
|
||||
# The Bank Identification Number reflecting this settlement record.
|
||||
attr_reader :bin
|
||||
# The date that the transactions are cleared and posted to user's accounts.
|
||||
attr_reader :clearing_date
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The total interchange received as reimbursement for the transactions.
|
||||
attr_reader :interchange_fees
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# The total net amount required to settle with the network.
|
||||
attr_reader :net_total
|
||||
# The card network for this settlement report. One of ["visa", "maestro"]
|
||||
attr_reader :network
|
||||
# The total amount of fees owed to the network.
|
||||
attr_reader :network_fees
|
||||
# The Settlement Identification Number assigned by the network.
|
||||
attr_reader :network_settlement_identifier
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# One of `international` or `uk_national_net`.
|
||||
attr_reader :settlement_service
|
||||
# The current processing status of this settlement.
|
||||
attr_reader :status
|
||||
# The total number of transactions reflected in this settlement.
|
||||
attr_reader :transaction_count
|
||||
# The total transaction amount reflected in this settlement.
|
||||
attr_reader :transaction_volume
|
||||
end
|
||||
end
|
||||
end
|
@ -13,6 +13,181 @@ module Stripe
|
||||
"issuing.token"
|
||||
end
|
||||
|
||||
class NetworkData < Stripe::StripeObject
|
||||
class Device < Stripe::StripeObject
|
||||
# An obfuscated ID derived from the device ID.
|
||||
attr_reader :device_fingerprint
|
||||
# The IP address of the device at provisioning time.
|
||||
attr_reader :ip_address
|
||||
# The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal.
|
||||
attr_reader :location
|
||||
# The name of the device used for tokenization.
|
||||
attr_reader :name
|
||||
# The phone number of the device used for tokenization.
|
||||
attr_reader :phone_number
|
||||
# The type of device used for tokenization.
|
||||
attr_reader :type
|
||||
end
|
||||
|
||||
class Mastercard < Stripe::StripeObject
|
||||
# A unique reference ID from MasterCard to represent the card account number.
|
||||
attr_reader :card_reference_id
|
||||
# The network-unique identifier for the token.
|
||||
attr_reader :token_reference_id
|
||||
# The ID of the entity requesting tokenization, specific to MasterCard.
|
||||
attr_reader :token_requestor_id
|
||||
# The name of the entity requesting tokenization, if known. This is directly provided from MasterCard.
|
||||
attr_reader :token_requestor_name
|
||||
end
|
||||
|
||||
class Visa < Stripe::StripeObject
|
||||
# A unique reference ID from Visa to represent the card account number.
|
||||
attr_reader :card_reference_id
|
||||
# The network-unique identifier for the token.
|
||||
attr_reader :token_reference_id
|
||||
# The ID of the entity requesting tokenization, specific to Visa.
|
||||
attr_reader :token_requestor_id
|
||||
# Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa.
|
||||
attr_reader :token_risk_score
|
||||
end
|
||||
|
||||
class WalletProvider < Stripe::StripeObject
|
||||
class CardholderAddress < Stripe::StripeObject
|
||||
# The street address of the cardholder tokenizing the card.
|
||||
attr_reader :line1
|
||||
# The postal code of the cardholder tokenizing the card.
|
||||
attr_reader :postal_code
|
||||
end
|
||||
# The wallet provider-given account ID of the digital wallet the token belongs to.
|
||||
attr_reader :account_id
|
||||
# An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy.
|
||||
attr_reader :account_trust_score
|
||||
# The method used for tokenizing a card.
|
||||
attr_reader :card_number_source
|
||||
# Attribute for field cardholder_address
|
||||
attr_reader :cardholder_address
|
||||
# The name of the cardholder tokenizing the card.
|
||||
attr_reader :cardholder_name
|
||||
# An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy.
|
||||
attr_reader :device_trust_score
|
||||
# The hashed email address of the cardholder's account with the wallet provider.
|
||||
attr_reader :hashed_account_email_address
|
||||
# The reasons for suggested tokenization given by the card network.
|
||||
attr_reader :reason_codes
|
||||
# The recommendation on responding to the tokenization request.
|
||||
attr_reader :suggested_decision
|
||||
# The version of the standard for mapping reason codes followed by the wallet provider.
|
||||
attr_reader :suggested_decision_version
|
||||
end
|
||||
# Attribute for field device
|
||||
attr_reader :device
|
||||
# Attribute for field mastercard
|
||||
attr_reader :mastercard
|
||||
# The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network.
|
||||
attr_reader :type
|
||||
# Attribute for field visa
|
||||
attr_reader :visa
|
||||
# Attribute for field wallet_provider
|
||||
attr_reader :wallet_provider
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# The Issuing card identifier to list tokens for.
|
||||
attr_accessor :card
|
||||
# Only return Issuing tokens that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Select Issuing tokens with the given status.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(
|
||||
card: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
starting_after: nil,
|
||||
status: nil
|
||||
)
|
||||
@card = card
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@starting_after = starting_after
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Specifies which status the token should be updated to.
|
||||
attr_accessor :status
|
||||
|
||||
def initialize(expand: nil, status: nil)
|
||||
@expand = expand
|
||||
@status = status
|
||||
end
|
||||
end
|
||||
# Card associated with this token.
|
||||
attr_reader :card
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# The hashed ID derived from the device ID from the card network associated with the token.
|
||||
attr_reader :device_fingerprint
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# The last four digits of the token.
|
||||
attr_reader :last4
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The token service provider / card network associated with the token.
|
||||
attr_reader :network
|
||||
# Attribute for field network_data
|
||||
attr_reader :network_data
|
||||
# Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch.
|
||||
attr_reader :network_updated_at
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The usage state of the token.
|
||||
attr_reader :status
|
||||
# The digital wallet for this token, if one was used.
|
||||
attr_reader :wallet_provider
|
||||
|
||||
# Lists all Issuing Token objects for a given card.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: params, opts: opts)
|
||||
|
@ -17,6 +17,933 @@ module Stripe
|
||||
"issuing.transaction"
|
||||
end
|
||||
|
||||
class AmountDetails < Stripe::StripeObject
|
||||
# The fee charged by the ATM for the cash withdrawal.
|
||||
attr_reader :atm_fee
|
||||
# The amount of cash requested by the cardholder.
|
||||
attr_reader :cashback_amount
|
||||
end
|
||||
|
||||
class MerchantData < Stripe::StripeObject
|
||||
# A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
|
||||
attr_reader :category
|
||||
# The merchant category code for the seller’s business
|
||||
attr_reader :category_code
|
||||
# City where the seller is located
|
||||
attr_reader :city
|
||||
# Country where the seller is located
|
||||
attr_reader :country
|
||||
# Name of the seller
|
||||
attr_reader :name
|
||||
# Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
|
||||
attr_reader :network_id
|
||||
# Postal code where the seller is located
|
||||
attr_reader :postal_code
|
||||
# State where the seller is located
|
||||
attr_reader :state
|
||||
# The seller's tax identification number. Currently populated for French merchants only.
|
||||
attr_reader :tax_id
|
||||
# An ID assigned by the seller to the location of the sale.
|
||||
attr_reader :terminal_id
|
||||
# URL provided by the merchant on a 3DS request
|
||||
attr_reader :url
|
||||
end
|
||||
|
||||
class NetworkData < Stripe::StripeObject
|
||||
# A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations.
|
||||
attr_reader :authorization_code
|
||||
# The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network.
|
||||
attr_reader :processing_date
|
||||
# Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions.
|
||||
attr_reader :transaction_id
|
||||
end
|
||||
|
||||
class PurchaseDetails < Stripe::StripeObject
|
||||
class Fleet < Stripe::StripeObject
|
||||
class CardholderPromptData < Stripe::StripeObject
|
||||
# Driver ID.
|
||||
attr_reader :driver_id
|
||||
# Odometer reading.
|
||||
attr_reader :odometer
|
||||
# An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
|
||||
attr_reader :unspecified_id
|
||||
# User ID.
|
||||
attr_reader :user_id
|
||||
# Vehicle number.
|
||||
attr_reader :vehicle_number
|
||||
end
|
||||
|
||||
class ReportedBreakdown < Stripe::StripeObject
|
||||
class Fuel < Stripe::StripeObject
|
||||
# Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
|
||||
attr_reader :gross_amount_decimal
|
||||
end
|
||||
|
||||
class NonFuel < Stripe::StripeObject
|
||||
# Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
|
||||
attr_reader :gross_amount_decimal
|
||||
end
|
||||
|
||||
class Tax < Stripe::StripeObject
|
||||
# Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_reader :local_amount_decimal
|
||||
# Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_reader :national_amount_decimal
|
||||
end
|
||||
# Breakdown of fuel portion of the purchase.
|
||||
attr_reader :fuel
|
||||
# Breakdown of non-fuel portion of the purchase.
|
||||
attr_reader :non_fuel
|
||||
# Information about tax included in this transaction.
|
||||
attr_reader :tax
|
||||
end
|
||||
# Answers to prompts presented to cardholder at point of sale.
|
||||
attr_reader :cardholder_prompt_data
|
||||
# The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
|
||||
attr_reader :purchase_type
|
||||
# More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
|
||||
attr_reader :reported_breakdown
|
||||
# The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
|
||||
attr_reader :service_type
|
||||
end
|
||||
|
||||
class Flight < Stripe::StripeObject
|
||||
class Segment < Stripe::StripeObject
|
||||
# The three-letter IATA airport code of the flight's destination.
|
||||
attr_reader :arrival_airport_code
|
||||
# The airline carrier code.
|
||||
attr_reader :carrier
|
||||
# The three-letter IATA airport code that the flight departed from.
|
||||
attr_reader :departure_airport_code
|
||||
# The flight number.
|
||||
attr_reader :flight_number
|
||||
# The flight's service class.
|
||||
attr_reader :service_class
|
||||
# Whether a stopover is allowed on this flight.
|
||||
attr_reader :stopover_allowed
|
||||
end
|
||||
# The time that the flight departed.
|
||||
attr_reader :departure_at
|
||||
# The name of the passenger.
|
||||
attr_reader :passenger_name
|
||||
# Whether the ticket is refundable.
|
||||
attr_reader :refundable
|
||||
# The legs of the trip.
|
||||
attr_reader :segments
|
||||
# The travel agency that issued the ticket.
|
||||
attr_reader :travel_agency
|
||||
end
|
||||
|
||||
class Fuel < Stripe::StripeObject
|
||||
# [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
|
||||
attr_reader :industry_product_code
|
||||
# The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
|
||||
attr_reader :quantity_decimal
|
||||
# The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
|
||||
attr_reader :type
|
||||
# The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
|
||||
attr_reader :unit
|
||||
# The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
|
||||
attr_reader :unit_cost_decimal
|
||||
end
|
||||
|
||||
class Lodging < Stripe::StripeObject
|
||||
# The time of checking into the lodging.
|
||||
attr_reader :check_in_at
|
||||
# The number of nights stayed at the lodging.
|
||||
attr_reader :nights
|
||||
end
|
||||
|
||||
class Receipt < Stripe::StripeObject
|
||||
# The description of the item. The maximum length of this field is 26 characters.
|
||||
attr_reader :description
|
||||
# The quantity of the item.
|
||||
attr_reader :quantity
|
||||
# The total for this line item in cents.
|
||||
attr_reader :total
|
||||
# The unit cost of the item in cents.
|
||||
attr_reader :unit_cost
|
||||
end
|
||||
# Fleet-specific information for transactions using Fleet cards.
|
||||
attr_reader :fleet
|
||||
# Information about the flight that was purchased with this transaction.
|
||||
attr_reader :flight
|
||||
# Information about fuel that was purchased with this transaction.
|
||||
attr_reader :fuel
|
||||
# Information about lodging that was purchased with this transaction.
|
||||
attr_reader :lodging
|
||||
# The line items in the purchase.
|
||||
attr_reader :receipt
|
||||
# A merchant-specific order number.
|
||||
attr_reader :reference
|
||||
end
|
||||
|
||||
class Treasury < Stripe::StripeObject
|
||||
# The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund
|
||||
attr_reader :received_credit
|
||||
# The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture
|
||||
attr_reader :received_debit
|
||||
end
|
||||
|
||||
class ListParams < Stripe::RequestParams
|
||||
class Created < Stripe::RequestParams
|
||||
# Minimum value to filter by (exclusive)
|
||||
attr_accessor :gt
|
||||
# Minimum value to filter by (inclusive)
|
||||
attr_accessor :gte
|
||||
# Maximum value to filter by (exclusive)
|
||||
attr_accessor :lt
|
||||
# Maximum value to filter by (inclusive)
|
||||
attr_accessor :lte
|
||||
|
||||
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
|
||||
@gt = gt
|
||||
@gte = gte
|
||||
@lt = lt
|
||||
@lte = lte
|
||||
end
|
||||
end
|
||||
# Only return transactions that belong to the given card.
|
||||
attr_accessor :card
|
||||
# Only return transactions that belong to the given cardholder.
|
||||
attr_accessor :cardholder
|
||||
# Only return transactions that were created during the given date interval.
|
||||
attr_accessor :created
|
||||
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
|
||||
attr_accessor :ending_before
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
|
||||
attr_accessor :limit
|
||||
# Only return transactions that are associated with the given settlement.
|
||||
attr_accessor :settlement
|
||||
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
|
||||
attr_accessor :starting_after
|
||||
# Only return transactions that have the given type. One of `capture` or `refund`.
|
||||
attr_accessor :type
|
||||
|
||||
def initialize(
|
||||
card: nil,
|
||||
cardholder: nil,
|
||||
created: nil,
|
||||
ending_before: nil,
|
||||
expand: nil,
|
||||
limit: nil,
|
||||
settlement: nil,
|
||||
starting_after: nil,
|
||||
type: nil
|
||||
)
|
||||
@card = card
|
||||
@cardholder = cardholder
|
||||
@created = created
|
||||
@ending_before = ending_before
|
||||
@expand = expand
|
||||
@limit = limit
|
||||
@settlement = settlement
|
||||
@starting_after = starting_after
|
||||
@type = type
|
||||
end
|
||||
end
|
||||
|
||||
class RetrieveParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
|
||||
def initialize(expand: nil)
|
||||
@expand = expand
|
||||
end
|
||||
end
|
||||
|
||||
class UpdateParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
|
||||
attr_accessor :metadata
|
||||
|
||||
def initialize(expand: nil, metadata: nil)
|
||||
@expand = expand
|
||||
@metadata = metadata
|
||||
end
|
||||
end
|
||||
|
||||
class RefundParams < Stripe::RequestParams
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :refund_amount
|
||||
|
||||
def initialize(expand: nil, refund_amount: nil)
|
||||
@expand = expand
|
||||
@refund_amount = refund_amount
|
||||
end
|
||||
end
|
||||
|
||||
class CreateForceCaptureParams < Stripe::RequestParams
|
||||
class MerchantData < Stripe::RequestParams
|
||||
# A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
|
||||
attr_accessor :category
|
||||
# City where the seller is located
|
||||
attr_accessor :city
|
||||
# Country where the seller is located
|
||||
attr_accessor :country
|
||||
# Name of the seller
|
||||
attr_accessor :name
|
||||
# Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
|
||||
attr_accessor :network_id
|
||||
# Postal code where the seller is located
|
||||
attr_accessor :postal_code
|
||||
# State where the seller is located
|
||||
attr_accessor :state
|
||||
# An ID assigned by the seller to the location of the sale.
|
||||
attr_accessor :terminal_id
|
||||
# URL provided by the merchant on a 3DS request
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(
|
||||
category: nil,
|
||||
city: nil,
|
||||
country: nil,
|
||||
name: nil,
|
||||
network_id: nil,
|
||||
postal_code: nil,
|
||||
state: nil,
|
||||
terminal_id: nil,
|
||||
url: nil
|
||||
)
|
||||
@category = category
|
||||
@city = city
|
||||
@country = country
|
||||
@name = name
|
||||
@network_id = network_id
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
@terminal_id = terminal_id
|
||||
@url = url
|
||||
end
|
||||
end
|
||||
|
||||
class PurchaseDetails < Stripe::RequestParams
|
||||
class Fleet < Stripe::RequestParams
|
||||
class CardholderPromptData < Stripe::RequestParams
|
||||
# Driver ID.
|
||||
attr_accessor :driver_id
|
||||
# Odometer reading.
|
||||
attr_accessor :odometer
|
||||
# An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
|
||||
attr_accessor :unspecified_id
|
||||
# User ID.
|
||||
attr_accessor :user_id
|
||||
# Vehicle number.
|
||||
attr_accessor :vehicle_number
|
||||
|
||||
def initialize(
|
||||
driver_id: nil,
|
||||
odometer: nil,
|
||||
unspecified_id: nil,
|
||||
user_id: nil,
|
||||
vehicle_number: nil
|
||||
)
|
||||
@driver_id = driver_id
|
||||
@odometer = odometer
|
||||
@unspecified_id = unspecified_id
|
||||
@user_id = user_id
|
||||
@vehicle_number = vehicle_number
|
||||
end
|
||||
end
|
||||
|
||||
class ReportedBreakdown < Stripe::RequestParams
|
||||
class Fuel < Stripe::RequestParams
|
||||
# Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
|
||||
attr_accessor :gross_amount_decimal
|
||||
|
||||
def initialize(gross_amount_decimal: nil)
|
||||
@gross_amount_decimal = gross_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class NonFuel < Stripe::RequestParams
|
||||
# Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
|
||||
attr_accessor :gross_amount_decimal
|
||||
|
||||
def initialize(gross_amount_decimal: nil)
|
||||
@gross_amount_decimal = gross_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Tax < Stripe::RequestParams
|
||||
# Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_accessor :local_amount_decimal
|
||||
# Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_accessor :national_amount_decimal
|
||||
|
||||
def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
|
||||
@local_amount_decimal = local_amount_decimal
|
||||
@national_amount_decimal = national_amount_decimal
|
||||
end
|
||||
end
|
||||
# Breakdown of fuel portion of the purchase.
|
||||
attr_accessor :fuel
|
||||
# Breakdown of non-fuel portion of the purchase.
|
||||
attr_accessor :non_fuel
|
||||
# Information about tax included in this transaction.
|
||||
attr_accessor :tax
|
||||
|
||||
def initialize(fuel: nil, non_fuel: nil, tax: nil)
|
||||
@fuel = fuel
|
||||
@non_fuel = non_fuel
|
||||
@tax = tax
|
||||
end
|
||||
end
|
||||
# Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
|
||||
attr_accessor :cardholder_prompt_data
|
||||
# The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
|
||||
attr_accessor :purchase_type
|
||||
# More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
|
||||
attr_accessor :reported_breakdown
|
||||
# The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
|
||||
attr_accessor :service_type
|
||||
|
||||
def initialize(
|
||||
cardholder_prompt_data: nil,
|
||||
purchase_type: nil,
|
||||
reported_breakdown: nil,
|
||||
service_type: nil
|
||||
)
|
||||
@cardholder_prompt_data = cardholder_prompt_data
|
||||
@purchase_type = purchase_type
|
||||
@reported_breakdown = reported_breakdown
|
||||
@service_type = service_type
|
||||
end
|
||||
end
|
||||
|
||||
class Flight < Stripe::RequestParams
|
||||
class Segment < Stripe::RequestParams
|
||||
# The three-letter IATA airport code of the flight's destination.
|
||||
attr_accessor :arrival_airport_code
|
||||
# The airline carrier code.
|
||||
attr_accessor :carrier
|
||||
# The three-letter IATA airport code that the flight departed from.
|
||||
attr_accessor :departure_airport_code
|
||||
# The flight number.
|
||||
attr_accessor :flight_number
|
||||
# The flight's service class.
|
||||
attr_accessor :service_class
|
||||
# Whether a stopover is allowed on this flight.
|
||||
attr_accessor :stopover_allowed
|
||||
|
||||
def initialize(
|
||||
arrival_airport_code: nil,
|
||||
carrier: nil,
|
||||
departure_airport_code: nil,
|
||||
flight_number: nil,
|
||||
service_class: nil,
|
||||
stopover_allowed: nil
|
||||
)
|
||||
@arrival_airport_code = arrival_airport_code
|
||||
@carrier = carrier
|
||||
@departure_airport_code = departure_airport_code
|
||||
@flight_number = flight_number
|
||||
@service_class = service_class
|
||||
@stopover_allowed = stopover_allowed
|
||||
end
|
||||
end
|
||||
# The time that the flight departed.
|
||||
attr_accessor :departure_at
|
||||
# The name of the passenger.
|
||||
attr_accessor :passenger_name
|
||||
# Whether the ticket is refundable.
|
||||
attr_accessor :refundable
|
||||
# The legs of the trip.
|
||||
attr_accessor :segments
|
||||
# The travel agency that issued the ticket.
|
||||
attr_accessor :travel_agency
|
||||
|
||||
def initialize(
|
||||
departure_at: nil,
|
||||
passenger_name: nil,
|
||||
refundable: nil,
|
||||
segments: nil,
|
||||
travel_agency: nil
|
||||
)
|
||||
@departure_at = departure_at
|
||||
@passenger_name = passenger_name
|
||||
@refundable = refundable
|
||||
@segments = segments
|
||||
@travel_agency = travel_agency
|
||||
end
|
||||
end
|
||||
|
||||
class Fuel < Stripe::RequestParams
|
||||
# [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
|
||||
attr_accessor :industry_product_code
|
||||
# The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
|
||||
attr_accessor :quantity_decimal
|
||||
# The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
|
||||
attr_accessor :type
|
||||
# The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
|
||||
attr_accessor :unit
|
||||
# The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
|
||||
attr_accessor :unit_cost_decimal
|
||||
|
||||
def initialize(
|
||||
industry_product_code: nil,
|
||||
quantity_decimal: nil,
|
||||
type: nil,
|
||||
unit: nil,
|
||||
unit_cost_decimal: nil
|
||||
)
|
||||
@industry_product_code = industry_product_code
|
||||
@quantity_decimal = quantity_decimal
|
||||
@type = type
|
||||
@unit = unit
|
||||
@unit_cost_decimal = unit_cost_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Lodging < Stripe::RequestParams
|
||||
# The time of checking into the lodging.
|
||||
attr_accessor :check_in_at
|
||||
# The number of nights stayed at the lodging.
|
||||
attr_accessor :nights
|
||||
|
||||
def initialize(check_in_at: nil, nights: nil)
|
||||
@check_in_at = check_in_at
|
||||
@nights = nights
|
||||
end
|
||||
end
|
||||
|
||||
class Receipt < Stripe::RequestParams
|
||||
# Attribute for param field description
|
||||
attr_accessor :description
|
||||
# Attribute for param field quantity
|
||||
attr_accessor :quantity
|
||||
# Attribute for param field total
|
||||
attr_accessor :total
|
||||
# Attribute for param field unit_cost
|
||||
attr_accessor :unit_cost
|
||||
|
||||
def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
|
||||
@description = description
|
||||
@quantity = quantity
|
||||
@total = total
|
||||
@unit_cost = unit_cost
|
||||
end
|
||||
end
|
||||
# Fleet-specific information for transactions using Fleet cards.
|
||||
attr_accessor :fleet
|
||||
# Information about the flight that was purchased with this transaction.
|
||||
attr_accessor :flight
|
||||
# Information about fuel that was purchased with this transaction.
|
||||
attr_accessor :fuel
|
||||
# Information about lodging that was purchased with this transaction.
|
||||
attr_accessor :lodging
|
||||
# The line items in the purchase.
|
||||
attr_accessor :receipt
|
||||
# A merchant-specific order number.
|
||||
attr_accessor :reference
|
||||
|
||||
def initialize(
|
||||
fleet: nil,
|
||||
flight: nil,
|
||||
fuel: nil,
|
||||
lodging: nil,
|
||||
receipt: nil,
|
||||
reference: nil
|
||||
)
|
||||
@fleet = fleet
|
||||
@flight = flight
|
||||
@fuel = fuel
|
||||
@lodging = lodging
|
||||
@receipt = receipt
|
||||
@reference = reference
|
||||
end
|
||||
end
|
||||
# The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# Card associated with this transaction.
|
||||
attr_accessor :card
|
||||
# The currency of the capture. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
|
||||
attr_accessor :merchant_data
|
||||
# Additional purchase information that is optionally provided by the merchant.
|
||||
attr_accessor :purchase_details
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
card: nil,
|
||||
currency: nil,
|
||||
expand: nil,
|
||||
merchant_data: nil,
|
||||
purchase_details: nil
|
||||
)
|
||||
@amount = amount
|
||||
@card = card
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@merchant_data = merchant_data
|
||||
@purchase_details = purchase_details
|
||||
end
|
||||
end
|
||||
|
||||
class CreateUnlinkedRefundParams < Stripe::RequestParams
|
||||
class MerchantData < Stripe::RequestParams
|
||||
# A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values.
|
||||
attr_accessor :category
|
||||
# City where the seller is located
|
||||
attr_accessor :city
|
||||
# Country where the seller is located
|
||||
attr_accessor :country
|
||||
# Name of the seller
|
||||
attr_accessor :name
|
||||
# Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant.
|
||||
attr_accessor :network_id
|
||||
# Postal code where the seller is located
|
||||
attr_accessor :postal_code
|
||||
# State where the seller is located
|
||||
attr_accessor :state
|
||||
# An ID assigned by the seller to the location of the sale.
|
||||
attr_accessor :terminal_id
|
||||
# URL provided by the merchant on a 3DS request
|
||||
attr_accessor :url
|
||||
|
||||
def initialize(
|
||||
category: nil,
|
||||
city: nil,
|
||||
country: nil,
|
||||
name: nil,
|
||||
network_id: nil,
|
||||
postal_code: nil,
|
||||
state: nil,
|
||||
terminal_id: nil,
|
||||
url: nil
|
||||
)
|
||||
@category = category
|
||||
@city = city
|
||||
@country = country
|
||||
@name = name
|
||||
@network_id = network_id
|
||||
@postal_code = postal_code
|
||||
@state = state
|
||||
@terminal_id = terminal_id
|
||||
@url = url
|
||||
end
|
||||
end
|
||||
|
||||
class PurchaseDetails < Stripe::RequestParams
|
||||
class Fleet < Stripe::RequestParams
|
||||
class CardholderPromptData < Stripe::RequestParams
|
||||
# Driver ID.
|
||||
attr_accessor :driver_id
|
||||
# Odometer reading.
|
||||
attr_accessor :odometer
|
||||
# An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type.
|
||||
attr_accessor :unspecified_id
|
||||
# User ID.
|
||||
attr_accessor :user_id
|
||||
# Vehicle number.
|
||||
attr_accessor :vehicle_number
|
||||
|
||||
def initialize(
|
||||
driver_id: nil,
|
||||
odometer: nil,
|
||||
unspecified_id: nil,
|
||||
user_id: nil,
|
||||
vehicle_number: nil
|
||||
)
|
||||
@driver_id = driver_id
|
||||
@odometer = odometer
|
||||
@unspecified_id = unspecified_id
|
||||
@user_id = user_id
|
||||
@vehicle_number = vehicle_number
|
||||
end
|
||||
end
|
||||
|
||||
class ReportedBreakdown < Stripe::RequestParams
|
||||
class Fuel < Stripe::RequestParams
|
||||
# Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes.
|
||||
attr_accessor :gross_amount_decimal
|
||||
|
||||
def initialize(gross_amount_decimal: nil)
|
||||
@gross_amount_decimal = gross_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class NonFuel < Stripe::RequestParams
|
||||
# Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes.
|
||||
attr_accessor :gross_amount_decimal
|
||||
|
||||
def initialize(gross_amount_decimal: nil)
|
||||
@gross_amount_decimal = gross_amount_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Tax < Stripe::RequestParams
|
||||
# Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_accessor :local_amount_decimal
|
||||
# Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax.
|
||||
attr_accessor :national_amount_decimal
|
||||
|
||||
def initialize(local_amount_decimal: nil, national_amount_decimal: nil)
|
||||
@local_amount_decimal = local_amount_decimal
|
||||
@national_amount_decimal = national_amount_decimal
|
||||
end
|
||||
end
|
||||
# Breakdown of fuel portion of the purchase.
|
||||
attr_accessor :fuel
|
||||
# Breakdown of non-fuel portion of the purchase.
|
||||
attr_accessor :non_fuel
|
||||
# Information about tax included in this transaction.
|
||||
attr_accessor :tax
|
||||
|
||||
def initialize(fuel: nil, non_fuel: nil, tax: nil)
|
||||
@fuel = fuel
|
||||
@non_fuel = non_fuel
|
||||
@tax = tax
|
||||
end
|
||||
end
|
||||
# Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry.
|
||||
attr_accessor :cardholder_prompt_data
|
||||
# The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`.
|
||||
attr_accessor :purchase_type
|
||||
# More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data.
|
||||
attr_accessor :reported_breakdown
|
||||
# The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`.
|
||||
attr_accessor :service_type
|
||||
|
||||
def initialize(
|
||||
cardholder_prompt_data: nil,
|
||||
purchase_type: nil,
|
||||
reported_breakdown: nil,
|
||||
service_type: nil
|
||||
)
|
||||
@cardholder_prompt_data = cardholder_prompt_data
|
||||
@purchase_type = purchase_type
|
||||
@reported_breakdown = reported_breakdown
|
||||
@service_type = service_type
|
||||
end
|
||||
end
|
||||
|
||||
class Flight < Stripe::RequestParams
|
||||
class Segment < Stripe::RequestParams
|
||||
# The three-letter IATA airport code of the flight's destination.
|
||||
attr_accessor :arrival_airport_code
|
||||
# The airline carrier code.
|
||||
attr_accessor :carrier
|
||||
# The three-letter IATA airport code that the flight departed from.
|
||||
attr_accessor :departure_airport_code
|
||||
# The flight number.
|
||||
attr_accessor :flight_number
|
||||
# The flight's service class.
|
||||
attr_accessor :service_class
|
||||
# Whether a stopover is allowed on this flight.
|
||||
attr_accessor :stopover_allowed
|
||||
|
||||
def initialize(
|
||||
arrival_airport_code: nil,
|
||||
carrier: nil,
|
||||
departure_airport_code: nil,
|
||||
flight_number: nil,
|
||||
service_class: nil,
|
||||
stopover_allowed: nil
|
||||
)
|
||||
@arrival_airport_code = arrival_airport_code
|
||||
@carrier = carrier
|
||||
@departure_airport_code = departure_airport_code
|
||||
@flight_number = flight_number
|
||||
@service_class = service_class
|
||||
@stopover_allowed = stopover_allowed
|
||||
end
|
||||
end
|
||||
# The time that the flight departed.
|
||||
attr_accessor :departure_at
|
||||
# The name of the passenger.
|
||||
attr_accessor :passenger_name
|
||||
# Whether the ticket is refundable.
|
||||
attr_accessor :refundable
|
||||
# The legs of the trip.
|
||||
attr_accessor :segments
|
||||
# The travel agency that issued the ticket.
|
||||
attr_accessor :travel_agency
|
||||
|
||||
def initialize(
|
||||
departure_at: nil,
|
||||
passenger_name: nil,
|
||||
refundable: nil,
|
||||
segments: nil,
|
||||
travel_agency: nil
|
||||
)
|
||||
@departure_at = departure_at
|
||||
@passenger_name = passenger_name
|
||||
@refundable = refundable
|
||||
@segments = segments
|
||||
@travel_agency = travel_agency
|
||||
end
|
||||
end
|
||||
|
||||
class Fuel < Stripe::RequestParams
|
||||
# [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased.
|
||||
attr_accessor :industry_product_code
|
||||
# The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places.
|
||||
attr_accessor :quantity_decimal
|
||||
# The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`.
|
||||
attr_accessor :type
|
||||
# The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`.
|
||||
attr_accessor :unit
|
||||
# The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places.
|
||||
attr_accessor :unit_cost_decimal
|
||||
|
||||
def initialize(
|
||||
industry_product_code: nil,
|
||||
quantity_decimal: nil,
|
||||
type: nil,
|
||||
unit: nil,
|
||||
unit_cost_decimal: nil
|
||||
)
|
||||
@industry_product_code = industry_product_code
|
||||
@quantity_decimal = quantity_decimal
|
||||
@type = type
|
||||
@unit = unit
|
||||
@unit_cost_decimal = unit_cost_decimal
|
||||
end
|
||||
end
|
||||
|
||||
class Lodging < Stripe::RequestParams
|
||||
# The time of checking into the lodging.
|
||||
attr_accessor :check_in_at
|
||||
# The number of nights stayed at the lodging.
|
||||
attr_accessor :nights
|
||||
|
||||
def initialize(check_in_at: nil, nights: nil)
|
||||
@check_in_at = check_in_at
|
||||
@nights = nights
|
||||
end
|
||||
end
|
||||
|
||||
class Receipt < Stripe::RequestParams
|
||||
# Attribute for param field description
|
||||
attr_accessor :description
|
||||
# Attribute for param field quantity
|
||||
attr_accessor :quantity
|
||||
# Attribute for param field total
|
||||
attr_accessor :total
|
||||
# Attribute for param field unit_cost
|
||||
attr_accessor :unit_cost
|
||||
|
||||
def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil)
|
||||
@description = description
|
||||
@quantity = quantity
|
||||
@total = total
|
||||
@unit_cost = unit_cost
|
||||
end
|
||||
end
|
||||
# Fleet-specific information for transactions using Fleet cards.
|
||||
attr_accessor :fleet
|
||||
# Information about the flight that was purchased with this transaction.
|
||||
attr_accessor :flight
|
||||
# Information about fuel that was purchased with this transaction.
|
||||
attr_accessor :fuel
|
||||
# Information about lodging that was purchased with this transaction.
|
||||
attr_accessor :lodging
|
||||
# The line items in the purchase.
|
||||
attr_accessor :receipt
|
||||
# A merchant-specific order number.
|
||||
attr_accessor :reference
|
||||
|
||||
def initialize(
|
||||
fleet: nil,
|
||||
flight: nil,
|
||||
fuel: nil,
|
||||
lodging: nil,
|
||||
receipt: nil,
|
||||
reference: nil
|
||||
)
|
||||
@fleet = fleet
|
||||
@flight = flight
|
||||
@fuel = fuel
|
||||
@lodging = lodging
|
||||
@receipt = receipt
|
||||
@reference = reference
|
||||
end
|
||||
end
|
||||
# The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_accessor :amount
|
||||
# Card associated with this unlinked refund transaction.
|
||||
attr_accessor :card
|
||||
# The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_accessor :currency
|
||||
# Specifies which fields in the response should be expanded.
|
||||
attr_accessor :expand
|
||||
# Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened.
|
||||
attr_accessor :merchant_data
|
||||
# Additional purchase information that is optionally provided by the merchant.
|
||||
attr_accessor :purchase_details
|
||||
|
||||
def initialize(
|
||||
amount: nil,
|
||||
card: nil,
|
||||
currency: nil,
|
||||
expand: nil,
|
||||
merchant_data: nil,
|
||||
purchase_details: nil
|
||||
)
|
||||
@amount = amount
|
||||
@card = card
|
||||
@currency = currency
|
||||
@expand = expand
|
||||
@merchant_data = merchant_data
|
||||
@purchase_details = purchase_details
|
||||
end
|
||||
end
|
||||
# The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :amount
|
||||
# Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal).
|
||||
attr_reader :amount_details
|
||||
# The `Authorization` object that led to this transaction.
|
||||
attr_reader :authorization
|
||||
# ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction.
|
||||
attr_reader :balance_transaction
|
||||
# The card used to make this transaction.
|
||||
attr_reader :card
|
||||
# The cardholder to whom this transaction belongs.
|
||||
attr_reader :cardholder
|
||||
# Time at which the object was created. Measured in seconds since the Unix epoch.
|
||||
attr_reader :created
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# If you've disputed the transaction, the ID of the dispute.
|
||||
attr_reader :dispute
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
||||
attr_reader :livemode
|
||||
# The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency.
|
||||
attr_reader :merchant_amount
|
||||
# The currency with which the merchant is taking payment.
|
||||
attr_reader :merchant_currency
|
||||
# Attribute for field merchant_data
|
||||
attr_reader :merchant_data
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# Details about the transaction, such as processing dates, set by the card network.
|
||||
attr_reader :network_data
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# Additional purchase information that is optionally provided by the merchant.
|
||||
attr_reader :purchase_details
|
||||
# Attribute for field settlement
|
||||
attr_reader :settlement
|
||||
# [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null.
|
||||
attr_reader :token
|
||||
# [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
|
||||
attr_reader :treasury
|
||||
# The nature of the transaction.
|
||||
attr_reader :type
|
||||
# The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`.
|
||||
attr_reader :wallet
|
||||
|
||||
# Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
|
||||
def self.list(params = {}, opts = {})
|
||||
request_stripe_object(
|
||||
|
@ -8,5 +8,80 @@ module Stripe
|
||||
def self.object_name
|
||||
"item"
|
||||
end
|
||||
|
||||
class AdjustableQuantity < Stripe::StripeObject
|
||||
# Attribute for field enabled
|
||||
attr_reader :enabled
|
||||
# Attribute for field maximum
|
||||
attr_reader :maximum
|
||||
# Attribute for field minimum
|
||||
attr_reader :minimum
|
||||
end
|
||||
|
||||
class Discount < Stripe::StripeObject
|
||||
# The amount discounted.
|
||||
attr_reader :amount
|
||||
# A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
|
||||
# It contains information about when the discount began, when it will end, and what it is applied to.
|
||||
#
|
||||
# Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
|
||||
attr_reader :discount
|
||||
end
|
||||
|
||||
class Display < Stripe::StripeObject
|
||||
# Attribute for field description
|
||||
attr_reader :description
|
||||
# Attribute for field images
|
||||
attr_reader :images
|
||||
# Attribute for field name
|
||||
attr_reader :name
|
||||
end
|
||||
|
||||
class Tax < Stripe::StripeObject
|
||||
# Amount of tax applied for this rate.
|
||||
attr_reader :amount
|
||||
# Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
|
||||
#
|
||||
# Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
|
||||
attr_reader :rate
|
||||
# The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
|
||||
attr_reader :taxability_reason
|
||||
# The amount on which tax is calculated, in cents (or local equivalent).
|
||||
attr_reader :taxable_amount
|
||||
end
|
||||
# Attribute for field adjustable_quantity
|
||||
attr_reader :adjustable_quantity
|
||||
# Total discount amount applied. If no discounts were applied, defaults to 0.
|
||||
attr_reader :amount_discount
|
||||
# Total before any discounts or taxes are applied.
|
||||
attr_reader :amount_subtotal
|
||||
# Total tax amount applied. If no tax was applied, defaults to 0.
|
||||
attr_reader :amount_tax
|
||||
# Total after discounts and taxes.
|
||||
attr_reader :amount_total
|
||||
# Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
||||
attr_reader :currency
|
||||
# An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.
|
||||
attr_reader :description
|
||||
# The discounts applied to the line item.
|
||||
attr_reader :discounts
|
||||
# Attribute for field display
|
||||
attr_reader :display
|
||||
# Unique identifier for the object.
|
||||
attr_reader :id
|
||||
# Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
||||
attr_reader :metadata
|
||||
# String representing the object's type. Objects of the same type share the same value.
|
||||
attr_reader :object
|
||||
# The price used to generate the line item.
|
||||
attr_reader :price
|
||||
# The ID of the product for this line item.
|
||||
#
|
||||
# This will always be the same as `price.product`.
|
||||
attr_reader :product
|
||||
# The quantity of products being purchased.
|
||||
attr_reader :quantity
|
||||
# The taxes applied to the line item.
|
||||
attr_reader :taxes
|
||||
end
|
||||
end
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user