diff --git a/gocardless_pro.gemspec b/gocardless_pro.gemspec index 8c87590..7474b7e 100644 --- a/gocardless_pro.gemspec +++ b/gocardless_pro.gemspec @@ -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 diff --git a/lib/gocardless_pro/resources/institution.rb b/lib/gocardless_pro/resources/institution.rb index 3d89ad3..4fab567 100644 --- a/lib/gocardless_pro/resources/institution.rb +++ b/lib/gocardless_pro/resources/institution.rb @@ -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 @@ -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 diff --git a/lib/gocardless_pro/resources/outbound_payment.rb b/lib/gocardless_pro/resources/outbound_payment.rb index fe95aa6..2558c94 100644 --- a/lib/gocardless_pro/resources/outbound_payment.rb +++ b/lib/gocardless_pro/resources/outbound_payment.rb @@ -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: # diff --git a/lib/gocardless_pro/resources/payer_authorisation.rb b/lib/gocardless_pro/resources/payer_authorisation.rb index e96ccd6..4e4a9d0 100644 --- a/lib/gocardless_pro/resources/payer_authorisation.rb +++ b/lib/gocardless_pro/resources/payer_authorisation.rb @@ -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 diff --git a/lib/gocardless_pro/resources/redirect_flow.rb b/lib/gocardless_pro/resources/redirect_flow.rb index b006810..f1de0cd 100644 --- a/lib/gocardless_pro/resources/redirect_flow.rb +++ b/lib/gocardless_pro/resources/redirect_flow.rb @@ -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 diff --git a/lib/gocardless_pro/services/billing_requests_service.rb b/lib/gocardless_pro/services/billing_requests_service.rb index d68eab7..d33e567 100644 --- a/lib/gocardless_pro/services/billing_requests_service.rb +++ b/lib/gocardless_pro/services/billing_requests_service.rb @@ -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 = {}) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 67d9813..f557d9e 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -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 { @@ -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 diff --git a/spec/code_samples/customer_notifications_code_samples_spec.rb b/spec/code_samples/customer_notifications_code_samples_spec.rb index 4a8bf2d..f72753b 100644 --- a/spec/code_samples/customer_notifications_code_samples_spec.rb +++ b/spec/code_samples/customer_notifications_code_samples_spec.rb @@ -29,7 +29,7 @@ it 'executes without error' do @client = client - @client.customer_notifications.handle('PCN123') + @client.customer_notifications.handle('EV1D18JEXAMPLE') end end end diff --git a/spec/resources/institution_spec.rb b/spec/resources/institution_spec.rb index bb92606..29eb621 100644 --- a/spec/resources/institution_spec.rb +++ b/spec/resources/institution_spec.rb @@ -25,6 +25,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -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 @@ -80,6 +83,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -103,6 +107,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -140,6 +145,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -190,6 +196,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }, }.to_json, diff --git a/spec/services/institutions_service_spec.rb b/spec/services/institutions_service_spec.rb index a2ce684..191a682 100644 --- a/spec/services/institutions_service_spec.rb +++ b/spec/services/institutions_service_spec.rb @@ -24,6 +24,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -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 @@ -107,6 +110,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -130,6 +134,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -162,6 +167,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -185,6 +191,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -213,6 +220,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -239,6 +247,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -276,6 +285,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }], meta: { @@ -337,6 +347,7 @@ 'limits' => 'limits-input', 'logo_url' => 'logo_url-input', 'name' => 'name-input', + 'roles' => 'roles-input', 'status' => 'status-input', }, }.to_json,