diff --git a/app/services/workarea/zipco/checkout.rb b/app/services/workarea/zipco/checkout.rb index a11f1cb..0a2cc52 100644 --- a/app/services/workarea/zipco/checkout.rb +++ b/app/services/workarea/zipco/checkout.rb @@ -17,7 +17,7 @@ def complete if result == "referred" order.set_zipco_referred_at! else - order.update_attributes(zipco_referred_at: nil) + order.update(zipco_referred_at: nil) end order.user_id = user.try(:id) diff --git a/app/services/workarea/zipco/setup.rb b/app/services/workarea/zipco/setup.rb index c273c77..b19af0c 100644 --- a/app/services/workarea/zipco/setup.rb +++ b/app/services/workarea/zipco/setup.rb @@ -20,7 +20,7 @@ def set_checkout_data payment.set_zipco(token: create_order_response.zipco_order_id) - order.update_attributes!(zipco_order_id: create_order_response.zipco_order_id) + order.update!(zipco_order_id: create_order_response.zipco_order_id) end def redirect_uri diff --git a/test/integration/workarea/storefront/zipco_integration_test.rb b/test/integration/workarea/storefront/zipco_integration_test.rb index c50ac48..d7eb44e 100644 --- a/test/integration/workarea/storefront/zipco_integration_test.rb +++ b/test/integration/workarea/storefront/zipco_integration_test.rb @@ -95,7 +95,7 @@ def test_start_clears_credit_card def test_cancel_removes_zipco payment = Payment.find(order.id) - order.update_attributes(zipco_order_id: '1234') + order.update(zipco_order_id: '1234') payment.set_zipco(token: '1234') @@ -112,7 +112,7 @@ def test_cancel_removes_zipco def test_decline_removes_zipco payment = Payment.find(order.id) - order.update_attributes(zipco_order_id: '1234') + order.update(zipco_order_id: '1234') payment.set_zipco(token: '1234') diff --git a/test/services/workarea/zipco/order_test.rb b/test/services/workarea/zipco/order_test.rb index bff5681..eb567fd 100644 --- a/test/services/workarea/zipco/order_test.rb +++ b/test/services/workarea/zipco/order_test.rb @@ -9,7 +9,7 @@ def test_to_h payment = Workarea::Payment.find(order.id) payment = Workarea::Payment.find(order.id) - payment.profile.update_attributes!(store_credit: 2.00) + payment.profile.update!(store_credit: 2.00) payment.set_store_credit payment.tenders.first.amount = 2.to_m payment.save diff --git a/workarea-zipco.gemspec b/workarea-zipco.gemspec index ece690c..f154a32 100644 --- a/workarea-zipco.gemspec +++ b/workarea-zipco.gemspec @@ -16,4 +16,5 @@ Gem::Specification.new do |spec| spec.files = `git ls-files`.split("\n") spec.add_dependency 'workarea', '>= 3.4.x' +spec.required_ruby_version = ['>= 2.7', '< 3.5'] end