Statement migration completed

Event generated when a statement migration finishes and the result is reported. Result can be either SUCCESS or FAIL.

Type: object
Additional properties: true
Domain: migration
Event: statement_outgoing
Version: 1

|
code

Title: Migration message code
Description: The code of message for systems
Type: string
Example:
MIGR-0001

message required

Title: The message schema
Description: Message of Statement migration result
Type: string
Example:
Statement migrated with success

migration

Title: Migration Identifiers Object
Description: Identifier sent on start of migration process
Type: object
Additional properties: true
Example:

{
    "id": "migration-id",
    "version_date": "2021-08-11T11:25:00.000Z"
}
id required

Title: Migration Identifier
Type: string
Example:
migration-id

version_date

Title: Version Date of Migration Identifier
Type: string
Format: date-time
Example:
2021-08-11T11:25:00.000Z

status required

Title: Migration status
Description: If the result of Statement migration was success or not
Type: string
Must be one of the following:
SUCCESS
FAIL
Example:
SUCCESS
FAIL

entity

Title: Pismo generated Statement information
Type: object
Additional properties: true
Example:

{
    "statement_id": 22944079,
    "cycle_closing_date": "2018-03-15",
    "best_transaction_day": "2018-03-16",
    "due_date": "2018-03-25",
    "real_due_date": "2018-03-25",
    "cycle": 3,
    "current_cycle": 3,
    "previous_balance": 180.52,
    "debits": 50,
    "credits": 50,
    "current_balance": 190.52,
    "minimum_payment": 20,
    "posted_date": "2021-10-25T19:54:41",
    "migration": {
        "id": "2021-10-27+05-statement",
        "version_date": "2021-10-28T11:25:00.000Z"
    }
}
metadata

Description: Statement's metadata
Type: object
Additional properties: true
Example:

{
    "key1": "value1",
    "key2": "value2"
}
statement_id

Title: Statement Identifier
Description: Statement identifier generated by pismo.
Type: integer
Example:
22944079

debits

Description: Statement's Debits informed at Incoming Event
Type: number
Example:
50.0

due_date

Description: Statement's Due Date informed at Incoming Event
Type: string
Format: date
Example:
2018-03-25

previous_balance

Description: Statement's Previous Balance informed at Incoming Event
Type: number
Example:
180.52

cycle

Title: The cycle schema
Description: Statement's Cycle informed at Incoming Event
Type: integer
Example:
2

current_cycle

Description: Current statement cycle
Type: integer
Example:
2

real_due_date

Description: Statement's Real Due Date informed at Incoming Event
Type: string
Format: date
Example:
2018-03-25

credits

Description: Statement's Credits informed at Incoming Event
Type: number
Example:
50.0

cycle_closing_date

Description: Statment's Cycle Closing Date informed at Incoming Event
Type: string
Format: date
Example:
2018-03-15

minimum_payment

Description: Statement's Minimum Payment informed at Incoming Event
Type: number
Example:
20.0

current_balance

Description: Statement's Migration Current Balance informed at Incoming Event
Type: number
Example:
190.52

best_transaction_day

Description: Statement's Best Transaction Day informed at Incoming Event
Type: string
Format: date
Example:
2018-03-16

posted_date

Description: Statement's Posted Date informed at Incoming Event
Type: string
Format: date-time
Example:
2021-10-25T19:54:41Z

operation

