Skip to content

LineItem retrieved with invalid attributes #262

Description

@clevep

LineItem objects loaded from my Account contain invalid values for the attributes:

  • advertiser_user_id
  • bid_unit
  • charge_by

So if I load a LineItem and then immediately save it, I am greeted with errors like this:

>>> line_item = account.line_items().next()

>>> line_item.save()
BadRequest: <BadRequest object at 0x7fc24b5bd9a8 code=400 details=[{'message': 'Expected a value in APP_CLICK, APP_INSTALL, VIEW, VIEW_3S_100PCT, VIEW_6S, got "LINK_CLICK" for bid_unit', 'code': 'INVALID_PARAMETER', 'parameter': 'bid_unit'}, {'message': 'Expected a value in APP_CLICK, APP_INSTALL, got "LINK_CLICK" for charge_by', 'code': 'INVALID_PARAMETER', 'parameter': 'charge_by'}, {'message': 'setting advertiser_user_id is not allowed', 'code': 'INVALID_PARAMETER', 'parameter': 'advertiser_user_id'}]>

I am able to work around this by explicitly setting all of these attributes to None before saving, but it does not seem like they should populate with invalid values.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions