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

Billing and Shipping Address not instantiated in Orders #734

Open
1 task done
AlexandreBarbier opened this issue Aug 28, 2024 · 0 comments
Open
1 task done

Billing and Shipping Address not instantiated in Orders #734

AlexandreBarbier opened this issue Aug 28, 2024 · 0 comments

Comments

@AlexandreBarbier
Copy link

Issue summary

When fetching orders from shopify.Order.find(...) the billing_address and the shipping_address are not instantiated

Expected behavior

The shipping_address and billing_address should have a value

Actual behavior

No errors are raised the field are just set to none.

Steps to reproduce the problem

  1. fetch an order with shopify.Order.find(...)
  2. try to print the billing_address or shipping_address

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

oas = shopify.Order.find(
                order_id, fields='billing_address,shipping_address')
print(oas.billing_address)

here is another exemple to show that the BillingAddress initialisation does not work

r = requests.get(SHOP_URL + f'/api/2024-07/orders/{order_id}.json?fields=billing_address,shipping_address', headers={
                             'X-Shopify-Access-Token': settings.shopify_token})

billing_address = r.json()['order']['billing_address']
print(billing_address)
b_addr = shopify.BillingAddress(billing_address)
print(b_addr)

Checklist

  • I have described this issue in a way that is actionable (if possible)
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

1 participant