Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

International Time in Transit - FedexAvailabilityCommitmentRequest #113

Open
Helix31522 opened this issue Jun 2, 2019 · 5 comments
Open

Comments

@Helix31522
Copy link

Hi all,

Thanks in advance for your help. What am I missing here? I can return time in transit for ground shipments, but I am having no luck with International time in transit.

            avc_request = FedexAvailabilityCommitmentRequest(CONFIG_OBJ)
            avc_request.Origin.PostalCode = sender_postal
            avc_request.Origin.CountryCode = sender_country
            avc_request.Destination.PostalCode = receiver_postal
            avc_request.Destination.CountryCode = receiver_country
            avc_request.CarrierCode = 'FDXE'
            avc_request.ShipDate = shipment_date

            avc_request.send_request()
            print(avc_request.response)
            print('----start------')
            for option in avc_request.response.Options:
                if hasattr(option, 'TransitTime'):
                    print(option.Service)
                    print(option.TransitTime)
            print('----end------')

avc_request.response prints the following, but there is no transit time to pull for each service:

(reply){
   HighestSeverity = "SUCCESS"
   Notifications[] = 
      (Notification){
         Severity = "SUCCESS"
         Source = "vacs"
         Code = "000"
         Message = "SUCCESS"
         LocalizedMessage = "SUCCESS"
      },
   Version = 
      (VersionId){
         ServiceId = "vacs"
         Major = 4
         Intermediate = 0
         Minor = 0
      }
   Options[] = 
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_ECONOMY"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY_FREIGHT"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_ECONOMY_FREIGHT"
         DestinationStationId = "MNLA "
         DestinationAirportId = "MNL"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_PRIORITY_DISTRIBUTION"
      },
      (ServiceAvailabilityOption){
         Service = "INTERNATIONAL_DISTRIBUTION_FREIGHT"
      },
 }
@jeenal-gajjar
Copy link

jeenal-gajjar commented Jul 16, 2019

I am also getting the same Issue.
I also got issue during international shipment for the commodities.
error: fedex.base_service.FedexError: Commodities are required (Error code: 6065)
Can you help me into this issue?

@radzhome
Copy link
Member

If you get it working please add an example for international shipment. Thanks.

@skiv23
Copy link

skiv23 commented Nov 16, 2020

I am also getting the same Issue.
I also got issue during international shipment for the commodities.
error: fedex.base_service.FedexError: Commodities are required (Error code: 6065)
Can you help me into this issue?

If anyone else comes here with this question, here's the code sample for commodities

commodity = shipment.create_wsdl_object_of_type('Commodity')
commodity.NumberOfPieces = 1
commodity.Description = '123'
commodity.CountryOfManufacture = 'US'
commodity.Quantity = 1
commodity.QuantityUnits = 'EA'
commodity.Weight.Units = 'LB'
commodity.Weight.Value = 1.0
commodity.UnitPrice.Currency = 'USD'
commodity.UnitPrice.Amount = 1.0
commodity.CustomsValue.Currency = 'USD'
commodity.CustomsValue.Amount = 1.0

shipment.RequestedShipment.CustomsClearanceDetail.Commodities = [commodity]
shipment.RequestedShipment.CustomsClearanceDetail.CustomsValue.Currency = "USD"
shipment.RequestedShipment.CustomsClearanceDetail.CustomsValue.Amount = 1.0
shipment.RequestedShipment.CustomsClearanceDetail.DutiesPayment.PaymentType = 'SENDER'
shipment.RequestedShipment.CustomsClearanceDetail.DutiesPayment.Payor.ResponsibleParty.AccountNumber = self.CONFIG_OBJ.account_number

More info about these fields can be found in their PDF.

Regarding Time in transit - Issue still exists, but I believe it's in the API itself. Developer PDF has a US->BR ServiceAvailabilityRequest example in xml, it doesn't have any extra data, but it doesn't show transit time anyway. Tried both ways - this library and postman.

@radzhome
Copy link
Member

You want to add the example as a PR?

@MatinF
Copy link

MatinF commented Mar 31, 2021

The new international shipment example may also be useful here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants