Skip to content

Commit

Permalink
UBR-353 Add method for cancelling ticket sale by id.
Browse files Browse the repository at this point in the history
  • Loading branch information
HnLn committed Nov 17, 2015
1 parent e9c8259 commit b5ebd28
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
11 changes: 10 additions & 1 deletion CultureFeed/CultureFeed/Uitpas.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,16 @@ public function registerPassholderInCardSystem($passholderId, CultureFeed_Uitpas
*/
public function cancelTicketSale($uitpas_number, $cdbid, $consumer_key_counter = NULL);

/**
/**
* Cancel a ticket sale for a passholder by ticket id.
*
* @param string $ticketId The ticket id
* @param string $consumer_key_counter The consumer key of the counter from where the request originates
* @return boolean
*/
public function cancelTicketSaleById($ticketId, $consumer_key_counter = NULL);

/**
* Search for checkins
*
* @param CultureFeed_Uitpas_Event_Query_SearchCheckinsOptions $query The query
Expand Down
22 changes: 21 additions & 1 deletion CultureFeed/CultureFeed/Uitpas/Default.php
Original file line number Diff line number Diff line change
Expand Up @@ -991,7 +991,27 @@ public function cancelTicketSale($uitpas_number, $cdbid, $consumer_key_counter =
}
}

public function getPassholderForTicketSale( CultureFeed_Uitpas_Event_TicketSale $ts, $consumer_key_counter = NULL ) {
/**
* {@inheritdoc}
*/
public function cancelTicketSaleById($ticketId, $consumer_key_counter = NULL)
{
$data = array();

if ($consumer_key_counter) {
$data['balieConsumerKey'] = $consumer_key_counter;
}

try {
$this->oauth_client->authenticatedPostAsXml('uitpas/cultureevent/cancel/' . $ticketId, $data);
return true;
}
catch (Exception $e) {
return false;
}
}

public function getPassholderForTicketSale( CultureFeed_Uitpas_Event_TicketSale $ts, $consumer_key_counter = NULL ) {
$user_id = $ts->userId;
return $this->getPassholderByUser($user_id, $consumer_key_counter);
}
Expand Down

0 comments on commit b5ebd28

Please sign in to comment.