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.
701 702 703 704 705 706 707 708 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 701 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.
721 722 723 724 725 726 727 728 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 721 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.
731 732 733 734 735 736 737 738 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 731 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.
751 752 753 754 755 756 757 758 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 751 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.
771 772 773 774 775 776 777 778 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 771 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
696 697 698 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 696 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.
791 792 793 794 795 796 797 798 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 791 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.
811 812 813 814 815 816 817 818 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 811 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.
711 712 713 714 715 716 717 718 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 711 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.
741 742 743 744 745 746 747 748 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 741 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.
761 762 763 764 765 766 767 768 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 761 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.
781 782 783 784 785 786 787 788 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 781 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.
801 802 803 804 805 806 807 808 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 801 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.
821 822 823 824 825 826 827 828 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 821 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 |