{"id":337771,"date":"2022-09-01T09:00:52","date_gmt":"2022-09-01T09:00:52","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=337771"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=337771","title":{"rendered":"<span>\u041e\u043d\u043b\u0430\u0439\u043d \u043a\u0430\u0441\u0441\u044b \u041e\u0424\u0414 \u043a\u043b\u0430\u0441\u0441 \u043d\u0430 Delphi<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0421\u0432\u043e\u0438 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u041e\u041e\u0424 \u041a\u0430\u0437\u0430\u043a\u0422\u0435\u043b\u0435\u043a\u043e\u043c<\/h2>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type TSellBuy = class(TObject)   Sum : Double;   PaymentType : Integer;   PaymentTypeName : String; end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TNonNullableType = record   Sell : Double;   Buy : Double;   ReturnSell : Double;   ReturnBuy : Double;  end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 ZX \u043e\u0442\u0447\u0435\u0442\u0430 <\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type TZXReport = class(TObject)   ReportNumber : Integer;   TaxPayerName :  String;   TaxPayerIN : String;   TaxPayerVAT : Boolean;   TaxPayerVATSeria : String;   TaxPayerVATNumber : String;   CashBoxSN : String;   CashBoxIN : String;   CashBoxRN : String;   StartOn : String;   ReportOn : String;   CloseOn : String;   CashierCode : Integer;   ShiftNumber : Integer;   DocumentCount : Integer;   PutMoneySum : Double;   TakeMoneySum : Double;   ControlSum : String;   OfflineMode : Boolean;   CashBoxOfflineMode : Boolean;   SumInCashbox  : Double;   Sell : TList;{ of TSellBuy;}   Buy : TList {of TSellBuy;};   ReturnSell : TList {of TSellBuy;};   ReturnBuy : TList {of TSellBuy;};    StartNonNullable : TNonNullableType;    EndNonNullable : TNonNullableType;  end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TControlTape = class(TObject)   OperationTypeText : String;   Sum : Double;   Date : String;   EmployeeCode : Integer;   Number : String;   isOffline : Boolean;   ExternalOperationId : String; end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0441\u0441\u044b, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u043c\u0435\u043d\u044b \u043a\u0430\u0441\u0441\u044b<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   TCassa = class(Tobject)     UniqueNumber: String;     RegistrationNumber: String;     IdentificationNumber: String;     Name: String;     Description: String;     IsOffline: Boolean;     CurrentStatus: Integer;     Shift: Integer;   end;<\/code><\/pre>\n<blockquote>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 <\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   Tpayment = class(Tobject)     Sum: double;     PaymentType: LongInt;    end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   Tposition = class(Tobject)     Count: double;     Price: double;     Tax: double;     TaxType: LongInt;     PositionName: String;     PositionCode: double;     Discount: double;     Markup: double;     SectionCode: String;     IsStorno: Boolean;      UnitCode: Integer;   end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   TSendCheck = class(Tobject)   public     Token: String;     CashboxUniqueNumber: String;     OperationType: LongInt;     Position: TJSONArray;     Payment: TJSONArray;     Change: double;     RoundType: Integer;     ExternalCheckNumber: String;     CustomerEmail: String;    end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   Tcashbox = class(Tobject)     Unique_Number: String;     Registration_Number: String;     Identity_Number: String;     Address: String;   end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TMoneyOperation = class(TObject)   OfflineMode : Boolean;   CashBoxOfflineMode : Boolean;   DateTime : String;   Sum : Double;   CashBox : Tcashbox; end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   TAnswerCheck = class(Tobject)   public   var     check_number: String;     date_time: String;     offline_mode: Boolean;     cashbox: Tcashbox;     CheckOrderNumber: Integer;     ShiftNumber: Integer;     EmployeeName: String;     TicketUrl: String;   end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   TOOFD = class(Tobject)    private const     API_URL = 'https:\/\/devkkm.webkassa.kz\/api\/';    var     HTTP: TIdHTTP;     SSLIO: TIdSSLIOHandlerSocketOpenSSL;    public     constructor Create();     destructor Destroy();<\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u041a\u041a\u041c \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0442\u0443\u0442 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f REST API \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443, \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043a\u0435\u043d, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.Autorize(login: String; passwd: String): String; var   json_stream: TStringStream;   json_obj: TJSONObject;   json_pair: TJSONPair;   response: String;   Token: String;   json_response: TJSONObject; begin   try     begin         Token := '';       json_obj := TJSONObject.Create;       json_pair := TJSONPair.Create('Login', login);       json_obj.AddPair(json_pair);       json_pair := TJSONPair.Create('Password', passwd);       json_obj.AddPair(json_pair);        json_stream := TStringStream.Create(json_obj.ToJSON);        response := HTTP.Post(API_URL + 'Authorize', json_stream);       json_response := TJSONObject.ParseJSONValue(response) as TJSONObject;       if (json_response.GetValue('Data') &lt;> nil) then       begin         Token := (json_response.GetValue('Data') as TJSONObject)           .GetValue('Token').Value;        end       else       begin         \/\/ error code        ShowMessage(response);        Log(response);       end;      end;   finally     Result := Token;     json_obj.Free;     json_stream.Free;    end;  end; <\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u043a \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0432 \u041e\u041e\u0424\u0414, \u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0447\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a &#171;\u0427\u0415\u041a \u041f\u041e\u041a\u0423\u041f\u041a\u0418&#187; \u0442\u0430\u043a \u0438 &#171;\u0427\u0415\u041a \u0412\u041e\u0417\u0412\u0420\u0410\u0422\u0410&#187; , \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e <\/p>\n<p>1.\u041d\u0430\u0448 \u0442\u043e\u043a\u0435\u043d &#8212; \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<p>2. \u041d\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u041e\u041e\u0424\u0414<\/p>\n<p>3. \u0412\u0438\u0434 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442)<\/p>\n<p>4. \u041f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0447\u0435\u043a\u0435 &#8212; \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438\u043b\u0438 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442<\/p>\n<p>5. \u041e\u043f\u043b\u0430\u0442\u044b \u0438\u043b\u0438 \u0412\u043e\u0437\u0432\u0440\u0430\u0442\u044b \u0441\u0443\u043c\u043c\u0430 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/p>\n<p>\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u041a\u041a\u041c \u041e\u041e\u0424\u0414, <\/p>\n<p>\u0432 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0438\u043f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435  <strong>type<\/strong>   <strong>TAnswerCheck<\/strong><\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.Check(SendCheck: TSendCheck): TAnswerCheck; var   json_stream, jsst: TStringStream;   json_obj: TJSONObject;   json_pair: TJSONPair;   response: String;   json_response: TJSONObject;   json_data: TJSONObject;   answer: TAnswerCheck;   cashbox: Tcashbox;   cashbox_json: TJSONObject;   js_str: String; begin   try      json_obj := TJSONObject.Create;      json_obj.AddPair('Token', SendCheck.Token);     json_obj.AddPair('CashBoxUniqueNumber', SendCheck.CashboxUniqueNumber);     json_obj.AddPair('OperationType',       TJSONNumber.Create(SendCheck.OperationType));     json_obj.AddPair('Positions', SendCheck.Position);     json_obj.AddPair('Payments', SendCheck.Payment);      json_stream := TStringStream.Create(json_obj.ToJSON);      answer := TAnswerCheck.Create;     response := HTTP.Post(API_URL + 'Check', json_stream);     Log(response);      json_response := (TJSONObject.ParseJSONValue(response) as TJSONObject);     if (json_response.GetValue('Data') &lt;> nil) then     begin       json_data := (json_response.GetValue('Data') as TJSONObject);        answer.check_number := json_data.GetValue('CheckNumber').Value;       answer.date_time := json_data.GetValue('DateTime').Value;       answer.offline_mode := StrToBool(json_data.GetValue('OfflineMode').Value);        cashbox_json := (json_data.GetValue('Cashbox') as TJSONObject);        answer.cashbox := Tcashbox.Create;       answer.cashbox.Unique_Number :=         cashbox_json.GetValue('UniqueNumber').Value;       answer.cashbox.Registration_Number :=         cashbox_json.GetValue('RegistrationNumber').Value;       answer.cashbox.Identity_Number :=         cashbox_json.GetValue('IdentityNumber').Value;       answer.cashbox.Address := cashbox_json.GetValue('Address').Value;        answer.CheckOrderNumber :=         StrToInt(json_data.GetValue('CheckOrderNumber').Value);       answer.ShiftNumber := StrToInt(json_data.GetValue('ShiftNumber').Value);       answer.EmployeeName := json_data.GetValue('EmployeeName').Value;       answer.TicketUrl := json_data.GetValue('TicketUrl').Value;      end     else     begin       \/\/ error code     ShowMessage(response);     end;    finally     Result := answer;     json_stream.Free;     json_response.Free;   end;  end;<\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e ZX \u041e\u0442\u0447\u0435\u0442\u0430\u043c<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.ZReport(Token: String; CassaNumber: String): TZXReport; var   json_obj,   json_data,   json_response,   json_ennon: TJSONObject;   json_stream: TStringStream;   response: String;   res : TZXReport;   sell,   buy :TSellBuy;   i : Integer;   sell_js_arr : TJSONArray;   type_pay : Integer; begin  try   DialogProgress;   json_obj := TJSONObject.Create;     res := TZXReport.Create;    json_obj.AddPair('Token', Token);   json_obj.AddPair('CashBoxUniqueNumber', CassaNumber);    json_stream := TStringStream.Create(json_obj.ToJSON);   response := HTTP.Post(API_URL + 'ZReport', json_stream);    Log(response);   json_response := (TJSONObject.ParseJSONValue(response) as TJSONObject);   if (json_response.GetValue('Data') &lt;> nil) then     begin       json_data := (json_response.GetValue('Data') as TJSONObject);       res.ReportNumber := StrToInt(json_data.GetValue('ReportNumber').Value);       res.TaxPayerName := json_data.GetValue('TaxPayerName').Value;       res.TaxPayerIN := json_data.GetValue('TaxPayerIN').Value;       res.TaxPayerVAT := StrToBool(json_data.GetValue('TaxPayerVAT').Value);       res.TaxPayerVATSeria := json_data.GetValue('TaxPayerVATSeria').Value;       res.TaxPayerVATNumber := json_data.GetValue('TaxPayerVATNumber').Value;       res.CashBoxSN := json_data.GetValue('CashboxSN').Value;       res.CashBoxIN := json_data.GetValue('CashboxIN').Value;       res.CashBoxRN := json_data.GetValue('CashboxRN').Value;       res.StartOn := json_data.GetValue('StartOn').Value;       res.ReportOn := json_data.GetValue('ReportOn').Value;       res.CloseOn := json_data.GetValue('CloseOn').Value;       res.CashierCode := StrToInt(json_data.GetValue('CashierCode').Value);       res.ShiftNumber := StrToInt(json_data.GetValue('ShiftNumber').Value);       res.DocumentCount := StrToInt(json_data.GetValue('DocumentCount').Value);       res.PutMoneySum := StrToFloat(json_data.GetValue('PutMoneySum').Value);       res.TakeMoneySum := StrToFloat(json_data.GetValue('TakeMoneySum').Value);       res.ControlSum := (json_data.GetValue('ControlSum').Value);       res.OfflineMode := StrToBool(json_data.GetValue('OfflineMode').Value);       res.CashBoxOfflineMode := StrToBool(json_data.GetValue('CashboxOfflineMode').Value);       res.SumInCashbox := StrToFloat(json_data.GetValue('SumInCashbox').Value);       sell_js_arr :=(TJSONObject(json_data.GetValue('Sell')).GetValue('PaymentsByTypesApiModel') as TJSONArray);      res.Sell := TList.Create;      for i := 0 to sell_js_arr.Count-1 do         begin         sell := TSellBuy.Create;          sell.Sum := StrToFloat(TJSONObject(sell_js_arr.Items[i]).GetValue('Sum').Value);        type_pay := StrToInt(TJSONObject(sell_js_arr.Items[i]).GetValue('Type').Value);         case type_pay of        0 : sell.PaymentTypeName := '\u041d\u0430\u043b\u0438\u0447\u043d\u044b\u0435';        1 : sell.PaymentTypeName := '\u0411\u0430\u043d\u043a\u043e\u0432\u0441\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0430';        2 : sell.PaymentTypeName := '\u041e\u043f\u043b\u0430\u0442\u0430 \u0432 \u043a\u0440\u0435\u0434\u0438\u0442';        3 : sell.PaymentTypeName := '\u041e\u043f\u043b\u0430\u0442\u0430 \u0442\u0430\u0440\u043e\u0439';        end;            res.Sell.Add(sell);         end;       res.EndNonNullable.Sell := StrToFloat(TJSONObject(json_data.GetValue('EndNonNullable')).GetValue('Sell').Value);      res.EndNonNullable.Buy := StrToFloat(TJSONObject(json_data.GetValue('EndNonNullable')).GetValue('Buy').Value);      res.EndNonNullable.ReturnSell := StrToFloat(TJSONObject(json_data.GetValue('EndNonNullable')).GetValue('ReturnSell').Value);      res.EndNonNullable.ReturnBuy := StrToFloat(TJSONObject(json_data.GetValue('EndNonNullable')).GetValue('ReturnBuy').Value);       res.StartNonNullable.Sell := StrToFloat(TJSONObject(json_data.GetValue('StartNonNullable')).GetValue('Sell').Value);      res.StartNonNullable.Buy := StrToFloat(TJSONObject(json_data.GetValue('StartNonNullable')).GetValue('Buy').Value);      res.StartNonNullable.ReturnSell := StrToFloat(TJSONObject(json_data.GetValue('StartNonNullable')).GetValue('ReturnSell').Value);      res.StartNonNullable.ReturnBuy := StrToFloat(TJSONObject(json_data.GetValue('StartNonNullable')).GetValue('ReturnBuy').Value);    \/\/  res.ReturnSell.Add();     end    else    begin      ShowMessage(response);    end;  finally   Result := res;   CloseDialog; end;  end;<\/code><\/pre>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f OOFD<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">if(not Assigned(OOFD))then   OOFD := TOOFD.Create;  sum := StrToFloat(edt_sum.Text);  moneyOperation := OOFD.MoneyOperation(MainForm.WEBCASSA_HASH_KEY,UniqueNumberSelect,0,sum,'');  LoadReport(326);   frxReport1.Variables['SNCASSA']:=QuotedStr(moneyOperation.CashBox.Unique_Number);   frxReport1.Variables['REGNUMCASSA']:=QuotedStr(moneyOperation.CashBox.Registration_Number);    frxReport1.Variables['SUMOPER']:=QuotedStr(FloatToStr(sum));     frxReport1.Variables['SUMMA']:=QuotedStr(FloatToStr(moneyOperation.Sum));      frxReport1.Variables['ZAVNUMCASSA']:=QuotedStr(moneyOperation.CashBox.Identity_Number);   ShowReport;<\/code><\/pre>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/685648\/\"> https:\/\/habr.com\/ru\/post\/685648\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0421\u0432\u043e\u0438 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 \u041e\u041e\u0424 \u041a\u0430\u0437\u0430\u043a\u0422\u0435\u043b\u0435\u043a\u043e\u043c<\/h2>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type TSellBuy = class(TObject)   Sum : Double;   PaymentType : Integer;   PaymentTypeName : String; end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TNonNullableType = record   Sell : Double;   Buy : Double;   ReturnSell : Double;   ReturnBuy : Double;  end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 ZX \u043e\u0442\u0447\u0435\u0442\u0430 <\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type TZXReport = class(TObject)   ReportNumber : Integer;   TaxPayerName :  String;   TaxPayerIN : String;   TaxPayerVAT : Boolean;   TaxPayerVATSeria : String;   TaxPayerVATNumber : String;   CashBoxSN : String;   CashBoxIN : String;   CashBoxRN : String;   StartOn : String;   ReportOn : String;   CloseOn : String;   CashierCode : Integer;   ShiftNumber : Integer;   DocumentCount : Integer;   PutMoneySum : Double;   TakeMoneySum : Double;   ControlSum : String;   OfflineMode : Boolean;   CashBoxOfflineMode : Boolean;   SumInCashbox  : Double;   Sell : TList;{ of TSellBuy;}   Buy : TList {of TSellBuy;};   ReturnSell : TList {of TSellBuy;};   ReturnBuy : TList {of TSellBuy;};    StartNonNullable : TNonNullableType;    EndNonNullable : TNonNullableType;  end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TControlTape = class(TObject)   OperationTypeText : String;   Sum : Double;   Date : String;   EmployeeCode : Integer;   Number : String;   isOffline : Boolean;   ExternalOperationId : String; end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u0442\u0438\u043f \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u0430\u0441\u0441\u044b, \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u044d\u0442\u043e\u0442 \u0442\u0438\u043f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0442\u043e\u0431\u044b \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0438 \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0439 \u0441\u043c\u0435\u043d\u044b \u043a\u0430\u0441\u0441\u044b<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   TCassa = class(Tobject)     UniqueNumber: String;     RegistrationNumber: String;     IdentificationNumber: String;     Name: String;     Description: String;     IsOffline: Boolean;     CurrentStatus: Integer;     Shift: Integer;   end;<\/code><\/pre>\n<blockquote>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439, \u0447\u0442\u043e\u0431\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 <\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   Tpayment = class(Tobject)     Sum: double;     PaymentType: LongInt;    end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   Tposition = class(Tobject)     Count: double;     Price: double;     Tax: double;     TaxType: LongInt;     PositionName: String;     PositionCode: double;     Discount: double;     Markup: double;     SectionCode: String;     IsStorno: Boolean;      UnitCode: Integer;   end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   TSendCheck = class(Tobject)   public     Token: String;     CashboxUniqueNumber: String;     OperationType: LongInt;     Position: TJSONArray;     Payment: TJSONArray;     Change: double;     RoundType: Integer;     ExternalCheckNumber: String;     CustomerEmail: String;    end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   Tcashbox = class(Tobject)     Unique_Number: String;     Registration_Number: String;     Identity_Number: String;     Address: String;   end;<\/code><\/pre>\n<pre><code class=\"delphi\">type TMoneyOperation = class(TObject)   OfflineMode : Boolean;   CashBoxOfflineMode : Boolean;   DateTime : String;   Sum : Double;   CashBox : Tcashbox; end;<\/code><\/pre>\n<pre><code class=\"delphi\">type   TAnswerCheck = class(Tobject)   public   var     check_number: String;     date_time: String;     offline_mode: Boolean;     cashbox: Tcashbox;     CheckOrderNumber: Integer;     ShiftNumber: Integer;     EmployeeName: String;     TicketUrl: String;   end;<\/code><\/pre>\n<blockquote>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043d\u0435\u0433\u043e \u043d\u0430\u0448\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">type   TOOFD = class(Tobject)    private const     API_URL = 'https:\/\/devkkm.webkassa.kz\/api\/';    var     HTTP: TIdHTTP;     SSLIO: TIdSSLIOHandlerSocketOpenSSL;    public     constructor Create();     destructor Destroy();<\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0432 \u043d\u0430\u0448 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0442\u0438\u043f \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u041a\u041a\u041c \u0441\u0438\u0441\u0442\u0435\u043c\u0435, \u0442\u0443\u0442 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f REST API \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443, \u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043a\u0435\u043d, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.Autorize(login: String; passwd: String): String; var   json_stream: TStringStream;   json_obj: TJSONObject;   json_pair: TJSONPair;   response: String;   Token: String;   json_response: TJSONObject; begin   try     begin         Token := '';       json_obj := TJSONObject.Create;       json_pair := TJSONPair.Create('Login', login);       json_obj.AddPair(json_pair);       json_pair := TJSONPair.Create('Password', passwd);       json_obj.AddPair(json_pair);        json_stream := TStringStream.Create(json_obj.ToJSON);        response := HTTP.Post(API_URL + 'Authorize', json_stream);       json_response := TJSONObject.ParseJSONValue(response) as TJSONObject;       if (json_response.GetValue('Data') &lt;> nil) then       begin         Token := (json_response.GetValue('Data') as TJSONObject)           .GetValue('Token').Value;        end       else       begin         \/\/ error code        ShowMessage(response);        Log(response);       end;      end;   finally     Result := Token;     json_obj.Free;     json_stream.Free;    end;  end; <\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u043a \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0432 \u041e\u041e\u0424\u0414, \u0442\u0443\u0442 \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0447\u0442\u043e \u0447\u0435\u043a \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043a\u0430\u043a &#171;\u0427\u0415\u041a \u041f\u041e\u041a\u0423\u041f\u041a\u0418&#187; \u0442\u0430\u043a \u0438 &#171;\u0427\u0415\u041a \u0412\u041e\u0417\u0412\u0420\u0410\u0422\u0410&#187; , \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e <\/p>\n<p>1.\u041d\u0430\u0448 \u0442\u043e\u043a\u0435\u043d &#8212; \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043f\u0440\u0438 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438<\/p>\n<p>2. \u041d\u0430\u0448 \u043d\u043e\u043c\u0435\u0440 \u043a\u0430\u0441\u0441\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u041e\u041e\u0424\u0414<\/p>\n<p>3. \u0412\u0438\u0434 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 (\u043f\u043e\u043a\u0443\u043f\u043a\u0430 \u0438\u043b\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0442)<\/p>\n<p>4. \u041f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u0447\u0435\u043a\u0435 &#8212; \u0442\u043e\u0432\u0430\u0440\u044b \u0438\u043b\u0438 \u0443\u0441\u043b\u0443\u0433\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u0440\u043e\u0434\u0430\u0435\u043c \u0438\u043b\u0438 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0434\u0435\u043b\u0430\u0435\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442<\/p>\n<p>5. \u041e\u043f\u043b\u0430\u0442\u044b \u0438\u043b\u0438 \u0412\u043e\u0437\u0432\u0440\u0430\u0442\u044b \u0441\u0443\u043c\u043c\u0430 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/p>\n<p>\u042d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u041a\u041a\u041c \u041e\u041e\u0424\u0414, <\/p>\n<p>\u0432 \u043e\u0442\u0432\u0435\u0442 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0442\u0438\u043f \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u043f\u0438\u0441\u0430\u043b\u0438 \u0440\u0430\u043d\u0435\u0435  <strong>type<\/strong>   <strong>TAnswerCheck<\/strong><\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.Check(SendCheck: TSendCheck): TAnswerCheck; var   json_stream, jsst: TStringStream;   json_obj: TJSONObject;   json_pair: TJSONPair;   response: String;   json_response: TJSONObject;   json_data: TJSONObject;   answer: TAnswerCheck;   cashbox: Tcashbox;   cashbox_json: TJSONObject;   js_str: String; begin   try      json_obj := TJSONObject.Create;      json_obj.AddPair('Token', SendCheck.Token);     json_obj.AddPair('CashBoxUniqueNumber', SendCheck.CashboxUniqueNumber);     json_obj.AddPair('OperationType',       TJSONNumber.Create(SendCheck.OperationType));     json_obj.AddPair('Positions', SendCheck.Position);     json_obj.AddPair('Payments', SendCheck.Payment);      json_stream := TStringStream.Create(json_obj.ToJSON);      answer := TAnswerCheck.Create;     response := HTTP.Post(API_URL + 'Check', json_stream);     Log(response);      json_response := (TJSONObject.ParseJSONValue(response) as TJSONObject);     if (json_response.GetValue('Data') &lt;> nil) then     begin       json_data := (json_response.GetValue('Data') as TJSONObject);        answer.check_number := json_data.GetValue('CheckNumber').Value;       answer.date_time := json_data.GetValue('DateTime').Value;       answer.offline_mode := StrToBool(json_data.GetValue('OfflineMode').Value);        cashbox_json := (json_data.GetValue('Cashbox') as TJSONObject);        answer.cashbox := Tcashbox.Create;       answer.cashbox.Unique_Number :=         cashbox_json.GetValue('UniqueNumber').Value;       answer.cashbox.Registration_Number :=         cashbox_json.GetValue('RegistrationNumber').Value;       answer.cashbox.Identity_Number :=         cashbox_json.GetValue('IdentityNumber').Value;       answer.cashbox.Address := cashbox_json.GetValue('Address').Value;        answer.CheckOrderNumber :=         StrToInt(json_data.GetValue('CheckOrderNumber').Value);       answer.ShiftNumber := StrToInt(json_data.GetValue('ShiftNumber').Value);       answer.EmployeeName := json_data.GetValue('EmployeeName').Value;       answer.TicketUrl := json_data.GetValue('TicketUrl').Value;      end     else     begin       \/\/ error code     ShowMessage(response);     end;    finally     Result := answer;     json_stream.Free;     json_response.Free;   end;  end;<\/code><\/pre>\n<blockquote>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e ZX \u041e\u0442\u0447\u0435\u0442\u0430\u043c<\/p>\n<\/blockquote>\n<pre><code class=\"delphi\">function TOOFD.ZReport(Token: String; CassaNumber: String): TZXReport; var   json_obj,   json_data,   json_response,   json_ennon: TJSONObject;   json_stream: TStringStream;   response: String;   res : TZXReport;   sell,   buy :TSellBuy;   i : Integer;   sell_js_arr : TJSONArray;   type_pay : Integer; begin  try   DialogProgress;   json_obj := TJSONObject.Create;     res := TZXReport.Create;    json_obj.AddPair('Token', Token);   json_obj.AddPair('CashBoxUniqueNumber', CassaNumber);    json_stream := TStringStream.Create(json_obj.ToJSON);   response := HTTP.Post(API_URL + 'ZReport', json_stream);    Log(response);   json_response := (TJSONObject.ParseJSONValue(response) as TJSONObject);   if (json_response.GetValue('Data') &lt;> nil) then     begin       json_data := (json_response.GetValue('Data') as TJSONObject);       res.ReportNumber := StrToInt(json_data.GetValue('ReportNumber').Value);       res.TaxPayerName := json_data.GetValue('TaxPayerName').Value;       res.TaxPayerIN := json_data.GetValue('TaxPayerIN').Value;       res.TaxPayerVAT := StrToBool(json_data.GetValue('TaxPayerVAT').Value);       res.TaxPayerVATSeria := json_data.GetValue('TaxPayerVATSeria').Value;       res.TaxPayerVATNumber := json_data.GetValue('TaxPayerVATNumber').Value;       res.CashBoxSN := json_data.GetValue('CashboxSN').Value;       res.CashBoxIN := json_data.GetValue('CashboxIN').Value;       res.CashBoxRN := json_data.GetValue('CashboxRN').Value;       res.StartOn := json_data.GetValue('StartOn').Value;       res.ReportOn := json_data.GetValue('ReportOn').Value;       res.CloseOn := json_data.GetValue('CloseOn').Value;       res.CashierCode := StrToInt(json_data.GetValue('CashierCode').Value);       res.ShiftNumber := StrToInt(json_data.GetValue('ShiftNumber').Value);       res.DocumentCount := StrToInt(json_data.GetValue('DocumentCount').Value);       res.PutMoneySum := StrToFloat(json_data.GetValue('PutMoneySum').Value);       res.TakeMoneySum := StrToFloat(json_data.GetValue('TakeMoneySum').Value);       res.ControlSum := (json_data.GetValue('ControlSum').Value);       res.OfflineMode := StrToBool(json_data.GetValue('OfflineMode').Value);       res.CashBoxOfflineMode := StrToBool(json_data.GetValue('CashboxOfflineMode').Value);       res.SumInCashbox := StrToFloat(json_data.GetValue('SumInCashbox').Value);       sell_js_arr :=(TJSONObject(json_data.GetValue('Sell')).GetValue('PaymentsByTypesApiModel') as TJSONArray);      res.Sell<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-337771","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337771","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=337771"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337771\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337771"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337771"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337771"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}