You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: payment_view_model.rb
    path of file: ./repos/workarea/storefront/app/view_models/workarea/storefront/checkout
    
    the code of the file until where you have to start completion: module Workarea
  module Storefront
    class Checkout::PaymentViewModel < ApplicationViewModel
      include CheckoutContent
      include OrderPricing

      # Can the
    
      def selected_payment_id
        if credit_card? && credit_card.saved_card_id.present?
          credit_card.saved_card_id
        elsif options[:payment].present?
          options[:payment]
        else
          payment.try(:default_credit_card).try(:id)
        end