Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
2cd1b73
Changes generated by 0447966dbc7deb4a368eb115ca363fe1cfcfbd16
gocardless-ci-robot[bot] Jul 21, 2026
ac36219
Changes generated by 9d9ff143689ee009c9124b148c0c3d597e5060c2
gocardless-ci-robot[bot] Jul 21, 2026
6353aaf
Changes generated by cab4c6d4f4714865da64e55cc2cfce31ce27171a
gocardless-ci-robot[bot] Jul 23, 2026
81355cb
Changes generated by 21e2aafcb42b73c259b569f768ba4f8a77517aba
gocardless-ci-robot[bot] Jul 23, 2026
f55381f
Changes generated by 37ace3cbc00f4c37c4fe018f3d733be1d01a28f8
gocardless-ci-robot[bot] Jul 23, 2026
e25a7b6
Changes generated by 717b3b1301189aad15c3bb4c0dc9001ecf2dafaf
gocardless-ci-robot[bot] Jul 23, 2026
a6471e3
Changes generated by 03c5a92dee86a779113125877d81f061ea5399b2
gocardless-ci-robot[bot] Jul 23, 2026
951d198
Changes generated by 823ec60ec0c7bb5c3d6415b3471025c8b91fbbf9
gocardless-ci-robot[bot] Jul 24, 2026
a38cf04
Changes generated by 618a2dfa62a5f87135b0d0bcd9b10f3af790fe85
gocardless-ci-robot[bot] Jul 30, 2026
d788277
Changes generated by bef4cfda31eb49ec9a126fcc3ca077acfdd5e355
gocardless-ci-robot[bot] Aug 3, 2026
f6f5441
Changes generated by db06bc8cfaf13a7c18e14a90ff2d221b58752c9a
gocardless-ci-robot[bot] Aug 7, 2026
db80d23
Changes generated by e81b5c7c52e45163e379a646c5480589373e0d94
gocardless-ci-robot[bot] Aug 10, 2026
bc32f5c
Changes generated by b7521727bf01a05673c8dc808021b7cfc375dfd5
gocardless-ci-robot[bot] Aug 10, 2026
ac45ac2
Automatically merge template-changes PRs
jamiecobbett Aug 11, 2026
665270a
Fix all-tests-passed to match required check
jamiecobbett Aug 11, 2026
ec7478a
Automatically generate release notes from changelog
jamiecobbett Aug 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/auto-merge-client-library-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Auto-merge client-library changes

on: pull_request_target

permissions:
pull-requests: write

jobs:
merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'gocardless-ci-robot[bot]' && github.event.pull_request.head.ref == 'template-changes' }}
steps:
- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GOCARDLESS_CI_ROBOT_TOKEN }}
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- run: bundle install && bundle exec rspec

all-tests-passed:
name: All tests passed
name: all-tests-passed
runs-on: ubuntu-latest
needs: [test]
if: always()
Expand Down Expand Up @@ -75,12 +75,35 @@ jobs:
printf -- "---\n:rubygems_api_key: $RUBYGEM_PUBLISH_API_KEY\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem


