Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webhook endpoints #44

Merged
merged 2 commits into from
May 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Fix prefixed paths
  • Loading branch information
robwittman committed May 10, 2020
commit d0684ce9960e9e7de14e69ae6e68cd82a4e690ae
10 changes: 5 additions & 5 deletions src/Service/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function create(Order &$order)
*/
public function close(Order &$order)
{
$endpoint= '/orders/'.$order->id.'/close.json';
$endpoint = 'orders/'.$order->id.'/close.json';
$response = $this->request($endpoint, 'POST');
$order->setData($response['order']);
}
Expand All @@ -91,7 +91,7 @@ public function close(Order &$order)
*/
public function open(Order &$order)
{
$endpoint= '/orders/'.$order->id.'/open.json';
$endpoint = 'orders/'.$order->id.'/open.json';
$response = $this->request($endpoint, 'POST');
$order->setData($response['order']);
}
Expand All @@ -105,7 +105,7 @@ public function open(Order &$order)
*/
public function cancel(Order &$order)
{
$endpoint= '/orders/'.$order->id.'/cancel.json';
$endpoint = '/orders/'.$order->id.'/cancel.json';
$response = $this->request($endpoint, 'POST');
$order->setData($response['order']);
}
Expand All @@ -120,7 +120,7 @@ public function cancel(Order &$order)
public function update(Order &$order)
{
$data = $order->exportData();
$endpoint= '/orders/'.$order->id.'.json';
$endpoint = 'orders/'.$order->id.'.json';
$response = $this->request(
$endpoint, 'POST', array(
'order' => $data
Expand All @@ -138,7 +138,7 @@ public function update(Order &$order)
*/
public function delete(Order &$order)
{
$endpoint= '/orders/'.$order->id.'.json';
$endpoint = 'orders/'.$order->id.'.json';
$this->request($endpoint, 'DELETE');
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Service/PageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function get($pageId, array $params = [])
public function create(Page &$page)
{
$data = $page->exportData();
$endpoint= '/pages.json';
$endpoint = 'pages.json';
$response = $this->request(
$endpoint, 'POST', array(
'page' => $data
Expand All @@ -78,7 +78,7 @@ public function create(Page &$page)
public function update(Page &$page)
{
$data = $page->exportData();
$endpoint= '/pages/'.$page->id.'.json';
$endpoint = 'pages/'.$page->id.'.json';
$response = $this->request(
$endpoint, 'PUT', array(
'page' => $data
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ProductImageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ProductImageService extends AbstractService
*/
public function all($productId, array $params = [])
{
$endpoint= '/products/'.$productId.'/images.json';
$endpoint = 'products/'.$productId.'/images.json';
$response = $this->request($endpoint, 'GET', $params);
return $this->createCollection(ProductImage::class, $response['images']);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Service/RecurringApplicationChargeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function create(RecurringApplicationCharge &$recurringApplicationCharge)
*/
public function delete(RecurringApplicationCharge $recurringApplicationCharge)
{
$endpoint= '/recurring_application_charges/'.$recurringApplicationCharge->id.'.json';
$endpoint = 'recurring_application_charges/'.$recurringApplicationCharge->id.'.json';
$this->request($endpoint, 'DELETE');
return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Service/ScriptTagService.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function create(ScriptTag &$scriptTag)
{
$data = $scriptTag->exportData();
$response = $this->request(
'/script_tags.json', 'POST', array(
'script_tags.json', 'POST', array(
'script_tag' => $data
)
);
Expand All @@ -79,7 +79,7 @@ public function update(ScriptTag $scriptTag)
{
$data = $scriptTag->exportData();
$response = $this->request(
'/script_tags/'.$scriptTag->id.'.json', 'PUT', array(
'script_tags/'.$scriptTag->id.'.json', 'PUT', array(
'script_tag' => $data
)
);
Expand Down