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.
530 531 532 533 534 535 536 537 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 530 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.
550 551 552 553 554 555 556 557 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 550 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.
560 561 562 563 564 565 566 567 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 560 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.
580 581 582 583 584 585 586 587 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 580 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.
600 601 602 603 604 605 606 607 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 600 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
525 526 527 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 525 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.
620 621 622 623 624 625 626 627 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 620 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.
640 641 642 643 644 645 646 647 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 640 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.
540 541 542 543 544 545 546 547 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 540 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.
570 571 572 573 574 575 576 577 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 570 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.
590 591 592 593 594 595 596 597 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 590 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.
610 611 612 613 614 615 616 617 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 610 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.
630 631 632 633 634 635 636 637 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 630 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.
650 651 652 653 654 655 656 657 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 650 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 |