Skip to content

Commit

Permalink
Merge pull request #33 from kiriminaja/feature/inabiel/KAV-353
Browse files Browse the repository at this point in the history
[MAIN] KAV-353: SDK Update Lat Lng Request Pickup
  • Loading branch information
yanuaraditia authored Nov 15, 2023
2 parents 1c60087 + 725a3cd commit 145b339
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/Models/RequestPickupData.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ class RequestPickupData extends ModelBase
public array $packages; // PackageData of array(min:1 object) false Lihat penyusunan list paket berikut
public string $schedule; // string false Lihat bagian #Pickup Schedules
public ?string $platform_name = null;
public ?float $latitude; // float Latitude dari pengirim, diperlukan ketka menggunakan ekspedisi Lion Parcel.
public ?float $longitude; // float Latitude dari pengirim, diperlukan ketka menggunakan ekspedisi Lion Parcel.
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

require_once(__DIR__.'/../ShippingMock.php');

use KiriminAja\Base\Config\Cache\Mode;
use KiriminAja\Base\Config\KiriminAjaConfig;
use KiriminAja\Models\PackageData;
use KiriminAja\Models\RequestPickupData;
use KiriminAja\Services\KiriminAja;
use KiriminAja\Services\Shipping\RequestPickupService;
use KiriminAja\Services\Shipping\ShippingMock;
use PHPUnit\Framework\TestCase;
Expand Down Expand Up @@ -48,7 +51,9 @@ public function test()
$pickup_object->phone = "082129627860";
$pickup_object->name = "dipaferdian";
$pickup_object->kecamatan_id = 5784;
$pickup_object->schedule = "2022-11-03 17:00:00";
$pickup_object->latitude = -6.3493;
$pickup_object->longitude = 106.801376;
$pickup_object->schedule = "2023-07-17 17:00:00";
$pickup_object->zipcode = 16610;
$pickup_object->platform_name = 'mitra';
$pickup_object->packages = [];
Expand All @@ -66,15 +71,14 @@ public function test()
$package_data->length = 8;
$package_data->item_value = 275000;
$package_data->shipping_cost = 65000;
$package_data->service = "sicepat";
$package_data->service_type = "SIUNT";
$package_data->service = "jne";
$package_data->service_type = "REG";
$package_data->item_name = "Test item name";
$package_data->package_type_id = 1;
$package_data->cod = 0;
$package_data->note = 'test pickup request non cod';
$package_data->drop = true;
$pickup_object->packages = [$package_data];

$result = (new RequestPickupService($pickup_object))->call();

self::assertTrue($result->status);
Expand Down

0 comments on commit 145b339

Please sign in to comment.