This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"estimateCreateOrder": { | |
"totalEstimate": null, | |
"ordersEstimate": [], | |
"packagesWithErrors": [ | |
{ | |
"originalIndex": 1, | |
"error": "Local fora da área de cobertura para a cidade Nilopolis", | |
"resolvedAddress": "Av. das Américas, 4666 - Barra da Tijuca, Rio de Janeiro - RJ, 22640-102, Brazil" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"estimateCreateOrder": { | |
"totalEstimate": { | |
"totalCost": "81.04", | |
"totalEta": 2552, | |
"totalDistance": 50.18 | |
}, | |
"ordersEstimate": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Passo 01 chamar /location/configGet | |
Para ver se uma location nossa ja esta registrada | |
{ | |
"location_id": "3", | |
"provider": "loggi" | |
} | |
Passo 02 chamar /location/config (se necessario) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"estimateCreateOrder": { | |
"totalEstimate": { | |
"totalCost": "81.04", | |
"totalEta": 2552, | |
"totalDistance": 50.18 | |
}, | |
"ordersEstimate": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request { | |
"url": "/?", | |
"method": "post", | |
"data": { | |
"query": "\n mutation CreateOrder(\n $externalId: String!, \n $trackingKey: String!\n $pickups: [Pickup]!, \n $packages: [Packages]!\n $paymentMethod: Int!\n ) {\n createOrder(input: {\n externalId: $externalId\n trackingKey: $trackingKey\n pickups: $pickups\n packages: $packages\n paymentMethod: $paymentMethod\n }) {\n success\n shop {\n pk\n name\n }\n orders {\n pk\n trackingKey\n packages {\n pk\n status\n pickupWaypoint {\n index\n indexDisplay\n eta\n legDistance\n }\n waypoint {\n index\n indexDisplay\n eta\n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Request { | |
"url": "https://staging.loggi.com/graphql/?", | |
"method": "post", | |
"data": { | |
"query": "\n mutation CreateOrder(\n $externalId: String!, \n $trackingKey: String!\n $pickups: [Pickup]!, \n $packages: [Packages]!\n $paymentMethod: Int!\n ) {\n createOrder(input: {\n externalId: $externalId\n trackingKey: $trackingKey\n pickups: $pickups\n packages: $packages\n paymentMethod: $paymentMethod\n }) {\n success\n shop {\n pk\n name\n }\n orders {\n pk\n trackingKey\n packages {\n pk\n status\n pickupWaypoint {\n index\n indexDisplay\n eta\n legDistance\n }\n waypoint {\n index\n indexDispla |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mutation CreateOrder( | |
$externalId: String!, | |
$trackingKey: String! | |
$pickups: [Pickup]!, | |
$packages: [Packages]! | |
$paymentMethod: Int! | |
) { | |
createOrder(input: { | |
externalId: $externalId | |
trackingKey: $trackingKey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"error": { | |
"message": "aaaa is not defined", | |
"name": "ReferenceError", | |
"frames": [ | |
{ | |
"file": "src/app/strategies/provider/loggi/loggi-strategy.js", | |
"filePath": "/var/www/newtail/newtail-logistic-hub/src/app/strategies/provider/loggi/loggi-strategy.js", | |
"method": "LoggiStrategy.deliveryOrderCreate", | |
"line": 167, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function cardLinkHolder($userWalletCard, $user, $token) { | |
$toolsSvc = $this->sc->get('tools'); | |
$userWalletCardSvc = $this->sc->get('rp_user_wallet_card'); | |
$userBirthdate = $user->getBirthdate(); | |
$userGender = $user->getGender(); | |
if($userGender) { | |
if($userGender == "M") { | |
$userGender = "male"; | |
} else if($userGender == "F") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Error Handling | |
The pattern of error return is: | |
{ | |
status: 500, | |
errors: [ | |
{ message: '......' }, //message will always be present | |
{ message: '......', id: '...' } //id may not always be present so check the existence before usage | |
{ message: '......', id: '...', stack_trace: '' } //its used for exception stack trace on dev |