From 17a1fd4d47f58544b7ef70473608ef61ad5db6c3 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 15 Feb 2026 14:44:46 +1100 Subject: [PATCH 1/3] Remove card expiry validation on update requests Cards can be updated _sans_ expiry, in cases such as: 1. when make_default is passed as an argument 2. When a new alias is being specified --- lib/fat_zebra/card.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/fat_zebra/card.rb b/lib/fat_zebra/card.rb index a045d5b..79aca3d 100644 --- a/lib/fat_zebra/card.rb +++ b/lib/fat_zebra/card.rb @@ -19,8 +19,5 @@ class Card < APIResource validates :card_expiry, required: { unless: %i[wallet] }, on: :create validates :wallet, required: { unless: %i[card_number] }, on: :create - - validates :card_expiry, required: true, on: :update - end end From f3093da730aa33a05a172a2c3e5bf6690930ca15 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 15 Feb 2026 14:59:43 +1100 Subject: [PATCH 2/3] Lock to less-precise Ruby version --- gemfiles/ruby3.4/Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemfiles/ruby3.4/Gemfile b/gemfiles/ruby3.4/Gemfile index aeaa2eb..679dd58 100644 --- a/gemfiles/ruby3.4/Gemfile +++ b/gemfiles/ruby3.4/Gemfile @@ -2,7 +2,7 @@ source 'http://rubygems.org' -ruby '3.4.8' +ruby '~> 3.4' # Specify your gem's dependencies in FatZebra.gemspec gemspec path: '../../' From 8c7acad14642945349a6eca6165fdb6f7da0d24b Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 15 Feb 2026 14:59:49 +1100 Subject: [PATCH 3/3] Remove unnecessary validations check --- spec/lib/fat_zebra/card_spec.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/lib/fat_zebra/card_spec.rb b/spec/lib/fat_zebra/card_spec.rb index bb0408c..60cd68a 100644 --- a/spec/lib/fat_zebra/card_spec.rb +++ b/spec/lib/fat_zebra/card_spec.rb @@ -30,12 +30,6 @@ it { is_expected.to be_accepted } it { expect(credit_card.token).to eq(create.token) } it { expect(credit_card.card_expiry).to_not eq(create.card_expiry) } - - context 'validations' do - let(:valid_credit_card_update_payload) {{}} - - it { expect{ credit_card }.to raise_error(FatZebra::RequestValidationError) } - end end describe '.find', :vcr do