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.



641
642
643
644
645
646
647
648
649
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 641

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.



652
653
654
655
656
657
658
659
660
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 652

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.



663
664
665
666
667
668
669
670
671
# File 'lib/stripe/services/test_helpers/issuing/transaction_service.rb', line 663

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