# frozen_string_literal: true

module Stripe
  module Issuing
    class Card < APIResource
      extend Stripe::APIOperations::Create
      extend Stripe::APIOperations::List
      include Stripe::APIOperations::Save

      OBJECT_NAME = "issuing.card".freeze

      custom_method :details, http_verb: :get

      def details(params = {}, opts = {})
        resp, opts = request(:get, resource_url + "/details", params, opts)
        Util.convert_to_stripe_object(resp.data, opts)
      end
    end
  end
end

# frozen_string_literal: true

module Stripe
  module Issuing
    class Card < APIResource
      extend Stripe::APIOperations::Create
      extend Stripe::APIOperations::List
      include Stripe::APIOperations::Save

      OBJECT_NAME = "issuing.card".freeze

      custom_method :details, http_verb: :get

      def details(params = {}, opts = {})
        resp, opts = request(:get, resource_url + "/details", params, opts)
        initialize_from(resp.data, opts)
      end
    end
  end
end

Revert "Use Util.convert_to_stripe_object instead of initialize_from"
Revert "Use Util.convert_to_stripe_object instead of initialize_from"

This reverts commit ea736eba1b8f33d8febbf0b1be0957f34f7b04db.
