I don't do any validation on my end because that is fedex's job. More importantly, I dont want to keep up with their validation changes, etc because they don't document that.
> I don't do any validation on my end because that is fedex's job. More
> importantly, I dont want to keep up with their validation changes, etc
> because they don't document that.
> Anyways country refers to the element they want.
Your request looks good to me. I just released a new version for you. Update to that version and do this:
begin # your fedex code here rescue Shippinglogic::FedEx::Error => e raise e.request.inspect end
That should show your raw request. Be sure and mask your fedex credentials. But that should tell us whats going on. All of my tests are passing and I'm currently rating packages in my app right now. So it's probably something dumb.
> On Aug 8, 5:36 pm, Ben Johnson <bjohn...@binarylogic.com> wrote: >> Hey Brian,
>> Use country, not country_code.
>> I don't do any validation on my end because that is fedex's job. More >> importantly, I dont want to keep up with their validation changes, >> etc >> because they don't document that.
>> Anyways country refers to the element they want.
I haven't looked at what you changed yet, but whatever it was fixed
it. I'll do some more testing later.
Something I noticed is when I make a change to the request - say I
change the weight and call fedex.rate again - it returns the cached
result. Is it assumed that I will create a new fedex object for each
request?
On Aug 8, 5:55 pm, Ben Johnson <bjohn...@binarylogic.com> wrote:
> Your request looks good to me. I just released a new version for you.
> Update to that version and do this:
> begin
> # your fedex code here
> rescue Shippinglogic::FedEx::Error => e
> raise e.request.inspect
> end
> That should show your raw request. Be sure and mask your fedex
> credentials. But that should tell us whats going on. All of my tests
> are passing and I'm currently rating packages in my app right now. So
> it's probably something dumb.
> > On Aug 8, 5:36 pm, Ben Johnson <bjohn...@binarylogic.com> wrote:
> >> Hey Brian,
> >> Use country, not country_code.
> >> I don't do any validation on my end because that is fedex's job. More
> >> importantly, I dont want to keep up with their validation changes,
> >> etc
> >> because they don't document that.
> >> Anyways country refers to the element they want.
No, I haven't really thought about doing that, but no you should not have to create a new object for each request. Let me write some tests for that and come up with a solution. What I am trying to avoid with the caching is this:
rates = fedex.rate rates.first rates.last
The 2 last lines should not make 2 requests, but what I think I'll do is clear the cache if any attributes are changed.
> I haven't looked at what you changed yet, but whatever it was fixed > it. I'll do some more testing later.
> Something I noticed is when I make a change to the request - say I > change the weight and call fedex.rate again - it returns the cached > result. Is it assumed that I will create a new fedex object for each > request?
> On Aug 8, 5:55 pm, Ben Johnson <bjohn...@binarylogic.com> wrote: >> Your request looks good to me. I just released a new version for you. >> Update to that version and do this:
>> begin >> # your fedex code here >> rescue Shippinglogic::FedEx::Error => e >> raise e.request.inspect >> end
>> That should show your raw request. Be sure and mask your fedex >> credentials. But that should tell us whats going on. All of my tests >> are passing and I'm currently rating packages in my app right now. So >> it's probably something dumb.
>>> On Aug 8, 5:36 pm, Ben Johnson <bjohn...@binarylogic.com> wrote: >>>> Hey Brian,
>>>> Use country, not country_code.
>>>> I don't do any validation on my end because that is fedex's job. >>>> More >>>> importantly, I dont want to keep up with their validation changes, >>>> etc >>>> because they don't document that.
>>>> Anyways country refers to the element they want.