From 9f7952334a18e363f3654c48e439d0da12ecf368 Mon Sep 17 00:00:00 2001 From: Robot Date: Tue, 16 Apr 2024 15:45:41 +0000 Subject: [PATCH 1/4] Changes from gocardless/gocardless-pro-ruby-template@a6bbaecd1e423323a57d98a6f9b949aae3b09f69 --- lib/gocardless_pro/services/bank_details_lookups_service.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/gocardless_pro/services/bank_details_lookups_service.rb b/lib/gocardless_pro/services/bank_details_lookups_service.rb index 1d3ca5e..b27c2d8 100644 --- a/lib/gocardless_pro/services/bank_details_lookups_service.rb +++ b/lib/gocardless_pro/services/bank_details_lookups_service.rb @@ -10,8 +10,10 @@ module GoCardlessPro module Services # Service for making requests to the BankDetailsLookup endpoints class BankDetailsLookupsService < BaseService - # Performs a bank details lookup. As part of the lookup, a modulus check and - # reachability check are performed. + # Performs a bank details lookup. As part of the lookup, some validations are + # performed such as a modulus check for GBP accounts and a reachability check + # for PayTo. These checks vary per scheme. Please reach out to us if you require + # more information about the checks. # # If your request returns an [error](#api-usage-errors) or the # `available_debit_schemes` From 21d5c48d824881bde20e9d6b3ae4d3c940389b8f Mon Sep 17 00:00:00 2001 From: Robot Date: Thu, 25 Apr 2024 10:09:19 +0000 Subject: [PATCH 2/4] Changes from gocardless/gocardless-pro-ruby-template@b21aff1d71b170f1cf4028f077f85c67db892412 --- .../services/bank_details_lookups_service.rb | 12 ++++++++---- .../services/billing_requests_service.rb | 6 ++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/gocardless_pro/services/bank_details_lookups_service.rb b/lib/gocardless_pro/services/bank_details_lookups_service.rb index b27c2d8..a4ccbfb 100644 --- a/lib/gocardless_pro/services/bank_details_lookups_service.rb +++ b/lib/gocardless_pro/services/bank_details_lookups_service.rb @@ -10,10 +10,14 @@ module GoCardlessPro module Services # Service for making requests to the BankDetailsLookup endpoints class BankDetailsLookupsService < BaseService - # Performs a bank details lookup. As part of the lookup, some validations are - # performed such as a modulus check for GBP accounts and a reachability check - # for PayTo. These checks vary per scheme. Please reach out to us if you require - # more information about the checks. + # 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. # # If your request returns an [error](#api-usage-errors) or the # `available_debit_schemes` diff --git a/lib/gocardless_pro/services/billing_requests_service.rb b/lib/gocardless_pro/services/billing_requests_service.rb index 12b9ae2..8a199e5 100644 --- a/lib/gocardless_pro/services/billing_requests_service.rb +++ b/lib/gocardless_pro/services/billing_requests_service.rb @@ -110,6 +110,12 @@ def collect_customer_details(identity, options = {}) # Direct Debit. If a bank account is discovered to be closed or invalid, the # 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](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. # Example URL: /billing_requests/:identity/actions/collect_bank_account # # @param identity # Unique identifier, beginning with "BRQ". From 646931ad59c4897db5b4b4fb97160c6bbba37a8a Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 29 Apr 2024 15:46:24 +0000 Subject: [PATCH 3/4] Changes from gocardless/gocardless-pro-ruby-template@73429e3097335fbb441ac6dd4b74ec0daf126ae5 --- lib/gocardless_pro/resources/subscription.rb | 1 - lib/gocardless_pro/services/subscriptions_service.rb | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/gocardless_pro/resources/subscription.rb b/lib/gocardless_pro/resources/subscription.rb index 9daff24..9baf108 100644 --- a/lib/gocardless_pro/resources/subscription.rb +++ b/lib/gocardless_pro/resources/subscription.rb @@ -67,7 +67,6 @@ module Resources # last working day of the month). # - otherwise the charge date will be rolled __forwards__ to the next # business day. - # class Subscription attr_reader :amount attr_reader :app_fee diff --git a/lib/gocardless_pro/services/subscriptions_service.rb b/lib/gocardless_pro/services/subscriptions_service.rb index 8937c24..938ff08 100644 --- a/lib/gocardless_pro/services/subscriptions_service.rb +++ b/lib/gocardless_pro/services/subscriptions_service.rb @@ -180,7 +180,6 @@ def update(identity, options = {}) # # - `pause_cycles_must_be_greater_than_or_equal_to` if the provided value for # `pause_cycles` cannot be satisfied. - # # Example URL: /subscriptions/:identity/actions/pause # # @param identity # Unique identifier, beginning with "SB". From 77abc6440f63c2e44f3288b5a92bf5e36d73016b Mon Sep 17 00:00:00 2001 From: Robot Date: Mon, 13 May 2024 20:50:30 +0000 Subject: [PATCH 4/4] Changes from gocardless/gocardless-pro-ruby-template@b32ad39b1cf366c72a4fc4b8c42c37cd65760f06 --- lib/gocardless_pro/client.rb | 2 +- lib/gocardless_pro/middlewares/raise_gocardless_errors.rb | 5 ++++- lib/gocardless_pro/version.rb | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/gocardless_pro/client.rb b/lib/gocardless_pro/client.rb index 1a3f093..4e8d8eb 100644 --- a/lib/gocardless_pro/client.rb +++ b/lib/gocardless_pro/client.rb @@ -218,7 +218,7 @@ def default_options 'User-Agent' => "#{user_agent}", 'Content-Type' => 'application/json', 'GoCardless-Client-Library' => 'gocardless-pro-ruby', - 'GoCardless-Client-Version' => '2.54.0', + 'GoCardless-Client-Version' => '2.55.0', }, } end diff --git a/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb b/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb index 0d56e5a..d31dbc8 100644 --- a/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +++ b/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb @@ -3,9 +3,12 @@ module Middlewares class RaiseGoCardlessErrors < Faraday::Middleware API_ERROR_STATUSES = 501..599 CLIENT_ERROR_STATUSES = 400..500 + API_STATUS_NO_CONTENT = 204 def on_complete(env) - raise ApiError, generate_error_data(env) if !json?(env) || API_ERROR_STATUSES.include?(env.status) + if !(env.status == API_STATUS_NO_CONTENT || json?(env)) || API_ERROR_STATUSES.include?(env.status) + raise ApiError, generate_error_data(env) + end return unless CLIENT_ERROR_STATUSES.include?(env.status) diff --git a/lib/gocardless_pro/version.rb b/lib/gocardless_pro/version.rb index 2328022..aa1d9fb 100644 --- a/lib/gocardless_pro/version.rb +++ b/lib/gocardless_pro/version.rb @@ -3,5 +3,5 @@ module GoCardlessPro module GoCardlessPro # Current version of the GC gem - VERSION = '2.54.0' + VERSION = '2.55.0' end