From 5155edcf264141d5fbb6d74784757f79d4dbfd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Thu, 24 Sep 2026 18:11:49 +0200 Subject: [PATCH 1/2] feat(issuing): add scheduled_revocation_date and status to update-card Swagger 2026-09-17: update-card-request gains scheduled_revocation_date (replaces deprecated revocation_date) and status to reactivate an inactive/suspended card. update-card-response no longer includes encrypted_cvv on the live API; this SDK has no typed issuing response classes, so no response-side code change is needed. --- .../issuing/update_card_request.rb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/lib/checkout_sdk/issuing/update_card_request.rb b/lib/checkout_sdk/issuing/update_card_request.rb index ee31345..9c88d9b 100644 --- a/lib/checkout_sdk/issuing/update_card_request.rb +++ b/lib/checkout_sdk/issuing/update_card_request.rb @@ -39,14 +39,21 @@ module Issuing # Example: 2026-06-01T10:00Z # @return [String] # @!attribute revocation_date - # Date scheduling the card's automatic revocation. - # [Optional] - # Format: yyyy-MM-dd (time is midnight UTC) - # Example: 2027-03-12 - # @return [String] + # @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`. + # Must be after the current date. Maps swagger `IssuingRevocationDate`. + # @deprecated Use {#scheduled_revocation_date} instead. + # @!attribute scheduled_revocation_date + # @return [String] Date for the card to be automatically revoked, in the form `yyyy-mm-dd`. + # Overrides the deprecated {#revocation_date} when both are given. Maps swagger + # `IssuingScheduledRevocationDate`. + # @!attribute status + # @return [String] Set to `active` to reactivate an `inactive` or `suspended` card. + # Mutually exclusive with `scheduled_activation_date`: submitting both returns a + # `scheduled_activation_date_conflicts_with_activation` error. The only supported + # value is `active`. class UpdateCardRequest attr_accessor :reference, :metadata, :expiry_month, :expiry_year, - :scheduled_activation_date, :revocation_date + :scheduled_activation_date, :revocation_date, :scheduled_revocation_date, :status end end end From f64f1b4ee785acda15792aa206be06bd965a18ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Armando=20Rodr=C3=ADguez?= <127134616+armando-rodriguez-cko@users.noreply.github.com> Date: Fri, 25 Sep 2026 11:29:07 +0200 Subject: [PATCH 2/2] fix(issuing): document is_single_use on update-card-response for virtual cards Swagger 2026-09-23 split update-card-response into a virtual/physical discriminator; the virtual variant adds is_single_use (specifies whether the card is set to expire after a single use). Physical cards never send it. This SDK has no typed issuing response classes, so this is a doc + test update. --- lib/checkout_sdk/issuing/issuing_client.rb | 5 ++++- .../issuing/issuing_cards_serialization_spec.rb | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/checkout_sdk/issuing/issuing_client.rb b/lib/checkout_sdk/issuing/issuing_client.rb index a68b3e5..23c031e 100644 --- a/lib/checkout_sdk/issuing/issuing_client.rb +++ b/lib/checkout_sdk/issuing/issuing_client.rb @@ -93,7 +93,10 @@ def get_card_details(card_id) # @param [CardUpdateHeaders, nil] headers the optional return-encrypted-cvv and # Encryption-Key HTTP headers. Setting return_encrypted_cvv without encryption_key returns # a 422 with error code encryption_key_required. - # @return [OpenStruct] the update response, carrying encrypted_cvv when requested + # @return [OpenStruct] the update response, carrying encrypted_cvv when requested. For a + # virtual card the response may also carry is_single_use (boolean, default false), + # specifying whether the card is set to expire after a single use. Physical cards never + # send it. def update_card(card_id, update_card_request, headers = nil) api_client.invoke_patch( build_path(ISSUING, CARDS, card_id), diff --git a/spec/checkout_sdk/issuing/issuing_cards_serialization_spec.rb b/spec/checkout_sdk/issuing/issuing_cards_serialization_spec.rb index 7730582..e161951 100644 --- a/spec/checkout_sdk/issuing/issuing_cards_serialization_spec.rb +++ b/spec/checkout_sdk/issuing/issuing_cards_serialization_spec.rb @@ -84,4 +84,17 @@ def serialize(request) expect(headers.return_encrypted_cvv).to eq('true') end end + + describe 'update_card response' do + # The 2026-09-23 spec update split update-card-response into a virtual/physical + # discriminator; the virtual variant adds is_single_use. This SDK has no typed response + # class for update_card (raw OpenStruct, the same mechanism CheckoutSdk::ApiClient uses), + # so this just confirms the field round-trips through that deserialization. + it 'round-trips is_single_use for a virtual card response' do + body = '{"type":"virtual","last_modified_date":"2026-06-01T10:00:00Z","is_single_use":true}' + response = JSON.parse(body, object_class: OpenStruct) + + expect(response.is_single_use).to eq(true) + end + end end