307 lines
8.7 KiB
JSON
307 lines
8.7 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "printer/v1/pdf_invoice.proto",
|
|
"version": "version not set"
|
|
},
|
|
"tags": [
|
|
{
|
|
"name": "PrinterService"
|
|
}
|
|
],
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"paths": {
|
|
"/v1/printer/invoice": {
|
|
"post": {
|
|
"operationId": "PrinterService_InvoiceGen",
|
|
"responses": {
|
|
"200": {
|
|
"description": "A successful response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/invoiceDocumentResponse"
|
|
}
|
|
},
|
|
"default": {
|
|
"description": "An unexpected error response.",
|
|
"schema": {
|
|
"$ref": "#/definitions/rpcStatus"
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/invoiceInvoice"
|
|
}
|
|
}
|
|
],
|
|
"tags": [
|
|
"PrinterService"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"invoiceDocumentResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"document": {
|
|
"type": "string",
|
|
"format": "byte"
|
|
},
|
|
"signature": {
|
|
"type": "string"
|
|
},
|
|
"sha512": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "PDF Response"
|
|
},
|
|
"invoiceInvoice": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": {
|
|
"$ref": "#/definitions/invoiceOrderInfo"
|
|
},
|
|
"offer": {
|
|
"$ref": "#/definitions/invoiceOfferInfo"
|
|
},
|
|
"info": {
|
|
"$ref": "#/definitions/invoiceInvoiceInfo"
|
|
}
|
|
},
|
|
"title": "Invoice"
|
|
},
|
|
"invoiceInvoiceInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"invoiceId": {
|
|
"type": "string"
|
|
},
|
|
"invoiceDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
},
|
|
"invoiceDueDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
},
|
|
"invoiceType": {
|
|
"$ref": "#/definitions/invoiceInvoiceType"
|
|
}
|
|
}
|
|
},
|
|
"invoiceInvoiceType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"INVOICE_TYPE_UNSPECIFIED",
|
|
"INVOICE_TYPE_PAID",
|
|
"INVOICE_TYPE_OPEN"
|
|
],
|
|
"default": "INVOICE_TYPE_UNSPECIFIED",
|
|
"description": "PaymentProvider represents the supported set\nof payment providers."
|
|
},
|
|
"invoiceOfferInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"offerId": {
|
|
"type": "string"
|
|
},
|
|
"offerDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
},
|
|
"offerDueDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
}
|
|
}
|
|
},
|
|
"invoiceOrderInfo": {
|
|
"type": "object",
|
|
"properties": {
|
|
"orderId": {
|
|
"type": "string"
|
|
},
|
|
"orderDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
},
|
|
"orderDueDate": {
|
|
"$ref": "#/definitions/typeDateTime"
|
|
},
|
|
"orderType": {
|
|
"$ref": "#/definitions/invoiceOrderType"
|
|
},
|
|
"orderItems": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/invoiceOrderItem"
|
|
}
|
|
},
|
|
"orderVatItems": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/invoiceOrderVatItem"
|
|
}
|
|
},
|
|
"deposit": {
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
},
|
|
"invoiceOrderItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"vat": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"count": {
|
|
"type": "string",
|
|
"format": "uint64"
|
|
},
|
|
"priceSingle": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"priceSum": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"priceNet": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"invoiceOrderType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ORDER_TYPE_UNSPECIFIED",
|
|
"ORDER_TYPE_PHONE",
|
|
"ORDER_TYPE_WWW",
|
|
"ORDER_TYPE_EMAIL"
|
|
],
|
|
"default": "ORDER_TYPE_UNSPECIFIED"
|
|
},
|
|
"invoiceOrderVatItem": {
|
|
"type": "object",
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"vat": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"vatMoneySum": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"itemsCount": {
|
|
"type": "string",
|
|
"format": "uint64"
|
|
}
|
|
}
|
|
},
|
|
"protobufAny": {
|
|
"type": "object",
|
|
"properties": {
|
|
"@type": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": {}
|
|
},
|
|
"rpcStatus": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer",
|
|
"format": "int32"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"details": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/protobufAny"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"typeDateTime": {
|
|
"type": "object",
|
|
"properties": {
|
|
"year": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a\ndatetime without a year."
|
|
},
|
|
"month": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Month of year. Must be from 1 to 12."
|
|
},
|
|
"day": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Day of month. Must be from 1 to 31 and valid for the year and\nmonth."
|
|
},
|
|
"hours": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Hours of day in 24 hour format. Should be from 0 to 23. An API\nmay choose to allow the value \"24:00:00\" for scenarios like business\nclosing time."
|
|
},
|
|
"minutes": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Minutes of hour of day. Must be from 0 to 59."
|
|
},
|
|
"seconds": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Seconds of minutes of the time. Must normally be from 0 to 59. An\nAPI may allow the value 60 if it allows leap-seconds."
|
|
},
|
|
"nanos": {
|
|
"type": "integer",
|
|
"format": "int32",
|
|
"description": "Required. Fractions of seconds in nanoseconds. Must be from 0 to\n999,999,999."
|
|
},
|
|
"utcOffset": {
|
|
"type": "string",
|
|
"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours.\nFor example, a UTC offset of -4:00 would be represented as\n{ seconds: -14400 }."
|
|
},
|
|
"timeZone": {
|
|
"$ref": "#/definitions/typeTimeZone",
|
|
"description": "Time zone."
|
|
}
|
|
},
|
|
"description": "Represents civil time (or occasionally physical time).\n\nThis type can represent a civil time in one of a few possible ways:\n\n * When utc_offset is set and time_zone is unset: a civil time on a calendar\n day with a particular offset from UTC.\n * When time_zone is set and utc_offset is unset: a civil time on a calendar\n day in a particular time zone.\n * When neither time_zone nor utc_offset is set: a civil time on a calendar\n day in local time.\n\nThe date is relative to the Proleptic Gregorian Calendar.\n\nIf year is 0, the DateTime is considered not to have a specific year. month\nand day must have valid, non-zero values.\n\nThis type may also be used to represent a physical time if all the date and\ntime fields are set and either case of the `time_offset` oneof is set.\nConsider using `Timestamp` message for physical time instead. If your use\ncase also would like to store the user's timezone, that can be done in\nanother field.\n\nThis type is more flexible than some applications may want. Make sure to\ndocument and validate your application's limitations."
|
|
},
|
|
"typeTimeZone": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\"."
|
|
},
|
|
"version": {
|
|
"type": "string",
|
|
"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\"."
|
|
}
|
|
},
|
|
"description": "Represents a time zone from the\n[IANA Time Zone Database](https://www.iana.org/time-zones)."
|
|
}
|
|
}
|
|
}
|