-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Labels
Description
Description
Adyen::ModificationsApi exists both for Payment and Checkout
Steps to reproduce
it 'loads modification_api without conflicting with checkout modification_api' do
@shared_values[:client].payment.modifications_api
@shared_values[:client].checkout.modifications_api
expect(@shared_values[:client].checkout.modifications_api.service).to eq('Checkout')
expect(@shared_values[:client].payment.modifications_api.service).to eq('Payment')
endThis test fails with:
Actual behavior
This test fails with:
Failure/Error: expect(@shared_values[:client].checkout.modifications_api.service).to eq('Checkout')
expected: "Checkout"
got: "Payment"
(compared using ==)
Expected behavior
Both modification_api classes should be their own classes, they currently share the same name and one override the other's #initialize method.
Code snippet or screenshots (if applicable)
https://github.com/Adyen/adyen-ruby-api-library/blob/main/lib/adyen/services/checkout/modifications_api.rb
https://github.com/Adyen/adyen-ruby-api-library/blob/main/lib/adyen/services/payment/modifications_api.rb
Adyen Ruby API Library version
11.0.0
Ruby language version
N/A
Operating System
macOS
Additional context
Bug introduced by #313