Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions lib/RecurringApplicationCharge.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,68 @@ class RecurringApplicationCharge extends ShopifyResource
'activate',
);

/*
* Create a recurring application charge
*
* @param array $data
*
* @return array
*
*/
public function create($dataArray)
{
$dataArray = $this->wrapData($dataArray);

$url = $this->generateUrl($dataArray);

$response = $this->post(array(), $url);

return $response;
}

/**
* Get list of all charges
*
* @return array
*/
public function charges(){
$url = $this->generateUrl();

$response = $this->get(array(), $url);

return $response;
}

/**
* Get details of a single charge
*
* @param $charge_id
*
* @return array
*/
public function charge( $charge_id ){
$url = $this->generateUrl(array(), $charge_id);

$response = $this->get(array(), $url);

return $response;
}

/**
* Cancel a recurring charge
*
* @param $charge_id
*
* @return array
*/
public function cancel($charge_id){
$url = $this->generateUrl(array(), $charge_id);

$response = $this->delete(array(), $url);

return $response;
}

/*
* Customize a recurring application charge
*
Expand Down