Skip to Content Skip to Search
Methods
S

Instance Public methods

show()

# File app/controllers/v2/coupons_controller.rb, line 3
def show
  status_code, coupon_data = coupon_fetcher.get(params[:coupon_code])

  if status_code != 200
    return render_coupon_fetcher_errors
  end

  render json: coupon,
    status: status_code,
    serializer: Coupon::CouponSerializer,
    description: coupon_data.description
end