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.



103
104
105
106
107
108
109
110
111
# File 'lib/stripe/services/treasury/transaction_service.rb', line 103

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.



114
115
116
117
118
119
120
121
122
# File 'lib/stripe/services/treasury/transaction_service.rb', line 114

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