Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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.88.2'
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
4 changes: 2 additions & 2 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
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