Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton-Shutik committed Nov 7, 2024
1 parent 054fe50 commit 782e3b6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ deleted = client.products.delete(resource=1234)
# Count of products
count = client.products.count()

# Get product metafields
metafields = client.products.metafields.all(resource_id=1234)

# Get product metafield
metafield = client.products.metafields.get(resource_id=1234, sub_resource_id=5678)

# Create product metafield
data = {"metafield": {"namespace": "warehouse", "key": "foo", "value": 25, "type": "integer"}}
metafield = client.products.metafields.create(resource_id=5678, json=data)

# Update product metafield
data = {"metafield": {"value": 30}}
metafield = client.products.metafields.update(resource_id=1234, sub_resource_id=5678, json=data)

# Delete product metafield
deleted = client.products.metafields.delete(resource_id=1234, sub_resource_id=5678)


# Cancel order
order = client.orders.cancel(resource_id=1234)

Expand Down

0 comments on commit 782e3b6

Please sign in to comment.