-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
I just tried to update a product and it seems that it is complaining about fields being null. You should be able to "round trip" a read/write. As a workaround how to do remove those additional fields from the update?
(byebug) product = client.products.where(sku: "Hold").first
#<BaseCRM::Product id=3036919, updated_at="2019-03-31T09:13:12Z", created_at="2019-03-31T09:13:12Z", active=true, description=nil, name="Hold Plan", sku="Hold", prices=[{:currency=>"USD", :amount=>"25.00"}], max_discount=nil, max_markup=nil, cost=nil, cost_currency=nil>
(byebug) product.name = "New Name"
"New Name"
(byebug) client.products.update(product)
*** BaseCRM::ErrorsCollection Exception: [b9qc3-kh39i-cqe7c-usmp0] http_status=422 Unprocessable Entity
code=blank message=attribute can't be blank details=This field may not be null. resource=product field=/data/cost
code=blank message=attribute can't be blank details=This field may not be null. resource=product field=/data/cost_currency
code=blank message=attribute can't be blank details=This field may not be null. resource=product field=/data/description
code=blank message=attribute can't be blank details=This field may not be null. resource=product field=/data/max_markup
Metadata
Metadata
Assignees
Labels
No labels