Skip to content

About Invoices #29

@cirotix

Description

@cirotix

I see from the git history (and from the forks of this project) that there is some confusion about the Invoices stream.

from streams.py

class Invoices(Stream):
    name = "invoices"
    replication_method = "INCREMENTAL"
    # replication_key = "updated_at"
    replication_key = "due_date"
    # API endpoint filters only on `due_date`.

We can see that the replication key has due_date and had been updated_at. There was a back and forth on this line in the commits.
The fact is there are actually two very different Invoice objects in Chargify:

Legacy Invoices have a updated_at property
Relationship Invoices have a due_date property
Both of them have a completely different structure and are unrelated. The most confusing part is that they have the same endpoint in Chargify API: /invoices/
You'll get one or the other depending on the instance you have.

I will open a PR to fix this issue. Unfortunately, I only have instances with Legacy Invoices so I can only test this. But I will provide a scafolder for the new Relationship Invoices.

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