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

api url bugs are fixed #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "michaelb/ship-station",
"name": "aydoganserdar/ship-station",
"description": "A php wrapper for ship station's api",
"type": "Api Wrapper",
"keywords": ["ship", "shipping", "ship-station", "shipstation", "api", "wrapper"],
Expand Down
14 changes: 14 additions & 0 deletions src/Endpoints/Orders.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ public function createLabelForOrder(Order $order, $test = false)
return $this->post('createlabelfororder', [compact('form_params')]);
}

/**
* @param Order $order
* @param bool $test
*
* @return \GuzzleHttp\Psr7\Response
*/
public function createLabelForOrder2($params)
{

return $this->post('createlabelfororder', [
'form_params' => $params
]);
}

/**
* Create a single order
*
Expand Down
6 changes: 3 additions & 3 deletions src/Endpoints/Shipments.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function listShipments($query = [])
*/
public function createLabel($label = [])
{
return $this->post('createlabel', ['form_params' => $label]);
return $this->post('/createlabel', ['form_params' => $label]);
}

/**
Expand All @@ -35,7 +35,7 @@ public function createLabel($label = [])
*/
public function getRates($query = [])
{
return $this->post('getrates', ['form_params' => $query]);
return $this->post('/getrates', ['form_params' => $query]);
}

/**
Expand All @@ -46,6 +46,6 @@ public function getRates($query = [])
*/
public function voidLabel($shipmentId = '')
{
return $this->post('voidlabel', ['form_params' => compact('shipmentId')]);
return $this->post('/voidlabel', ['form_params' => compact('shipmentId')]);
}
}