Skip Menu |

This queue is for tickets about the Net-Easypost CPAN distribution.

Report information
The Basics
Id: 87493
Status: resolved
Priority: 0/
Queue: Net-Easypost

People
Owner: Nobody in particular
Requestors: marknort [...] hotmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.08
Fixed in: (no value)



Subject: Net::EasyPost issue . . .
Date: Wed, 31 Jul 2013 18:19:01 +0000
To: "bug-Net-Easypost [...] rt.cpan.org" <bug-net-easypost [...] rt.cpan.org>, "mrallen1 [...] yahoo.com" <mrallen1 [...] yahoo.com>
From: Mark Norton <marknort [...] hotmail.com>
Mr Allen, First of all, thank you for writing the EasyPost API software. It is just what I needed. I am curious though, are you planning on updating the software to include some of the "new feature" such as ScanForms (Most important to me) and PDF Labels, FedEx and UPS Labels, Refunds & Insurance (Also important to us), as well as Customs Forms. I am in need of the ScanForms, Customs Forms, Refunds and Insurance APIs that they now offer. Can you please let me know if you are planning on updating this software to include these things? I appreciate your time. Mark
On Wed Jul 31 14:19:14 2013, marknort@hotmail.com wrote: Show quoted text
> Can you please let me know if you are planning on updating this > software to include these things?
I would like to update the library, but I haven't found time to yet. I don't have any ETA on when an update might be forthcoming. The current code's on github, and I would definitely welcome any contributions or if you want to take it over, that would be cool too. https://github.com/mrallen1/Net-Easypost Thanks. Mark
Subject: RE: [rt.cpan.org #87493] Net::EasyPost issue . . .
Date: Wed, 31 Jul 2013 20:26:36 +0000
To: "bug-Net-Easypost [...] rt.cpan.org" <bug-net-easypost [...] rt.cpan.org>
From: Mark Norton <marknort [...] hotmail.com>
Hi Mark, Thank you for the information. I am really sorry that you do not have the time to work on this project. I appreciate that you want someone else to "carry on," but I fear I am not that person. I am a marginal Perl programmer at best, and am even having a hard time getting the things done with your software that I need done. Right now, I am working on getting a list of rates from EasyPost with your get_rate method (Which I assume is actually a typo and it should be get_rates). Every time I execute your code, it will go straight through and purchase the label, but if I just try to get the rates for the various services (see code below), I get this error: Can't call method "role" on an undefined value. The "role" is set in my code but it does not appear to be reading it. Yes, I have verified that all the scalars are set. Do you think you can point me in the right direction? Thanks for your help. Mark Code: my $ezp = Net::Easypost->new( access_code => 'testAPICode' ); $addr = $ezp->verify_address( { street1 => $address1, city => $city, state => $state, zip => $zip } ); $to = $addr->clone; $to->role('to'); $to->name($name); $from = Net::Easypost::Address->new( role => 'from', name => 'Time Capsule Corporation', street1 => '1004 N Railroad Street', street2 => 'PO Box 38', city => 'Shirley', state => 'IN', phone => '3178918463', zip => '47384' ); $parcel = Net::Easypost::Parcel->new( length => $length, # dimensions in inches width => $width, height => $depth, weight => $weight, # weight in ounces ); $rates = $ezp->get_rates( { to => $to, from => $from, parcel => $parcel } ); print "Result: " . Dumper( $rates ) . "<BR>\n"; exit; Show quoted text
> Subject: [rt.cpan.org #87493] Net::EasyPost issue . . . > From: bug-Net-Easypost@rt.cpan.org > To: marknort@hotmail.com > Date: Wed, 31 Jul 2013 16:16:31 -0400 > > <URL: https://rt.cpan.org/Ticket/Display.html?id=87493 > > > On Wed Jul 31 14:19:14 2013, marknort@hotmail.com wrote:
> > Can you please let me know if you are planning on updating this > > software to include these things?
> > I would like to update the library, but I haven't found time to yet. I don't have any ETA on when an update might be forthcoming. > > The current code's on github, and I would definitely welcome any contributions or if you want to take it over, that would be cool too. > > https://github.com/mrallen1/Net-Easypost > > Thanks. > > Mark > >
On Wed Jul 31 16:26:48 2013, marknort@hotmail.com wrote: Show quoted text
> this error: Can't call method "role" > on an undefined value. The "role" is set in my code but it does not > appear to be reading it.
That's a genuine bug which is now fixed. I just pushed 0.09 to CPAN. Also you need to make sure that your return value from $ezp->get_rates(...) is an array otherwise, you're just going to get the number of rates. See t/02-rates.t for some example code. Cheers, Mark
Subject: RE: [rt.cpan.org #87493] Net::EasyPost issue . . .
Date: Wed, 31 Jul 2013 21:45:27 +0000
To: "bug-Net-Easypost [...] rt.cpan.org" <bug-net-easypost [...] rt.cpan.org>
From: Mark Norton <marknort [...] hotmail.com>
Thanks Mark! It was the array that was tripping me up! I knew it had to be something stupid! :) Mark Show quoted text
> Subject: [rt.cpan.org #87493] Net::EasyPost issue . . . > From: bug-Net-Easypost@rt.cpan.org > To: marknort@hotmail.com > Date: Wed, 31 Jul 2013 17:32:14 -0400 > > <URL: https://rt.cpan.org/Ticket/Display.html?id=87493 > > > On Wed Jul 31 16:26:48 2013, marknort@hotmail.com wrote:
> > this error: Can't call method "role" > > on an undefined value. The "role" is set in my code but it does not > > appear to be reading it.
> > That's a genuine bug which is now fixed. I just pushed 0.09 to CPAN. > > Also you need to make sure that your return value from > > $ezp->get_rates(...) > > is an array otherwise, you're just going to get the number of rates. > > See t/02-rates.t for some example code. > > Cheers, > > Mark > >
Closing out old bug that had a workaround in 2013.