public function update_credential($id, $recipient_name = null, $recipient_email = null, $course_id = null, $issued_on = null, $expired_on = null, $custom_attributes = null){

		$data = array(
		    "credential" => array(
		    	"group_id" => $course_id,
		        "recipient" => array(
		            "name" => $recipient_name,
		            "email" => $recipient_email
		        ),
		        "issued_on" => $issued_on,
		        "expired_on" => $expired_on,
		        "custom_attributes" => $custom_attributes
		    )
		);
		$data = $this->strip_empty_keys($data);

		$client = new \GuzzleHttp\Client();

        $params = array('Authorization' => 'Token token="'.$this->getAPIKey().'"');

		$response = $client->put($this->api_endpoint.'credentials/'.$id, array(
		    'headers' =>  $params,
		    'json' => $data
		));

		$result = json_decode($response->getBody());

		return $result;
	}
public function update_credential($id, $recipient_name = null, $recipient_email = null, $course_id = null, $issued_on = null, $expired_on = null, $custom_attributes = null){

		$data = array(
		    "credential" => array(
		    	"group_id" => $course_id,
		        "recipient" => array(
		            "name" => $recipient_name,
		            "email" => $recipient_email
		        ),
		        "issued_on" => $issued_on,
		        "expired_on" => $expired_on,
		        "custom_attributes" => $custom_attributes
		    )
		);
		$data = $this->strip_empty_keys($data);

		$client = new \GuzzleHttp\Client();

        $params = array('Authorization' => 'Token token="'.$this->getAPIKey().'"');

		$response = $client->put($this->api_endpoint.'credentials/'.$id, array(
		    'headers' =>  $params,
		    'json' => $data
		));

		$result = json_decode($response->getBody());

		return $result;
	}
public function update_credential ( $ id , $ recipient_name = null , $ recipient_email = null , $ course_id = null , $ issued_on = null , $ expired_on = null , $ custom_attributes = null ) { $ data = array ( "credential" => array ( "group_id" => $ course_id , "recipient" => array ( "name" => $ recipient_name , "email" => $ recipient_email ) , "issued_on" => $ issued_on , "expired_on" => $ expired_on , "custom_attributes" => $ custom_attributes ) ) ; $ data = $ this -> strip_empty_keys ( $ data ) ; $ client = new \ GuzzleHttp \ Client ( ) ; $ params = array ( 'Authorization' => 'Token token="' . $ this -> getAPIKey ( ) . '"' ) ; $ response = $ client -> put ( $ this -> api_endpoint . 'credentials/' . $ id , array ( 'headers' => $ params , 'json' => $ data ) ) ; $ result = json_decode ( $ response -> getBody ( ) ) ; return $ result ; }
Updates a Credential
@param type $id
@param String|null $recipient_name
@param String|null $recipient_email
@param String|null $course_id
@param Date|null $issued_on
@param Date|null $expired_on
@param stdObject|null $custom_attributes
@return stdObject
Updates a Credential