diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index ea274835b..6312e582c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -79,3 +79,4 @@ jobs: composer openapi:generate git update-index --refresh || printf '' git diff-index "${{ github.sha }}" --quiet -- src/Resources/app/administration/src/types/openapi.d.ts || (echo "Please run 'composer openapi:generate' to update openapi.d.ts" && exit 1) + git diff-index "${{ github.sha }}" --quiet -- src/Resources/Schema || (echo "Please run 'composer openapi:generate' to update Resources/Schema files" && exit 1) diff --git a/src/Checkout/ExpressCheckout/SalesChannel/ExpressCategoryRoute.php b/src/Checkout/ExpressCheckout/SalesChannel/ExpressCategoryRoute.php index 26ea421ca..35ad38c9c 100644 --- a/src/Checkout/ExpressCheckout/SalesChannel/ExpressCategoryRoute.php +++ b/src/Checkout/ExpressCheckout/SalesChannel/ExpressCategoryRoute.php @@ -44,26 +44,6 @@ public function getDecorated(): AbstractCategoryRoute return $this->inner; } - #[OA\Post( - path: '/store-api/category/{navigationId}', - operationId: 'readCategory', - description: 'This endpoint returns information about the category, as well as a fully resolved (hydrated with mapping values) CMS page, if one is assigned to the category. You can pass slots which should be resolved exclusively.', - tags: ['Store API', 'Category'], - parameters: [ - new OA\Parameter( - name: 'navigationId', - description: 'Identifier of the navigation to be fetched', - in: 'path', - required: true, - schema: new OA\Schema(type: 'string', pattern: '^[0-9a-f]{32}$') - ), - ], - responses: [new OA\Response( - ref: '#/components/schemas/category_flat', - response: Response::HTTP_OK, - description: 'The loaded category with cms page' - )] - )] #[Route(path: '/store-api/category/{navigationId}', name: 'store-api.category.detail', methods: ['GET', 'POST'])] public function load(string $navigationId, Request $request, SalesChannelContext $context): CategoryRouteResponse { diff --git a/src/DevOps/Command/GenerateOpenApi.php b/src/DevOps/Command/GenerateOpenApi.php index 4a13bfc23..82aa79df3 100644 --- a/src/DevOps/Command/GenerateOpenApi.php +++ b/src/DevOps/Command/GenerateOpenApi.php @@ -15,8 +15,10 @@ use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Logger\ConsoleLogger; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Style\SymfonyStyle; #[AsCommand( name: 'swag:paypal:openapi:generate', @@ -26,6 +28,8 @@ class GenerateOpenApi extends Command { private const ROOT_DIR = __DIR__ . '/../../..'; + private const STORE_API_DIR = self::ROOT_DIR . '/src/Resources/Schema/StoreApi'; + private const ADMIN_API_DIR = self::ROOT_DIR . '/src/Resources/Schema/AdminApi'; protected function execute(InputInterface $input, OutputInterface $output): int { @@ -36,28 +40,88 @@ protected function execute(InputInterface $input, OutputInterface $output): int ->add(new PayPalApiStructSnakeCasePropertiesProcessor()) ->add(new RequireNonOptionalPropertiesProcessor()); - $openApi = $generator->setProcessorPipeline($pipeline)->generate([ - Util::finder( - self::ROOT_DIR . '/src', - [self::ROOT_DIR . '/src/DevOps', self::ROOT_DIR . '/src/Resources'] // ignored directories - ), - ]); + $generator = $generator->setProcessorPipeline($pipeline); + + $storeApi = $input->getOption('store-api'); + $adminApi = $input->getOption('admin-api'); + $style = new SymfonyStyle($input, $output); + + try { + if ($storeApi) { + $this->generateStoreApiSchema($style, $generator); + } + + if ($adminApi) { + $this->generateAdminApiSchema($style, $generator); + } + } catch (\RuntimeException $e) { + $style->error($e->getMessage()); + + return Command::FAILURE; + } + + return Command::SUCCESS; + } + + protected function generateStoreApiSchema(SymfonyStyle $style, Generator $generator): void + { + $file = \realpath(self::STORE_API_DIR . '/openapi.json'); + \assert($file !== false); + + if (!\is_dir(self::STORE_API_DIR)) { + throw new \RuntimeException('Failed to find Store API directory at: ' . self::STORE_API_DIR); + } + + $openApi = $generator->generate([ + Util::finder(self::ROOT_DIR . '/src/RestApi'), + Util::finder(self::ROOT_DIR . '/src/Checkout'), + ])?->toJson(); if ($openApi === null) { - // @phpstan-ignore-next-line - throw new \RuntimeException('Failed to generate OpenAPI schema'); + throw new \RuntimeException('Failed to generate OpenAPI schema for Store API'); } - $cacheDir = self::ROOT_DIR . '/var/cache'; + if (\file_put_contents($file, $openApi) === false) { + throw new \RuntimeException('Failed to write Store API schema to: ' . $file); + } + + $style->success('Written Store API schema to: ' . $file); + } + + protected function generateAdminApiSchema(SymfonyStyle $style, Generator $generator): void + { + $file = \realpath(self::ADMIN_API_DIR . '/openapi.json'); + \assert($file !== false); + + if (!\is_dir(self::ADMIN_API_DIR)) { + throw new \RuntimeException('Failed to find Admin API directory at: ' . self::ADMIN_API_DIR); + } + + $openApi = $generator->generate([ + Util::finder(self::ROOT_DIR . '/src/RestApi'), + Util::finder(self::ROOT_DIR . '/src/Administration'), + Util::finder(self::ROOT_DIR . '/src/Dispute'), + Util::finder(self::ROOT_DIR . '/src/OrdersApi'), + Util::finder(self::ROOT_DIR . '/src/PaymentsApi'), + Util::finder(self::ROOT_DIR . '/src/Pos'), + Util::finder(self::ROOT_DIR . '/src/Setting'), + Util::finder(self::ROOT_DIR . '/src/Webhook'), + ])?->toJson(); - if (!\is_dir($cacheDir) && !\mkdir($cacheDir, 0777, true)) { - echo 'Failed to create var/cache directory'; + if ($openApi === null) { + throw new \RuntimeException('Failed to generate OpenAPI schema for Admin API'); + } - return 1; + if (\file_put_contents($file, $openApi) === false) { + throw new \RuntimeException('Failed to write Admin API schema to: ' . $file); } - \file_put_contents($cacheDir . '/openapi.yaml', $openApi->toYaml()); + $style->success('Written Admin API schema to: ' . $file); + } - return 0; + protected function configure(): void + { + $this->addOption('store-api', null, InputOption::VALUE_NEGATABLE, 'Generate store-api schema into src/Resources/Schema/StoreApi', true); + $this->addOption('admin-api', null, InputOption::VALUE_NEGATABLE, 'Generate store-api schema into src/Resources/Schema/AdminApi', true); } } diff --git a/src/Resources/Schema/AdminApi/openapi.json b/src/Resources/Schema/AdminApi/openapi.json new file mode 100644 index 000000000..1a88ce592 --- /dev/null +++ b/src/Resources/Schema/AdminApi/openapi.json @@ -0,0 +1,6885 @@ +{ + "openapi": "3.0.0", + "paths": { + "/api/_action/paypal/saleschannel-default": { + "post": { + "tags": [ + "Admin Api", + "SwagPayPalPaymentMethod" + ], + "description": "Sets PayPal as the default payment method for a given Saleschannel, or all.", + "operationId": "setPayPalAsDefault", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "salesChannelId": { + "description": "The id of the Saleschannel where PayPal should be set as the default payment method. Set to null to set PayPal as default for every Saleschannel.", + "type": "string", + "nullable": true + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Setting PayPal as default was successful" + } + } + } + }, + "/api/paypal/dispute": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads a list of PayPal disputes", + "operationId": "disputeList", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "query", + "description": "ID of the sales channel to which the disputes belong", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "disputeStateFilter", + "name": "disputeStateFilter", + "in": "query", + "description": "Filter for dispute state. Separate multiple states with a comma. Must one of these values: Swag\\PayPal\\RestApi\\V1\\Api\\Disputes\\Item::DISPUTE_STATES", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "List of PayPal disputes", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes" + } + } + } + } + } + } + }, + "/api/paypal/dispute/{disputeId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the dispute details of the given PayPal dispute ID", + "operationId": "disputeDetails", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "query", + "description": "ID of the sales channel to which the disputes belong", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "disputeId", + "name": "disputeId", + "in": "path", + "description": "ID of the dispute", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal dispute", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item" + } + } + } + } + } + } + }, + "/api/paypal-v2/order/{orderTransactionId}/{paypalOrderId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the order details of the given PayPal order ID", + "operationId": "orderDetails", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "paypalOrderId", + "name": "paypalOrderId", + "in": "path", + "description": "ID of the PayPal order", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal order", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order" + } + } + } + } + } + } + }, + "/api/paypal-v2/authorization/{orderTransactionId}/{authorizationId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the authorization details of the given PayPal authorization ID", + "operationId": "authorizationDetails", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "authorizationId", + "name": "authorizationId", + "in": "path", + "description": "ID of the PayPal authorization", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal authorization", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_authorization" + } + } + } + } + } + } + }, + "/api/paypal-v2/capture/{orderTransactionId}/{captureId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the capture details of the given PayPal capture ID", + "operationId": "captureDetails", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "captureId", + "name": "captureId", + "in": "path", + "description": "ID of the PayPal capture", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal capture", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + } + } + } + } + } + } + }, + "/api/paypal-v2/refund/{orderTransactionId}/{refundId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the refund details of the given PayPal refund ID", + "operationId": "refundDetails", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "refundId", + "name": "refundId", + "in": "path", + "description": "ID of the PayPal refund", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal refund", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + } + } + } + } + } + } + }, + "/api/_action/paypal-v2/refund-capture/{orderTransactionId}/{captureId}/{paypalOrderId}": { + "post": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Refunds the PayPal capture and sets the state of the Shopware order transaction accordingly", + "operationId": "refundCapture", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "captureId", + "name": "captureId", + "in": "path", + "description": "ID of the PayPal capture", + "required": true, + "schema": { + "type": "string" + } + }, + { + "parameter": "paypalOrderId", + "name": "paypalOrderId", + "in": "path", + "description": "ID of the PayPal order", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "partnerAttributionId": { + "description": "Partner Attribution ID. See Swag\\PayPal\\RestApi\\PartnerAttributionId", + "type": "string" + }, + "amount": { + "description": "Amount which should be refunded", + "type": "string" + }, + "currency": { + "description": "Currency of the refund", + "type": "string" + }, + "invoiceNumber": { + "description": "Invoice number of the refund", + "type": "string" + }, + "noteToPayer": { + "description": "A note to the payer sent with the refund", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Details of the PayPal refund", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + } + } + } + } + } + } + }, + "/api/_action/paypal-v2/capture-authorization/{orderTransactionId}/{authorizationId}": { + "post": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Captures the PayPal authorization and sets the state of the Shopware order transaction accordingly", + "operationId": "captureAuthorization", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "authorizationId", + "name": "authorizationId", + "in": "path", + "description": "ID of the PayPal authorization", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "partnerAttributionId": { + "description": "Partner Attribution ID. See Swag\\PayPal\\RestApi\\PartnerAttributionId", + "type": "string" + }, + "amount": { + "description": "Amount which should be captured", + "type": "string" + }, + "currency": { + "description": "Currency of the capture", + "type": "string" + }, + "invoiceNumber": { + "description": "Invoice number of the capture", + "type": "string" + }, + "noteToPayer": { + "description": "A note to the payer sent with the capture", + "type": "string" + }, + "isFinal": { + "description": "Define if this is the final capture", + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Details of the PayPal capture", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + } + } + } + } + } + } + }, + "/api/_action/paypal-v2/void-authorization/{orderTransactionId}/{authorizationId}": { + "post": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Voids the PayPal authorization and sets the state of the Shopware order transaction accordingly", + "operationId": "voidAuthorization", + "parameters": [ + { + "parameter": "orderTransactionId", + "name": "orderTransactionId", + "in": "path", + "description": "ID of the order transaction which contains the PayPal payment", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "authorizationId", + "name": "authorizationId", + "in": "path", + "description": "ID of the PayPal authorization", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "partnerAttributionId": { + "description": "Partner Attribution ID. See Swag\\PayPal\\RestApi\\PartnerAttributionId", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Avoidance was successful" + } + } + } + }, + "/api/paypal/payment-details/{orderId}/{paymentId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the Payment details of the given PayPal ID", + "operationId": "paymentDetails", + "parameters": [ + { + "parameter": "orderId", + "name": "orderId", + "in": "path", + "description": "ID of the order which contains the PayPal payment", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "paymentId", + "name": "paymentId", + "in": "path", + "description": "ID of the PayPal payment", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal payment", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_payment" + } + } + } + } + } + } + }, + "/api/paypal/resource-details/{resourceType}/{resourceId}/{orderId}": { + "get": { + "tags": [ + "Admin API", + "PayPal" + ], + "description": "Loads the PayPal resource details of the given resource ID", + "operationId": "resourceDetails", + "parameters": [ + { + "parameter": "resourceType", + "name": "resourceType", + "in": "path", + "description": "Type of the resource. Possible values: sale, authorization, order, capture, refund", + "schema": { + "type": "string", + "enum": [ + "sale", + "authorize", + "order", + "capture" + ] + } + }, + { + "parameter": "resourceId", + "name": "resourceId", + "in": "path", + "description": "ID of the PayPal resource", + "schema": { + "type": "string" + } + }, + { + "parameter": "orderId", + "name": "orderId", + "in": "path", + "description": "ID of the order which contains the PayPal resource", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Details of the PayPal resource", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_sale" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_authorization" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_order" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_capture" + } + ] + } + } + } + } + } + } + }, + "/api/_action/paypal/refund-payment/{resourceType}/{resourceId}/{orderId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "paypalRefundPayment", + "parameters": [ + { + "parameter": "resourceType", + "name": "resourceType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "authorize", + "order" + ] + } + }, + { + "parameter": "resourceId", + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "parameter": "orderId", + "name": "orderId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Capture for the given resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_do_void" + } + } + } + } + } + } + }, + "/api/_action/paypal/capture-payment/{resourceType}/{resourceId}/{orderId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "paypalCapturePayment", + "parameters": [ + { + "parameter": "resourceType", + "name": "resourceType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "authorize", + "order" + ] + } + }, + { + "parameter": "resourceId", + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "parameter": "orderId", + "name": "orderId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Capture for the given resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_do_void" + } + } + } + } + } + } + }, + "/api/_action/paypal/void-payment/{resourceType}/{resourceId}/{orderId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "paypalVoidPayment", + "parameters": [ + { + "parameter": "resourceType", + "name": "resourceType", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "authorize", + "order" + ] + } + }, + { + "parameter": "resourceId", + "name": "resourceId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + }, + { + "parameter": "orderId", + "name": "orderId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Voidance for the given resource", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_do_void" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/sync/{salesChannelId}/products": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncProducts", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Run ID of the started sync process", + "content": { + "application/json": { + "schema": { + "properties": { + "runId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/sync/{salesChannelId}/images": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncImages", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Run ID of the started sync process", + "content": { + "application/json": { + "schema": { + "properties": { + "runId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/sync/{salesChannelId}/inventory": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncInventory", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Run ID of the started sync process", + "content": { + "application/json": { + "schema": { + "properties": { + "runId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/sync/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSync", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Run ID of the started sync process", + "content": { + "application/json": { + "schema": { + "properties": { + "runId": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/sync/abort/{runId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncAbort", + "parameters": [ + { + "parameter": "runId", + "name": "runId", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Abortion was successful" + } + } + } + }, + "/api/_action/paypal/pos/sync/reset/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncReset", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "204": { + "description": "Reset was successful" + } + } + } + }, + "/api/_action/paypal/pos/log/cleanup/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posSyncCleanup", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "204": { + "description": "Cleanup was successful" + } + } + } + }, + "/api/paypal/pos/product-log/{salesChannelId}": { + "get": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posProductLog", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "limit", + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10, + "minimum": 1 + } + }, + { + "parameter": "page", + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1, + "minimum": 1 + } + } + ], + "responses": { + "200": { + "description": "Product log of the sales channel" + } + } + } + }, + "/api/_action/paypal/pos/validate-api-credentials": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posValidateApiCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "apiKey": { + "type": "string" + }, + "salesChannelId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Validation result of the API credentials", + "content": { + "application/json": { + "schema": { + "properties": { + "credentialsValid": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/paypal/pos/fetch-information": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posFetchInformation", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "apiKey": { + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Fetched information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_pos_setting_additional_information" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/clone-product-visibility": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posCloneProductVisibility", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "fromSalesChannelId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + }, + "toSalesChannelId": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Cloning of product visibility was successful" + } + } + } + }, + "/api/paypal/pos/product-count": { + "get": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "posGetProductCounts", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "query", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + }, + { + "parameter": "cloneSalesChannelId", + "name": "cloneSalesChannelId", + "in": "query", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Product counts", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_pos_setting_product_count" + } + } + } + } + } + } + }, + "/api/_action/paypal/pos/webhook/registration/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "SwagPayPalPosWebhook" + ], + "operationId": "registerPosWebhook", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "204": { + "description": "Webhook registration was successful" + } + } + }, + "delete": { + "tags": [ + "Admin Api", + "SwagPayPalPosWebhook" + ], + "operationId": "deregisterPosWebhook", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "204": { + "description": "Webhook deregistration was successful" + } + } + } + }, + "/api/_action/paypal/pos/webhook/execute/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "SwagPayPalPosWebhook" + ], + "operationId": "executePosWebhook", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_pos_webhook" + } + } + } + }, + "responses": { + "204": { + "description": "Webhook execution was successful" + } + } + } + }, + "/api/_action/paypal/validate-api-credentials": { + "get": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "validateApiCredentials", + "parameters": [ + { + "name": "clientId", + "in": "query", + "description": "The client id of the PayPal API credentials", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clientSecret", + "in": "query", + "description": "The client secret of the PayPal API credentials", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sandboxActive", + "in": "query", + "description": "If the sandbox environment should be used", + "required": false, + "schema": { + "type": "boolean", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Returns if the provided API credentials are valid", + "content": { + "application/json": { + "schema": { + "properties": { + "credentialsValid": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/get-api-credentials": { + "post": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "getApiCredentials", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "authCode": { + "type": "string" + }, + "sharedId": { + "type": "string" + }, + "nonce": { + "type": "string" + }, + "sandboxActive": { + "type": "boolean" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the API credentials", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + } + }, + "/api/_action/paypal/merchant-information": { + "get": { + "tags": [ + "Admin Api", + "PayPal" + ], + "operationId": "getMerchantInformation", + "parameters": [ + { + "name": "salesChannelId", + "in": "query", + "description": "The id of the sales channel to get merchant information for", + "required": false, + "schema": { + "type": "string", + "nullable": true + } + } + ], + "responses": { + "200": { + "description": "Returns information about the merchant", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_setting_merchant_information" + } + } + } + } + } + } + }, + "/api/_action/paypal/webhook/status/{salesChannelId}": { + "get": { + "tags": [ + "Admin Api", + "SwagPayPalWebhook" + ], + "operationId": "getWebhookStatus", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Returns the status of the PayPal webhook", + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/webhook/register/{salesChannelId}": { + "post": { + "tags": [ + "Admin Api", + "SwagPayPalWebhook" + ], + "operationId": "registerWebhook", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Returns the action taken for the webhook registration", + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/webhook/deregister/{salesChannelId}": { + "delete": { + "tags": [ + "Admin Api", + "SwagPayPalWebhook" + ], + "operationId": "deregisterWebhook", + "parameters": [ + { + "parameter": "salesChannelId", + "name": "salesChannelId", + "in": "path", + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "Returns the action taken for the webhook deregistration", + "content": { + "application/json": { + "schema": { + "properties": { + "result": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/api/_action/paypal/webhook/execute": { + "post": { + "tags": [ + "Admin Api", + "SwagPayPalPosWebhook" + ], + "operationId": "executeWebhook", + "parameters": [ + { + "parameter": "sw-token", + "name": "sw-token", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/swag_paypal_v1_webhook" + } + } + } + }, + "responses": { + "204": { + "description": "Webhook execution was successful" + } + } + } + } + }, + "components": { + "schemas": { + "swag_paypal_v1_capture": { + "required": [ + "amount", + "is_final_capture", + "id", + "state", + "reason_code", + "parent_payment", + "transaction_fee", + "create_time", + "update_time", + "links" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "is_final_capture": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "reason_code": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_capture_transaction_fee" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_capture_transaction_fee": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + } + ] + }, + "swag_paypal_v1_client_token": { + "required": [ + "client_token", + "expires_in", + "expire_date_time" + ], + "properties": { + "client_token": { + "type": "string" + }, + "expires_in": { + "description": "The lifetime of the access token, in seconds.", + "type": "integer" + }, + "expire_date_time": { + "description": "Calculated expiration date", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_address": { + "required": [ + "line1", + "line2", + "city", + "country_code", + "postal_code", + "state", + "phone" + ], + "properties": { + "line1": { + "type": "string" + }, + "line2": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "state": { + "type": "string", + "nullable": true + }, + "phone": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_common_amount": { + "required": [ + "total", + "currency", + "details" + ], + "properties": { + "total": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/swag_paypal_v1_common_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_details": { + "required": [ + "subtotal", + "shipping", + "tax", + "handling_fee", + "shipping_discount", + "discount", + "insurance" + ], + "properties": { + "subtotal": { + "type": "string" + }, + "shipping": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "handling_fee": { + "type": "string" + }, + "shipping_discount": { + "type": "string" + }, + "discount": { + "type": "string" + }, + "insurance": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_link": { + "required": [ + "href", + "rel", + "method", + "enc_type" + ], + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "method": { + "type": "string" + }, + "enc_type": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_common_money": { + "required": [ + "value", + "currency_code" + ], + "properties": { + "value": { + "type": "string" + }, + "currency_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_value": { + "required": [ + "currency", + "value" + ], + "properties": { + "currency": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_create_webhooks": { + "required": [ + "url", + "event_types" + ], + "properties": { + "url": { + "type": "string" + }, + "event_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_create_webhooks_event_type" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_create_webhooks_event_type": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes": { + "required": [ + "items", + "links" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item" + }, + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_buyer": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_item": { + "required": [ + "item_id", + "item_description", + "item_quantity", + "partner_transaction_id", + "reason", + "dispute_amount", + "notes" + ], + "properties": { + "item_id": { + "type": "string" + }, + "item_description": { + "type": "string" + }, + "item_quantity": { + "type": "string" + }, + "partner_transaction_id": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "dispute_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "notes": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_product_details": { + "required": [ + "product_received", + "product_received_time", + "sub_reasons", + "purchase_url", + "return_details" + ], + "properties": { + "product_received": { + "type": "string" + }, + "product_received_time": { + "type": "string" + }, + "sub_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_sub_reason" + } + }, + "purchase_url": { + "type": "string" + }, + "return_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_return_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_return_details": { + "required": [ + "return_time", + "mode", + "receipt", + "return_confirmation_number", + "returned" + ], + "properties": { + "return_time": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "receipt": { + "type": "boolean" + }, + "return_confirmation_number": { + "type": "string" + }, + "returned": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_seller": { + "required": [ + "email", + "merchant_id", + "name" + ], + "properties": { + "email": { + "type": "string" + }, + "merchant_id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_service_details": { + "required": [ + "description", + "service_started", + "note", + "sub_reasons", + "purchase_url" + ], + "properties": { + "description": { + "type": "string" + }, + "service_started": { + "type": "string" + }, + "note": { + "type": "string" + }, + "sub_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_sub_reason" + } + }, + "purchase_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_sub_reason": { + "required": [ + "sub_reason" + ], + "properties": { + "sub_reason": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_transaction": { + "required": [ + "buyer_transaction_id", + "seller_transaction_id", + "reference_id", + "create_time", + "transaction_status", + "gross_amount", + "invoice_number", + "custom", + "buyer", + "seller", + "items" + ], + "properties": { + "buyer_transaction_id": { + "type": "string" + }, + "seller_transaction_id": { + "type": "string" + }, + "reference_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "transaction_status": { + "type": "string" + }, + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "invoice_number": { + "type": "string" + }, + "custom": { + "type": "string" + }, + "buyer": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_buyer" + }, + "seller": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_seller" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item": { + "required": [ + "dispute_id", + "create_time", + "update_time", + "disputed_transactions", + "reason", + "status", + "dispute_state", + "dispute_amount", + "external_reason_code", + "dispute_outcome", + "adjudications", + "money_movements", + "dispute_life_cycle_stage", + "dispute_channel", + "messages", + "extensions", + "evidences", + "buyer_response_due_date", + "seller_response_due_date", + "offer", + "refund_details", + "communication_details", + "partner_actions", + "supporting_info", + "links" + ], + "properties": { + "dispute_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "disputed_transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_disputed_transaction" + }, + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "dispute_state": { + "type": "string", + "enum": [ + "REQUIRED_ACTION", + "REQUIRED_OTHER_PARTY_ACTION", + "UNDER_PAYPAL_REVIEW", + "RESOLVED", + "OPEN_INQUIRIES", + "APPEALABLE" + ], + "nullable": true + }, + "dispute_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_dispute_amount" + }, + "external_reason_code": { + "type": "string", + "nullable": true + }, + "dispute_outcome": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_dispute_outcome" + } + ], + "nullable": true + }, + "adjudications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_adjudication" + } + }, + "money_movements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_money_movement" + } + }, + "dispute_life_cycle_stage": { + "type": "string" + }, + "dispute_channel": { + "type": "string", + "nullable": true + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_message" + }, + "nullable": true + }, + "extensions": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions" + }, + "evidences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence" + }, + "nullable": true + }, + "buyer_response_due_date": { + "type": "string", + "nullable": true + }, + "seller_response_due_date": { + "type": "string", + "nullable": true + }, + "offer": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_offer" + } + ], + "nullable": true + }, + "refund_details": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_refund_details" + } + ], + "nullable": true + }, + "communication_details": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_communication_details" + } + ], + "nullable": true + }, + "partner_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_partner_action" + }, + "nullable": true + }, + "supporting_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_supporting_info" + }, + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_adjudication": { + "required": [ + "type", + "adjudication_time", + "reason", + "dispute_life_cycle_stage" + ], + "properties": { + "type": { + "type": "string" + }, + "adjudication_time": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "dispute_life_cycle_stage": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_communication_details": { + "required": [ + "email", + "note", + "time_posted" + ], + "properties": { + "email": { + "type": "string" + }, + "note": { + "type": "string" + }, + "time_posted": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_dispute_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + ] + }, + "swag_paypal_v1_disputes_item_dispute_outcome": { + "required": [ + "outcome_code", + "amount_refunded" + ], + "properties": { + "outcome_code": { + "type": "string" + }, + "amount_refunded": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_disputed_transaction": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_transaction" + }, + { + "required": [ + "seller_protection_eligible" + ], + "properties": { + "seller_protection_eligible": { + "type": "boolean" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_disputes_item_evidence": { + "required": [ + "evidence_type", + "evidence_info", + "documents", + "notes", + "item_id" + ], + "properties": { + "evidence_type": { + "type": "string" + }, + "evidence_info": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info" + }, + "documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_document" + } + }, + "notes": { + "type": "string" + }, + "item_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_document": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info": { + "required": [ + "tracking_info", + "refund_ids" + ], + "properties": { + "tracking_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info_tracking_info" + } + }, + "refund_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info_refund_id" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info_refund_id": { + "required": [ + "refund_id" + ], + "properties": { + "refund_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info_tracking_info": { + "required": [ + "carrier_name", + "carrier_name_other", + "tracking_url", + "tracking_number" + ], + "properties": { + "carrier_name": { + "type": "string" + }, + "carrier_name_other": { + "type": "string" + }, + "tracking_url": { + "type": "string" + }, + "tracking_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions": { + "required": [ + "merchant_contacted", + "merchant_contacted_outcome", + "merchant_contacted_time", + "merchant_contacted_mode", + "buyer_contacted_time", + "buyer_contacted_channel", + "billing_dispute_properties", + "merchandize_dispute_properties" + ], + "properties": { + "merchant_contacted": { + "type": "boolean" + }, + "merchant_contacted_outcome": { + "type": "string" + }, + "merchant_contacted_time": { + "type": "string" + }, + "merchant_contacted_mode": { + "type": "string" + }, + "buyer_contacted_time": { + "type": "string" + }, + "buyer_contacted_channel": { + "type": "string" + }, + "billing_dispute_properties": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties" + }, + "merchandize_dispute_properties": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_merchandize_dispute_properties" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties": { + "required": [ + "duplicate_transaction", + "incorrect_transaction_amount", + "payment_by_other_means", + "credit_not_processed", + "canceled_recurring_billing" + ], + "properties": { + "duplicate_transaction": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_duplicate_transaction" + }, + "incorrect_transaction_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_incorrect_transaction_amount" + }, + "payment_by_other_means": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_payment_by_other_means" + }, + "credit_not_processed": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_credit_not_processed" + }, + "canceled_recurring_billing": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_canceled_recurring_billing" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_canceled_recurring_billing": { + "required": [ + "expected_refund", + "cancellation_details" + ], + "properties": { + "expected_refund": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "cancellation_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_agreed_refund_details": { + "required": [ + "merchant_agreed_refund", + "merchant_agreed_refund_time" + ], + "properties": { + "merchant_agreed_refund": { + "type": "boolean" + }, + "merchant_agreed_refund_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details": { + "required": [ + "cancellation_date", + "cancellation_number", + "cancelled", + "cancellation_mode" + ], + "properties": { + "cancellation_date": { + "type": "string" + }, + "cancellation_number": { + "type": "string" + }, + "cancelled": { + "type": "boolean" + }, + "cancellation_mode": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_credit_not_processed": { + "required": [ + "issue_type", + "expected_refund", + "cancellation_details", + "product_details", + "service_details", + "agreed_refund_details" + ], + "properties": { + "issue_type": { + "type": "string" + }, + "expected_refund": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "cancellation_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details" + }, + "product_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_product_details" + }, + "service_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_service_details" + }, + "agreed_refund_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_agreed_refund_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_duplicate_transaction": { + "required": [ + "received_duplicate", + "original_transaction" + ], + "properties": { + "received_duplicate": { + "type": "boolean" + }, + "original_transaction": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_transaction" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_incorrect_transaction_amount": { + "required": [ + "correct_transaction_amount", + "correct_transaction_time" + ], + "properties": { + "correct_transaction_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "correct_transaction_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_payment_by_other_means": { + "required": [ + "charge_different_from_original", + "received_duplicate", + "payment_method", + "payment_instrument_suffix" + ], + "properties": { + "charge_different_from_original": { + "type": "boolean" + }, + "received_duplicate": { + "type": "boolean" + }, + "payment_method": { + "type": "string" + }, + "payment_instrument_suffix": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_merchandize_dispute_properties": { + "required": [ + "issue_type", + "product_details", + "service_details" + ], + "properties": { + "issue_type": { + "type": "string" + }, + "product_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_product_details" + }, + "service_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_service_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_message": { + "required": [ + "posted_by", + "time_posted", + "content" + ], + "properties": { + "posted_by": { + "type": "string" + }, + "time_posted": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_money_movement": { + "required": [ + "affected_party", + "amount", + "initiated_time", + "type", + "reason" + ], + "properties": { + "affected_party": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "initiated_time": { + "type": "string" + }, + "type": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_offer": { + "required": [ + "buyer_requested_amount", + "seller_offered_amount", + "offer_type", + "history" + ], + "properties": { + "buyer_requested_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "seller_offered_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "offer_type": { + "type": "string" + }, + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_offer_history" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_offer_history": { + "required": [ + "offer_time", + "actor", + "event_type", + "offer_type" + ], + "properties": { + "offer_time": { + "type": "string" + }, + "actor": { + "type": "string" + }, + "event_type": { + "type": "string" + }, + "offer_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_partner_action": { + "required": [ + "id", + "name", + "create_time", + "update_time", + "due_time", + "status", + "amount" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "due_time": { + "type": "string" + }, + "status": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_refund_details": { + "required": [ + "allowed_refund_amount" + ], + "properties": { + "allowed_refund_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_supporting_info": { + "required": [ + "notes", + "source", + "provided_time" + ], + "properties": { + "notes": { + "type": "string" + }, + "source": { + "type": "string" + }, + "provided_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_do_void": { + "required": [ + "id", + "amount", + "state", + "parent_payment", + "create_time", + "update_time", + "links" + ], + "properties": { + "id": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "state": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations": { + "required": [ + "merchant_id", + "tracking_id", + "products", + "capabilities", + "oauth_integrations", + "granted_permissions", + "payments_receivable", + "legal_name", + "primary_email", + "primary_email_confirmed" + ], + "properties": { + "merchant_id": { + "type": "string" + }, + "tracking_id": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_product" + } + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_capability" + }, + "nullable": true + }, + "oauth_integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_oauth_integration" + } + }, + "granted_permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "payments_receivable": { + "type": "boolean" + }, + "legal_name": { + "type": "string" + }, + "primary_email": { + "type": "string" + }, + "primary_email_confirmed": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_capability": { + "required": [ + "name", + "status" + ], + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_oauth_integration": { + "required": [ + "integrationMethod", + "integrationType", + "oauthThirdParty" + ], + "properties": { + "integration_method": { + "type": "string" + }, + "integration_type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "oauth_third_party": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party": { + "required": [ + "merchantClientId", + "partnerClientId", + "scopes" + ], + "properties": { + "access_token": { + "type": "string" + }, + "merchant_client_id": { + "type": "string" + }, + "partner_client_id": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_product": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "vetting_status": { + "type": "string" + }, + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_oauth_credentials": { + "required": [ + "restId", + "restSecret", + "url" + ], + "properties": { + "restId": { + "type": "string" + }, + "restSecret": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_patch": { + "required": [ + "op", + "path", + "value" + ], + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "replace" + ] + }, + "path": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "mixed" + } + } + ] + } + }, + "type": "object" + }, + "swag_paypal_v1_payment": { + "required": [ + "id", + "state", + "cart", + "payer", + "transactions", + "create_time", + "update_time", + "links", + "redirect_urls", + "application_context", + "payment_instruction" + ], + "properties": { + "id": { + "type": "string" + }, + "intent": { + "type": "string", + "default": "sale", + "enum": [ + "sale", + "authorize", + "order" + ] + }, + "state": { + "type": "string" + }, + "cart": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer" + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "redirect_urls": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_redirect_urls" + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_application_context" + }, + "payment_instruction": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payment_instruction" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_application_context": { + "required": [ + "brand_name", + "locale", + "landing_page" + ], + "properties": { + "brand_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "landing_page": { + "type": "string", + "enum": [ + "Login", + "Billing" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS" + }, + "user_action": { + "type": "string", + "default": "commit" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer": { + "required": [ + "payment_method", + "status", + "payer_info", + "external_selected_funding_instrument_type" + ], + "properties": { + "payment_method": { + "type": "string" + }, + "status": { + "type": "string" + }, + "payer_info": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer_payer_info" + }, + "external_selected_funding_instrument_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer_execute_payer_info": { + "required": [ + "payer_id" + ], + "properties": { + "payer_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer_payer_info": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer_execute_payer_info" + }, + { + "required": [ + "email", + "first_name", + "last_name", + "billing_address", + "shipping_address", + "phone", + "country_code" + ], + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "billing_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_address" + } + ], + "nullable": true + }, + "shipping_address": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_address" + }, + "phone": { + "type": "string" + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_payment_payment_instruction": { + "required": [ + "reference_number", + "recipient_banking_instruction", + "amount", + "payment_due_date", + "instruction_type", + "links" + ], + "properties": { + "reference_number": { + "type": "string" + }, + "recipient_banking_instruction": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payment_instruction_recipient_banking_instruction" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "payment_due_date": { + "type": "string" + }, + "instruction_type": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payment_instruction_recipient_banking_instruction": { + "required": [ + "bank_name", + "account_holder_name", + "international_bank_account_number", + "bank_identifier_code" + ], + "properties": { + "bank_name": { + "type": "string" + }, + "account_holder_name": { + "type": "string" + }, + "international_bank_account_number": { + "type": "string" + }, + "bank_identifier_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_redirect_urls": { + "required": [ + "return_url", + "cancel_url" + ], + "properties": { + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction": { + "required": [ + "amount", + "payee", + "item_list", + "related_resources", + "invoice_number", + "soft_descriptor", + "description", + "custom" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payee": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_payee" + }, + "item_list": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list" + } + ], + "nullable": true + }, + "related_resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource" + } + }, + "invoice_number": { + "type": "string", + "nullable": true + }, + "soft_descriptor": { + "type": "string" + }, + "description": { + "type": "string" + }, + "custom": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list": { + "required": [ + "shipping_address", + "items", + "shipping_options", + "shipping_phone_number" + ], + "properties": { + "shipping_address": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_address" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_item" + } + }, + "shipping_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_option" + } + }, + "shipping_phone_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list_item": { + "required": [ + "name", + "currency", + "price", + "quantity", + "sku", + "tax" + ], + "properties": { + "name": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "price": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + }, + "tax": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list_shipping_address": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_address" + }, + { + "required": [ + "recipient_name" + ], + "properties": { + "recipient_name": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_payment_transaction_item_list_shipping_option": { + "properties": {} + }, + "swag_paypal_v1_payment_transaction_payee": { + "required": [ + "merchant_id", + "email" + ], + "properties": { + "merchant_id": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource": { + "required": [ + "sale", + "authorization", + "order", + "refund", + "capture" + ], + "properties": { + "sale": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_sale" + } + ], + "nullable": true + }, + "authorization": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_authorization" + } + ], + "nullable": true + }, + "order": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_order" + } + ], + "nullable": true + }, + "refund": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_refund" + } + ], + "nullable": true + }, + "capture": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_capture" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_authorization": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "reason_code", + "valid_until" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "reason_code": { + "type": "string" + }, + "valid_until": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_capture": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "custom", + "transaction_fee", + "invoice_number" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "custom": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "invoice_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_order": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "reason_code" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "reason_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_refund": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "sale_id", + "capture_id" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "sale_id": { + "type": "string" + }, + "capture_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_sale": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "transaction_fee" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan": { + "required": [ + "product_id", + "name", + "description", + "status", + "billing_cycles", + "payment_preferences", + "taxes" + ], + "properties": { + "product_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string" + }, + "billing_cycles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle" + } + }, + "payment_preferences": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_payment_preferences" + }, + "taxes": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_taxes" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle": { + "required": [ + "frequency", + "tenure_type", + "sequence", + "pricing_scheme", + "total_cycles" + ], + "properties": { + "frequency": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle_frequency" + }, + "tenure_type": { + "type": "string" + }, + "sequence": { + "type": "integer" + }, + "pricing_scheme": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle_pricing_scheme" + }, + "total_cycles": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle_frequency": { + "required": [ + "interval_unit", + "interval_count" + ], + "properties": { + "interval_unit": { + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle_pricing_scheme": { + "required": [ + "fixed_price" + ], + "properties": { + "fixed_price": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_payment_preferences": { + "required": [ + "auto_bill_outstanding", + "payment_failure_threshold" + ], + "properties": { + "auto_bill_outstanding": { + "type": "boolean" + }, + "payment_failure_threshold": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_taxes": { + "required": [ + "percentage", + "inclusive" + ], + "properties": { + "percentage": { + "type": "string" + }, + "inclusive": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_product": { + "required": [ + "name", + "description", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_refund": { + "required": [ + "amount", + "invoice_number", + "description", + "reason", + "id", + "create_time", + "update_time", + "state", + "refund_from_transaction_fee", + "total_refunded_amount", + "refund_from_received_amount", + "sale_id", + "capture_id", + "parent_payment", + "links" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "invoice_number": { + "type": "string" + }, + "description": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "state": { + "type": "string" + }, + "refund_from_transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "total_refunded_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "refund_from_received_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "sale_id": { + "type": "string" + }, + "capture_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_shipping": { + "required": [ + "trackers" + ], + "properties": { + "trackers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_shipping_tracker" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_shipping_tracker": { + "required": [ + "transaction_id", + "tracking_number", + "status", + "carrier", + "notify_buyer", + "shipment_date" + ], + "properties": { + "transaction_id": { + "type": "string" + }, + "tracking_number": { + "type": "string" + }, + "status": { + "type": "string" + }, + "carrier": { + "type": "string" + }, + "notify_buyer": { + "type": "boolean" + }, + "shipment_date": { + "description": "Pattern: '2022-08-15'", + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription": { + "required": [ + "id", + "plan_id", + "start_time", + "quantity", + "shipping_amount", + "subscriber", + "billing_info", + "application_context", + "status", + "status_update_time", + "create_time", + "update_time", + "links" + ], + "properties": { + "id": { + "type": "string" + }, + "plan_id": { + "type": "string" + }, + "start_time": { + "type": "string" + }, + "quantity": { + "type": "string" + }, + "shipping_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "subscriber": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber" + }, + "billing_info": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info" + } + ], + "nullable": true + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_application_context" + }, + "status": { + "type": "string" + }, + "status_update_time": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_application_context": { + "required": [ + "brand_name", + "locale", + "return_url", + "cancel_url" + ], + "properties": { + "user_action": { + "type": "string", + "default": "SUBSCRIBE_NOW" + }, + "brand_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS" + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info": { + "required": [ + "outstanding_balance", + "cycle_executions", + "last_payment", + "next_billing_time", + "failed_payments_count" + ], + "properties": { + "outstanding_balance": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_outstanding_balance" + }, + "cycle_executions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_cycle_execution" + } + }, + "last_payment": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_last_payment" + }, + "next_billing_time": { + "type": "string", + "nullable": true + }, + "failed_payments_count": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_cycle_execution": { + "required": [ + "tenure_type", + "sequence", + "cycles_completed", + "cycles_remaining", + "total_cycles" + ], + "properties": { + "tenure_type": { + "type": "string" + }, + "sequence": { + "type": "integer" + }, + "cycles_completed": { + "type": "integer" + }, + "cycles_remaining": { + "type": "integer" + }, + "total_cycles": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_last_payment": { + "required": [ + "amount", + "time" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_outstanding_balance": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + ] + }, + "swag_paypal_v1_subscription_subscriber": { + "required": [ + "name", + "email_address", + "payer_id", + "shipping_address" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_name" + }, + "email_address": { + "type": "string" + }, + "payer_id": { + "type": "string" + }, + "shipping_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_name": { + "required": [ + "given_name", + "surname" + ], + "properties": { + "given_name": { + "type": "string" + }, + "surname": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address": { + "required": [ + "name", + "address" + ], + "properties": { + "name": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address_name" + } + ], + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address_address" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address_address": { + "required": [ + "address_line_1", + "address_line_2", + "admin_area_1", + "admin_area_2", + "postal_code", + "country_code" + ], + "properties": { + "address_line_1": { + "type": "string", + "nullable": true + }, + "address_line_2": { + "type": "string", + "nullable": true + }, + "admin_area_1": { + "type": "string", + "nullable": true + }, + "admin_area_2": { + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address_name": { + "required": [ + "full_name" + ], + "properties": { + "full_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_token": { + "required": [ + "scope", + "nonce", + "access_token", + "token_type", + "app_id", + "id_token", + "expires_in", + "expire_date_time" + ], + "properties": { + "scope": { + "description": "Scopes expressed in the form of resource URL endpoints. The value of the scope parameter\nis expressed as a list of space-delimited, case-sensitive strings.", + "type": "string" + }, + "nonce": { + "type": "string" + }, + "access_token": { + "description": "The access token issued by PayPal. After the access token\nexpires (see $expiresIn), you must request a new access token.", + "type": "string" + }, + "token_type": { + "description": "The type of the token issued as described in OAuth2.0 RFC6749,\nSection 7.1. Value is case insensitive.", + "type": "string" + }, + "app_id": { + "type": "string" + }, + "id_token": { + "type": "string", + "nullable": true + }, + "expires_in": { + "description": "The lifetime of the access token, in seconds.", + "type": "integer" + }, + "expire_date_time": { + "description": "Calculated expiration date", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "swag_paypal_v1_webhook": { + "required": [ + "id", + "resource_type", + "event_type", + "summary", + "resource", + "create_time", + "links", + "event_version", + "resource_version" + ], + "properties": { + "id": { + "type": "string" + }, + "resource_type": { + "type": "string" + }, + "event_type": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "resource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v3_payment_token" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_authorization" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_webhook_resource" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription" + } + ] + }, + "create_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "event_version": { + "type": "string" + }, + "resource_version": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_webhook_resource": { + "required": [ + "id", + "parent_payment", + "billing_agreement_id", + "sale_id", + "refund_reason_code", + "update_time", + "amount", + "payment_mode", + "create_time", + "clearing_time", + "protection_eligibility_type", + "protection_eligibility", + "transaction_fee", + "invoice_number", + "links", + "state", + "merchant_id" + ], + "properties": { + "id": { + "type": "string" + }, + "parent_payment": { + "type": "string", + "nullable": true + }, + "billing_agreement_id": { + "type": "string", + "nullable": true + }, + "sale_id": { + "type": "string", + "nullable": true + }, + "refund_reason_code": { + "type": "string", + "nullable": true + }, + "update_time": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "clearing_time": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "invoice_number": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "state": { + "type": "string" + }, + "merchant_id": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_common_address": { + "required": [ + "address_line_1", + "address_line_2", + "admin_area_2", + "admin_area_1", + "postal_code", + "country_code" + ], + "properties": { + "address_line_1": { + "description": "The first line of the address. For example, number or street. For example, 173 Drury Lane.\nRequired for data entry and compliance and risk checks. Must contain the full address.", + "type": "string", + "nullable": true + }, + "address_line_2": { + "description": "The second line of the address. For example, suite or apartment number.", + "type": "string", + "nullable": true + }, + "admin_area_2": { + "description": "A city, town, or village. Smaller than $adminArea1", + "type": "string", + "nullable": true + }, + "admin_area_1": { + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision.\nFormat for postal delivery. For example, CA and not California.", + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_link": { + "required": [ + "href", + "rel", + "method", + "enc_type" + ], + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "method": { + "type": "string" + }, + "enc_type": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_common_money": { + "required": [ + "currency_code", + "value" + ], + "properties": { + "currency_code": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_name": { + "required": [ + "given_name", + "surname" + ], + "properties": { + "given_name": { + "type": "string" + }, + "surname": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_phone_number": { + "required": [ + "national_number", + "country_code" + ], + "properties": { + "national_number": { + "type": "string" + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order": { + "required": [ + "create_time", + "update_time", + "id", + "intent", + "payer", + "purchase_units", + "application_context", + "payment_source", + "status", + "processing_instruction", + "links" + ], + "properties": { + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "id": { + "type": "string" + }, + "intent": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payer" + }, + "purchase_units": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit" + }, + "nullable": true + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_application_context" + }, + "payment_source": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source" + } + ], + "nullable": true + }, + "status": { + "type": "string" + }, + "processing_instruction": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_application_context": { + "required": [ + "brand_name", + "return_url", + "cancel_url" + ], + "properties": { + "brand_name": { + "type": "string" + }, + "landing_page": { + "type": "string", + "default": "NO_PREFERENCE", + "enum": [ + "LOGIN", + "BILLING", + "NO_PREFERENCE" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS", + "enum": [ + "SET_PROVIDED_ADDRESS", + "NO_SHIPPING", + "GET_FROM_FILE" + ] + }, + "user_action": { + "type": "string", + "default": "PAY_NOW", + "enum": [ + "CONTINUE", + "PAY_NOW" + ] + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payer": { + "required": [ + "name", + "email_address", + "payer_id", + "phone", + "address" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "email_address": { + "type": "string" + }, + "payer_id": { + "type": "string" + }, + "phone": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_phone" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source": { + "required": [ + "apple_pay", + "pay_upon_invoice", + "bancontact", + "blik", + "boletobancario", + "card", + "eps", + "giropay", + "ideal", + "multibanco", + "my_bank", + "oxxo", + "p24", + "paypal", + "sofort", + "token", + "trustly", + "google_pay", + "venmo" + ], + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_apple_pay" + }, + "pay_upon_invoice": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_pay_upon_invoice" + } + ], + "nullable": true + }, + "bancontact": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_bancontact" + } + ], + "nullable": true + }, + "blik": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_blik" + } + ], + "nullable": true + }, + "boletobancario": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_boletobancario" + } + ], + "nullable": true + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "eps": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_eps" + } + ], + "nullable": true + }, + "giropay": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_giropay" + } + ], + "nullable": true + }, + "ideal": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_ideal" + } + ], + "nullable": true + }, + "multibanco": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_multibanco" + } + ], + "nullable": true + }, + "my_bank": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_my_bank" + } + ], + "nullable": true + }, + "oxxo": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_oxxo" + } + ], + "nullable": true + }, + "p24": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_p24" + } + ], + "nullable": true + }, + "paypal": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_paypal" + } + ], + "nullable": true + }, + "sofort": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_sofort" + } + ], + "nullable": true + }, + "token": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_token" + } + ], + "nullable": true + }, + "trustly": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_trustly" + } + ], + "nullable": true + }, + "google_pay": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_google_pay" + } + ], + "nullable": true + }, + "venmo": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_venmo" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_apple_pay": { + "required": [ + "name", + "country_code", + "experience_context", + "card", + "attributes" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_bancontact": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_blik": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_boletobancario": { + "required": [ + "name", + "country_code", + "experience_context", + "email", + "expiry_date", + "tax_info", + "billing_address" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + }, + "expiry_date": { + "type": "string" + }, + "tax_info": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_boletobancario_tax_info" + }, + "billing_address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_boletobancario_tax_info": { + "required": [ + "tax_id", + "tax_id_type" + ], + "properties": { + "tax_id": { + "type": "string" + }, + "tax_id_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card": { + "required": [ + "name", + "country_code", + "experience_context", + "last_digits", + "brand", + "type", + "vault_id", + "billing_address", + "authentication_result", + "attributes", + "stored_credential" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "last_digits": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "billing_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + ], + "nullable": true + }, + "authentication_result": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_authentication_result" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + }, + "stored_credential": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_stored_credential" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_authentication_result": { + "required": [ + "liability_shift", + "three_d_secure" + ], + "properties": { + "liability_shift": { + "type": "string" + }, + "three_d_secure": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_authentication_result_3d_secure" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_authentication_result_3d_secure": { + "required": [ + "enrollment_status", + "authentication_status" + ], + "properties": { + "enrollment_status": { + "type": "string" + }, + "authentication_status": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_stored_credential": { + "required": [ + "payment_initiator", + "payment_type", + "usage", + "previous_network_transaction_reference" + ], + "properties": { + "payment_initiator": { + "type": "string", + "enum": [ + "MERCHANT", + "CUSTOMER" + ] + }, + "payment_type": { + "type": "string", + "enum": [ + "RECURRING", + "ONE_TIME", + "UNSCHEDULED" + ] + }, + "usage": { + "type": "string", + "enum": [ + "DERIVED", + "FIRST", + "SUBSEQUENT" + ] + }, + "previous_network_transaction_reference": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes": { + "required": [ + "vault", + "customer", + "verification" + ], + "properties": { + "vault": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_vault" + }, + "customer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + }, + "verification": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_verification" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_customer": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_vault": { + "required": [ + "id", + "store_in_vault", + "usage_type", + "status", + "confirm_payment_token", + "permit_multiple_payment_tokens", + "customer", + "links" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "store_in_vault": { + "type": "string" + }, + "usage_type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "confirm_payment_token": { + "type": "string" + }, + "permit_multiple_payment_tokens": { + "type": "boolean" + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + } + ], + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_verification": { + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_experience_context": { + "required": [ + "locale", + "brand_name", + "logo_url", + "return_url", + "cancel_url", + "payment_method_preference", + "customer_service_instructions" + ], + "properties": { + "locale": { + "type": "string" + }, + "brand_name": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "landing_page": { + "type": "string", + "default": "NO_PREFERENCE", + "enum": [ + "LOGIN", + "GUEST_CHECKOUT", + "NO_PREFERENCE" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS", + "enum": [ + "SET_PROVIDED_ADDRESS", + "NO_SHIPPING", + "GET_FROM_FILE" + ] + }, + "user_action": { + "type": "string", + "default": "PAY_NOW", + "enum": [ + "CONTINUE", + "PAY_NOW" + ] + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + }, + "payment_method_preference": { + "description": "Only: PayPal Wallet", + "type": "string", + "enum": [ + "UNRESTRICTED", + "IMMEDIATE_PAYMENT_REQUIRED" + ] + }, + "customer_service_instructions": { + "description": "Only: PUI", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_phone": { + "required": [ + "phone_type", + "phone_number" + ], + "properties": { + "phone_type": { + "type": "string" + }, + "phone_number": { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_eps": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_giropay": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_google_pay": { + "required": [ + "experience_context", + "card", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_ideal": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_multibanco": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_my_bank": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_oxxo": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_p24": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_pay_upon_invoice": { + "required": [ + "experience_context", + "name", + "email", + "birth_date", + "phone", + "billing_address", + "payment_reference", + "deposit_bank_details" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "email": { + "type": "string" + }, + "birth_date": { + "type": "string" + }, + "phone": { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + }, + "billing_address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "payment_reference": { + "type": "string" + }, + "deposit_bank_details": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_pay_upon_invoice_deposit_bank_details" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_pay_upon_invoice_deposit_bank_details": { + "required": [ + "bic", + "bank_name", + "iban", + "account_holder_name" + ], + "properties": { + "bic": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "account_holder_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_paypal": { + "required": [ + "experience_context", + "email_address", + "account_id", + "billing_agreement_id", + "vault_id", + "name", + "phone_number", + "address", + "birth_date", + "phone_type", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email_address": { + "type": "string" + }, + "account_id": { + "type": "string" + }, + "billing_agreement_id": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "phone_number": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "birth_date": { + "type": "string" + }, + "phone_type": { + "type": "string" + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_sofort": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_token": { + "required": [ + "experience_context", + "id", + "type", + "stored_payment_source" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "stored_payment_source": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_token_stored_payment_source" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_token_stored_payment_source": { + "required": [ + "payment_initiator", + "payment_type", + "usage" + ], + "properties": { + "payment_initiator": { + "type": "string" + }, + "payment_type": { + "type": "string" + }, + "usage": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_trustly": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_venmo": { + "required": [ + "experience_context", + "email_address", + "user_name", + "account_id", + "vault_id", + "name", + "phone_number", + "address", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email_address": { + "type": "string" + }, + "user_name": { + "type": "string" + }, + "account_id": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "phone_number": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit": { + "required": [ + "reference_id", + "amount", + "payee", + "description", + "custom_id", + "invoice_id", + "items", + "shipping", + "payments" + ], + "properties": { + "reference_id": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_amount" + }, + "payee": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payee" + }, + "description": { + "type": "string" + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_item" + }, + "nullable": true + }, + "shipping": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping" + }, + "payments": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_amount": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + { + "required": [ + "breakdown" + ], + "properties": { + "breakdown": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_amount_breakdown" + } + ], + "nullable": true + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v2_order_purchase_unit_amount_breakdown": { + "required": [ + "item_total", + "shipping", + "handling", + "tax_total", + "insurance", + "shipping_discount", + "discount" + ], + "properties": { + "item_total": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "shipping": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "handling": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax_total": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "insurance": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "shipping_discount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "discount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_item": { + "required": [ + "name", + "unit_amount", + "tax", + "tax_rate", + "category", + "quantity", + "sku" + ], + "properties": { + "name": { + "type": "string" + }, + "unit_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax_rate": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "float" + } + ] + }, + "category": { + "type": "string", + "enum": [ + "PHYSICAL_GOODS", + "DIGITAL_GOODS", + "DONATION" + ] + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payee": { + "required": [ + "email_address", + "merchant_id", + "display_data" + ], + "properties": { + "email_address": { + "type": "string" + }, + "merchant_id": { + "type": "string" + }, + "display_data": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payee_display_data" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payee_display_data": { + "required": [ + "brand_name" + ], + "properties": { + "brand_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments": { + "required": [ + "authorizations", + "captures", + "refunds" + ], + "properties": { + "authorizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_authorization" + }, + "nullable": true + }, + "captures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + }, + "nullable": true + }, + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_authorization": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "seller_protection", + "expiration_time" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "seller_protection": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_common_seller_protection" + }, + "expiration_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_authorization_seller_protection": { + "required": [ + "status", + "dispute_categories" + ], + "properties": { + "status": { + "type": "string" + }, + "dispute_categories": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_capture": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "invoice_id", + "note_to_payer", + "seller_protection", + "final_capture", + "seller_receivable_breakdown", + "disbursement_mode" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "note_to_payer": { + "type": "string", + "nullable": true + }, + "seller_protection": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_common_seller_protection" + }, + "final_capture": { + "type": "boolean" + }, + "seller_receivable_breakdown": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture_seller_receivable_breakdown" + }, + "disbursement_mode": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_capture_seller_receivable_breakdown": { + "required": [ + "gross_amount", + "paypal_fee", + "net_amount" + ], + "properties": { + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "paypal_fee": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "net_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_common_seller_protection": { + "required": [ + "status", + "dispute_categories" + ], + "properties": { + "status": { + "type": "string" + }, + "dispute_categories": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_refund": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "invoice_id", + "note_to_payer", + "seller_payable_breakdown" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "note_to_payer": { + "type": "string", + "nullable": true + }, + "seller_payable_breakdown": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund_seller_payable_breakdown" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_refund_seller_payable_breakdown": { + "required": [ + "gross_amount", + "paypal_fee", + "net_amount", + "total_refunded_amount" + ], + "properties": { + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "paypal_fee": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "net_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "total_refunded_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping": { + "required": [ + "name", + "address", + "trackers" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_name" + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "trackers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_tracker" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_name": { + "required": [ + "full_name" + ], + "properties": { + "full_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_tracker": { + "required": [ + "id", + "status", + "notify_payer", + "links", + "items" + ], + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "notify_payer": { + "type": "boolean" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_tracker_item": { + "required": [ + "name", + "quantity", + "sku", + "url", + "image_url" + ], + "properties": { + "name": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string", + "nullable": true + }, + "image_url": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_tracker": { + "required": [ + "capture_id", + "tracking_number", + "carrier", + "carrier_name_other", + "items" + ], + "properties": { + "capture_id": { + "type": "string" + }, + "tracking_number": { + "type": "string" + }, + "carrier": { + "type": "string" + }, + "carrier_name_other": { + "type": "string", + "nullable": true + }, + "notify_payer": { + "type": "boolean", + "default": false + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_tracker_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_patch": { + "required": [ + "op", + "path", + "value", + "from" + ], + "properties": { + "op": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": { + "nullable": true, + "oneOf": [ + { + "type": "integer" + }, + { + "type": "float" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "mixed" + } + } + ] + }, + "from": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral": { + "required": [ + "business_entity", + "preferred_language_code", + "tracking_id", + "partner_config_override", + "operations", + "products", + "capabilities", + "legal_consents", + "links" + ], + "properties": { + "business_entity": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_business_entity" + }, + "preferred_language_code": { + "type": "string" + }, + "tracking_id": { + "type": "string" + }, + "partner_config_override": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_partner_config_override" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation" + } + }, + "products": { + "type": "array", + "items": { + "type": "string" + } + }, + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "legal_consents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_legal_consent" + } + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_business_entity": { + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_business_entity_address" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_business_entity_address": { + "required": [ + "country_code" + ], + "properties": { + "country_code": { + "type": "string" + }, + "type": { + "type": "string", + "default": "WORK" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_legal_consent": { + "required": [ + "granted" + ], + "properties": { + "type": { + "type": "string", + "default": "SHARE_DATA_CONSENT" + }, + "granted": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation": { + "required": [ + "api_integration_preference" + ], + "properties": { + "operation": { + "type": "string", + "default": "API_INTEGRATION" + }, + "api_integration_preference": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference": { + "required": [ + "rest_api_integration" + ], + "properties": { + "rest_api_integration": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference_integration" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference_integration": { + "required": [ + "third_party_details" + ], + "properties": { + "integration_method": { + "type": "string", + "default": "PAYPAL" + }, + "integration_type": { + "type": "string", + "default": "THIRD_PARTY" + }, + "third_party_details": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference_integration_third_party_details" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference_integration_third_party_details": { + "required": [ + "features" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_partner_config_override": { + "required": [ + "return_url", + "partner_logo_url" + ], + "properties": { + "return_url": { + "type": "string" + }, + "partner_logo_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v3_payment_token": { + "required": [ + "id", + "status", + "customer", + "payment_source", + "links", + "metadata" + ], + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "customer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + }, + "payment_source": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v3_payment_token_metadata" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v3_payment_token_metadata": { + "required": [ + "order_id" + ], + "properties": { + "order_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_pos_webhook": { + "required": [ + "organizationUuid", + "messageUuid", + "eventName", + "payload", + "timestamp" + ], + "properties": { + "organizationUuid": { + "type": "string" + }, + "messageUuid": { + "type": "string" + }, + "eventName": { + "type": "string" + }, + "payload": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_pos_setting_additional_information": { + "required": [ + "extensions", + "countryId", + "currencyId", + "languageId", + "customerGroupId", + "navigationCategoryId", + "shippingMethodId", + "paymentMethodId", + "merchantInformation" + ], + "properties": { + "extensions": { + "type": "object", + "additionalProperties": true + }, + "countryId": { + "type": "string" + }, + "currencyId": { + "type": "string" + }, + "languageId": { + "type": "string", + "nullable": true + }, + "customerGroupId": { + "type": "string" + }, + "navigationCategoryId": { + "type": "string" + }, + "shippingMethodId": { + "type": "string" + }, + "paymentMethodId": { + "type": "string" + }, + "merchantInformation": { + "type": "array", + "items": { + "type": "mixed" + } + } + }, + "type": "object" + }, + "swag_paypal_pos_setting_product_count": { + "required": [ + "localCount", + "remoteCount" + ], + "properties": { + "localCount": { + "type": "integer" + }, + "remoteCount": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_setting_merchant_information": { + "required": [ + "merchantIntegrations", + "capabilities" + ], + "properties": { + "merchantIntegrations": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations" + }, + "capabilities": { + "description": "string> key: paymentMethodId, value: capability (see AbstractMethodData)", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "type": "object" + } + } + }, + "tags": [ + { + "name": "Admin Api", + "description": "Admin Api" + }, + { + "name": "SwagPayPalPaymentMethod", + "description": "SwagPayPalPaymentMethod" + }, + { + "name": "Admin API", + "description": "Admin API" + }, + { + "name": "PayPal", + "description": "PayPal" + }, + { + "name": "SwagPayPalPosWebhook", + "description": "SwagPayPalPosWebhook" + }, + { + "name": "SwagPayPalWebhook", + "description": "SwagPayPalWebhook" + } + ] +} \ No newline at end of file diff --git a/src/Resources/Schema/StoreApi/openapi.json b/src/Resources/Schema/StoreApi/openapi.json new file mode 100644 index 000000000..7486ed265 --- /dev/null +++ b/src/Resources/Schema/StoreApi/openapi.json @@ -0,0 +1,5367 @@ +{ + "openapi": "3.0.0", + "paths": { + "/store-api/paypal/express/create-order": { + "post": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Creates a PayPal order from the existing cart", + "operationId": "createPayPalExpressOrder", + "responses": { + "200": { + "description": "The new token of the order" + } + } + } + }, + "/store-api/paypal/express/prepare-checkout": { + "post": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Logs in a guest customer, with the data of a paypal order", + "operationId": "preparePayPalExpressCheckout", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "token": { + "description": "ID of the paypal order", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "The url to redirect to", + "content": { + "application/json": { + "schema": { + "properties": { + "redirectUrl": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/store-api/paypal/pui/payment-instructions/{transactionId}": { + "get": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Tries to get payment instructions for PUI payments", + "operationId": "getPUIPaymentInstructions", + "parameters": [ + { + "name": "transactionId", + "in": "path", + "description": "Identifier of the order transaction to be fetched", + "required": true, + "schema": { + "type": "string", + "pattern": "^[0-9a-f]{32}$" + } + } + ], + "responses": { + "200": { + "description": "The payment instructions of the order" + } + } + } + }, + "/store-api/paypal/vault/clear": { + "post": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Clears the vault for the current customer", + "operationId": "paypalVaultClear", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "type": { + "type": "string", + "enum": [ + "cancel", + "browser", + "error" + ] + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Vault has been cleared successfully" + } + } + } + }, + "/store-api/paypal/create-order": { + "post": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Creates a PayPal order from the existing cart or an order", + "operationId": "createPayPalOrder", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "product": { + "description": "Use an existing order id to create PayPal order", + "type": "string", + "default": "ppcp" + }, + "orderId": { + "description": "Use an existing order id to create PayPal order", + "type": "string" + } + }, + "type": "object" + } + } + } + }, + "responses": { + "200": { + "description": "Returns the created PayPal order id", + "content": { + "application/json": { + "schema": { + "properties": { + "token": { + "type": "string" + } + }, + "type": "object" + } + } + } + } + } + } + }, + "/store-api/paypal/payment-method-eligibility": { + "post": { + "tags": [ + "Store API", + "PayPal" + ], + "description": "Sets ineligible payment methods to be removed from the session", + "operationId": "setPaymentMethodEligibility", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "paymentMethods": { + "description": "List of PayPal payment method identifiers according to constant REMOVABLE_PAYMENT_HANDLERS", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + } + } + } + }, + "responses": { + "204": { + "description": "Success" + } + } + } + } + }, + "components": { + "schemas": { + "swag_paypal_v1_capture": { + "required": [ + "amount", + "is_final_capture", + "id", + "state", + "reason_code", + "parent_payment", + "transaction_fee", + "create_time", + "update_time", + "links" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "is_final_capture": { + "type": "boolean" + }, + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "reason_code": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_capture_transaction_fee" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_capture_transaction_fee": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + } + ] + }, + "swag_paypal_v1_client_token": { + "required": [ + "client_token", + "expires_in", + "expire_date_time" + ], + "properties": { + "client_token": { + "type": "string" + }, + "expires_in": { + "description": "The lifetime of the access token, in seconds.", + "type": "integer" + }, + "expire_date_time": { + "description": "Calculated expiration date", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_address": { + "required": [ + "line1", + "line2", + "city", + "country_code", + "postal_code", + "state", + "phone" + ], + "properties": { + "line1": { + "type": "string" + }, + "line2": { + "type": "string", + "nullable": true + }, + "city": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "state": { + "type": "string", + "nullable": true + }, + "phone": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_common_amount": { + "required": [ + "total", + "currency", + "details" + ], + "properties": { + "total": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "details": { + "$ref": "#/components/schemas/swag_paypal_v1_common_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_details": { + "required": [ + "subtotal", + "shipping", + "tax", + "handling_fee", + "shipping_discount", + "discount", + "insurance" + ], + "properties": { + "subtotal": { + "type": "string" + }, + "shipping": { + "type": "string" + }, + "tax": { + "type": "string" + }, + "handling_fee": { + "type": "string" + }, + "shipping_discount": { + "type": "string" + }, + "discount": { + "type": "string" + }, + "insurance": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_link": { + "required": [ + "href", + "rel", + "method", + "enc_type" + ], + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "method": { + "type": "string" + }, + "enc_type": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_common_money": { + "required": [ + "value", + "currency_code" + ], + "properties": { + "value": { + "type": "string" + }, + "currency_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_common_value": { + "required": [ + "currency", + "value" + ], + "properties": { + "currency": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_create_webhooks": { + "required": [ + "url", + "event_types" + ], + "properties": { + "url": { + "type": "string" + }, + "event_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_create_webhooks_event_type" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_create_webhooks_event_type": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes": { + "required": [ + "items", + "links" + ], + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item" + }, + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_buyer": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_item": { + "required": [ + "item_id", + "item_description", + "item_quantity", + "partner_transaction_id", + "reason", + "dispute_amount", + "notes" + ], + "properties": { + "item_id": { + "type": "string" + }, + "item_description": { + "type": "string" + }, + "item_quantity": { + "type": "string" + }, + "partner_transaction_id": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "dispute_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "notes": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_product_details": { + "required": [ + "product_received", + "product_received_time", + "sub_reasons", + "purchase_url", + "return_details" + ], + "properties": { + "product_received": { + "type": "string" + }, + "product_received_time": { + "type": "string" + }, + "sub_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_sub_reason" + } + }, + "purchase_url": { + "type": "string" + }, + "return_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_return_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_return_details": { + "required": [ + "return_time", + "mode", + "receipt", + "return_confirmation_number", + "returned" + ], + "properties": { + "return_time": { + "type": "string" + }, + "mode": { + "type": "string" + }, + "receipt": { + "type": "boolean" + }, + "return_confirmation_number": { + "type": "string" + }, + "returned": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_seller": { + "required": [ + "email", + "merchant_id", + "name" + ], + "properties": { + "email": { + "type": "string" + }, + "merchant_id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_service_details": { + "required": [ + "description", + "service_started", + "note", + "sub_reasons", + "purchase_url" + ], + "properties": { + "description": { + "type": "string" + }, + "service_started": { + "type": "string" + }, + "note": { + "type": "string" + }, + "sub_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_sub_reason" + } + }, + "purchase_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_sub_reason": { + "required": [ + "sub_reason" + ], + "properties": { + "sub_reason": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_common_transaction": { + "required": [ + "buyer_transaction_id", + "seller_transaction_id", + "reference_id", + "create_time", + "transaction_status", + "gross_amount", + "invoice_number", + "custom", + "buyer", + "seller", + "items" + ], + "properties": { + "buyer_transaction_id": { + "type": "string" + }, + "seller_transaction_id": { + "type": "string" + }, + "reference_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "transaction_status": { + "type": "string" + }, + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "invoice_number": { + "type": "string" + }, + "custom": { + "type": "string" + }, + "buyer": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_buyer" + }, + "seller": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_seller" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item": { + "required": [ + "dispute_id", + "create_time", + "update_time", + "disputed_transactions", + "reason", + "status", + "dispute_state", + "dispute_amount", + "external_reason_code", + "dispute_outcome", + "adjudications", + "money_movements", + "dispute_life_cycle_stage", + "dispute_channel", + "messages", + "extensions", + "evidences", + "buyer_response_due_date", + "seller_response_due_date", + "offer", + "refund_details", + "communication_details", + "partner_actions", + "supporting_info", + "links" + ], + "properties": { + "dispute_id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "disputed_transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_disputed_transaction" + }, + "nullable": true + }, + "reason": { + "type": "string" + }, + "status": { + "type": "string" + }, + "dispute_state": { + "type": "string", + "enum": [ + "REQUIRED_ACTION", + "REQUIRED_OTHER_PARTY_ACTION", + "UNDER_PAYPAL_REVIEW", + "RESOLVED", + "OPEN_INQUIRIES", + "APPEALABLE" + ], + "nullable": true + }, + "dispute_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_dispute_amount" + }, + "external_reason_code": { + "type": "string", + "nullable": true + }, + "dispute_outcome": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_dispute_outcome" + } + ], + "nullable": true + }, + "adjudications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_adjudication" + } + }, + "money_movements": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_money_movement" + } + }, + "dispute_life_cycle_stage": { + "type": "string" + }, + "dispute_channel": { + "type": "string", + "nullable": true + }, + "messages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_message" + }, + "nullable": true + }, + "extensions": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions" + }, + "evidences": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence" + }, + "nullable": true + }, + "buyer_response_due_date": { + "type": "string", + "nullable": true + }, + "seller_response_due_date": { + "type": "string", + "nullable": true + }, + "offer": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_offer" + } + ], + "nullable": true + }, + "refund_details": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_refund_details" + } + ], + "nullable": true + }, + "communication_details": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_communication_details" + } + ], + "nullable": true + }, + "partner_actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_partner_action" + }, + "nullable": true + }, + "supporting_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_supporting_info" + }, + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_adjudication": { + "required": [ + "type", + "adjudication_time", + "reason", + "dispute_life_cycle_stage" + ], + "properties": { + "type": { + "type": "string" + }, + "adjudication_time": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "dispute_life_cycle_stage": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_communication_details": { + "required": [ + "email", + "note", + "time_posted" + ], + "properties": { + "email": { + "type": "string" + }, + "note": { + "type": "string" + }, + "time_posted": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_dispute_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + ] + }, + "swag_paypal_v1_disputes_item_dispute_outcome": { + "required": [ + "outcome_code", + "amount_refunded" + ], + "properties": { + "outcome_code": { + "type": "string" + }, + "amount_refunded": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_disputed_transaction": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_transaction" + }, + { + "required": [ + "seller_protection_eligible" + ], + "properties": { + "seller_protection_eligible": { + "type": "boolean" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_disputes_item_evidence": { + "required": [ + "evidence_type", + "evidence_info", + "documents", + "notes", + "item_id" + ], + "properties": { + "evidence_type": { + "type": "string" + }, + "evidence_info": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info" + }, + "documents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_document" + } + }, + "notes": { + "type": "string" + }, + "item_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_document": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info": { + "required": [ + "tracking_info", + "refund_ids" + ], + "properties": { + "tracking_info": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info_tracking_info" + } + }, + "refund_ids": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_evidence_evidence_info_refund_id" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info_refund_id": { + "required": [ + "refund_id" + ], + "properties": { + "refund_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_evidence_evidence_info_tracking_info": { + "required": [ + "carrier_name", + "carrier_name_other", + "tracking_url", + "tracking_number" + ], + "properties": { + "carrier_name": { + "type": "string" + }, + "carrier_name_other": { + "type": "string" + }, + "tracking_url": { + "type": "string" + }, + "tracking_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions": { + "required": [ + "merchant_contacted", + "merchant_contacted_outcome", + "merchant_contacted_time", + "merchant_contacted_mode", + "buyer_contacted_time", + "buyer_contacted_channel", + "billing_dispute_properties", + "merchandize_dispute_properties" + ], + "properties": { + "merchant_contacted": { + "type": "boolean" + }, + "merchant_contacted_outcome": { + "type": "string" + }, + "merchant_contacted_time": { + "type": "string" + }, + "merchant_contacted_mode": { + "type": "string" + }, + "buyer_contacted_time": { + "type": "string" + }, + "buyer_contacted_channel": { + "type": "string" + }, + "billing_dispute_properties": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties" + }, + "merchandize_dispute_properties": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_merchandize_dispute_properties" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties": { + "required": [ + "duplicate_transaction", + "incorrect_transaction_amount", + "payment_by_other_means", + "credit_not_processed", + "canceled_recurring_billing" + ], + "properties": { + "duplicate_transaction": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_duplicate_transaction" + }, + "incorrect_transaction_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_incorrect_transaction_amount" + }, + "payment_by_other_means": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_payment_by_other_means" + }, + "credit_not_processed": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_credit_not_processed" + }, + "canceled_recurring_billing": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_canceled_recurring_billing" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_canceled_recurring_billing": { + "required": [ + "expected_refund", + "cancellation_details" + ], + "properties": { + "expected_refund": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "cancellation_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_agreed_refund_details": { + "required": [ + "merchant_agreed_refund", + "merchant_agreed_refund_time" + ], + "properties": { + "merchant_agreed_refund": { + "type": "boolean" + }, + "merchant_agreed_refund_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details": { + "required": [ + "cancellation_date", + "cancellation_number", + "cancelled", + "cancellation_mode" + ], + "properties": { + "cancellation_date": { + "type": "string" + }, + "cancellation_number": { + "type": "string" + }, + "cancelled": { + "type": "boolean" + }, + "cancellation_mode": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_credit_not_processed": { + "required": [ + "issue_type", + "expected_refund", + "cancellation_details", + "product_details", + "service_details", + "agreed_refund_details" + ], + "properties": { + "issue_type": { + "type": "string" + }, + "expected_refund": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "cancellation_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_cancellation_details" + }, + "product_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_product_details" + }, + "service_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_service_details" + }, + "agreed_refund_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_common_agreed_refund_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_duplicate_transaction": { + "required": [ + "received_duplicate", + "original_transaction" + ], + "properties": { + "received_duplicate": { + "type": "boolean" + }, + "original_transaction": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_transaction" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_incorrect_transaction_amount": { + "required": [ + "correct_transaction_amount", + "correct_transaction_time" + ], + "properties": { + "correct_transaction_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "correct_transaction_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_billing_dispute_properties_payment_by_other_means": { + "required": [ + "charge_different_from_original", + "received_duplicate", + "payment_method", + "payment_instrument_suffix" + ], + "properties": { + "charge_different_from_original": { + "type": "boolean" + }, + "received_duplicate": { + "type": "boolean" + }, + "payment_method": { + "type": "string" + }, + "payment_instrument_suffix": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_extensions_merchandize_dispute_properties": { + "required": [ + "issue_type", + "product_details", + "service_details" + ], + "properties": { + "issue_type": { + "type": "string" + }, + "product_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_product_details" + }, + "service_details": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_common_service_details" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_message": { + "required": [ + "posted_by", + "time_posted", + "content" + ], + "properties": { + "posted_by": { + "type": "string" + }, + "time_posted": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_money_movement": { + "required": [ + "affected_party", + "amount", + "initiated_time", + "type", + "reason" + ], + "properties": { + "affected_party": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "initiated_time": { + "type": "string" + }, + "type": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_offer": { + "required": [ + "buyer_requested_amount", + "seller_offered_amount", + "offer_type", + "history" + ], + "properties": { + "buyer_requested_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "seller_offered_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "offer_type": { + "type": "string" + }, + "history": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_disputes_item_offer_history" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_offer_history": { + "required": [ + "offer_time", + "actor", + "event_type", + "offer_type" + ], + "properties": { + "offer_time": { + "type": "string" + }, + "actor": { + "type": "string" + }, + "event_type": { + "type": "string" + }, + "offer_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_partner_action": { + "required": [ + "id", + "name", + "create_time", + "update_time", + "due_time", + "status", + "amount" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "due_time": { + "type": "string" + }, + "status": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_refund_details": { + "required": [ + "allowed_refund_amount" + ], + "properties": { + "allowed_refund_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_disputes_item_supporting_info": { + "required": [ + "notes", + "source", + "provided_time" + ], + "properties": { + "notes": { + "type": "string" + }, + "source": { + "type": "string" + }, + "provided_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_do_void": { + "required": [ + "id", + "amount", + "state", + "parent_payment", + "create_time", + "update_time", + "links" + ], + "properties": { + "id": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "state": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations": { + "required": [ + "merchant_id", + "tracking_id", + "products", + "capabilities", + "oauth_integrations", + "granted_permissions", + "payments_receivable", + "legal_name", + "primary_email", + "primary_email_confirmed" + ], + "properties": { + "merchant_id": { + "type": "string" + }, + "tracking_id": { + "type": "string" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_product" + } + }, + "capabilities": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_capability" + }, + "nullable": true + }, + "oauth_integrations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_oauth_integration" + } + }, + "granted_permissions": { + "type": "array", + "items": { + "type": "string" + } + }, + "payments_receivable": { + "type": "boolean" + }, + "legal_name": { + "type": "string" + }, + "primary_email": { + "type": "string" + }, + "primary_email_confirmed": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_capability": { + "required": [ + "name", + "status" + ], + "properties": { + "name": { + "type": "string" + }, + "status": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_oauth_integration": { + "required": [ + "integrationMethod", + "integrationType", + "oauthThirdParty" + ], + "properties": { + "integration_method": { + "type": "string" + }, + "integration_type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "oauth_third_party": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_oauth_integration_oauth_third_party": { + "required": [ + "merchantClientId", + "partnerClientId", + "scopes" + ], + "properties": { + "access_token": { + "type": "string" + }, + "merchant_client_id": { + "type": "string" + }, + "partner_client_id": { + "type": "string" + }, + "refresh_token": { + "type": "string" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_merchant_integrations_product": { + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + }, + "vetting_status": { + "type": "string" + }, + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_oauth_credentials": { + "required": [ + "restId", + "restSecret", + "url" + ], + "properties": { + "restId": { + "type": "string" + }, + "restSecret": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_patch": { + "required": [ + "op", + "path", + "value" + ], + "properties": { + "op": { + "type": "string", + "enum": [ + "add", + "replace" + ] + }, + "path": { + "type": "string" + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "mixed" + } + } + ] + } + }, + "type": "object" + }, + "swag_paypal_v1_payment": { + "required": [ + "id", + "state", + "cart", + "payer", + "transactions", + "create_time", + "update_time", + "links", + "redirect_urls", + "application_context", + "payment_instruction" + ], + "properties": { + "id": { + "type": "string" + }, + "intent": { + "type": "string", + "default": "sale", + "enum": [ + "sale", + "authorize", + "order" + ] + }, + "state": { + "type": "string" + }, + "cart": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer" + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "redirect_urls": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_redirect_urls" + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_application_context" + }, + "payment_instruction": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payment_instruction" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_application_context": { + "required": [ + "brand_name", + "locale", + "landing_page" + ], + "properties": { + "brand_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "landing_page": { + "type": "string", + "enum": [ + "Login", + "Billing" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS" + }, + "user_action": { + "type": "string", + "default": "commit" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer": { + "required": [ + "payment_method", + "status", + "payer_info", + "external_selected_funding_instrument_type" + ], + "properties": { + "payment_method": { + "type": "string" + }, + "status": { + "type": "string" + }, + "payer_info": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer_payer_info" + }, + "external_selected_funding_instrument_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer_execute_payer_info": { + "required": [ + "payer_id" + ], + "properties": { + "payer_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payer_payer_info": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payer_execute_payer_info" + }, + { + "required": [ + "email", + "first_name", + "last_name", + "billing_address", + "shipping_address", + "phone", + "country_code" + ], + "properties": { + "email": { + "type": "string" + }, + "first_name": { + "type": "string" + }, + "last_name": { + "type": "string" + }, + "billing_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_address" + } + ], + "nullable": true + }, + "shipping_address": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_address" + }, + "phone": { + "type": "string" + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_payment_payment_instruction": { + "required": [ + "reference_number", + "recipient_banking_instruction", + "amount", + "payment_due_date", + "instruction_type", + "links" + ], + "properties": { + "reference_number": { + "type": "string" + }, + "recipient_banking_instruction": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_payment_instruction_recipient_banking_instruction" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "payment_due_date": { + "type": "string" + }, + "instruction_type": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_payment_instruction_recipient_banking_instruction": { + "required": [ + "bank_name", + "account_holder_name", + "international_bank_account_number", + "bank_identifier_code" + ], + "properties": { + "bank_name": { + "type": "string" + }, + "account_holder_name": { + "type": "string" + }, + "international_bank_account_number": { + "type": "string" + }, + "bank_identifier_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_redirect_urls": { + "required": [ + "return_url", + "cancel_url" + ], + "properties": { + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction": { + "required": [ + "amount", + "payee", + "item_list", + "related_resources", + "invoice_number", + "soft_descriptor", + "description", + "custom" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payee": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_payee" + }, + "item_list": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list" + } + ], + "nullable": true + }, + "related_resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource" + } + }, + "invoice_number": { + "type": "string", + "nullable": true + }, + "soft_descriptor": { + "type": "string" + }, + "description": { + "type": "string" + }, + "custom": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list": { + "required": [ + "shipping_address", + "items", + "shipping_options", + "shipping_phone_number" + ], + "properties": { + "shipping_address": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_address" + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_item" + } + }, + "shipping_options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_item_list_shipping_option" + } + }, + "shipping_phone_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list_item": { + "required": [ + "name", + "currency", + "price", + "quantity", + "sku", + "tax" + ], + "properties": { + "name": { + "type": "string" + }, + "currency": { + "type": "string" + }, + "price": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + }, + "tax": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_item_list_shipping_address": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_address" + }, + { + "required": [ + "recipient_name" + ], + "properties": { + "recipient_name": { + "type": "string" + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v1_payment_transaction_item_list_shipping_option": { + "properties": {} + }, + "swag_paypal_v1_payment_transaction_payee": { + "required": [ + "merchant_id", + "email" + ], + "properties": { + "merchant_id": { + "type": "string" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource": { + "required": [ + "sale", + "authorization", + "order", + "refund", + "capture" + ], + "properties": { + "sale": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_sale" + } + ], + "nullable": true + }, + "authorization": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_authorization" + } + ], + "nullable": true + }, + "order": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_order" + } + ], + "nullable": true + }, + "refund": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_refund" + } + ], + "nullable": true + }, + "capture": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_payment_transaction_related_resource_capture" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_authorization": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "reason_code", + "valid_until" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "reason_code": { + "type": "string" + }, + "valid_until": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_capture": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "custom", + "transaction_fee", + "invoice_number" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "custom": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "invoice_number": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_order": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "reason_code" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "reason_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_refund": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "sale_id", + "capture_id" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "sale_id": { + "type": "string" + }, + "capture_id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_payment_transaction_related_resource_sale": { + "required": [ + "id", + "state", + "amount", + "payment_mode", + "create_time", + "update_time", + "protection_eligibility", + "protection_eligibility_type", + "receipt_id", + "parent_payment", + "links", + "transaction_fee" + ], + "properties": { + "id": { + "type": "string" + }, + "state": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "receipt_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan": { + "required": [ + "product_id", + "name", + "description", + "status", + "billing_cycles", + "payment_preferences", + "taxes" + ], + "properties": { + "product_id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "status": { + "type": "string" + }, + "billing_cycles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle" + } + }, + "payment_preferences": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_payment_preferences" + }, + "taxes": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_taxes" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle": { + "required": [ + "frequency", + "tenure_type", + "sequence", + "pricing_scheme", + "total_cycles" + ], + "properties": { + "frequency": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle_frequency" + }, + "tenure_type": { + "type": "string" + }, + "sequence": { + "type": "integer" + }, + "pricing_scheme": { + "$ref": "#/components/schemas/swag_paypal_v1_plan_billing_cycle_pricing_scheme" + }, + "total_cycles": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle_frequency": { + "required": [ + "interval_unit", + "interval_count" + ], + "properties": { + "interval_unit": { + "type": "string" + }, + "interval_count": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_billing_cycle_pricing_scheme": { + "required": [ + "fixed_price" + ], + "properties": { + "fixed_price": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_payment_preferences": { + "required": [ + "auto_bill_outstanding", + "payment_failure_threshold" + ], + "properties": { + "auto_bill_outstanding": { + "type": "boolean" + }, + "payment_failure_threshold": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_plan_taxes": { + "required": [ + "percentage", + "inclusive" + ], + "properties": { + "percentage": { + "type": "string" + }, + "inclusive": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v1_product": { + "required": [ + "name", + "description", + "type" + ], + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_refund": { + "required": [ + "amount", + "invoice_number", + "description", + "reason", + "id", + "create_time", + "update_time", + "state", + "refund_from_transaction_fee", + "total_refunded_amount", + "refund_from_received_amount", + "sale_id", + "capture_id", + "parent_payment", + "links" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "invoice_number": { + "type": "string" + }, + "description": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "id": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "state": { + "type": "string" + }, + "refund_from_transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "total_refunded_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "refund_from_received_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "sale_id": { + "type": "string" + }, + "capture_id": { + "type": "string" + }, + "parent_payment": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_shipping": { + "required": [ + "trackers" + ], + "properties": { + "trackers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_shipping_tracker" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_shipping_tracker": { + "required": [ + "transaction_id", + "tracking_number", + "status", + "carrier", + "notify_buyer", + "shipment_date" + ], + "properties": { + "transaction_id": { + "type": "string" + }, + "tracking_number": { + "type": "string" + }, + "status": { + "type": "string" + }, + "carrier": { + "type": "string" + }, + "notify_buyer": { + "type": "boolean" + }, + "shipment_date": { + "description": "Pattern: '2022-08-15'", + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription": { + "required": [ + "id", + "plan_id", + "start_time", + "quantity", + "shipping_amount", + "subscriber", + "billing_info", + "application_context", + "status", + "status_update_time", + "create_time", + "update_time", + "links" + ], + "properties": { + "id": { + "type": "string" + }, + "plan_id": { + "type": "string" + }, + "start_time": { + "type": "string" + }, + "quantity": { + "type": "string" + }, + "shipping_amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "subscriber": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber" + }, + "billing_info": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info" + } + ], + "nullable": true + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_application_context" + }, + "status": { + "type": "string" + }, + "status_update_time": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_application_context": { + "required": [ + "brand_name", + "locale", + "return_url", + "cancel_url" + ], + "properties": { + "user_action": { + "type": "string", + "default": "SUBSCRIBE_NOW" + }, + "brand_name": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS" + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info": { + "required": [ + "outstanding_balance", + "cycle_executions", + "last_payment", + "next_billing_time", + "failed_payments_count" + ], + "properties": { + "outstanding_balance": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_outstanding_balance" + }, + "cycle_executions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_cycle_execution" + } + }, + "last_payment": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_billing_info_last_payment" + }, + "next_billing_time": { + "type": "string", + "nullable": true + }, + "failed_payments_count": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_cycle_execution": { + "required": [ + "tenure_type", + "sequence", + "cycles_completed", + "cycles_remaining", + "total_cycles" + ], + "properties": { + "tenure_type": { + "type": "string" + }, + "sequence": { + "type": "integer" + }, + "cycles_completed": { + "type": "integer" + }, + "cycles_remaining": { + "type": "integer" + }, + "total_cycles": { + "type": "integer" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_last_payment": { + "required": [ + "amount", + "time" + ], + "properties": { + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + }, + "time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_billing_info_outstanding_balance": { + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_common_money" + } + ] + }, + "swag_paypal_v1_subscription_subscriber": { + "required": [ + "name", + "email_address", + "payer_id", + "shipping_address" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_name" + }, + "email_address": { + "type": "string" + }, + "payer_id": { + "type": "string" + }, + "shipping_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_name": { + "required": [ + "given_name", + "surname" + ], + "properties": { + "given_name": { + "type": "string" + }, + "surname": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address": { + "required": [ + "name", + "address" + ], + "properties": { + "name": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address_name" + } + ], + "nullable": true + }, + "address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription_subscriber_shipping_address_address" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address_address": { + "required": [ + "address_line_1", + "address_line_2", + "admin_area_1", + "admin_area_2", + "postal_code", + "country_code" + ], + "properties": { + "address_line_1": { + "type": "string", + "nullable": true + }, + "address_line_2": { + "type": "string", + "nullable": true + }, + "admin_area_1": { + "type": "string", + "nullable": true + }, + "admin_area_2": { + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_subscription_subscriber_shipping_address_name": { + "required": [ + "full_name" + ], + "properties": { + "full_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_token": { + "required": [ + "scope", + "nonce", + "access_token", + "token_type", + "app_id", + "id_token", + "expires_in", + "expire_date_time" + ], + "properties": { + "scope": { + "description": "Scopes expressed in the form of resource URL endpoints. The value of the scope parameter\nis expressed as a list of space-delimited, case-sensitive strings.", + "type": "string" + }, + "nonce": { + "type": "string" + }, + "access_token": { + "description": "The access token issued by PayPal. After the access token\nexpires (see $expiresIn), you must request a new access token.", + "type": "string" + }, + "token_type": { + "description": "The type of the token issued as described in OAuth2.0 RFC6749,\nSection 7.1. Value is case insensitive.", + "type": "string" + }, + "app_id": { + "type": "string" + }, + "id_token": { + "type": "string", + "nullable": true + }, + "expires_in": { + "description": "The lifetime of the access token, in seconds.", + "type": "integer" + }, + "expire_date_time": { + "description": "Calculated expiration date", + "type": "string", + "format": "date-time" + } + }, + "type": "object" + }, + "swag_paypal_v1_webhook": { + "required": [ + "id", + "resource_type", + "event_type", + "summary", + "resource", + "create_time", + "links", + "event_version", + "resource_version" + ], + "properties": { + "id": { + "type": "string" + }, + "resource_type": { + "type": "string" + }, + "event_type": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "resource": { + "nullable": true, + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v3_payment_token" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_authorization" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + }, + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_webhook_resource" + }, + { + "$ref": "#/components/schemas/swag_paypal_v1_subscription" + } + ] + }, + "create_time": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "event_version": { + "type": "string" + }, + "resource_version": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v1_webhook_resource": { + "required": [ + "id", + "parent_payment", + "billing_agreement_id", + "sale_id", + "refund_reason_code", + "update_time", + "amount", + "payment_mode", + "create_time", + "clearing_time", + "protection_eligibility_type", + "protection_eligibility", + "transaction_fee", + "invoice_number", + "links", + "state", + "merchant_id" + ], + "properties": { + "id": { + "type": "string" + }, + "parent_payment": { + "type": "string", + "nullable": true + }, + "billing_agreement_id": { + "type": "string", + "nullable": true + }, + "sale_id": { + "type": "string", + "nullable": true + }, + "refund_reason_code": { + "type": "string", + "nullable": true + }, + "update_time": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v1_common_amount" + }, + "payment_mode": { + "type": "string" + }, + "create_time": { + "type": "string" + }, + "clearing_time": { + "type": "string" + }, + "protection_eligibility_type": { + "type": "string" + }, + "protection_eligibility": { + "type": "string" + }, + "transaction_fee": { + "$ref": "#/components/schemas/swag_paypal_v1_common_value" + }, + "invoice_number": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v1_common_link" + } + }, + "state": { + "type": "string" + }, + "merchant_id": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_common_address": { + "required": [ + "address_line_1", + "address_line_2", + "admin_area_2", + "admin_area_1", + "postal_code", + "country_code" + ], + "properties": { + "address_line_1": { + "description": "The first line of the address. For example, number or street. For example, 173 Drury Lane.\nRequired for data entry and compliance and risk checks. Must contain the full address.", + "type": "string", + "nullable": true + }, + "address_line_2": { + "description": "The second line of the address. For example, suite or apartment number.", + "type": "string", + "nullable": true + }, + "admin_area_2": { + "description": "A city, town, or village. Smaller than $adminArea1", + "type": "string", + "nullable": true + }, + "admin_area_1": { + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision.\nFormat for postal delivery. For example, CA and not California.", + "type": "string", + "nullable": true + }, + "postal_code": { + "type": "string", + "nullable": true + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_link": { + "required": [ + "href", + "rel", + "method", + "enc_type" + ], + "properties": { + "href": { + "type": "string" + }, + "rel": { + "type": "string" + }, + "method": { + "type": "string" + }, + "enc_type": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_common_money": { + "required": [ + "currency_code", + "value" + ], + "properties": { + "currency_code": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_name": { + "required": [ + "given_name", + "surname" + ], + "properties": { + "given_name": { + "type": "string" + }, + "surname": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_common_phone_number": { + "required": [ + "national_number", + "country_code" + ], + "properties": { + "national_number": { + "type": "string" + }, + "country_code": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order": { + "required": [ + "create_time", + "update_time", + "id", + "intent", + "payer", + "purchase_units", + "application_context", + "payment_source", + "status", + "processing_instruction", + "links" + ], + "properties": { + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "id": { + "type": "string" + }, + "intent": { + "type": "string" + }, + "payer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payer" + }, + "purchase_units": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit" + }, + "nullable": true + }, + "application_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_application_context" + }, + "payment_source": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source" + } + ], + "nullable": true + }, + "status": { + "type": "string" + }, + "processing_instruction": { + "type": "string" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_application_context": { + "required": [ + "brand_name", + "return_url", + "cancel_url" + ], + "properties": { + "brand_name": { + "type": "string" + }, + "landing_page": { + "type": "string", + "default": "NO_PREFERENCE", + "enum": [ + "LOGIN", + "BILLING", + "NO_PREFERENCE" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS", + "enum": [ + "SET_PROVIDED_ADDRESS", + "NO_SHIPPING", + "GET_FROM_FILE" + ] + }, + "user_action": { + "type": "string", + "default": "PAY_NOW", + "enum": [ + "CONTINUE", + "PAY_NOW" + ] + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payer": { + "required": [ + "name", + "email_address", + "payer_id", + "phone", + "address" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "email_address": { + "type": "string" + }, + "payer_id": { + "type": "string" + }, + "phone": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_phone" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source": { + "required": [ + "apple_pay", + "pay_upon_invoice", + "bancontact", + "blik", + "boletobancario", + "card", + "eps", + "giropay", + "ideal", + "multibanco", + "my_bank", + "oxxo", + "p24", + "paypal", + "sofort", + "token", + "trustly", + "google_pay", + "venmo" + ], + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_apple_pay" + }, + "pay_upon_invoice": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_pay_upon_invoice" + } + ], + "nullable": true + }, + "bancontact": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_bancontact" + } + ], + "nullable": true + }, + "blik": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_blik" + } + ], + "nullable": true + }, + "boletobancario": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_boletobancario" + } + ], + "nullable": true + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "eps": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_eps" + } + ], + "nullable": true + }, + "giropay": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_giropay" + } + ], + "nullable": true + }, + "ideal": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_ideal" + } + ], + "nullable": true + }, + "multibanco": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_multibanco" + } + ], + "nullable": true + }, + "my_bank": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_my_bank" + } + ], + "nullable": true + }, + "oxxo": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_oxxo" + } + ], + "nullable": true + }, + "p24": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_p24" + } + ], + "nullable": true + }, + "paypal": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_paypal" + } + ], + "nullable": true + }, + "sofort": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_sofort" + } + ], + "nullable": true + }, + "token": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_token" + } + ], + "nullable": true + }, + "trustly": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_trustly" + } + ], + "nullable": true + }, + "google_pay": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_google_pay" + } + ], + "nullable": true + }, + "venmo": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_venmo" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_apple_pay": { + "required": [ + "name", + "country_code", + "experience_context", + "card", + "attributes" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_bancontact": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_blik": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_boletobancario": { + "required": [ + "name", + "country_code", + "experience_context", + "email", + "expiry_date", + "tax_info", + "billing_address" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + }, + "expiry_date": { + "type": "string" + }, + "tax_info": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_boletobancario_tax_info" + }, + "billing_address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_boletobancario_tax_info": { + "required": [ + "tax_id", + "tax_id_type" + ], + "properties": { + "tax_id": { + "type": "string" + }, + "tax_id_type": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card": { + "required": [ + "name", + "country_code", + "experience_context", + "last_digits", + "brand", + "type", + "vault_id", + "billing_address", + "authentication_result", + "attributes", + "stored_credential" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "last_digits": { + "type": "string" + }, + "brand": { + "type": "string" + }, + "type": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "billing_address": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + } + ], + "nullable": true + }, + "authentication_result": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_authentication_result" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + }, + "stored_credential": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_stored_credential" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_authentication_result": { + "required": [ + "liability_shift", + "three_d_secure" + ], + "properties": { + "liability_shift": { + "type": "string" + }, + "three_d_secure": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card_authentication_result_3d_secure" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_authentication_result_3d_secure": { + "required": [ + "enrollment_status", + "authentication_status" + ], + "properties": { + "enrollment_status": { + "type": "string" + }, + "authentication_status": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_card_stored_credential": { + "required": [ + "payment_initiator", + "payment_type", + "usage", + "previous_network_transaction_reference" + ], + "properties": { + "payment_initiator": { + "type": "string", + "enum": [ + "MERCHANT", + "CUSTOMER" + ] + }, + "payment_type": { + "type": "string", + "enum": [ + "RECURRING", + "ONE_TIME", + "UNSCHEDULED" + ] + }, + "usage": { + "type": "string", + "enum": [ + "DERIVED", + "FIRST", + "SUBSEQUENT" + ] + }, + "previous_network_transaction_reference": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes": { + "required": [ + "vault", + "customer", + "verification" + ], + "properties": { + "vault": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_vault" + }, + "customer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + }, + "verification": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_verification" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_customer": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_vault": { + "required": [ + "id", + "store_in_vault", + "usage_type", + "status", + "confirm_payment_token", + "permit_multiple_payment_tokens", + "customer", + "links" + ], + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "store_in_vault": { + "type": "string" + }, + "usage_type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "confirm_payment_token": { + "type": "string" + }, + "permit_multiple_payment_tokens": { + "type": "boolean" + }, + "customer": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + } + ], + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_attributes_verification": { + "required": [ + "method" + ], + "properties": { + "method": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_experience_context": { + "required": [ + "locale", + "brand_name", + "logo_url", + "return_url", + "cancel_url", + "payment_method_preference", + "customer_service_instructions" + ], + "properties": { + "locale": { + "type": "string" + }, + "brand_name": { + "type": "string" + }, + "logo_url": { + "type": "string" + }, + "landing_page": { + "type": "string", + "default": "NO_PREFERENCE", + "enum": [ + "LOGIN", + "GUEST_CHECKOUT", + "NO_PREFERENCE" + ] + }, + "shipping_preference": { + "type": "string", + "default": "SET_PROVIDED_ADDRESS", + "enum": [ + "SET_PROVIDED_ADDRESS", + "NO_SHIPPING", + "GET_FROM_FILE" + ] + }, + "user_action": { + "type": "string", + "default": "PAY_NOW", + "enum": [ + "CONTINUE", + "PAY_NOW" + ] + }, + "return_url": { + "type": "string" + }, + "cancel_url": { + "type": "string" + }, + "payment_method_preference": { + "description": "Only: PayPal Wallet", + "type": "string", + "enum": [ + "UNRESTRICTED", + "IMMEDIATE_PAYMENT_REQUIRED" + ] + }, + "customer_service_instructions": { + "description": "Only: PUI", + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_common_phone": { + "required": [ + "phone_type", + "phone_number" + ], + "properties": { + "phone_type": { + "type": "string" + }, + "phone_number": { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_eps": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_giropay": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_google_pay": { + "required": [ + "experience_context", + "card", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "card": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_card" + } + ], + "nullable": true + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_ideal": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_multibanco": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_my_bank": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_oxxo": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_p24": { + "required": [ + "name", + "country_code", + "experience_context", + "email" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_pay_upon_invoice": { + "required": [ + "experience_context", + "name", + "email", + "birth_date", + "phone", + "billing_address", + "payment_reference", + "deposit_bank_details" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "email": { + "type": "string" + }, + "birth_date": { + "type": "string" + }, + "phone": { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + }, + "billing_address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "payment_reference": { + "type": "string" + }, + "deposit_bank_details": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_pay_upon_invoice_deposit_bank_details" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_pay_upon_invoice_deposit_bank_details": { + "required": [ + "bic", + "bank_name", + "iban", + "account_holder_name" + ], + "properties": { + "bic": { + "type": "string" + }, + "bank_name": { + "type": "string" + }, + "iban": { + "type": "string" + }, + "account_holder_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_paypal": { + "required": [ + "experience_context", + "email_address", + "account_id", + "billing_agreement_id", + "vault_id", + "name", + "phone_number", + "address", + "birth_date", + "phone_type", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email_address": { + "type": "string" + }, + "account_id": { + "type": "string" + }, + "billing_agreement_id": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "phone_number": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "birth_date": { + "type": "string" + }, + "phone_type": { + "type": "string" + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_sofort": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_token": { + "required": [ + "experience_context", + "id", + "type", + "stored_payment_source" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "id": { + "type": "string" + }, + "type": { + "type": "string" + }, + "stored_payment_source": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_token_stored_payment_source" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_token_stored_payment_source": { + "required": [ + "payment_initiator", + "payment_type", + "usage" + ], + "properties": { + "payment_initiator": { + "type": "string" + }, + "payment_type": { + "type": "string" + }, + "usage": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_trustly": { + "required": [ + "name", + "country_code", + "experience_context" + ], + "properties": { + "name": { + "type": "string" + }, + "country_code": { + "type": "string" + }, + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_payment_source_venmo": { + "required": [ + "experience_context", + "email_address", + "user_name", + "account_id", + "vault_id", + "name", + "phone_number", + "address", + "attributes" + ], + "properties": { + "experience_context": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_experience_context" + }, + "email_address": { + "type": "string" + }, + "user_name": { + "type": "string" + }, + "account_id": { + "type": "string" + }, + "vault_id": { + "type": "string" + }, + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_common_name" + }, + "phone_number": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_phone_number" + } + ], + "nullable": true + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "attributes": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit": { + "required": [ + "reference_id", + "amount", + "payee", + "description", + "custom_id", + "invoice_id", + "items", + "shipping", + "payments" + ], + "properties": { + "reference_id": { + "type": "string" + }, + "amount": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_amount" + }, + "payee": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payee" + }, + "description": { + "type": "string" + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_item" + }, + "nullable": true + }, + "shipping": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping" + }, + "payments": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_amount": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + { + "required": [ + "breakdown" + ], + "properties": { + "breakdown": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_amount_breakdown" + } + ], + "nullable": true + } + }, + "type": "object" + } + ] + }, + "swag_paypal_v2_order_purchase_unit_amount_breakdown": { + "required": [ + "item_total", + "shipping", + "handling", + "tax_total", + "insurance", + "shipping_discount", + "discount" + ], + "properties": { + "item_total": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "shipping": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "handling": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax_total": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "insurance": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "shipping_discount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "discount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_item": { + "required": [ + "name", + "unit_amount", + "tax", + "tax_rate", + "category", + "quantity", + "sku" + ], + "properties": { + "name": { + "type": "string" + }, + "unit_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "tax_rate": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "integer" + }, + { + "type": "float" + } + ] + }, + "category": { + "type": "string", + "enum": [ + "PHYSICAL_GOODS", + "DIGITAL_GOODS", + "DONATION" + ] + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payee": { + "required": [ + "email_address", + "merchant_id", + "display_data" + ], + "properties": { + "email_address": { + "type": "string" + }, + "merchant_id": { + "type": "string" + }, + "display_data": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payee_display_data" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payee_display_data": { + "required": [ + "brand_name" + ], + "properties": { + "brand_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments": { + "required": [ + "authorizations", + "captures", + "refunds" + ], + "properties": { + "authorizations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_authorization" + }, + "nullable": true + }, + "captures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture" + }, + "nullable": true + }, + "refunds": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_authorization": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "seller_protection", + "expiration_time" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "seller_protection": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_common_seller_protection" + }, + "expiration_time": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_authorization_seller_protection": { + "required": [ + "status", + "dispute_categories" + ], + "properties": { + "status": { + "type": "string" + }, + "dispute_categories": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_capture": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "invoice_id", + "note_to_payer", + "seller_protection", + "final_capture", + "seller_receivable_breakdown", + "disbursement_mode" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "note_to_payer": { + "type": "string", + "nullable": true + }, + "seller_protection": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_common_seller_protection" + }, + "final_capture": { + "type": "boolean" + }, + "seller_receivable_breakdown": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_capture_seller_receivable_breakdown" + }, + "disbursement_mode": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_capture_seller_receivable_breakdown": { + "required": [ + "gross_amount", + "paypal_fee", + "net_amount" + ], + "properties": { + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "paypal_fee": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "net_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_common_seller_protection": { + "required": [ + "status", + "dispute_categories" + ], + "properties": { + "status": { + "type": "string" + }, + "dispute_categories": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_refund": { + "required": [ + "status", + "id", + "amount", + "custom_id", + "links", + "create_time", + "update_time", + "invoice_id", + "note_to_payer", + "seller_payable_breakdown" + ], + "properties": { + "status": { + "type": "string" + }, + "id": { + "type": "string" + }, + "amount": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + ], + "nullable": true + }, + "custom_id": { + "type": "string", + "nullable": true + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "create_time": { + "type": "string" + }, + "update_time": { + "type": "string" + }, + "invoice_id": { + "type": "string", + "nullable": true + }, + "note_to_payer": { + "type": "string", + "nullable": true + }, + "seller_payable_breakdown": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_payments_refund_seller_payable_breakdown" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_payments_refund_seller_payable_breakdown": { + "required": [ + "gross_amount", + "paypal_fee", + "net_amount", + "total_refunded_amount" + ], + "properties": { + "gross_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "paypal_fee": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "net_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + }, + "total_refunded_amount": { + "$ref": "#/components/schemas/swag_paypal_v2_common_money" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping": { + "required": [ + "name", + "address", + "trackers" + ], + "properties": { + "name": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_name" + }, + "address": { + "$ref": "#/components/schemas/swag_paypal_v2_common_address" + }, + "trackers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_tracker" + }, + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_name": { + "required": [ + "full_name" + ], + "properties": { + "full_name": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_tracker": { + "required": [ + "id", + "status", + "notify_payer", + "links", + "items" + ], + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "notify_payer": { + "type": "boolean" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_order_purchase_unit_shipping_tracker_item": { + "required": [ + "name", + "quantity", + "sku", + "url", + "image_url" + ], + "properties": { + "name": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "sku": { + "type": "string", + "nullable": true + }, + "url": { + "type": "string", + "nullable": true + }, + "image_url": { + "type": "string", + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v2_order_tracker": { + "required": [ + "capture_id", + "tracking_number", + "carrier", + "carrier_name_other", + "items" + ], + "properties": { + "capture_id": { + "type": "string" + }, + "tracking_number": { + "type": "string" + }, + "carrier": { + "type": "string" + }, + "carrier_name_other": { + "type": "string", + "nullable": true + }, + "notify_payer": { + "type": "boolean", + "default": false + }, + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_order_purchase_unit_shipping_tracker_item" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_patch": { + "required": [ + "op", + "path", + "value", + "from" + ], + "properties": { + "op": { + "type": "string" + }, + "path": { + "type": "string" + }, + "value": { + "nullable": true, + "oneOf": [ + { + "type": "integer" + }, + { + "type": "float" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "array", + "items": { + "type": "mixed" + } + } + ] + }, + "from": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral": { + "required": [ + "business_entity", + "preferred_language_code", + "tracking_id", + "partner_config_override", + "operations", + "products", + "capabilities", + "legal_consents", + "links" + ], + "properties": { + "business_entity": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_business_entity" + }, + "preferred_language_code": { + "type": "string" + }, + "tracking_id": { + "type": "string" + }, + "partner_config_override": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_partner_config_override" + }, + "operations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation" + } + }, + "products": { + "type": "array", + "items": { + "type": "string" + } + }, + "capabilities": { + "type": "array", + "items": { + "type": "string" + } + }, + "legal_consents": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_legal_consent" + } + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_business_entity": { + "required": [ + "addresses" + ], + "properties": { + "addresses": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_business_entity_address" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_business_entity_address": { + "required": [ + "country_code" + ], + "properties": { + "country_code": { + "type": "string" + }, + "type": { + "type": "string", + "default": "WORK" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_legal_consent": { + "required": [ + "granted" + ], + "properties": { + "type": { + "type": "string", + "default": "SHARE_DATA_CONSENT" + }, + "granted": { + "type": "boolean" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation": { + "required": [ + "api_integration_preference" + ], + "properties": { + "operation": { + "type": "string", + "default": "API_INTEGRATION" + }, + "api_integration_preference": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference": { + "required": [ + "rest_api_integration" + ], + "properties": { + "rest_api_integration": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference_integration" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference_integration": { + "required": [ + "third_party_details" + ], + "properties": { + "integration_method": { + "type": "string", + "default": "PAYPAL" + }, + "integration_type": { + "type": "string", + "default": "THIRD_PARTY" + }, + "third_party_details": { + "$ref": "#/components/schemas/swag_paypal_v2_referral_operation_integration_preference_integration_third_party_details" + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_operation_integration_preference_integration_third_party_details": { + "required": [ + "features" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "type": "object" + }, + "swag_paypal_v2_referral_partner_config_override": { + "required": [ + "return_url", + "partner_logo_url" + ], + "properties": { + "return_url": { + "type": "string" + }, + "partner_logo_url": { + "type": "string" + } + }, + "type": "object" + }, + "swag_paypal_v3_payment_token": { + "required": [ + "id", + "status", + "customer", + "payment_source", + "links", + "metadata" + ], + "properties": { + "id": { + "type": "string" + }, + "status": { + "type": "string" + }, + "customer": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source_common_attributes_customer" + }, + "payment_source": { + "$ref": "#/components/schemas/swag_paypal_v2_order_payment_source" + }, + "links": { + "type": "array", + "items": { + "$ref": "#/components/schemas/swag_paypal_v2_common_link" + } + }, + "metadata": { + "oneOf": [ + { + "$ref": "#/components/schemas/swag_paypal_v3_payment_token_metadata" + } + ], + "nullable": true + } + }, + "type": "object" + }, + "swag_paypal_v3_payment_token_metadata": { + "required": [ + "order_id" + ], + "properties": { + "order_id": { + "type": "string" + } + }, + "type": "object" + } + } + }, + "tags": [ + { + "name": "Store API", + "description": "Store API" + }, + { + "name": "PayPal", + "description": "PayPal" + } + ] +} \ No newline at end of file diff --git a/src/Resources/app/administration/package.json b/src/Resources/app/administration/package.json index 156c34cc6..892c34539 100644 --- a/src/Resources/app/administration/package.json +++ b/src/Resources/app/administration/package.json @@ -13,7 +13,7 @@ "lint": "eslint --ext .js,.ts,.vue src", "lint-fix": "eslint --ext .js,.ts,.vue src --fix", "lint-ci": "npm run lint -- --format junit --output-file eslint.junit.xml", - "openapi-types": "openapi-typescript ../../../../var/cache/openapi.yaml --empty-objects-unknown --default-non-nullable --output src/types/openapi.d.ts" + "openapi-types": "openapi-typescript ../../Schema/AdminApi/openapi.json --empty-objects-unknown --default-non-nullable --output src/types/openapi.d.ts" }, "devDependencies": { "@babel/eslint-parser": "^7.19.1", diff --git a/src/Resources/app/administration/src/types/openapi.d.ts b/src/Resources/app/administration/src/types/openapi.d.ts index c8801a035..f70b567a6 100644 --- a/src/Resources/app/administration/src/types/openapi.d.ts +++ b/src/Resources/app/administration/src/types/openapi.d.ts @@ -9,34 +9,6 @@ export interface paths { /** @description Sets PayPal as the default payment method for a given Saleschannel, or all. */ post: operations["setPayPalAsDefault"]; }; - "/store-api/category/{navigationId}": { - /** @description This endpoint returns information about the category, as well as a fully resolved (hydrated with mapping values) CMS page, if one is assigned to the category. You can pass slots which should be resolved exclusively. */ - post: operations["readCategory"]; - }; - "/store-api/paypal/express/create-order": { - /** @description Creates a PayPal order from the existing cart */ - post: operations["createPayPalExpressOrder"]; - }; - "/store-api/paypal/express/prepare-checkout": { - /** @description Logs in a guest customer, with the data of a paypal order */ - post: operations["preparePayPalExpressCheckout"]; - }; - "/store-api/paypal/pui/payment-instructions/{transactionId}": { - /** @description Tries to get payment instructions for PUI payments */ - get: operations["getPUIPaymentInstructions"]; - }; - "/store-api/paypal/vault/clear": { - /** @description Clears the vault for the current customer */ - post: operations["paypalVaultClear"]; - }; - "/store-api/paypal/create-order": { - /** @description Creates a PayPal order from the existing cart or an order */ - post: operations["createPayPalOrder"]; - }; - "/store-api/paypal/payment-method-eligibility": { - /** @description Sets ineligible payment methods to be removed from the session */ - post: operations["setPaymentMethodEligibility"]; - }; "/api/paypal/dispute": { /** @description Loads a list of PayPal disputes */ get: operations["disputeList"]; @@ -142,18 +114,6 @@ export interface paths { "/api/_action/paypal/merchant-information": { get: operations["getMerchantInformation"]; }; - "/.well-known/apple-developer-merchantid-domain-association": { - /** @description Return the Apple Pay developer association */ - get: operations["applePayDomainAssociation"]; - }; - "/paypal/error": { - /** @description Adds an error message to the flash bag */ - post: operations["paypalError"]; - }; - "/paypal/handle-error": { - /** @description Adds an error message to the flash bag */ - post: operations["paypalHandleError"]; - }; "/api/_action/paypal/webhook/status/{salesChannelId}": { get: operations["getWebhookStatus"]; }; @@ -172,30 +132,6 @@ export type webhooks = Record; export interface components { schemas: { - swag_paypal_pos_webhook: { - organizationUuid: string; - messageUuid: string; - eventName: string; - payload: string; - timestamp: string; - }; - swag_paypal_pos_setting_additional_information: { - extensions: { - [key: string]: unknown; - }; - countryId: string; - currencyId: string; - languageId: string | null; - customerGroupId: string; - navigationCategoryId: string; - shippingMethodId: string; - paymentMethodId: string; - merchantInformation: Record[]; - }; - swag_paypal_pos_setting_product_count: { - localCount: number; - remoteCount: number; - }; swag_paypal_v1_capture: { amount: components["schemas"]["swag_paypal_v1_common_amount"]; is_final_capture: boolean; @@ -1424,6 +1360,30 @@ export interface components { swag_paypal_v3_payment_token_metadata: { order_id: string; }; + swag_paypal_pos_webhook: { + organizationUuid: string; + messageUuid: string; + eventName: string; + payload: string; + timestamp: string; + }; + swag_paypal_pos_setting_additional_information: { + extensions: { + [key: string]: unknown; + }; + countryId: string; + currencyId: string; + languageId: string | null; + customerGroupId: string; + navigationCategoryId: string; + shippingMethodId: string; + paymentMethodId: string; + merchantInformation: Record[]; + }; + swag_paypal_pos_setting_product_count: { + localCount: number; + remoteCount: number; + }; swag_paypal_setting_merchant_information: { merchantIntegrations: components["schemas"]["swag_paypal_v1_merchant_integrations"]; /** @description string> key: paymentMethodId, value: capability (see AbstractMethodData) */ @@ -1462,123 +1422,6 @@ export interface operations { }; }; }; - /** @description This endpoint returns information about the category, as well as a fully resolved (hydrated with mapping values) CMS page, if one is assigned to the category. You can pass slots which should be resolved exclusively. */ - readCategory: { - parameters: { - path: { - /** @description Identifier of the navigation to be fetched */ - navigationId: string; - }; - }; - responses: { - 200: components["schemas"]["category_flat"]; - }; - }; - /** @description Creates a PayPal order from the existing cart */ - createPayPalExpressOrder: { - responses: { - /** @description The new token of the order */ - 200: { - content: never; - }; - }; - }; - /** @description Logs in a guest customer, with the data of a paypal order */ - preparePayPalExpressCheckout: { - requestBody?: { - content: { - "application/json": { - /** @description ID of the paypal order */ - token?: string; - }; - }; - }; - responses: { - /** @description The url to redirect to */ - 200: { - content: { - "application/json": { - redirectUrl?: string; - }; - }; - }; - }; - }; - /** @description Tries to get payment instructions for PUI payments */ - getPUIPaymentInstructions: { - parameters: { - path: { - /** @description Identifier of the order transaction to be fetched */ - transactionId: string; - }; - }; - responses: { - /** @description The payment instructions of the order */ - 200: { - content: never; - }; - }; - }; - /** @description Clears the vault for the current customer */ - paypalVaultClear: { - requestBody?: { - content: { - "application/json": { - /** @enum {string} */ - type?: "cancel" | "browser" | "error"; - }; - }; - }; - responses: { - /** @description Vault has been cleared successfully */ - 204: { - content: never; - }; - }; - }; - /** @description Creates a PayPal order from the existing cart or an order */ - createPayPalOrder: { - requestBody?: { - content: { - "application/json": { - /** - * @description Use an existing order id to create PayPal order - * @default ppcp - */ - product: string; - /** @description Use an existing order id to create PayPal order */ - orderId?: string; - }; - }; - }; - responses: { - /** @description Returns the created PayPal order id */ - 200: { - content: { - "application/json": { - token?: string; - }; - }; - }; - }; - }; - /** @description Sets ineligible payment methods to be removed from the session */ - setPaymentMethodEligibility: { - requestBody?: { - content: { - "application/json": { - /** @description List of PayPal payment method identifiers according to constant REMOVABLE_PAYMENT_HANDLERS */ - paymentMethods?: string[]; - }; - }; - }; - responses: { - /** @description Success */ - 204: { - content: never; - }; - }; - }; /** @description Loads a list of PayPal disputes */ disputeList: { parameters: { @@ -2182,58 +2025,6 @@ export interface operations { }; }; }; - /** @description Return the Apple Pay developer association */ - applePayDomainAssociation: { - responses: { - /** @description Apple developer token */ - 200: { - content: never; - }; - }; - }; - /** @description Adds an error message to the flash bag */ - paypalError: { - requestBody?: { - content: { - "application/json": { - /** - * @deprecated - * @enum {string} - */ - type?: "cancel" | "browser" | "error"; - }; - }; - }; - responses: { - /** @description Error was added to the flash bag */ - 204: { - content: never; - }; - }; - }; - /** @description Adds an error message to the flash bag */ - paypalHandleError: { - requestBody?: { - content: { - "application/json": { - code?: string; - /** - * @description Will prevent reinitiate the corresponding payment method. - * @default false - */ - fatal: boolean; - /** @default null */ - error: string; - }; - }; - }; - responses: { - /** @description Error was added to the flash bag */ - 204: { - content: never; - }; - }; - }; getWebhookStatus: { parameters: { path: { diff --git a/src/RestApi/V1/Api/Payment/Transaction/ItemList/ShippingOption.php b/src/RestApi/V1/Api/Payment/Transaction/ItemList/ShippingOption.php index b100bf438..90dd01253 100644 --- a/src/RestApi/V1/Api/Payment/Transaction/ItemList/ShippingOption.php +++ b/src/RestApi/V1/Api/Payment/Transaction/ItemList/ShippingOption.php @@ -11,7 +11,10 @@ use Shopware\Core\Framework\Log\Package; use Swag\PayPal\RestApi\PayPalApiStruct; -#[OA\Schema(schema: 'swag_paypal_v1_payment_transaction_item_list_shipping_option')] +#[OA\Schema( + schema: 'swag_paypal_v1_payment_transaction_item_list_shipping_option', + properties: [], # so an empty object will be generated +)] #[Package('checkout')] class ShippingOption extends PayPalApiStruct { diff --git a/tests/OpenAPISchemaTest.php b/tests/OpenAPISchemaTest.php index 598f93b4b..05a3f23b0 100644 --- a/tests/OpenAPISchemaTest.php +++ b/tests/OpenAPISchemaTest.php @@ -16,6 +16,7 @@ use OpenApi\Generator; use PHPUnit\Framework\TestCase; use Shopware\Core\Framework\Log\Package; +use Swag\PayPal\Checkout\ExpressCheckout\SalesChannel\ExpressCategoryRoute; use Swag\PayPal\Checkout\Plus\PlusPaymentFinalizeController; use Swag\PayPal\Checkout\Plus\PlusPaymentHandleController; use Swag\PayPal\Checkout\SalesChannel\FilteredPaymentMethodRoute; @@ -41,6 +42,9 @@ class OpenAPISchemaTest extends TestCase '\\' . PayPalController::class . '::expressPrepareCart', '\\' . PayPalController::class . '::clearVault', + // Decoration, covered by platform + '\\' . ExpressCategoryRoute::class . '::load', + '\\' . FilteredPaymentMethodRoute::class . '::load', '\\' . PlusPaymentHandleController::class . '::handlePlusPayment', '\\' . PlusPaymentFinalizeController::class . '::finalizeTransaction',