Giter VIP home page Giter VIP logo

Comments (10)

skoshelev avatar skoshelev commented on June 5, 2024 1

Hi @danFbach. Thank you for your help. We also don’t know how this is possible, but this is not the first such object that can have a dual structure in the new API. Therefore, we were forced to make our implementation of some fields, such as RateResponse_RatedShipment.RatedPackage.
We will make the necessary changes soon

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

Correction, the oldest occurrence i have of this error is 03/19/2024 10:28:34 PM CST

Also, just checked their API Updates and there is nothing past January...but they don't always post changes.

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

I think this is also being brought up on the latest comment of #6712

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

In reference to that comment, they suggest just removing the Alert object from RateResponse_Response.
Of course this will work, but is not an ideal solution.
Changing it from

public System.Collections.Generic.ICollection<Response_Alert> Alert { get; set; }

to

public Response_Alert Alert { get; set; }

Also allows it to work.

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

https://developer.ups.com/api/reference?loc=en_US#operation/Rate
Official UPS documentation still defines Alert as an array of objects - so the existing implementation should work, and my changes should not fix it.
I've got a ticket open with UPS to get some answers.

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

image

It can be EITHER a single object OR an array. wtf. not sure how a deserializer can compensate for that

from nopcommerce.

danFbach avatar danFbach commented on June 5, 2024

In fact, multiple fields can be arrays or single objects - probably other fields that aren't listed here too.
If the response contains <= 1 result, it just returns the single object instead of an array with one object.
image

from nopcommerce.

skoshelev avatar skoshelev commented on June 5, 2024

Closed #7119

from nopcommerce.

sangeet-shah avatar sangeet-shah commented on June 5, 2024

@skoshelev @AndreiMaz

This plugin still having issue.

image

image

I getting error while RatedShipment property get as object from UPS response.

{ "RateResponse": { "Response": { "ResponseStatus": { "Code": "1", "Description": "Success" }, "Alert": [ { "Code": "113060", "Description": "The weight exceeds the limit for the UPS Letter/Envelope rate and will be rated using the weight." }, { "Code": "110971", "Description": "Your invoice may vary from the displayed reference rates" } ], "TransactionReference": { "CustomerContext": "testing", "TransactionIdentifier": "iewssoat24d2WM6mXBy9YL" } }, "RatedShipment": { "Service": { "Code": "65", "Description": "" }, "RatedShipmentAlert": [ { "Code": "113060", "Description": "The weight exceeds the limit for the UPS Letter/Envelope rate and will be rated using the weight." }, { "Code": "110971", "Description": "Your invoice may vary from the displayed reference rates" } ], "BillingWeight": { "UnitOfMeasurement": { "Code": "LBS", "Description": "Pounds" }, "Weight": "1.0" }, "TransportationCharges": { "CurrencyCode": "USD", "MonetaryValue": "126.36" }, "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "TotalCharges": { "CurrencyCode": "USD", "MonetaryValue": "126.36" }, "NegotiatedRateCharges": { "TotalCharge": { "CurrencyCode": "USD", "MonetaryValue": "125.10" } }, "RatedPackage": [ { "TransportationCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "ServiceOptionsCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "TotalCharges": { "CurrencyCode": "USD", "MonetaryValue": "0.00" }, "Weight": "1.0", "BillingWeight": { "UnitOfMeasurement": { "Code": "LBS", "Description": "Pounds" }, "Weight": "1.0" } } ] } } }

from nopcommerce.

skoshelev avatar skoshelev commented on June 5, 2024

Hi @sangeet-shah. This month, UPS updated both the API and documentation; according to the new specification, such problems should no longer exist. We have updated the code to use API version v2403.

Closed #7119

from nopcommerce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.