Class: GoCardlessPro::Services::BillingRequestWithActionsService
- Inherits:
-
BaseService
- Object
- BaseService
- GoCardlessPro::Services::BillingRequestWithActionsService
- Defined in:
- lib/gocardless_pro/services/billing_request_with_actions_service.rb
Overview
Service for making requests to the BillingRequestWithAction endpoints
Instance Method Summary collapse
-
#create_with_actions(options = {}) ⇒ Object
Creates a billing request and completes any specified actions in a single request.
Methods inherited from BaseService
#initialize, #make_request, #sub_url
Constructor Details
This class inherits a constructor from GoCardlessPro::Services::BaseService
Instance Method Details
#create_with_actions(options = {}) ⇒ Object
Creates a billing request and completes any specified actions in a single request. This endpoint allows you to create a billing request and immediately complete actions such as collecting customer details, bank account details, or other required actions. Example URL: /billing_requests/create_with_actions
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/gocardless_pro/services/billing_request_with_actions_service.rb', line 21 def create_with_actions( = {}) path = '/billing_requests/create_with_actions' params = .delete(:params) || {} [:params] = {} [:params][envelope_key] = params [:retry_failures] = true response = make_request(:post, path, ) return if response.body.nil? Resources::BillingRequestWithAction.new(unenvelope_body(response.body), response) end |