Class: Stripe::TestHelpers::Issuing::AuthorizationService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::TestHelpers::Issuing::AuthorizationService
- Defined in:
- lib/stripe/services/test_helpers/issuing/authorization_service.rb
Defined Under Namespace
Classes: CaptureParams, CreateParams, ExpireParams, FinalizeAmountParams, IncrementParams, RespondParams, ReverseParams
Instance 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.
-
#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.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
754 755 756 757 758 759 760 761 762 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 754 def capture(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) end |
#create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
765 766 767 768 769 770 771 772 773 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 765 def create(params = {}, opts = {}) request( method: :post, path: "/v1/test_helpers/issuing/authorizations", params: params, opts: opts, base_address: :api ) end |
#expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
776 777 778 779 780 781 782 783 784 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 776 def expire(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) 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.
787 788 789 790 791 792 793 794 795 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 787 def finalize_amount(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) end |
#increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
798 799 800 801 802 803 804 805 806 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 798 def increment(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) 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.
809 810 811 812 813 814 815 816 817 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 809 def respond(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) end |
#reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
820 821 822 823 824 825 826 827 828 |
# File 'lib/stripe/services/test_helpers/issuing/authorization_service.rb', line 820 def reverse(, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape() }), params: params, opts: opts, base_address: :api ) end |