Class: Spree::Api::V1::CustomersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/spree/api/v1/customers_controller.rb

Instance Method Summary collapse

Instance Method Details

#lookupObject



15
16
17
18
19
20
21
22
23
# File 'app/controllers/spree/api/v1/customers_controller.rb', line 15

def lookup
  lookup_level = params['lookupLevel'].downcase.to_sym
  collection = customer_lookup(type: lookup_level).execute

  render json: serialize_collection(
    type: lookup_level,
    collection: collection
  ), status: 200
end