Comments (1)
Same problem arisen here, i am also unable to get shipment items within order.
In python dict object has standard function, which is items and item function return attributes of dict along with values in the form of list of tuples.
For example:
dict.items**({"key":"val"})** function will return [(u'key', u'val')].
Now while creating object, it discard the attribute items, this is bug and has to fix or has to change its attribute name items to any other attribute.
Resolution to your problem is:
Go to base class in /bigcommerce/resource/base.py and open the file using any editor.
and insert a new line (I.e where i have written changed/newly added)
class Mapping(dict):
"""
Mapping
provides '.' access to dictionary keys
"""
def __init__(self, mapping, *args, **kwargs):
"""
Create a new mapping. Filters the mapping argument
to remove any elements that are already methods on the
object.
For example, Orders retains its `coupons` method, instead
of being replaced by the dict describing the coupons endpoint
"""
filter_args = {k: mapping[k] for k in mapping if k not in dir(self)}
filter_args['_items'] = mapping['items'] if mapping.has_key("items") else [] #Changed/Newly Added
self.__dict__ = self
dict.__init__(self, filter_args, *args, **kwargs)
def __str__(self):
"""
Display as a normal dict, but filter out underscored items first
"""
return str({k: self.__dict__[k] for k in self.__dict__ if not k.startswith("_")})
def __repr__(self):
return "<%s at %s, %s>" % (type(self).__name__, hex(id(self)), str(self))
from bigcommerce-api-python.
Related Issues (20)
- Zip payment method not returning in API
- Using v3 Catalog/Product filters HOT 2
- Go SDK + CloudQuery Source Plugin
- I can't get the addresses when I do an api.Customer.all()
- Rate Limit only firing once
- api.Products.count() doesn't work anymore? HOT 2
- 406 Not Acceptable ({"error":"Invalid format."}) during api.oauth_fetch_token call HOT 11
- api.ProductCustomFields.get(productidnumber,fieldidnumber).delete does not delete custom field HOT 1
- Odoo Connector
- ProductVideos cannot create, delete, or delete_all HOT 2
- Unset Price Value On Product Variations HOT 1
- Filter Keyword in API returns only exact match and not partial match
- Order field "custom_status" update returns an error HOT 2
- Seems to be no end point for Blog Tags
- 429 error shouldn't appear should it?
- Order status .iterall() infinite loop
- Updating customer password gives random 400 errors HOT 5
- Is there a way to update products in batches (more than 1 at a time)? HOT 1
- Old releases, broken functions, V3 support HOT 1
- Getting subresources alongside products (not separately) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bigcommerce-api-python.