Title: Migration Operation
Description: If the Statement migration is a creation or update
Type: string
Must be one of the following:
CREATION
UPDATE
Example:
UPDATE
CREATION

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "https://pismo.io/events/migration/statement_outgoing-1.json",
    "type": "object",
    "title": "Statement migration completed",
    "description": "Event generated when a statement migration finishes and the result is reported. Result can be either `SUCCESS` or `FAIL`.",
    "examples": [
        {
            "operation": "UPDATE",
            "status": "SUCCESS",
            "code": "MIGR-0001",
            "message": "Statement migrated with success",
            "migration": {
                "id": "migration-id",
                "version_date": "2021-08-11T11:25:00.000Z"
            },
            "entity": {
                "card_id": 10000012,
                "account_id": 10000015,
                "customer_id": 10000020
            }
        }
    ],
    "required": [
        "message",
        "migration",
        "status"
    ],
    "properties": {
        "code": {
            "$id": "#/properties/code",
            "type": "string",
            "title": "Migration message code",
            "description": "The code of message for systems",
            "examples": [
                "MIGR-0001"
            ]
        },
        "message": {
            "$id": "#/properties/message",
            "type": "string",
            "title": "The message schema",
            "description": "Message of Statement migration result",
            "examples": [
                "Statement migrated with success"
            ]
        },
        "migration": {
            "$id": "#/properties/migration",
            "type": "object",
            "title": "Migration Identifiers Object",
            "description": "Identifier sent on start of migration process",
            "examples": [
                {
                    "id": "migration-id",
                    "version_date": "2021-08-11T11:25:00.000Z"
                }
            ],
            "required": [
                "id"
            ],
            "properties": {
                "id": {
                    "$id": "#/properties/migration/properties/id",
                    "type": "string",
                    "title": "Migration Identifier",
                    "examples": [
                        "migration-id"
                    ]
                },
                "version_date": {
                    "$id": "#/properties/migration/properties/version_date",
                    "type": "string",
                    "format": "date-time",
                    "title": "Version Date of Migration Identifier",
                    "examples": [
                        "2021-08-11T11:25:00.000Z"
                    ]
                }
            },
            "additionalProperties": true
        },
        "status": {
            "$id": "#/properties/status",
            "type": "string",
            "title": "Migration status",
            "description": "If the result of Statement migration was success or not",
            "enum": [
                "SUCCESS",
                "FAIL"
            ],
            "examples": [
                "SUCCESS",
                "FAIL"
            ]
        },
        "entity": {
            "$id": "#/properties/entity",
            "type": "object",
            "title": "Pismo generated Statement information",
            "examples": [
                {
                    "statement_id": 22944079,
                    "cycle_closing_date": "2018-03-15",
                    "best_transaction_day": "2018-03-16",
                    "due_date": "2018-03-25",
                    "real_due_date": "2018-03-25",
                    "cycle": 3,
                    "current_cycle": 3,
                    "previous_balance": 180.52,
                    "debits": 50,
                    "credits": 50,
                    "current_balance": 190.52,
                    "minimum_payment": 20,
                    "posted_date": "2021-10-25T19:54:41",
                    "migration": {
                        "id": "2021-10-27+05-statement",
                        "version_date": "2021-10-28T11:25:00.000Z"
                    }
                }
            ],
            "properties": {
                "metadata": {
                    "$id": "#/properties/entity/properties/metadata",
                    "type": "object",
                    "description": "Statement's metadata",
                    "examples": [
                        {
                            "key1": "value1",
                            "key2": "value2"
                        }
                    ],
                    "additionalProperties": true
                },
                "statement_id": {
                    "$id": "#/properties/entity/properties/statement_id",
                    "type": "integer",
                    "title": "Statement Identifier",
                    "description": "Statement identifier generated by pismo.",
                    "examples": [
                        22944079
                    ]
                },
                "debits": {
                    "$id": "#/properties/entity/properties/debits",
                    "type": "number",
                    "description": "Statement's Debits informed at Incoming Event",
                    "examples": [
                        50.0
                    ]
                },
                "due_date": {
                    "$id": "#/properties/entity/properties/due_date",
                    "type": "string",
                    "format": "date",
                    "description": "Statement's Due Date informed at Incoming Event",
                    "examples": [
                        "2018-03-25"
                    ]
                },
                "previous_balance": {
                    "$id": "#/properties/entity/properties/previous_balance",
                    "type": "number",
                    "description": "Statement's Previous Balance informed at Incoming Event",
                    "examples": [
                        180.52
                    ]
                },
                "cycle": {
                    "$id": "#/properties/entity/properties/cycle",
                    "type": "integer",
                    "title": "The cycle schema",
                    "description": "Statement's Cycle informed at Incoming Event",
                    "examples": [
                        2
                    ]
                },
                "current_cycle": {
                    "$id": "#/properties/entity/properties/current_cycle",
                    "type": "integer",
                    "description": "Current statement cycle",
                    "examples": [
                        2
                    ]
                },
                "real_due_date": {
                    "$id": "#/properties/entity/properties/real_due_date",
                    "type": "string",
                    "format": "date",
                    "description": "Statement's Real Due Date informed at Incoming Event",
                    "examples": [
                        "2018-03-25"
                    ]
                },
                "credits": {
                    "$id": "#/properties/entity/properties/credits",
                    "type": "number",
                    "description": "Statement's Credits informed at Incoming Event",
                    "examples": [
                        50.0
                    ]
                },
                "cycle_closing_date": {
                    "$id": "#/properties/entity/properties/cycle_closing_date",
                    "type": "string",
                    "format": "date",
                    "description": "Statment's Cycle Closing Date informed at Incoming Event",
                    "examples": [
                        "2018-03-15"
                    ]
                },
                "minimum_payment": {
                    "$id": "#/properties/entity/properties/minimum_payment",
                    "type": "number",
                    "description": "Statement's Minimum Payment informed at Incoming Event",
                    "examples": [
                        20.0
                    ]
                },
                "current_balance": {
                    "$id": "#/properties/entity/properties/current_balance",
                    "type": "number",
                    "description": "Statement's Migration Current Balance informed at Incoming Event",
                    "examples": [
                        190.52
                    ]
                },
                "best_transaction_day": {
                    "$id": "#/properties/entity/properties/best_transaction_day",
                    "type": "string",
                    "format": "date",
                    "description": "Statement's Best Transaction Day informed at Incoming Event",
                    "examples": [
                        "2018-03-16"
                    ]
                },
                "posted_date": {
                    "$id": "#/properties/entity/properties/posted_date",
                    "type": "string",
                    "format": "date-time",
                    "description": "Statement's Posted Date informed at Incoming Event",
                    "examples": [
                        "2021-10-25T19:54:41Z"
                    ]
                }
            },
            "additionalProperties": true
        },
        "operation": {
            "$id": "#/properties/operation",
            "type": "string",
            "title": "Migration Operation",
            "description": "If the Statement migration is a creation or update",
            "enum": [
                "CREATION",
                "UPDATE"
            ],
            "examples": [
                "UPDATE",
                "CREATION"
            ]
        }
    },
    "additionalProperties": true
}
{
    "operation": "UPDATE",
    "status": "SUCCESS",
    "code": "MIGR-0001",
    "message": "Statement migrated with success",
    "migration": {
        "id": "migration-id",
        "version_date": "2021-08-11T11:25:00.000Z"
    },
    "entity": {
        "card_id": 10000012,
        "account_id": 10000015,
        "customer_id": 10000020
    }
}