/**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store(APIControllerHelper $helper, CreatePaymentAddressRequest $request, PaymentAddressRepository $payment_address_respository, Guard $auth)
 {
     $user = $auth->getUser();
     if (!$user) {
         throw new Exception("User not found", 1);
     }
     $attributes = $request->only(array_keys($request->rules()));
     $attributes['user_id'] = $user['id'];
     $address = $payment_address_respository->create($attributes);
     EventLog::log('paymentAddress.created', $address->toArray());
     // create a default account
     AccountHandler::createDefaultAccount($address);
     return $helper->transformResourceForOutput($address);
 }