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

The property 'address' is not defined for this Trash #18

Open
jprincipe opened this issue Feb 28, 2014 · 1 comment
Open

The property 'address' is not defined for this Trash #18

jprincipe opened this issue Feb 28, 2014 · 1 comment

Comments

@jprincipe
Copy link

I know that there is another bug with the same title, but this is using the latest version of the Stamps.com API (https://swsim.testing.stamps.com/swsim/SwsimV34.asmx)

Make the calls as defined in the ReadMe result in the error in the title.

Here are my example calls:

standardized_address = Stamps.clean_address(
  :address => {
    :full_name => 'The White House',
    :address1  => '1600 Pennsylvania Avenue, NW',
    :city      => 'Washington',
    :state     => 'DC',
    :zip_code  => '20500'
})

rates = Stamps.get_rates(
  :from_zip_code => '45440',
  :to_zip_code   => '20500',
  :weight_lb     => '0.5',
  :ship_date     => '2014-02-28'
)

stamp = Stamps.create!(
  :tracking_number => true,
  :rate          => rates.first,
  :to            => standardized_address,
  :from          => {
    :full_name    => 'Littlelines',
    :address1     => '50 Chestnut Street',
    :address2     => 'Suite 234',
    :city         => 'Beavercreek',
    :state        => 'OH',
    :zip_code     => '45440',
    :phone_number => '9375545027'
  },
  :memo => 'Thanks for shopping with us!'
)

I can see that the problem is with the serialization of the To Address object in the lib/stamps/mapping.rb. So I attempted to pass

:to => standardized_address[:address]

but that results in an error:

SystemStackError: stack level too deep
@UnConundrum
Copy link

I'm having the same problem. Is there any chance for an update?

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

2 participants