public function update(SubscriptionService $subscriptionService, DeltaVCalculator $deltaV, $object_id)
 {
     if (Input::has(['status', 'visibility'])) {
         $object = Object::find($object_id);
         if (Input::get('status') == ObjectPublicationStatus::PublishedStatus) {
             DB::transaction(function () use($object, $subscriptionService, $deltaV) {
                 // Put the necessary files to S3 (and maybe local)
                 if (Input::get('visibility') == VisibilityStatus::PublicStatus) {
                     $object->putToLocal();
                 }
                 $job = (new PutObjectToCloudJob($object))->onQueue('uploads');
                 $this->dispatch($job);
                 // Update the object properties
                 $object->fill(Input::only(['status', 'visibility']));
                 $object->actioned_at = Carbon::now();
                 // Save the object if there's no errors
                 $object->save();
                 // Add the object to our elasticsearch node
                 Search::index($object->search());
                 // Create an award wih DeltaV
                 $award = Award::create(['user_id' => $object->user_id, 'object_id' => $object->object_id, 'type' => 'Created', 'value' => $deltaV->calculate($object)]);
                 // Once done, extend subscription
                 $subscriptionService->incrementSubscription($object->user, $award);
             });
         } elseif (Input::get('status') == "Deleted") {
             $object->delete();
         }
         return response()->json(null, 204);
     }
     return response()->json(false, 400);
 }
 public function subscribe(SubscriptionService $subscriptionService)
 {
     // Retrieve the card token
     $creditCardToken = Input::get('creditCardToken');
     // Create Subscription
     $subscriptionService->createSubscription($creditCardToken);
     // Respond
     return response()->json(null, 204);
 }