Class: Stripe::Treasury::TransactionService

Inherits:
StripeService show all
Defined in:
lib/stripe/services/treasury/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

Retrieves a list of Transaction objects.



117
118
119
120
121
122
123
124
125
# File 'lib/stripe/services/treasury/transaction_service.rb', line 117

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

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

Retrieves the details of an existing Transaction.



128
129
130
131
132
133
134
135
136
# File 'lib/stripe/services/treasury/transaction_service.rb', line 128

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