- name: Extract changelog notes for this version
id: notes
if: steps.version_check.outputs.already_published == 'false'
run: |
VERSION="${{ steps.version_check.outputs.version }}"
NOTES=""
if [ -f CHANGELOG.md ]; then
NOTES=$(awk -v ver="$VERSION" '
$0 ~ "^## " ver {p=1; next}
p && /^## / {exit}
p {print}
' CHANGELOG.md)
fi
{
echo "notes<<EOF"
echo "$NOTES"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Create GitHub Release
if: steps.version_check.outputs.already_published == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION=${{ steps.version_check.outputs.version }}
gh release create "v$VERSION" \
--title "v$VERSION" \
--generate-notes
NOTES="${{ steps.notes.outputs.notes }}"
if [ -n "$(echo "$NOTES" | tr -d '[:space:]')" ]; then
gh release create v${{ steps.version_check.outputs.version }} --notes "$NOTES"
else
gh release create v${{ steps.version_check.outputs.version }} --generate-notes
fi
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- This file is generated, please add to it using `knope document-change` in the client-library-templates repo -->
# Changelog

## 4.4.1

Start of changelog tracking with Knope. See [GitHub releases](https://github.com/gocardless/gocardless-pro-ruby/releases) for the history of earlier versions.
8 changes: 4 additions & 4 deletions gocardless_pro.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
spec.add_dependency 'faraday', ['>= 2', '< 3']
spec.add_dependency 'base64'

spec.add_development_dependency 'rspec', '~> 3.13.0'
spec.add_development_dependency 'webmock', '~> 3.24.0'
spec.add_development_dependency 'rubocop', '~> 1.85.0'
spec.add_development_dependency 'yard', '~> 0.9.37'
spec.add_development_dependency 'rspec', '~> 3.13.2'
spec.add_development_dependency 'webmock', '~> 3.26.2'
spec.add_development_dependency 'rubocop', '~> 1.89.0'
spec.add_development_dependency 'yard', '~> 0.9.45'
end
2 changes: 2 additions & 0 deletions lib/gocardless_pro/resources/institution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Institution
attr_reader :limits
attr_reader :logo_url
attr_reader :name
attr_reader :roles
attr_reader :status

# Initialize a institution resource instance
Expand All @@ -38,6 +39,7 @@ def initialize(object, response = nil)
@limits = object['limits']
@logo_url = object['logo_url']
@name = object['name']
@roles = object['roles']
@status = object['status']
@response = response
end
Expand Down
2 changes: 1 addition & 1 deletion lib/gocardless_pro/resources/outbound_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module Resources
# the status of the outbound payment changes
# (https://developer.gocardless.com/api-reference/#event-types-outbound-payment).
#
# ####Rate limiting
# Rate limiting
#
# Two rate limits apply to the Outbound Payments APIs:
#
Expand Down
10 changes: 5 additions & 5 deletions lib/gocardless_pro/resources/payer_authorisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ module Resources
# https://api.gocardless.com/events?payer_authorisation={id}&action=completed
#
#
# Note that the `create` and `update` endpoints behave differently than
# other existing `create` and `update` endpoints. The Payer Authorisation is
# Note that the create and update endpoints behave differently than
# other existing create and update endpoints. The Payer Authorisation is
# still saved if incomplete data is provided.
# We return the list of incomplete data in the `incomplete_fields` along
# with the resources in the body of the response.
# We return the list of incomplete data in the incomplete_fields along with
# the resources in the body of the response.
# The bank account details(account_number, bank_code & branch_code) must be
# sent together rather than splitting across different request for both
# `create` and `update` endpoints.
# create and update endpoints.
#
#
# The API is designed to be flexible and allows you to collect information
Expand Down
4 changes: 2 additions & 2 deletions lib/gocardless_pro/resources/redirect_flow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module Resources
# Deprecated: Redirect Flows are legacy APIs and cannot be used by new
# integrators.
# The Billing Request flow
# (https://developer.gocardless.com/api-reference/#billing-requests) API
# should be used for your payment flows.
# (https://developer.gocardless.com/api-reference/#billing-requests-billing-requests)
# API should be used for your payment flows.
#
# Redirect flows enable you to use GoCardless' hosted payment pages
# (https://pay-sandbox.gocardless.com/AL000000AKFPFF) to set up mandates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ module Services
# Service for making requests to the BankAccountHolderVerification endpoints
class BankAccountHolderVerificationsService < BaseService
# Verify the account holder of the bank account. A complete verification can be
# attached when creating an outbound payment. This endpoint allows partner
# merchants to create Confirmation of Payee checks on customer bank accounts
# before sending outbound payments.
# attached when creating an outbound payment.
# This endpoint allows partner merchants to create Confirmation of Payee checks
# on customer bank accounts before sending outbound payments.
# Example URL: /bank_account_holder_verifications
# @param options [Hash] parameters as a hash, under a params key.
def create(options = {})
Expand Down
14 changes: 9 additions & 5 deletions lib/gocardless_pro/services/bank_details_lookups_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@ class BankDetailsLookupsService < BaseService
# Performs a bank details lookup. As part of the lookup, a modulus check and
# reachability check are performed.
#
# For UK-based bank accounts, where an account holder name is provided (and an
# account number, a sort code or an iban
# are already present), we verify that the account holder name and bank account
# number match the details held by
# the relevant bank.
# For UK or Eurozone-based bank accounts, where an account holder name is
# provided
# (and an account number, a sort code or an IBAN are already present), we verify
# that
# the account holder name and bank account number match the details held by the
# relevant bank.
# If there is no match, the endpoint will return a 422 - validation error on
# account_holder_name:
# "Account holder name does not match bank account details provided".
#
# If your request returns an error
# (https://developer.gocardless.com/api-reference/#api-usage-errors) or the
Expand Down
16 changes: 10 additions & 6 deletions lib/gocardless_pro/services/billing_requests_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ module GoCardlessPro
module Services
# Service for making requests to the BillingRequest endpoints
class BillingRequestsService < BaseService
# Important: All properties associated with `subscription_request` and
# `instalment_schedule_request` are only supported for ACH and PAD schemes.
# Important: All properties associated with subscription_request and
# instalment_schedule_request are only supported for ACH and PAD schemes.
# Example URL: /billing_requests
# @param options [Hash] parameters as a hash, under a params key.
def create(options = {})
Expand Down Expand Up @@ -112,11 +112,15 @@ def collect_customer_details(identity, options = {})
# customer is requested to adjust the account number/routing number and
# succeed in this check to continue with the flow.
#
# BACS scheme Payer Name Verification
# BACS and SEPA schemes Payer Name Verification
# (https://hub.gocardless.com/s/article/Introduction-to-Payer-Name-Verification?language=en_GB)
# is enabled by default for UK based bank accounts, meaning we verify the
# account holder name and bank account
# number match the details held by the relevant bank.
# is enabled by default for UK and Eurozone based bank accounts, meaning we
# verify the account holder name and bank account number/IBAN match
# the details held by the relevant bank. If there is no match, the endpoint will
# return a 422 - validation error on account_holder_name:
# "Account holder name does not match bank account details provided". Testing
# instructions are here
# (https://developer.gocardless.com/developer-tools/scenario-simulators/#payer_name_verification)
# Example URL: /billing_requests/:identity/actions/collect_bank_account
#
# @param identity # Unique identifier, beginning with "BRQ".
Expand Down
6 changes: 4 additions & 2 deletions spec/client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper'

describe GoCardlessPro::Client do
subject { -> { described_class.new(options) } }
subject(:client) { described_class.new(options) }

let(:options) do
{
Expand All @@ -14,6 +14,8 @@
let(:environment) { :live }
let(:token) { nil }

it { is_expected.to raise_error('No Access Token given to GoCardless Client') }
it 'raises an error' do
expect { client }.to raise_error('No Access Token given to GoCardless Client')
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

it 'executes without error' do
@client = client
@client.customer_notifications.handle('PCN123')
@client.customer_notifications.handle('EV1D18JEXAMPLE')
end
end
end
7 changes: 7 additions & 0 deletions spec/resources/institution_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -55,6 +56,8 @@

expect(get_list_response.records.first.name).to eq('name-input')

expect(get_list_response.records.first.roles).to eq('roles-input')

expect(get_list_response.records.first.status).to eq('status-input')
end

Expand All @@ -80,6 +83,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand All @@ -103,6 +107,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -140,6 +145,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -190,6 +196,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
},
}.to_json,
Expand Down
11 changes: 11 additions & 0 deletions spec/services/institutions_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -59,6 +60,8 @@

expect(get_list_response.records.first.name).to eq('name-input')

expect(get_list_response.records.first.roles).to eq('roles-input')

expect(get_list_response.records.first.status).to eq('status-input')
end

Expand Down Expand Up @@ -107,6 +110,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand All @@ -130,6 +134,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -162,6 +167,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand All @@ -185,6 +191,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -213,6 +220,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand All @@ -239,6 +247,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -276,6 +285,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
}],
meta: {
Expand Down Expand Up @@ -337,6 +347,7 @@
'limits' => 'limits-input',
'logo_url' => 'logo_url-input',
'name' => 'name-input',
'roles' => 'roles-input',
'status' => 'status-input',
},
}.to_json,
Expand Down