Class: Stripe::V2::MoneyManagement::PayoutMethodService

Inherits:
StripeService
  • Object
show all
Defined in:
lib/stripe/services/v2/money_management/payout_method_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

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

Archive a PayoutMethod object. Archived objects cannot be used as payout methods and will not appear in the payout method list.

** raises ControlledByDashboardError ** raises CannotProceedError ** raises InvalidPayoutMethodError ** raises ControlledByAlternateResourceError



15
16
17
18
19
20
21
22
23
# File 'lib/stripe/services/v2/money_management/payout_method_service.rb', line 15

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

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

Disable a PayoutMethod object. The payout method will not be available for use in outbound money movement. To re-enable the payout method, create an OutboundSetupIntent using POST /v2/money_management/outbound_setup_intents.

** raises CannotProceedError



30
31
32
33
34
35
36
37
38
# File 'lib/stripe/services/v2/money_management/payout_method_service.rb', line 30

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

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

List objects that adhere to the PayoutMethod interface.



41
42
43
44
45
46
47
48
49
# File 'lib/stripe/services/v2/money_management/payout_method_service.rb', line 41

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

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

Retrieve a PayoutMethod object.

** raises InvalidPayoutMethodError



54
55
56
57
58
59
60
61
62
# File 'lib/stripe/services/v2/money_management/payout_method_service.rb', line 54

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

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

Unarchive an PayoutMethod object.

** raises ControlledByDashboardError ** raises InvalidPayoutMethodError ** raises ControlledByAlternateResourceError



69
70
71
72
73
74
75
76
77
# File 'lib/stripe/services/v2/money_management/payout_method_service.rb', line 69

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