Sha256: 43f4101faf085e88dca1051d91195d719ef358ee4c0caf1a0828d8f66e802d0d
Contents?: true
Size: 1.22 KB
Versions: 6
Compression:
Stored size: 1.22 KB
Contents
module Spree module Api module V2 module Storefront module Account class CreditCardsController < ::Spree::Api::V2::ResourceController before_action :require_spree_current_user private def model_class Spree::CreditCard end def scope super.where(user: spree_current_user) end def collection_serializer Spree::Api::Dependencies.storefront_credit_card_serializer.constantize end def collection_finder Spree::Api::Dependencies.storefront_credit_card_finder.constantize end def resource_serializer Spree::Api::Dependencies.storefront_credit_card_serializer.constantize end def resource_finder Spree::Api::Dependencies.storefront_credit_card_finder.constantize end def serialize_collection(collection) collection_serializer.new( collection, include: resource_includes, fields: sparse_fields ).serializable_hash end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems