Skip to content

Commit

Permalink
Changes from gocardless/gocardless-pro-ruby-template@7703a1039ad1b33c…
Browse files Browse the repository at this point in the history
…94660df7a0fb1baa1a03e585
  • Loading branch information
gocardless-robot committed Jan 8, 2024
1 parent acfb2c5 commit c02f0db
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/gocardless_pro/resources/mandate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Mandate
attr_reader :id
attr_reader :metadata
attr_reader :next_possible_charge_date
attr_reader :next_possible_standard_ach_charge_date
attr_reader :payments_require_approval
attr_reader :reference
attr_reader :scheme
Expand All @@ -42,6 +43,7 @@ def initialize(object, response = nil)
@links = object['links']
@metadata = object['metadata']
@next_possible_charge_date = object['next_possible_charge_date']
@next_possible_standard_ach_charge_date = object['next_possible_standard_ach_charge_date']
@payments_require_approval = object['payments_require_approval']
@reference = object['reference']
@scheme = object['scheme']
Expand Down
2 changes: 2 additions & 0 deletions lib/gocardless_pro/resources/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Payment
attr_reader :created_at
attr_reader :currency
attr_reader :description
attr_reader :faster_ach
attr_reader :fx
attr_reader :id
attr_reader :metadata
Expand All @@ -42,6 +43,7 @@ def initialize(object, response = nil)
@created_at = object['created_at']
@currency = object['currency']
@description = object['description']
@faster_ach = object['faster_ach']
@fx = object['fx']
@id = object['id']
@links = object['links']
Expand Down
17 changes: 17 additions & 0 deletions spec/resources/mandate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand All @@ -45,6 +46,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand All @@ -67,6 +69,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -122,6 +125,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -167,6 +171,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -203,6 +208,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -237,6 +243,8 @@

expect(get_list_response.records.first.next_possible_charge_date).to eq('next_possible_charge_date-input')

expect(get_list_response.records.first.next_possible_standard_ach_charge_date).to eq('next_possible_standard_ach_charge_date-input')

expect(get_list_response.records.first.payments_require_approval).to eq('payments_require_approval-input')

expect(get_list_response.records.first.reference).to eq('reference-input')
Expand Down Expand Up @@ -271,6 +279,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -299,6 +308,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -343,6 +353,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -381,6 +392,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -441,6 +453,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -479,6 +492,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -523,6 +537,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -556,6 +571,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down Expand Up @@ -600,6 +616,7 @@
'links' => 'links-input',
'metadata' => 'metadata-input',
'next_possible_charge_date' => 'next_possible_charge_date-input',
'next_possible_standard_ach_charge_date' => 'next_possible_standard_ach_charge_date-input',
'payments_require_approval' => 'payments_require_approval-input',
'reference' => 'reference-input',
'scheme' => 'scheme-input',
Expand Down
17 changes: 17 additions & 0 deletions spec/resources/payment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand All @@ -43,6 +44,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand All @@ -65,6 +67,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -120,6 +123,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -165,6 +169,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -201,6 +206,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -235,6 +241,8 @@

expect(get_list_response.records.first.description).to eq('description-input')

expect(get_list_response.records.first.faster_ach).to eq('faster_ach-input')

expect(get_list_response.records.first.fx).to eq('fx-input')

expect(get_list_response.records.first.id).to eq('id-input')
Expand Down Expand Up @@ -269,6 +277,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -297,6 +306,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -341,6 +351,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -379,6 +390,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -439,6 +451,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -477,6 +490,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -521,6 +535,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -554,6 +569,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down Expand Up @@ -598,6 +614,7 @@
'created_at' => 'created_at-input',
'currency' => 'currency-input',
'description' => 'description-input',
'faster_ach' => 'faster_ach-input',
'fx' => 'fx-input',
'id' => 'id-input',
'links' => 'links-input',
Expand Down
Loading

0 comments on commit c02f0db

Please sign in to comment.