Added created_at property to all resources. FYI existing ResourceMeta class ensures all resources are singletons and can only be created once and after that are kept in the memory.
Fixed validate_mid_agreement_payment using wrong property
Adjusted validate_mid_agreement_payment so it checks agains last pay document (instead of using avareage from all documents related to the agreement)
Adjusted debit note validation so it is using Activity.created_at instead of agreement duration when applicable
Adjusted debit note and invoice validation so it is using created_at instead of timestamp when applicable
Added grace_amount to amount calculated using usage vector
Changes:
created_at
property to all resources. FYI existingResourceMeta
class ensures all resources are singletons and can only be created once and after that are kept in the memory.validate_mid_agreement_payment
using wrong propertyvalidate_mid_agreement_payment
so it checks agains last pay document (instead of using avareage from all documents related to the agreement)Activity.created_at
instead of agreement duration when applicablecreated_at
instead oftimestamp
when applicablegrace_amount
to amount calculated using usage vector