Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DE-801] Fix invoice events structure #137

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions doc/models/apply-credit-note-event.md
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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.APPLY_CREDIT_NOTE` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ApplyCreditNoteEventData`](../../doc/models/apply-credit-note-event-data.md) | Required | Example schema for an `apply_credit_note` event | ApplyCreditNoteEventData getEventData() | setEventData(ApplyCreditNoteEventData eventData) |

## 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"
}
]
}
}
```

45 changes: 45 additions & 0 deletions doc/models/apply-debit-note-event.md
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 | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.APPLY_DEBIT_NOTE` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ApplyDebitNoteEventData`](../../doc/models/apply-debit-note-event-data.md) | Required | Example schema for an `apply_debit_note` event | ApplyDebitNoteEventData getEventData() | setEventData(ApplyDebitNoteEventData eventData) |

## 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"
}
}
```

52 changes: 52 additions & 0 deletions doc/models/apply-payment-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

# Apply Payment Event

## Structure

`ApplyPaymentEvent`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.APPLY_PAYMENT` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ApplyPaymentEventData`](../../doc/models/apply-payment-event-data.md) | Required | Example schema for an `apply_payment` event | ApplyPaymentEventData getEventData() | setEventData(ApplyPaymentEventData eventData) |

## 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
}
}
```

47 changes: 47 additions & 0 deletions doc/models/backport-invoice-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

# Backport Invoice Event

## Structure

`BackportInvoiceEvent`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.BACKPORT_INVOICE` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`Invoice`](../../doc/models/invoice.md) | Required | Example schema for an `backport_invoice` event | Invoice getEventData() | setEventData(Invoice eventData) |

## Example (as JSON)

```json
{
"id": 78,
"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": "backport_invoice",
"event_data": {
"issue_date": "2024-01-01",
"due_date": "2024-01-01",
"paid_date": "2024-01-01",
"id": 206,
"uid": "uid6",
"site_id": 132,
"customer_id": 244,
"subscription_id": 60
}
}
```

30 changes: 0 additions & 30 deletions doc/models/billing-address.md

This file was deleted.

40 changes: 40 additions & 0 deletions doc/models/change-chargeback-status-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@

# Change Chargeback Status Event

## Structure

`ChangeChargebackStatusEvent`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.CHANGE_CHARGEBACK_STATUS` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ChangeChargebackStatusEventData`](../../doc/models/change-chargeback-status-event-data.md) | Required | Example schema for an `change_chargeback_status` event | ChangeChargebackStatusEventData getEventData() | setEventData(ChangeChargebackStatusEventData eventData) |

## 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": "change_chargeback_status",
"event_data": {
"chargeback_status": "won"
}
}
```

41 changes: 41 additions & 0 deletions doc/models/change-invoice-collection-method-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

# Change Invoice Collection Method Event

## Structure

`ChangeInvoiceCollectionMethodEvent`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.CHANGE_INVOICE_COLLECTION_METHOD` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ChangeInvoiceCollectionMethodEventData`](../../doc/models/change-invoice-collection-method-event-data.md) | Required | Example schema for an `change_invoice_collection_method` event | ChangeInvoiceCollectionMethodEventData getEventData() | setEventData(ChangeInvoiceCollectionMethodEventData eventData) |

## Example (as JSON)

```json
{
"id": 246,
"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": "change_invoice_collection_method",
"event_data": {
"from_collection_method": "from_collection_method4",
"to_collection_method": "to_collection_method8"
}
}
```

44 changes: 44 additions & 0 deletions doc/models/change-invoice-status-event.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@

# Change Invoice Status Event

## Structure

`ChangeInvoiceStatusEvent`

## Fields

| Name | Type | Tags | Description | Getter | Setter |
| --- | --- | --- | --- | --- | --- |
| `Id` | `long` | Required | - | long getId() | setId(long id) |
| `Timestamp` | `ZonedDateTime` | Required | - | ZonedDateTime getTimestamp() | setTimestamp(ZonedDateTime timestamp) |
| `Invoice` | [`Invoice`](../../doc/models/invoice.md) | Required | - | Invoice getInvoice() | setInvoice(Invoice invoice) |
| `EventType` | [`InvoiceEventType`](../../doc/models/invoice-event-type.md) | Required | **Default**: `InvoiceEventType.CHANGE_INVOICE_STATUS` | InvoiceEventType getEventType() | setEventType(InvoiceEventType eventType) |
| `EventData` | [`ChangeInvoiceStatusEventData`](../../doc/models/change-invoice-status-event-data.md) | Required | Example schema for an `change_invoice_status` event | ChangeInvoiceStatusEventData getEventData() | setEventData(ChangeInvoiceStatusEventData eventData) |

## Example (as JSON)

```json
{
"id": 92,
"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": "change_invoice_status",
"event_data": {
"gateway_trans_id": "gateway_trans_id2",
"amount": "amount8",
"from_status": "paid",
"to_status": "paid",
"consolidation_level": "child"
}
}
```

17 changes: 0 additions & 17 deletions doc/models/containers/invoice-event-data-payment-method.md

This file was deleted.

Loading
Loading