Class: Stripe::BalanceTransactionService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/balance_transaction_service.rb

Defined Under Namespace

Classes: ListParams, RetrieveParams

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

#list(params = {}, opts = {}) ⇒ Object

Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first.

Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history.



78
79
80
81
82
83
84
85
86
# File 'lib/stripe/services/balance_transaction_service.rb', line 78

def list(params = {}, opts = {})
  request(
    method: :get,
    path: "/v1/balance_transactions",
    params: params,
    opts: opts,
    base_address: :api
  )
end

#retrieve(id, params = {}, opts = {}) ⇒ Object

Retrieves the balance transaction with the given ID.

Note that this endpoint previously used the path /v1/balance/history/:id.



91
92
93
94
95
96
97
98
99
# File 'lib/stripe/services/balance_transaction_service.rb', line 91

def retrieve(id, params = {}, opts = {})
  request(
    method: :get,
    path: format("/v1/balance_transactions/%<id>s", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end