Class: GoCardlessPro::Services::PayerThemesService
- Inherits:
-
BaseService
- Object
- BaseService
- GoCardlessPro::Services::PayerThemesService
- Defined in:
- lib/gocardless_pro/services/payer_themes_service.rb
Overview
Service for making requests to the PayerTheme endpoints
Instance Method Summary collapse
-
#create_for_creditor(options = {}) ⇒ Object
Creates a new payer theme associated with a creditor.
Methods inherited from BaseService
#initialize, #make_request, #sub_url
Constructor Details
This class inherits a constructor from GoCardlessPro::Services::BaseService
Instance Method Details
#create_for_creditor(options = {}) ⇒ Object
Creates a new payer theme associated with a creditor. If a creditor already has payer themes, this will update the existing payer theme linked to the creditor. Example URL: /branding/payer_themes
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gocardless_pro/services/payer_themes_service.rb', line 18 def create_for_creditor( = {}) path = '/branding/payer_themes' params = .delete(:params) || {} [:params] = {} [:params][envelope_key] = params [:retry_failures] = true response = make_request(:post, path, ) return if response.body.nil? Resources::PayerTheme.new(unenvelope_body(response.body), response) end |