Class: Stripe::TestHelpers::Issuing::TransactionService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::TestHelpers::Issuing::TransactionService
- Defined in:
- lib/stripe/services/test_helpers/issuing/transaction_service.rb
Instance Method Summary collapse
-
#create_force_capture(params = {}, opts = {}) ⇒ Object
Allows the user to capture an arbitrary amount, also known as a forced capture.
-
#create_unlinked_refund(params = {}, opts = {}) ⇒ Object
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
-
#refund(transaction, params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create_force_capture(params = {}, opts = {}) ⇒ Object
Allows the user to capture an arbitrary amount, also known as a forced capture.
9 10 11 12 13 14 15 16 17 |
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 9 def create_force_capture(params = {}, opts = {}) request( method: :post, path: "/v1/test_helpers/issuing/transactions/create_force_capture", params: params, opts: opts, base_address: :api ) end |
#create_unlinked_refund(params = {}, opts = {}) ⇒ Object
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
20 21 22 23 24 25 26 27 28 |
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 20 def create_unlinked_refund(params = {}, opts = {}) request( method: :post, path: "/v1/test_helpers/issuing/transactions/create_unlinked_refund", params: params, opts: opts, base_address: :api ) end |
#refund(transaction, params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
31 32 33 34 35 36 37 38 39 |
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 31 def refund(transaction, params = {}, opts = {}) request( method: :post, path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(transaction) }), params: params, opts: opts, base_address: :api ) end |