Skip to content

Commit

Permalink
Merge pull request #123 from gocardless/template-changes
Browse files Browse the repository at this point in the history
Template changes
  • Loading branch information
jessezach authored Oct 26, 2023
2 parents 114e88b + 697cd08 commit 6c185c8
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/gocardless_pro/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def default_options
'User-Agent' => "#{user_agent}",
'Content-Type' => 'application/json',
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
'GoCardless-Client-Version' => '2.49.0',
'GoCardless-Client-Version' => '2.50.0',
},
}
end
Expand Down
4 changes: 4 additions & 0 deletions lib/gocardless_pro/resources/billing_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ def organisation
@links['organisation']
end

def payment_provider
@links['payment_provider']
end

def payment_request
@links['payment_request']
end
Expand Down
2 changes: 2 additions & 0 deletions lib/gocardless_pro/resources/creditor_bank_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class CreditorBankAccount
attr_reader :enabled
attr_reader :id
attr_reader :metadata
attr_reader :verification_status

# Initialize a creditor_bank_account resource instance
# @param object [Hash] an object returned from the API
Expand All @@ -50,6 +51,7 @@ def initialize(object, response = nil)
@id = object['id']
@links = object['links']
@metadata = object['metadata']
@verification_status = object['verification_status']
@response = response
end

Expand Down
2 changes: 1 addition & 1 deletion lib/gocardless_pro/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ module GoCardlessPro

module GoCardlessPro
# Current version of the GC gem
VERSION = '2.49.0'
VERSION = '2.50.0'
end
14 changes: 14 additions & 0 deletions spec/resources/creditor_bank_account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}
end

Expand All @@ -46,6 +47,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}
).
Expand All @@ -66,6 +68,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},

}.to_json,
Expand Down Expand Up @@ -119,6 +122,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}
end

Expand Down Expand Up @@ -162,6 +166,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -196,6 +201,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: {
Expand Down Expand Up @@ -232,6 +238,8 @@
expect(get_list_response.records.first.id).to eq('id-input')

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

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

it 'exposes the cursors for before and after' do
Expand Down Expand Up @@ -260,6 +268,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: { after: 'AB345' },
Expand All @@ -286,6 +295,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
limit: 2,
Expand Down Expand Up @@ -328,6 +338,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -364,6 +375,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -421,6 +433,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,

Expand Down Expand Up @@ -463,6 +476,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down
18 changes: 18 additions & 0 deletions spec/services/creditor_bank_accounts_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}
end

Expand All @@ -46,6 +47,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}
).
Expand All @@ -66,6 +68,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},

}.to_json,
Expand Down Expand Up @@ -142,6 +145,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}
end

Expand Down Expand Up @@ -185,6 +189,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -234,6 +239,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: {
Expand Down Expand Up @@ -275,6 +281,8 @@
expect(get_list_response.records.first.id).to eq('id-input')

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

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

it 'exposes the cursors for before and after' do
Expand Down Expand Up @@ -326,6 +334,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: { after: 'AB345' },
Expand All @@ -352,6 +361,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
limit: 2,
Expand Down Expand Up @@ -387,6 +397,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: { after: 'AB345' },
Expand All @@ -413,6 +424,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
limit: 2,
Expand Down Expand Up @@ -444,6 +456,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
cursors: { after: 'AB345' },
Expand Down Expand Up @@ -473,6 +486,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
}],
meta: {
limit: 2,
Expand Down Expand Up @@ -515,6 +529,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -551,6 +566,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down Expand Up @@ -663,6 +679,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,

Expand Down Expand Up @@ -716,6 +733,7 @@
'id' => 'id-input',
'links' => 'links-input',
'metadata' => 'metadata-input',
'verification_status' => 'verification_status-input',
},
}.to_json,
headers: response_headers
Expand Down

0 comments on commit 6c185c8

Please sign in to comment.