From 8738a6f7e71a8a7cb62a33ed7cf10b3c4dee9690 Mon Sep 17 00:00:00 2001 From: "gocardless-ci-robot[bot]" <123969075+gocardless-ci-robot[bot]@users.noreply.github.com> Date: Fri, 11 Sep 2026 10:05:14 +0000 Subject: [PATCH] Changes generated by bad27f532f69cd8db5a2b8e762be7173a464b512 This commit was automatically created from gocardless/client-library-templates@bad27f532f69cd8db5a2b8e762be7173a464b512 by the `push-files` action. Workflow run: https://github.com/gocardless/client-library-templates/actions/runs/34587244175 --- .../services/instalment_schedules_service.rb | 8 ++++---- .../instalment_schedules_code_samples_spec.rb | 4 ++-- spec/resources/instalment_schedule_spec.rb | 12 +++++------ .../instalment_schedules_service_spec.rb | 20 +++++++++---------- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/gocardless_pro/services/instalment_schedules_service.rb b/lib/gocardless_pro/services/instalment_schedules_service.rb index 8134068..5533d99 100644 --- a/lib/gocardless_pro/services/instalment_schedules_service.rb +++ b/lib/gocardless_pro/services/instalment_schedules_service.rb @@ -29,10 +29,10 @@ class InstalmentSchedulesService < BaseService # to the created payments, or the status `error` and detailed information about # the # failures. - # Example URL: /instalment_schedules + # Example URL: /instalment_schedules/create_with_dates # @param options [Hash] parameters as a hash, under a params key. def create_with_dates(options = {}) - path = '/instalment_schedules' + path = '/instalment_schedules/create_with_dates' params = options.delete(:params) || {} options[:params] = {} @@ -78,10 +78,10 @@ def create_with_dates(options = {}) # and link to # the created payments, or the status `error` and detailed information about the # failures. - # Example URL: /instalment_schedules + # Example URL: /instalment_schedules/create_with_schedule # @param options [Hash] parameters as a hash, under a params key. def create_with_schedule(options = {}) - path = '/instalment_schedules' + path = '/instalment_schedules/create_with_schedule' params = options.delete(:params) || {} options[:params] = {} diff --git a/spec/code_samples/instalment_schedules_code_samples_spec.rb b/spec/code_samples/instalment_schedules_code_samples_spec.rb index c46f642..e2e33e1 100644 --- a/spec/code_samples/instalment_schedules_code_samples_spec.rb +++ b/spec/code_samples/instalment_schedules_code_samples_spec.rb @@ -19,7 +19,7 @@ describe '#create_with_dates code sample' do before do # Convert :param placeholders to regex wildcards for flexible matching - stub_url = '/instalment_schedules'.gsub(/:\w+/, '[^/]+') + stub_url = '/instalment_schedules/create_with_dates'.gsub(/:\w+/, '[^/]+') stub_request(:post, /.*api.gocardless.com#{stub_url}/). to_return( body: { 'instalment_schedules' => {} }.to_json, @@ -65,7 +65,7 @@ describe '#create_with_schedule code sample' do before do # Convert :param placeholders to regex wildcards for flexible matching - stub_url = '/instalment_schedules'.gsub(/:\w+/, '[^/]+') + stub_url = '/instalment_schedules/create_with_schedule'.gsub(/:\w+/, '[^/]+') stub_request(:post, /.*api.gocardless.com#{stub_url}/). to_return( body: { 'instalment_schedules' => {} }.to_json, diff --git a/spec/resources/instalment_schedule_spec.rb b/spec/resources/instalment_schedule_spec.rb index 678c0bc..48c5bb3 100644 --- a/spec/resources/instalment_schedule_spec.rb +++ b/spec/resources/instalment_schedule_spec.rb @@ -28,7 +28,7 @@ end before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}). with( body: { 'instalment_schedules' => { @@ -76,7 +76,7 @@ let(:new_resource) { {} } before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}).to_return( body: { error: { type: 'validation_failed', @@ -115,7 +115,7 @@ end let!(:post_stub) do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}).to_return( body: { error: { type: 'invalid_state', @@ -185,7 +185,7 @@ end before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}). with( body: { 'instalment_schedules' => { @@ -233,7 +233,7 @@ let(:new_resource) { {} } before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}).to_return( body: { error: { type: 'validation_failed', @@ -272,7 +272,7 @@ end let!(:post_stub) do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}).to_return( body: { error: { type: 'invalid_state', diff --git a/spec/services/instalment_schedules_service_spec.rb b/spec/services/instalment_schedules_service_spec.rb index ad46964..26691e9 100644 --- a/spec/services/instalment_schedules_service_spec.rb +++ b/spec/services/instalment_schedules_service_spec.rb @@ -28,7 +28,7 @@ end before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}). with( body: { 'instalment_schedules' => { @@ -75,7 +75,7 @@ before { allow_any_instance_of(GoCardlessPro::Request).to receive(:sleep) } it 'retries timeouts' do - stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}). to_timeout.then.to_return({ status: 200, headers: response_headers }) post_create_response @@ -83,7 +83,7 @@ end it 'retries 5XX errors' do - stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}). to_return({ status: 502, headers: { 'Content-Type' => 'text/html' }, body: 'Response from Cloudflare' }). @@ -99,7 +99,7 @@ let(:new_resource) { {} } before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}).to_return( body: { error: { type: 'validation_failed', @@ -138,7 +138,7 @@ end let!(:post_stub) do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_dates}).to_return( body: { error: { type: 'invalid_state', @@ -224,7 +224,7 @@ end before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}). with( body: { 'instalment_schedules' => { @@ -271,7 +271,7 @@ before { allow_any_instance_of(GoCardlessPro::Request).to receive(:sleep) } it 'retries timeouts' do - stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}). to_timeout.then.to_return({ status: 200, headers: response_headers }) post_create_response @@ -279,7 +279,7 @@ end it 'retries 5XX errors' do - stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}). + stub = stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}). to_return({ status: 502, headers: { 'Content-Type' => 'text/html' }, body: 'Response from Cloudflare' }). @@ -295,7 +295,7 @@ let(:new_resource) { {} } before do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}).to_return( body: { error: { type: 'validation_failed', @@ -334,7 +334,7 @@ end let!(:post_stub) do - stub_request(:post, %r{.*api.gocardless.com/instalment_schedules}).to_return( + stub_request(:post, %r{.*api.gocardless.com/instalment_schedules/create_with_schedule}).to_return( body: { error: { type: 'invalid_state',