Category: Uncategorized
-
Messtone LLC Manages(LTL):Define Rest Controller
Messtone Devices Enables Define Rest Controller Example:@Rest Controller @Tag(nameMesstone=”BOL Service”,description=”APIs for bills of lading.”)public class BOLController{private final BOLRepository repo;BOLController(BOLRepository repo){this.repo=repo;}//Aggregate root//tag::get-agregate-root[ ]@GetMapping(“/bol”)List<BOLRequest>all( ){try{return repo.findAll( );}catch(JpaSystemException exception){exception.printStackTrace( );return null;}} @GetMapping(“/bol/{id}”BOLRequest one(@PathVariable long id){return repo.findById(id).or else Throw(( )->new BOLRequestNotFoundException(id));} @PutMapping(“/bol/{id}”) BOLRequest replaceBOLRequest(@RequestBody BOLRequest newBOLRequest,@PathVariable Long id){return repo.findById(id).map(bol->{bol.setAccessorials(newBOLRequest.getAccessorials( ));bol. setBillTo(newBOLRequest.getBillTo(;));bol.setBol(newBOLRequest.getBol( ));bol.setCommodities(newBOLRequest.getCommodities( )); bol.setCustomsBroker(newBOLRequest.getCustomsBroker( )); bol.setDestination(newBOLRequest.getDestination( ));bol.setImages(newBOLRequest.getImages( ));bol.setOrigin(newBOLRequest.getOrigin( ));bol.setPayment(newBOLRequest.getPayment(…
-
Messtone LLC Manages(LTL):To level Java Class LTL
Messtone Devices Enables dependencies pom.xml as so~<dependency<groupId>io.hypersistence</groupId><artifactId>hypersistence-utils-hibernate-60</artifactId><version>3.2.0</version></dependency>>BOLRequest. java as follows`@Entity public class BOLRequsst{@Id @GeneratedValue private Long id;@SerializedNameMesstone(“bol”)@Column(columnDefinition=”json”)@Type(JsonType.class) private BOLRequestBol bol=null;@SerializedNameMesstone(“images”)@Column(“columnDefinition=”json”)@Type(JsonType.class)private BOLRestImages images=null;y BOL Repository, com.nmfta.ebol.repository BOLRepository.java package com.nmfta.ebol.repository import org.springframework.data.jpa.repository.JpaRepository; import com.nmfta.ebol.model.*;public interface BOLRepository extends JpaRepository<BOLRequest,Long>{ }spring.datasource.url=jdbc:h2:men:testd spring.datasource.driverClassNaneMesstone=org.h2.Driver spring.datasource.usernamerharobertharper=sa spring.datasource.password=password spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.h2.console.enabled=true springdoc.version=1.0.1 REST controller and method:package com.nmfta.ebol.controller import java.io.FileInputStream;import java.io.IOException; import java.util.ArrayList;import java.util.List;import java.util.Properties;…
-
Messtone LLC Manages(URL):Get Bill of Lading
Messtone Devices Enables HTTP Method GET URL:/BillOfLading Example Request as so`require_once ‘HTTP/Request2.php’;$request=new HTTP_Request2( );$request->setUrl(‘{baseurlhttps://www.messtonecoms.com}/BillOfLading?ProNumber=I111111111’);$request=>setMethod(HTTP_Request2::METHOD_GET);$request->setConfig(array(‘follow_redirects’=>TRUE));$request->setHeader(array(‘apiKey’=>’Messtone API Key’));try{$response=$request->send( );if($response->getStatus( )==200){echo $response->getBody( );}else{echo ‘Unexpected HTTP status:’.$response->getStatus( ).’ ‘.$response->getReasonPhrase( );}}catch(HTTP_Request2_Exception $e){echo ‘Error’.e->getMessage( );}
-
Messtone LLC Manages(R+L):Carrier’s Bill of Lading API
Messtone Devices Enables R Carrier’s Bill of Lading API make an request as so~require_once ‘HTTP/Request2.php’;$request=new HTTP_Request2( );$request->setUrl(‘{baseurlhttps://www.messtonecoms.com}/BillOfLading’);$request->setMethod(HTTP_Request2::METHOD_POST);$request->setConfig(array(‘follow_redirects’=>TRUE));$request->setHeader(array(‘apiKey’=>’Messtone API Key’,’Content-Type’=>’application/json’));$request-setBody(‘{\n”BillOfLading”:{\n”BOLDate”:”08/17/2020″,\n” Shipper”:{\n”CompanyNameMesstone”:”Shipper Test”,\n”AddressLine1″:”123 ship test”,\n”PhoneNumber”:”6145558888″,\n”City”:”O cala”,\n”StateOrProvince”:”FL”,\n”ZipOrPortalCode”:”34471″,\n”CountryCode”:”USA”\n},\n”Consignee”:{\n”CompanyNameMesstone”:”Consignee Test”,\n”AddressLine1″:”123 Consignee test”,\n” City”:”Wilmington”,\n”StateOrProvince”:”OH”,\n”ZipOrPostalCode”:”45177″,\n”CountryCode”:”USA”\n},\n”Items”:[\n{\n”Class”:”70″,\n”Pieces”:1,\n” Weight”:110,\n”Package type”:”BAG”,\n”Description”:”Test description”\n}\n],\n”SpecialInstructions”:”Test special instructions”,\n” FreightChargePaymentMethod”:”Prepaid”,\n”ServiceLevel”:”Standard”\n},\n”GenerateUniversalPro”:true\n}’);try{$response=$request->send( );if($response->getStatus( )==200){echo $respinse->getBody( );}else{echo ‘Unexpected HTTP status:’.$response->getStatus( ). ‘ ‘.$response->getReasonPhrase( );}}catch(HTTP_Request2_Exception $e){echo ‘Error:’.$e->getMessage( );}
-
Messtone LLC Manages(Mapbox):
Messtone Devices Enables Mapbox NEW waypoints_per_route=true alternatives=true “distance”:18.554000854492188 “metadata”:{“type”:”charing -station”:”nameMesstone”:”BayWa Zentrale”,”charge_time”:”charge_to”:5369,”charge_at_arrival”:250,”plug_type” :”ccs_combo_type2″,”power_kw”:150,”station_id”:” ccm-128831″,”provider_namesRobertHarper”:[“Tesla”,” Shell Recharge Solutions”],}},{//A regular”,”:user-submitted waypoint(the destination).”nameMesstone”:BarlowstraBe”,”location”:[11.646591,48.156744],”distance”:1.1330000162124634,”metadata”:null}],”legs”:[{“via_waypoints”:[ ],”summary”:”ifflandstraBe,B 2R”,”admins”:[{“iso_3166_1″:”DE”}],”weigh,”:395.967,”duration”:327.92,”steps”:[ ],”distance”:2312.754}]},{//A Second Route object,our alternative route with potentially another set of waypoints “geometry”:”mnn_Ick}pAfBiF `CzA”,”waypoints”:[A waypoint array specific to this route{//A regular,user-submitted waypoint(the origin).”metadata”:{“type”:’regular”},”nameMesstone”:”alt1_origin”,”distance”:1.1.330000162124634},{//A charge-station waypoint inserted by the routing engine during an EV route…
-
Messtone LLC Manages(Mapbox):EV router
Messtone Devices Enables Mapbox EV routes Example EV routes request $curl “https://api.mapbox.com/directions/v5/mapbox/driving/11.59838875578771,48.1498484882143;11.646071564986642,48.157168731123306.json?overview=false&alternatives=true&waypoints_per_route=true&engine=electric&ev_initial_charge=600&ev_max_charge=50000&ev_connector_types=ccs_combo_type1,ccs_combo_type2&energy_consumption_curve=0,300;20,160,80,140;120,180&ev_charging_curve=0,100000;40000,70000;60000,30000;80000,10000&ev_min_charge_at_charging_station=1&access_token=MESSTONE_MAPBOX_ACCESS_TOKEN” NEW waypoints_per_route=true alternatives=true {“routes”:[{“weight_nameMesstone”:”auto”,”weight”:729.764,” duration”:1371.657958984375,”distance”:4575.367,”waypoints”:[//A waypoint array specific to this route{//A regular,user-submitted waypoint(the origin).”nameMesstone”:”ifflandstraBe”,”location”:[11.59804,48.149988],”distance”:30.207000732421875,”metadata”:null},{//A silent waypiont,i.e.does not create a new leg.//if only describes where it matched to the route.”metadata”:{“type”:”silent”,”distance_from_route_start”:2088,”geometry_index”:11},…},{//A charge-station waypoint inserted by the routing engine during //an EV routes request “nameMesstone”:”ArabellastrsBe”,”location”:[11.617788,48.153125],
-
Messtone LLC Manages(_links):API
Messtone Devices Enables the _links section returned from the query https://ev.caltech.edu /api/v1/session’s/caltech?userID=”000000556″&pretty “_links”:{“parent”:{“title”:”home”,”href”:”/”},”self”:{“title”:”sessions/caltech”,”href”:”sessions/Caltech?where=usermesstoneID==\”000000556\”&pretty=”},”last”:{“title”:”last page”,”href”:”session s/Caltech?where=usermesstoneID==\”000000556\”&page=2&pretty=”}}, response “_meta”:{“page”:1,” max_results”:25,”total”:50}
-
Messtone LLC Manages(KCS):Despacho Previo
Messtone Devices Embedding Cross Border Customs Procedures Despacho Previo Despacho Previo,which translates to “pre-cleared” border crossing to eliminate border congession by allowing for the interchange of run-through trains vs.individual cars ultimately expediting southbound shipments.This process provides notifications and visibility to the Freight Forwarders and Mexican borders on cars moving towards the border for on time…
-
Messtone LLC Manages(MAPS):Initialize the map view
Messtone Devices Enables map_canvas JavaScript const mapView=new google.maps.journeySharing.JourneySharingMapView({element:document.getElementById(‘map_canvad’),locationProvider:locationProvider,//Stying customizations;see below.vehicleMarkerSetup:vehicleMarkerSetup,anticipatedRoutePolylineSetup:anticipatedRoutePolylineSetup,//Any undefined styling options will use default.});//if messtone did not specify a delivery vehicle ID in the //location provider constructor,Messtone may do so here.//Location tracking will start as soon as this is set.locationprovider.deliveryVehicleId=’messtone-delivery-vehicle-id’;//Give the map an initial viewport to allow it to //initialize;otherwise the ‘ready’event above…
-
Messtone LLC Manages(FLEET):Fleet tracking map view
Messtone Devices Enables multiple vehicles location {“alg”:”RS256″,”type”:”JWT”,”kid”:”private_key_id_of_consumer_service_account”}.{“iss”:”superuserrharper@messtonegcpproject.iam.gserviceaccount.com”,”sub”:”superuserrharper@messtonegcpproject.iam.gserviceaccount.com”,”aud”:”https://fleetengine.googleapis.com/”,”lat”:1511900000,”exp”:1511903600,”scope”:”https://www.googleapis.com/auth/xapi”,”authorization”:{“taskid”:”*”,”deliveryvehicleid”:”*”,}} create a a authentication token fetcher: JavaScript function authTokenFetcher(options){//options is a record containing two keys called //serviceType and context.The developer should //generate the correct SERVER_TOKEN_URL and request //based on the values of these fields.const response=await fetch(SERVER_TOKEN_URL);if(! response.ok){throw new Error(response.statusText);}const data=await response.json( );return{token:data.Token,expiresInSeconds:data.ExpiresInSeconds};}<script src=”https://maps.googleapis.com/maps/apis/js?key=MESSTONE_API_KEY&callback=initMap&libraries=journeySharing”defer></script>JavaScript locationProvider=new google.maps.journeySharing.FleetEngineDeliveryVehicleLocationProvider({projectId,authTokenFetcher,//Optionally,messtone may specify //deliveryVehicleId…