From d310888d6e830749df6c4fd46707c9ea0db0577b Mon Sep 17 00:00:00 2001 From: Robot Date: Fri, 23 Aug 2024 07:12:27 +0000 Subject: [PATCH] Changes from gocardless/gocardless-pro-ruby-template@03f83d5523ebed887479c43ef7d527527e7faf8d --- lib/gocardless_pro/resources/mandate.rb | 2 ++ spec/resources/mandate_spec.rb | 17 +++++++++++++++++ spec/services/mandates_service_spec.rb | 21 +++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/lib/gocardless_pro/resources/mandate.rb b/lib/gocardless_pro/resources/mandate.rb index 837ffa3..5ff71f1 100644 --- a/lib/gocardless_pro/resources/mandate.rb +++ b/lib/gocardless_pro/resources/mandate.rb @@ -18,6 +18,7 @@ module Resources class Mandate attr_reader :authorisation_source attr_reader :consent_parameters + attr_reader :consent_type attr_reader :created_at attr_reader :funds_settlement attr_reader :id @@ -37,6 +38,7 @@ def initialize(object, response = nil) @authorisation_source = object['authorisation_source'] @consent_parameters = object['consent_parameters'] + @consent_type = object['consent_type'] @created_at = object['created_at'] @funds_settlement = object['funds_settlement'] @id = object['id'] diff --git a/spec/resources/mandate_spec.rb b/spec/resources/mandate_spec.rb index 62d8209..bba878a 100644 --- a/spec/resources/mandate_spec.rb +++ b/spec/resources/mandate_spec.rb @@ -17,6 +17,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -40,6 +41,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -63,6 +65,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -119,6 +122,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -165,6 +169,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -202,6 +207,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -233,6 +239,8 @@ expect(get_list_response.records.first.consent_parameters).to eq('consent_parameters-input') + expect(get_list_response.records.first.consent_type).to eq('consent_type-input') + expect(get_list_response.records.first.created_at).to eq('created_at-input') expect(get_list_response.records.first.funds_settlement).to eq('funds_settlement-input') @@ -273,6 +281,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -302,6 +311,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -347,6 +357,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -386,6 +397,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -447,6 +459,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -486,6 +499,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -531,6 +545,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -565,6 +580,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -610,6 +626,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', diff --git a/spec/services/mandates_service_spec.rb b/spec/services/mandates_service_spec.rb index 14e0707..5120f1a 100644 --- a/spec/services/mandates_service_spec.rb +++ b/spec/services/mandates_service_spec.rb @@ -17,6 +17,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -40,6 +41,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -63,6 +65,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -142,6 +145,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -188,6 +192,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -240,6 +245,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -276,6 +282,8 @@ expect(get_list_response.records.first.consent_parameters).to eq('consent_parameters-input') + expect(get_list_response.records.first.consent_type).to eq('consent_type-input') + expect(get_list_response.records.first.created_at).to eq('created_at-input') expect(get_list_response.records.first.funds_settlement).to eq('funds_settlement-input') @@ -339,6 +347,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -368,6 +377,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -406,6 +416,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -435,6 +446,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -469,6 +481,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -501,6 +514,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -546,6 +560,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -585,6 +600,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -701,6 +717,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -765,6 +782,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -821,6 +839,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -855,6 +874,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input', @@ -911,6 +931,7 @@ 'authorisation_source' => 'authorisation_source-input', 'consent_parameters' => 'consent_parameters-input', + 'consent_type' => 'consent_type-input', 'created_at' => 'created_at-input', 'funds_settlement' => 'funds_settlement-input', 'id' => 'id-input',