-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DE-801] Fix invoice events structure
- Loading branch information
1 parent
d9911de
commit 723121c
Showing
124 changed files
with
3,739 additions
and
2,704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
# Apply Credit Note Event | ||
|
||
## Structure | ||
|
||
`ApplyCreditNoteEvent` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `Id` | `int64` | Required | - | | ||
| `Timestamp` | `time.Time` | Required | - | | ||
| `Invoice` | [`models.Invoice`](../../doc/models/invoice.md) | Required | - | | ||
| `EventType` | [`models.InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `"apply_credit_note"` | | ||
| `EventData` | [`models.ApplyCreditNoteEventData`](../../doc/models/apply-credit-note-event-data.md) | Required | Example schema for an `apply_credit_note` event | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"id": 214, | ||
"timestamp": "2016-03-13T12:52:32.123Z", | ||
"invoice": { | ||
"issue_date": "2024-01-01", | ||
"due_date": "2024-01-01", | ||
"paid_date": "2024-01-01", | ||
"id": 166, | ||
"uid": "uid6", | ||
"site_id": 92, | ||
"customer_id": 204, | ||
"subscription_id": 20 | ||
}, | ||
"event_type": "apply_credit_note", | ||
"event_data": { | ||
"uid": "uid6", | ||
"credit_note_number": "credit_note_number0", | ||
"credit_note_uid": "credit_note_uid0", | ||
"original_amount": "original_amount0", | ||
"applied_amount": "applied_amount2", | ||
"transaction_time": "2016-03-13T12:52:32.123Z", | ||
"memo": "memo0", | ||
"role": "role0", | ||
"consolidated_invoice": false, | ||
"applied_credit_notes": [ | ||
{ | ||
"uid": "uid4", | ||
"number": "number8" | ||
}, | ||
{ | ||
"uid": "uid4", | ||
"number": "number8" | ||
}, | ||
{ | ||
"uid": "uid4", | ||
"number": "number8" | ||
} | ||
] | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# Apply Debit Note Event | ||
|
||
## Structure | ||
|
||
`ApplyDebitNoteEvent` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `Id` | `int64` | Required | - | | ||
| `Timestamp` | `time.Time` | Required | - | | ||
| `Invoice` | [`models.Invoice`](../../doc/models/invoice.md) | Required | - | | ||
| `EventType` | [`models.InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `"apply_debit_note"` | | ||
| `EventData` | [`models.ApplyDebitNoteEventData`](../../doc/models/apply-debit-note-event-data.md) | Required | Example schema for an `apply_debit_note` event | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"id": 164, | ||
"timestamp": "2016-03-13T12:52:32.123Z", | ||
"invoice": { | ||
"issue_date": "2024-01-01", | ||
"due_date": "2024-01-01", | ||
"paid_date": "2024-01-01", | ||
"id": 166, | ||
"uid": "uid6", | ||
"site_id": 92, | ||
"customer_id": 204, | ||
"subscription_id": 20 | ||
}, | ||
"event_type": "apply_debit_note", | ||
"event_data": { | ||
"debit_note_number": "debit_note_number6", | ||
"debit_note_uid": "debit_note_uid2", | ||
"original_amount": "original_amount0", | ||
"applied_amount": "applied_amount2", | ||
"memo": "memo0", | ||
"transaction_time": "2016-03-13T12:52:32.123Z" | ||
} | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
|
||
# Apply Payment Event | ||
|
||
## Structure | ||
|
||
`ApplyPaymentEvent` | ||
|
||
## Fields | ||
|
||
| Name | Type | Tags | Description | | ||
| --- | --- | --- | --- | | ||
| `Id` | `int64` | Required | - | | ||
| `Timestamp` | `time.Time` | Required | - | | ||
| `Invoice` | [`models.Invoice`](../../doc/models/invoice.md) | Required | - | | ||
| `EventType` | [`models.InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `"apply_payment"` | | ||
| `EventData` | [`models.ApplyPaymentEventData`](../../doc/models/apply-payment-event-data.md) | Required | Example schema for an `apply_payment` event | | ||
|
||
## Example (as JSON) | ||
|
||
```json | ||
{ | ||
"id": 234, | ||
"timestamp": "2016-03-13T12:52:32.123Z", | ||
"invoice": { | ||
"issue_date": "2024-01-01", | ||
"due_date": "2024-01-01", | ||
"paid_date": "2024-01-01", | ||
"id": 166, | ||
"uid": "uid6", | ||
"site_id": 92, | ||
"customer_id": 204, | ||
"subscription_id": 20 | ||
}, | ||
"event_type": "apply_payment", | ||
"event_data": { | ||
"consolidation_level": "child", | ||
"memo": "memo0", | ||
"original_amount": "original_amount0", | ||
"applied_amount": "applied_amount2", | ||
"transaction_time": "2016-03-13T12:52:32.123Z", | ||
"payment_method": { | ||
"type": "apple_pay" | ||
}, | ||
"transaction_id": 78, | ||
"parent_invoice_number": 36, | ||
"remaining_prepayment_amount": "remaining_prepayment_amount6", | ||
"prepayment": false, | ||
"external": false | ||
} | ||
} | ||
``` | ||
|
Oops, something went wrong.