Sha256: 126bc40eddcbbcb12e36367c032110bf3527ffc52d3e65f9024c6597849c129e

Contents?: true

Size: 1.13 KB

Versions: 6

Compression:

Stored size: 1.13 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 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

Version Path
spree_api-4.2.2 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
spree_api-4.2.1 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
spree_api-4.2.0 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
spree_api-4.2.0.rc5 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
spree_api-4.2.0.rc4 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb
spree_api-4.2.0.rc3 app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb