Class: Stripe::Issuing::Authorization::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Issuing::Authorization::TestHelpers
- Defined in:
- lib/stripe/resources/issuing/authorization.rb
Constant Summary collapse
- RESOURCE_CLASS =
Authorization
Class Method Summary collapse
-
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
-
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
.finalize_amount(authorization, params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
-
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
- .resource_class ⇒ Object
-
.respond(authorization, params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
-
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
Instance Method Summary collapse
-
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
#finalize_amount(params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
-
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
-
#respond(params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
-
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Stripe::APIResourceTestHelpers
Class Method Details
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
1212 1213 1214 1215 1216 1217 1218 1219 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1212 def self.capture(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
1232 1233 1234 1235 1236 1237 1238 1239 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1232 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/test_helpers/issuing/authorizations", params: params, opts: opts ) end |
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
1242 1243 1244 1245 1246 1247 1248 1249 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1242 def self.expire(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.finalize_amount(authorization, params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
1262 1263 1264 1265 1266 1267 1268 1269 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1262 def self.finalize_amount(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
1282 1283 1284 1285 1286 1287 1288 1289 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1282 def self.increment(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.resource_class ⇒ Object
1207 1208 1209 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1207 def self.resource_class "Authorization" end |
.respond(authorization, params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
1302 1303 1304 1305 1306 1307 1308 1309 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1302 def self.respond(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
1322 1323 1324 1325 1326 1327 1328 1329 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1322 def self.reverse(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape() }), params: params, opts: opts ) end |
Instance Method Details
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
1222 1223 1224 1225 1226 1227 1228 1229 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1222 def capture(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
1252 1253 1254 1255 1256 1257 1258 1259 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1252 def expire(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#finalize_amount(params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
1272 1273 1274 1275 1276 1277 1278 1279 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1272 def finalize_amount(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
1292 1293 1294 1295 1296 1297 1298 1299 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1292 def increment(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#respond(params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
1312 1313 1314 1315 1316 1317 1318 1319 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1312 def respond(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
1332 1333 1334 1335 1336 1337 1338 1339 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 1332 def reverse(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |