Skip to content

Commit

Permalink
update daftar kurir pro
Browse files Browse the repository at this point in the history
  • Loading branch information
Steeven Andrian committed Apr 15, 2019
1 parent 9693d1b commit a9358ba
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions src/Rajaongkir.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ class Rajaongkir
'first',
'ncs',
'star',
'lion',
'ninja-express',
'idl',
'rex',
],
];

Expand Down Expand Up @@ -241,7 +245,7 @@ public function __construct($apiKey = null, $accountType = null)
*
* Set Rajaongkir API Key.
*
* @param string $apiKey Rajaongkir API Key
* @param string $apiKey Rajaongkir API Key
*
* @access public
* @return static
Expand All @@ -260,7 +264,7 @@ public function setApiKey($apiKey)
*
* Set Rajaongkir account type.
*
* @param string $accountType RajaOngkir Account Type, can be starter, basic or pro
* @param string $accountType RajaOngkir Account Type, can be starter, basic or pro
*
* @access public
* @return static
Expand Down Expand Up @@ -399,7 +403,7 @@ public function getProvinces()
*
* Get detail of single province.
*
* @param int $idProvince Province ID
* @param int $idProvince Province ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -416,7 +420,7 @@ public function getProvince($idProvince)
*
* Get list of province cities.
*
* @param int $idProvince Province ID
* @param int $idProvince Province ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -439,7 +443,7 @@ public function getCities($idProvince = null)
*
* Get detail of single city.
*
* @param int $idCity City ID
* @param int $idCity City ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -456,7 +460,7 @@ public function getCity($idCity)
*
* Get list of city subdisctricts.
*
* @param int $idCity City ID
* @param int $idCity City ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -483,7 +487,7 @@ public function getSubdistricts($idCity)
*
* Get detail of single subdistrict.
*
* @param int $idSubdistrict Subdistrict ID
* @param int $idSubdistrict Subdistrict ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -510,7 +514,7 @@ public function getSubdistrict($idSubdistrict)
*
* Get list of supported international origins.
*
* @param int $idProvince Province ID
* @param int $idProvince Province ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand Down Expand Up @@ -539,8 +543,8 @@ public function getInternationalOrigins($idProvince = null)
*
* Get list of supported international origins by city and province.
*
* @param int $idCity City ID
* @param int $idProvince Province ID
* @param int $idCity City ID
* @param int $idProvince Province ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand Down Expand Up @@ -571,7 +575,7 @@ public function getInternationalOrigin($idCity = null, $idProvince = null)
*
* Get list of international destinations.
*
* @param int $id_country Country ID
* @param int $id_country Country ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand All @@ -594,7 +598,7 @@ public function getInternationalDestinations()
*
* Get International Destination
*
* @param int $idCountry Country ID
* @param int $idCountry Country ID
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand Down Expand Up @@ -623,16 +627,6 @@ public function getInternationalDestination($idCountry = null)
*
* Get cost calculation.
*
* @example
* $rajaongkir->getCost(
* ['city' => 1],
* ['subdistrict' => 12],
* ['weight' => 100, 'length' => 100, 'width' => 100, 'height' => 100, 'diameter' => 100],
* 'jne'
* );
*
* @see http://rajaongkir.com/dokumentasi/pro
*
* @param array $origin City, District or Subdistrict Origin
* @param array $destination City, District or Subdistrict Destination
* @param array $metrics Array of Specification
Expand All @@ -645,6 +639,16 @@ public function getInternationalDestination($idCountry = null)
*
* @access public
* @return array|bool Returns FALSE if failed.
* @see http://rajaongkir.com/dokumentasi/pro
*
* @example
* $rajaongkir->getCost(
* ['city' => 1],
* ['subdistrict' => 12],
* ['weight' => 100, 'length' => 100, 'width' => 100, 'height' => 100, 'diameter' => 100],
* 'jne'
* );
*
*/
public function getCost(array $origin, array $destination, $metrics, $courier)
{
Expand Down Expand Up @@ -770,8 +774,8 @@ public function getCost(array $origin, array $destination, $metrics, $courier)
*
* Get detail of waybill.
*
* @param int $idWaybill Receipt ID
* @param null|string $courier Courier Code
* @param int $idWaybill Receipt ID
* @param null|string $courier Courier Code
*
* @access public
* @return array|bool Returns FALSE if failed.
Expand Down Expand Up @@ -823,8 +827,8 @@ public function getCurrency()
*/
public function getSupportedCouriers()
{
if(isset($this->supportedCouriers[$this->accountType])) {
return $this->supportedCouriers[$this->accountType];
if (isset($this->supportedCouriers[ $this->accountType ])) {
return $this->supportedCouriers[ $this->accountType ];
}

return false;
Expand All @@ -841,8 +845,8 @@ public function getSupportedCouriers()
*/
public function getSupportedWayBills()
{
if(isset($this->supportedWayBills[$this->accountType])) {
return $this->supportedWayBills[$this->accountType];
if (isset($this->supportedWayBills[ $this->accountType ])) {
return $this->supportedWayBills[ $this->accountType ];
}

return false;
Expand All @@ -855,7 +859,7 @@ public function getSupportedWayBills()
*
* Get original response object.
*
* @param string $offset Response Offset Object
* @param string $offset Response Offset Object
*
* @access public
* @return \O2System\Curl\Response|bool Returns FALSE if failed.
Expand Down

0 comments on commit a9358ba

Please sign in to comment.