OPS-356: Remove invoice adjustment (#86) (#87)

This commit is contained in:
Артем 2023-09-04 14:19:26 +03:00 committed by GitHub
parent bfedcb9dbb
commit c32f50f875
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 148 deletions

View File

@ -120,7 +120,6 @@ enum ThreeDsVerification {
/* Invoices */
typedef base.ID InvoiceID
typedef base.ID InvoiceAdjustmentID
typedef base.ID InvoicePaymentID
typedef base.ID InvoicePaymentChargebackID
typedef base.ID InvoicePaymentRefundID
@ -502,47 +501,6 @@ struct RecurrentParentPayment {
/* Adjustments */
struct InvoiceAdjustment {
1: required InvoiceAdjustmentID id
2: required string reason
3: required base.Timestamp created_at
4: required InvoiceAdjustmentStatus status
5: required DataRevision domain_revision
6: optional PartyRevision party_revision
7: optional InvoiceAdjustmentState state
}
struct InvoiceAdjustmentPending {}
struct InvoiceAdjustmentProcessed {}
struct InvoiceAdjustmentCaptured { 1: required base.Timestamp at }
struct InvoiceAdjustmentCancelled { 1: required base.Timestamp at }
union InvoiceAdjustmentStatus {
1: InvoiceAdjustmentPending pending
2: InvoiceAdjustmentCaptured captured
3: InvoiceAdjustmentCancelled cancelled
4: InvoiceAdjustmentProcessed processed
}
/**
* Специфическое для выбранного сценария состояние поправки к инвойсу.
*/
union InvoiceAdjustmentState {
1: InvoiceAdjustmentStatusChangeState status_change
}
struct InvoiceAdjustmentStatusChangeState {
1: required InvoiceAdjustmentStatusChange scenario
}
/**
* Параметры поправки к инвойсу, используемые для смены его статуса.
*/
struct InvoiceAdjustmentStatusChange {
/** Статус, в который необходимо перевести инвойс. */
1: required InvoiceStatus target_status
}
struct InvoicePaymentAdjustment {
1: required InvoicePaymentAdjustmentID id
2: required InvoicePaymentAdjustmentStatus status

View File

@ -87,7 +87,6 @@ union InvoiceChange {
1: InvoiceCreated invoice_created
2: InvoiceStatusChanged invoice_status_changed
3: InvoicePaymentChange invoice_payment_change
4: InvoiceAdjustmentChange invoice_adjustment_change
}
union InvoiceTemplateChange {
@ -121,37 +120,6 @@ struct InvoicePaymentChange {
3: optional base.Timestamp occurred_at
}
/**
* Событие, касающееся корректировки по инвойсу.
*/
struct InvoiceAdjustmentChange {
1: required domain.InvoiceAdjustmentID id
2: required InvoiceAdjustmentChangePayload payload
3: optional base.Timestamp occurred_at
}
/**
* Один из возможных вариантов события, порождённого корректировкой по инвойсу.
*/
union InvoiceAdjustmentChangePayload {
1: InvoiceAdjustmentCreated invoice_adjustment_created
2: InvoiceAdjustmentStatusChanged invoice_adjustment_status_changed
}
/**
* Событие о создании корректировки инвойса
*/
struct InvoiceAdjustmentCreated {
1: required domain.InvoiceAdjustment adjustment
}
/**
* Событие об изменении статуса корректировки платежа
*/
struct InvoiceAdjustmentStatusChanged {
1: required domain.InvoiceAdjustmentStatus status
}
/**
* Один из возможных вариантов события, порождённого платежом по инвойсу.
*/
@ -612,7 +580,6 @@ struct InvoicePaymentParamsFlowHold {
struct Invoice {
1: required domain.Invoice invoice
2: required list<InvoicePayment> payments
3: optional list<InvoiceAdjustment> adjustments
}
struct InvoicePayment {
@ -644,7 +611,6 @@ struct InvoiceRefundSession {
1: optional domain.TransactionInfo transaction_info
}
typedef domain.InvoiceAdjustment InvoiceAdjustment
typedef domain.InvoicePaymentAdjustment InvoicePaymentAdjustment
struct InvoicePaymentChargeback {
@ -809,23 +775,6 @@ struct InvoicePaymentCaptureData {
4: optional domain.Allocation allocation
}
/**
* Параметры создаваемой поправки к инвойсу.
*/
struct InvoiceAdjustmentParams {
/** Причина, на основании которой создаётся поправка. */
1: required string reason
/** Сценарий создаваемой поправки. */
2: required InvoiceAdjustmentScenario scenario
}
/**
* Сценарий поправки к инвойсу.
*/
union InvoiceAdjustmentScenario {
1: domain.InvoiceAdjustmentStatusChange status_change
}
/**
* Параметры создаваемой поправки к платежу.
*/
@ -921,15 +870,6 @@ union InvalidStatus {
exception InvoiceNotFound {}
exception InvoiceAdjustmentNotFound {}
exception InvoiceAdjustmentPending {
1: required domain.InvoiceAdjustmentID id
}
exception InvoiceAdjustmentStatusUnacceptable {}
exception InvalidInvoiceAdjustmentStatus {
1: required domain.InvoiceAdjustmentStatus status
}
exception InvoicePaymentNotFound {}
exception InvoicePaymentRefundNotFound {}
@ -1085,49 +1025,6 @@ service Invoicing {
4: base.InvalidRequest ex4
)
InvoiceAdjustment CreateInvoiceAdjustment (
2: domain.InvoiceID id,
3: InvoiceAdjustmentParams params
)
throws (
2: InvoiceNotFound ex2,
3: InvalidInvoiceStatus ex3,
4: InvoiceAdjustmentPending ex4,
5: InvoiceAdjustmentStatusUnacceptable ex5,
6: InvoiceAlreadyHasStatus ex6,
7: base.InvalidRequest ex7,
8: InvoicePaymentPending ex8
)
InvoiceAdjustment GetAdjustment (
2: domain.InvoiceID id,
3: domain.InvoiceAdjustmentID adjustment_id
)
throws (
2: InvoiceNotFound ex2,
3: InvoiceAdjustmentNotFound ex3
)
void CaptureAdjustment (
2: domain.InvoiceID id,
3: domain.InvoiceAdjustmentID adjustment_id
)
throws (
2: InvoiceNotFound ex2,
3: InvoiceAdjustmentNotFound ex3,
4: InvalidInvoiceAdjustmentStatus ex4
)
void CancelAdjustment (
2: domain.InvoiceID id,
3: domain.InvoiceAdjustmentID adjustment_id
)
throws (
2: InvoiceNotFound ex2,
3: InvoiceAdjustmentNotFound ex3,
4: InvalidInvoiceAdjustmentStatus ex4
)
/* Terms */
domain.TermSet ComputeTerms (
@ -1153,8 +1050,7 @@ service Invoicing {
7: InvalidShopStatus ex7,
8: InvalidContractStatus ex8,
9: InvalidRecurrentParentPayment ex9,
10: OperationNotPermitted ex10,
11: InvoiceAdjustmentPending ex11
10: OperationNotPermitted ex10
)
InvoicePayment RegisterPayment (
@ -1168,7 +1064,6 @@ service Invoicing {
4: InvalidPartyStatus ex4,
5: InvalidShopStatus ex5,
6: InvalidContractStatus ex6,
7: InvoiceAdjustmentPending ex8,
8: InvalidRecurrentParentPayment ex9
)