Skip to content

Commit b8efd6f

Browse files
committed
Update yookassa_webhook.pas
1 parent 6ae3ae0 commit b8efd6f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

yookassa_webhook.pas

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,22 @@ TYookassaWebhookHandler = class
115115
property OnLog: TYookassaLogEvent read FOnLog write FOnLog;
116116
end;
117117

118+
function WebhookObjectTypeToString(aObjectType: TYookassaWebhookObjectType): String;
119+
118120
implementation
119121

120122
uses
121123
StrUtils;
122124

125+
const
126+
_WebhookObjectTypes: array[TYookassaWebhookObjectType] of String =
127+
('', '', 'payment', 'refund', 'payout', 'deal', 'paymentmethod');
128+
129+
function WebhookObjectTypeToString(aObjectType: TYookassaWebhookObjectType): String;
130+
begin
131+
Result:=_WebhookObjectTypes[aObjectType];
132+
end;
133+
123134
{ EYooKassaWebhookError }
124135

125136
constructor EYooKassaWebhookError.Create(const aMsg, aErrorCode: string);

0 commit comments

Comments
 (0)