Sha256: 6f3e0ee68fe7926e22e778eaca370bab16bde6bd5634f744b9ce0ced7b06c8b6
Contents?: true
Size: 1.9 KB
Versions: 13
Compression:
Stored size: 1.9 KB
Contents
# File generated from our OpenAPI spec # frozen_string_literal: true module Stripe class TransferService < StripeService attr_reader :reversals def initialize(requestor) super(requestor) @reversals = Stripe::TransferReversalService.new(@requestor) end # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. def create(params = {}, opts = {}) request(method: :post, path: "/v1/transfers", params: params, opts: opts, base_address: :api) end # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. def list(params = {}, opts = {}) request(method: :get, path: "/v1/transfers", params: params, opts: opts, base_address: :api) end # Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. def retrieve(transfer, params = {}, opts = {}) request( method: :get, path: format("/v1/transfers/%<transfer>s", { transfer: CGI.escape(transfer) }), params: params, opts: opts, base_address: :api ) end # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. # # This request accepts only metadata as an argument. def update(transfer, params = {}, opts = {}) request( method: :post, path: format("/v1/transfers/%<transfer>s", { transfer: CGI.escape(transfer) }), params: params, opts: opts, base_address: :api ) end end end
Version data entries
13 entries across 13 versions & 1 rubygems