From 535ea22620d948403cb75c49075fd6bb1ab1269c Mon Sep 17 00:00:00 2001 From: Crankshaft Robot Date: Mon, 20 Feb 2017 15:13:56 +0000 Subject: [PATCH] Crankshaft[BU000003GFGB12] Client - Ruby @ 2017-02-20 15:13:56 +0000 --- lib/gocardless_pro/resources/event.rb | 4 +++- spec/resources/event_spec.rb | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/gocardless_pro/resources/event.rb b/lib/gocardless_pro/resources/event.rb index 2b11c169..670ec675 100644 --- a/lib/gocardless_pro/resources/event.rb +++ b/lib/gocardless_pro/resources/event.rb @@ -48,7 +48,7 @@ def api_response # return the links that the resource has def links - valid_link_keys = %w(mandate new_customer_bank_account organisation parent_event payment payout previous_customer_bank_account refund subscription ) + valid_link_keys = %w(mandate new_customer_bank_account new_mandate organisation parent_event payment payout previous_customer_bank_account refund subscription ) valid_links = (@links || {}).select { |key, _| valid_link_keys.include?(key) } links_class = Struct.new( @@ -58,6 +58,8 @@ def links new_customer_bank_account: '', + new_mandate: '', + organisation: '', parent_event: '', diff --git a/spec/resources/event_spec.rb b/spec/resources/event_spec.rb index e39fd418..20b108ce 100644 --- a/spec/resources/event_spec.rb +++ b/spec/resources/event_spec.rb @@ -19,6 +19,8 @@ 'new_customer_bank_account' => 'new_customer_bank_account-input', + 'new_mandate' => 'new_mandate-input', + 'organisation' => 'organisation-input', 'parent_event' => 'parent_event-input', @@ -57,6 +59,8 @@ expect(resource.links.new_customer_bank_account).to eq('new_customer_bank_account-input') + expect(resource.links.new_mandate).to eq('new_mandate-input') + expect(resource.links.organisation).to eq('organisation-input') expect(resource.links.parent_event).to eq('parent_event-input')