Class: Stripe::V2::MoneyManagement::OutboundPaymentService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/v2/money_management/outbound_payment_service.rb

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

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

Cancels an OutboundPayment. Only processing OutboundPayments can be canceled.

** raises AlreadyCanceledError ** raises NotCancelableError



12
13
14
15
16
17
18
19
20
# File 'lib/stripe/services/v2/money_management/outbound_payment_service.rb', line 12

def cancel(id, params = {}, opts = {})
  request(
    method: :post,
    path: format("/v2/money_management/outbound_payments/%<id>s/cancel", { id: CGI.escape(id) }),
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Creates an OutboundPayment.

** raises InsufficientFundsError ** raises FeatureNotEnabledError ** raises QuotaExceededError ** raises RecipientNotNotifiableError



28
29
30
31
32
33
34
35
36
# File 'lib/stripe/services/v2/money_management/outbound_payment_service.rb', line 28

def create(params = {}, opts = {})
  request(
    method: :post,
    path: "/v2/money_management/outbound_payments",
    params: params,
    opts: opts,
    base_address: :api
  )
end

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

Returns a list of OutboundPayments that match the provided filters.



39
40
41
42
43
44
45
46
47
# File 'lib/stripe/services/v2/money_management/outbound_payment_service.rb', line 39

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

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

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment create or list response.



50
51
52
53
54
55
56
57
58
# File 'lib/stripe/services/v2/money_management/outbound_payment_service.rb', line 50

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