Skip to content
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
1 change: 1 addition & 0 deletions IS/PazarYeri/N11/Helper/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'stock' => 'ProductStockService',
'order' => 'OrderService',
'webhook' => 'WebHookService',
'invoice' => 'SellerInvoiceService'
);

/**
Expand Down
43 changes: 43 additions & 0 deletions IS/PazarYeri/N11/Services/OrderService.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,47 @@ public function orderDetail($client, $Id)

}

/**
*
* @description Bu metot yeni siparişleri kabul etmek için kullanılmaktadır.
*
* <code>
* $payload = [
* 'numberOfPackages' => '1',
* ];
* foreach ($orderItems as $item) {
* $payload['orderItemList']['orderItem'][] = [
* 'id' => $item['id'],
* ];
* }
* </code>
* @param $client Request
* @param $data array{numberOfPackages: int,orderItemList: array{orderItem: array{id: int}}
*/
public function acceptOrder($client, $data)
{
return $client->sendRequest('OrderItemAccept', $data);
}

/**
*
* @description Bu metot siparişin kalemlerini bölmek için kullanılmaktadır.
* Bu metot içerisinde verilen orderItemList'ler yeni bir order
* oluşturur.
*
*<code>
* $payload = [];
* foreach ($orderItems as $item) {
* $payload['orderItemList']['orderItem'][] = [
* 'id' => $item['id'],
* ];
* }
*</code>
* @param $client Request
* @param $data array{orderItemList: array{orderItem: array{id: int}}
*/
public function seperateCombinedItems($client, $data)
{
return $client->sendRequest('SeperateCombinedItems', $data);
}
}
37 changes: 37 additions & 0 deletions IS/PazarYeri/N11/Services/SellerInvoiceService.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace IS\PazarYeri\N11\Services;

use IS\PazarYeri\N11\Helper\Request;

class SellerInvoiceService
{

/**
*
* @description N11 SOAP Ürün Url
*
*/
public $url = 'https://api.n11.com/ws/SellerInvoiceService.wsdl';


/**
* @description Sipariş ile ilgili, çalıştığınız fatura servisinden
* elde ettiğiniz link şeklindeki faturalarızı, ilgili siparişe kaydetmek için kullanılır.
* PDF, PNG, JPEG, JPG, HTML formatlarında HTTPS protokolü ile gönderilmelidir.
* Maksimum link uzunluğu 2048 karakterdir.
*
* @param Request $client
* @param array{
* orderNumber: string,
* url: string
* } $data
* @return mixed
*/
public function saveLinkSellerInvoice(Request $client, array $data)
{
return $client->sendRequest('saveLinkSellerInvoice', $data);
}


}