Exemplo n.º 1
0
 /**
  * @param string $userId
  * @param string $userPassword
  * @param int    $partnerId
  * @param string $partnerPassword
  * @param string $errorLanguage
  */
 public function __construct($userId, $userPassword, $partnerId, $partnerPassword, $errorLanguage)
 {
     AnnotationRegistry::registerLoader('class_exists');
     $this->afterbuyGlobal = new AfterbuyGlobal($userId, $userPassword, $partnerId, $partnerPassword, $errorLanguage);
     $this->client = new \GuzzleHttp\Client(['base_uri' => 'https://api.afterbuy.de/afterbuy/ABInterface.aspx']);
     $this->serializer = Client::getDefaultSerializer();
 }
Exemplo n.º 2
0
 /**
  * Tests a successful UpdateSoldItems request of the Afterbuy XML Client
  */
 public function testUpdateSoldItemsSuccess()
 {
     $this->setMockHandlerForSuccessTest('UpdateSoldItems/ResponseOnSuccess.xml');
     $soldItems = $this->client->updateSoldItems([new UpdateSoldItemsOrder()]);
     $this->assertInstanceOf(UpdateSoldItemsResponse::class, $soldItems);
     $result = $soldItems->getResult();
     $this->assertInstanceOf(UpdateSoldItemsResult::class, $result);
     $this->assertEmpty($result->getErrors());
 }
Exemplo n.º 3
0
 /**
  * set up client
  */
 public function setUp()
 {
     $this->serializer = Client::getDefaultSerializer();
     $this->timezone = new \DateTimeZone('UTC');
 }
Exemplo n.º 4
0
 /**
  * set up client
  */
 public function setUp()
 {
     $this->serializer = Client::getDefaultSerializer();
 }