Skip to content

Instantly share code, notes, and snippets.

View pmartelletti's full-sized avatar

Pablo Maria Martelletti pmartelletti

View GitHub Profile
@pmartelletti
pmartelletti / RunHandler.php
Created September 18, 2019 09:45
here you go
<?php
namespace App\Services;
use App\Events\FileTransferWasSkipped;
use App\Events\FileTransferWasSuccessful;
use App\Events\RunDetailFailed;
use App\Events\RunDetailFinished;
use App\Events\RunDetailStarted;
use App\Exceptions\RunDetail\CouldNotConnectToLocation;
# Copyright 2010-2018 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
GET /api/offers // list of offers for current tenant
POST /api/offers // add new offer
GET /api/offers/blocked // list of blocked offers for this tenant (no matter the reason)
POST /api/offers/blocked // block existing offer - passing the ID as param maybe?
GET /api/offers/{offerId} // ofer details, including groups
PUT /api/offers/{offerId} // amend offer details
DELETE /api/offers/{offerId} // delete offer - are we marking as revoked? or deleted?
GET /api/offers/{offerId}/groups // list groups for given offer, not very useful
POST /api/offers/{offerId}/groups // create new offer group
GET /api/offers/{offerId}/groups/{number} // get group details
Suppliers: found both
https://go.frts.link/api/suppliers/2000005397020
https://go.frts.link/api/suppliers/2000005397033
Supplier Products:
Supplier Product 900237 referenced by Cost Price BP018f4c7762fff2fc2255ebc63f94996fc7 does not exist.
The supplier product Id is not referenced by that product. This is the response:
Error while syncing offer deal #6876: SQLSTATE[22018]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Conversion failed when converting the varchar value 'LogicProVouch ' to data type int. (SQL: update [ci_offer] set [description] = Pears Amber Soap, [tilldesc] = BUY 2 FOR £1, [startdate] = 2018-04-11 00:00:00:000, [enddate] = 2018-04-24 00:00:00:000, [timefrom] = 0000, [timeto] = 2359, [reclaim] = 0.000, [vat] = 1.0, [lastupdate] = 2018-05-16 10:10:51:000, [lastupuser] = IMPORT, [PrintPromoSEL] = 1, [PromoSELDesc] = BUY 2 FOR £1, [PromoSELEnds] = 24/04/2018, [status] = E, [grouptext] = AMBIENT, [PromoSELCrossOut] = 0, [master] = 0, [discountvalue] = 0, [department] = , [bonuspoints] = 0, [reclaimproduct] = , [reclaimcost] = 0, [crtg_offer] = , [crtg_product] = , [supplier] = , [posttocash] = 0, [ocsnumber] = 0, [reportasstaffdisc] = 0, [excludeProductType] = 0, [allowRTC] = 0, [posttocashnonstf] = 0, [ChoiceId] = , [TreatAsNonDiscountable] = 0, [doNotWriteUpc] = 0, [PosType] = 0, [NotificationMessage]
<?php
namespace App\Models;
use Carbon\Carbon;
use Doctrine\ORM\Mapping AS ORM;
use Doctrine\Common\Collections\ArrayCollection;
use App\Annotations\FRTS;
use LaravelDoctrine\Extensions\Timestamps\Timestamps;
<?php
namespace App\Models;
use Carbon\Carbon;
use Doctrine\ORM\Mapping AS ORM;
use Doctrine\Common\Collections\ArrayCollection;
use App\Annotations\FRTS;
use LaravelDoctrine\Extensions\Timestamps\Timestamps;
<?php
namespace App\Repositories;
use App\Exceptions\ImportModelNotFoundException;
use App\Exceptions\SupplierNotFoundException;
use App\Models\FrtsModel;
use App\Models\Supplier;
use LaravelDoctrine\ORM\Facades\EntityManager;
<?php
namespace App\Repositories;
use App\Exceptions\ImportModelNotFoundException;
use App\Exceptions\SupplierNotFoundException;
use App\Models\FrtsModel;
use App\Models\Supplier;
use LaravelDoctrine\ORM\Facades\EntityManager;
<?php
namespace Tests\Unit\Factories;
use App\Models\Department;
use App\Models\Section;
use App\Models\SubSection;
use Carbon\Carbon;
use Facades\App\Repositories\SubSections;
use Tests\IntegrationTestCase;
use Tests\TestCase;