Class: Stripe::TestHelpers::Issuing::TransactionService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/test_helpers/issuing/transaction_service.rb

Defined Under Namespace

Classes: CreateForceCaptureParams, CreateUnlinkedRefundParams, RefundParams

Instance Method Summary collapse

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.



732
733
734
735
736
737
738
739
740
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 732

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.



743
744
745
746
747
748
749
750
751
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 743

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.



754
755
756
757
758
759
760
761
762
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 754

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