Exemple #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();
 }
 /**
  * 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());
 }
 /**
  * set up client
  */
 public function setUp()
 {
     $this->serializer = Client::getDefaultSerializer();
     $this->timezone = new \DateTimeZone('UTC');
 }
 /**
  * set up client
  */
 public function setUp()
 {
     $this->serializer = Client::getDefaultSerializer();
 }