{
  "swagger": "2.0",
  "info": {
    "title": "payment/api/subscription/v1/subscription.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "SubscriptionService"
    },
    {
      "name": "CheckoutService"
    },
    {
      "name": "PaymentGatewayService"
    },
    {
      "name": "StripePaymentGatewayService"
    },
    {
      "name": "SubscriptionInternalService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/v1/payment/checkout/now": {
      "post": {
        "operationId": "CheckoutService_CheckoutNow",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1CheckoutNowReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CheckoutNowRequest"
            }
          }
        ],
        "tags": [
          "CheckoutService"
        ]
      }
    },
    "/v1/payment/checkout/order/{orderId}": {
      "post": {
        "operationId": "CheckoutService_CheckoutOrder",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1CheckoutOrderReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string"
                },
                "currencyCode": {
                  "type": "string"
                }
              },
              "required": [
                "provider"
              ]
            }
          }
        ],
        "tags": [
          "CheckoutService"
        ]
      }
    },
    "/v1/payment/methods": {
      "get": {
        "operationId": "PaymentGatewayService_GetPaymentMethod",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetPaymentMethodReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "orderId",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "isTest",
            "in": "query",
            "required": false,
            "type": "boolean"
          }
        ],
        "tags": [
          "PaymentGatewayService"
        ]
      }
    },
    "/v1/payment/stripe/config": {
      "get": {
        "operationId": "StripePaymentGatewayService_GetStripeConfig",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1GetStripeConfigReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "tags": [
          "StripePaymentGatewayService"
        ]
      }
    },
    "/v1/payment/stripe/webhook": {
      "post": {
        "operationId": "StripePaymentGatewayService_StripeWebhook",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1StripeWebhookReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {}
            }
          }
        ],
        "tags": [
          "StripePaymentGatewayService"
        ]
      }
    },
    "/v1/subscription": {
      "post": {
        "operationId": "SubscriptionService_CreateSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1CreateSubscriptionRequest"
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/list": {
      "post": {
        "operationId": "SubscriptionService_ListSubscription2",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListSubscriptionReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1ListSubscriptionRequest"
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/my/list": {
      "post": {
        "operationId": "SubscriptionService_ListMySubscription2",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListMySubscriptionReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "$ref": "#/definitions/v1ListMySubscriptionRequest"
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/my/{id}": {
      "get": {
        "operationId": "SubscriptionService_GetMySubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/my/{id}/cancel": {
      "post": {
        "operationId": "SubscriptionService_CancelMySubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object"
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/my/{subscription.id}": {
      "put": {
        "operationId": "SubscriptionService_UpdateMySubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "subscription.id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "subscription": {
                  "type": "object"
                },
                "updateMask": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/{id}": {
      "get": {
        "operationId": "SubscriptionService_GetSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/{id}/cancel": {
      "post": {
        "operationId": "SubscriptionService_CancelSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object"
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscription/{subscription.id}": {
      "put": {
        "operationId": "SubscriptionService_UpdateSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/subscriptionv1Subscription"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "subscription.id",
            "in": "path",
            "required": true,
            "type": "string"
          },
          {
            "name": "body",
            "in": "body",
            "required": true,
            "schema": {
              "type": "object",
              "properties": {
                "subscription": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "$ref": "#/definitions/v1SubscriptionItemParams"
                      }
                    }
                  }
                },
                "updateMask": {
                  "type": "string"
                }
              }
            }
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscriptions": {
      "get": {
        "operationId": "SubscriptionService_ListSubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListSubscriptionReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "pageOffset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.id.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.id.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.userId.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.userId.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.provider.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.provider.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.providerKey.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.providerKey.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$like",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    },
    "/v1/subscriptions/my": {
      "get": {
        "operationId": "SubscriptionService_ListMySubscription",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/v1ListMySubscriptionReply"
            }
          },
          "default": {
            "description": "An unexpected error response.",
            "schema": {
              "$ref": "#/definitions/googlerpcStatus"
            }
          }
        },
        "parameters": [
          {
            "name": "pageOffset",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "pageSize",
            "in": "query",
            "required": false,
            "type": "integer",
            "format": "int32"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.id.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.id.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.id.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.id.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.userId.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.userId.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.userId.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.userId.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.provider.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.provider.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.provider.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.provider.$like",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$eq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$neq",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$contains",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$starts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$nstarts_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$ends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$nends_with",
            "in": "query",
            "required": false,
            "type": "string"
          },
          {
            "name": "filter.providerKey.$in",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.providerKey.$nin",
            "in": "query",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "multi"
          },
          {
            "name": "filter.providerKey.$null",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$nnull",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$empty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$nempty",
            "in": "query",
            "required": false,
            "type": "boolean"
          },
          {
            "name": "filter.providerKey.$like",
            "in": "query",
            "required": false,
            "type": "string"
          }
        ],
        "tags": [
          "SubscriptionService"
        ]
      }
    }
  },
  "definitions": {
    "blobBlobFile": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "mime": {
          "type": "string"
        },
        "size": {
          "type": "string",
          "format": "int64"
        },
        "url": {
          "type": "string"
        },
        "metadata": {
          "type": "object"
        }
      }
    },
    "googlerpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    },
    "lbsAddress": {
      "type": "object",
      "properties": {
        "country": {
          "type": "string"
        },
        "region": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "title": "State or province"
        },
        "city": {
          "type": "string"
        },
        "zipCode": {
          "type": "string"
        },
        "line1": {
          "type": "string"
        },
        "line2": {
          "type": "string"
        },
        "line3": {
          "type": "string"
        },
        "geo": {
          "type": "object",
          "title": "Geo geojson"
        }
      }
    },
    "operationStringFilterOperation": {
      "type": "object",
      "properties": {
        "$eq": {
          "type": "string",
          "x-nullable": true
        },
        "$neq": {
          "type": "string",
          "x-nullable": true
        },
        "$contains": {
          "type": "string",
          "x-nullable": true
        },
        "$starts_with": {
          "type": "string",
          "x-nullable": true
        },
        "$nstarts_with": {
          "type": "string",
          "x-nullable": true
        },
        "$ends_with": {
          "type": "string",
          "x-nullable": true
        },
        "$nends_with": {
          "type": "string",
          "x-nullable": true
        },
        "$in": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "$nin": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "$null": {
          "type": "boolean",
          "x-nullable": true
        },
        "$nnull": {
          "type": "boolean",
          "x-nullable": true
        },
        "$empty": {
          "type": "boolean",
          "x-nullable": true
        },
        "$nempty": {
          "type": "boolean",
          "x-nullable": true
        },
        "$like": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "pricePricePb": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "type": "string"
        },
        "digits": {
          "type": "integer",
          "format": "int32"
        },
        "text": {
          "type": "string"
        },
        "amountDecimal": {
          "type": "string"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "protobufNullValue": {
      "type": "string",
      "enum": [
        "NULL_VALUE"
      ],
      "default": "NULL_VALUE",
      "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\n The JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value."
    },
    "stripeEphemeralKey": {
      "type": "object",
      "properties": {
        "secret": {
          "type": "string"
        }
      }
    },
    "stripeInvoice": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "paymentIntent": {
          "$ref": "#/definitions/stripePaymentIntent"
        }
      }
    },
    "stripePaymentIntent": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "clientSecret": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    },
    "stripeSubscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "latestInvoice": {
          "$ref": "#/definitions/stripeInvoice"
        }
      }
    },
    "subscriptionv1Subscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "userId": {
          "type": "string"
        },
        "user": {
          "$ref": "#/definitions/v1User"
        },
        "provider": {
          "type": "string"
        },
        "providerKey": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SubscriptionItem"
          }
        },
        "providerInfo": {
          "$ref": "#/definitions/v1SubscriptionProviderInfo"
        }
      }
    },
    "v1CheckoutItemParams": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "priceId": {
          "type": "string"
        },
        "quantity": {
          "type": "string",
          "format": "int64"
        },
        "bizPayload": {
          "type": "object"
        }
      }
    },
    "v1CheckoutNowReply": {
      "type": "object",
      "properties": {
        "subscription": {
          "$ref": "#/definitions/subscriptionv1Subscription"
        },
        "order": {
          "$ref": "#/definitions/v1Order"
        }
      }
    },
    "v1CheckoutNowRequest": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1CheckoutItemParams"
          }
        }
      },
      "required": [
        "provider"
      ]
    },
    "v1CheckoutOrderReply": {
      "type": "object",
      "properties": {
        "paymentProviderInfo": {
          "$ref": "#/definitions/v1OrderPaymentProviderInfo"
        }
      }
    },
    "v1CreateSubscriptionRequest": {
      "type": "object",
      "properties": {
        "userId": {
          "type": "string"
        },
        "provider": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SubscriptionItemParams"
          }
        }
      }
    },
    "v1Effect": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "GRANT",
        "FORBIDDEN"
      ],
      "default": "UNKNOWN"
    },
    "v1Gender": {
      "type": "string",
      "enum": [
        "UNKNOWN",
        "MALE",
        "FEMALE",
        "OTHER"
      ],
      "default": "UNKNOWN"
    },
    "v1GetPaymentMethodReply": {
      "type": "object",
      "properties": {
        "methods": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PaymentMethod"
          }
        }
      }
    },
    "v1GetStripeConfigReply": {
      "type": "object",
      "properties": {
        "isTest": {
          "type": "boolean"
        },
        "publishKey": {
          "type": "string"
        },
        "priceTables": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "customerId": {
          "type": "string"
        }
      }
    },
    "v1ListMySubscriptionReply": {
      "type": "object",
      "properties": {
        "totalSize": {
          "type": "integer",
          "format": "int32"
        },
        "filterSize": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/subscriptionv1Subscription"
          }
        }
      }
    },
    "v1ListMySubscriptionRequest": {
      "type": "object",
      "properties": {
        "pageOffset": {
          "type": "integer",
          "format": "int32"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32"
        },
        "search": {
          "type": "string"
        },
        "sort": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fields": {
          "type": "string"
        },
        "filter": {
          "$ref": "#/definitions/v1SubscriptionFilter"
        }
      }
    },
    "v1ListSubscriptionReply": {
      "type": "object",
      "properties": {
        "totalSize": {
          "type": "integer",
          "format": "int32"
        },
        "filterSize": {
          "type": "integer",
          "format": "int32"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/subscriptionv1Subscription"
          }
        }
      }
    },
    "v1ListSubscriptionRequest": {
      "type": "object",
      "properties": {
        "pageOffset": {
          "type": "integer",
          "format": "int32"
        },
        "pageSize": {
          "type": "integer",
          "format": "int32"
        },
        "search": {
          "type": "string"
        },
        "sort": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fields": {
          "type": "string"
        },
        "filter": {
          "$ref": "#/definitions/v1SubscriptionFilter"
        }
      }
    },
    "v1Order": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "tenantId": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "currencyCode": {
          "type": "string"
        },
        "totalPrice": {
          "$ref": "#/definitions/pricePricePb"
        },
        "totalPriceInclTax": {
          "$ref": "#/definitions/pricePricePb"
        },
        "discount": {
          "$ref": "#/definitions/pricePricePb"
        },
        "originalPrice": {
          "$ref": "#/definitions/pricePricePb"
        },
        "paidPrice": {
          "$ref": "#/definitions/pricePricePb"
        },
        "paidTime": {
          "type": "string",
          "format": "date-time"
        },
        "payBefore": {
          "type": "string",
          "format": "date-time"
        },
        "payProvider": {
          "type": "string"
        },
        "shippingAddr": {
          "$ref": "#/definitions/lbsAddress"
        },
        "billingAddr": {
          "$ref": "#/definitions/lbsAddress"
        },
        "customerId": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1OrderItem"
          }
        },
        "paymentProviderInfo": {
          "$ref": "#/definitions/v1OrderPaymentProviderInfo"
        },
        "paymentProviders": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1OrderPaymentProvider"
          }
        }
      }
    },
    "v1OrderItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "qty": {
          "type": "string",
          "format": "int64"
        },
        "currencyCode": {
          "type": "string"
        },
        "price": {
          "$ref": "#/definitions/pricePricePb"
        },
        "priceTax": {
          "$ref": "#/definitions/pricePricePb"
        },
        "priceInclTax": {
          "$ref": "#/definitions/pricePricePb"
        },
        "originalPrice": {
          "$ref": "#/definitions/pricePricePb"
        },
        "rowTotal": {
          "$ref": "#/definitions/pricePricePb"
        },
        "rowTotalTax": {
          "$ref": "#/definitions/pricePricePb"
        },
        "rowTotalInclTax": {
          "$ref": "#/definitions/pricePricePb"
        },
        "rowDiscount": {
          "$ref": "#/definitions/pricePricePb"
        },
        "product": {
          "$ref": "#/definitions/v1OrderProduct"
        },
        "isGiveaway": {
          "type": "boolean"
        },
        "bizPayload": {
          "type": "object"
        }
      }
    },
    "v1OrderPaymentProvider": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "providerKey": {
          "type": "string"
        }
      }
    },
    "v1OrderPaymentProviderInfo": {
      "type": "object",
      "properties": {
        "stripe": {
          "$ref": "#/definitions/v1OrderPaymentStripeInfo"
        }
      }
    },
    "v1OrderPaymentStripeInfo": {
      "type": "object",
      "properties": {
        "paymentIntent": {
          "$ref": "#/definitions/stripePaymentIntent"
        },
        "ephemeralKey": {
          "$ref": "#/definitions/stripeEphemeralKey"
        }
      }
    },
    "v1OrderProduct": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "mainPic": {
          "type": "string"
        },
        "id": {
          "type": "string",
          "x-nullable": true
        },
        "version": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "skuId": {
          "type": "string",
          "x-nullable": true
        },
        "skuTitle": {
          "type": "string"
        },
        "priceId": {
          "type": "string",
          "x-nullable": true
        }
      }
    },
    "v1PaymentMethod": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "logo": {
          "type": "string"
        },
        "desc": {
          "type": "string"
        },
        "notice": {
          "type": "string"
        }
      }
    },
    "v1Permission": {
      "type": "object",
      "properties": {
        "namespace": {
          "type": "string"
        },
        "resource": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "effect": {
          "$ref": "#/definitions/v1Effect"
        },
        "tenantId": {
          "type": "string"
        }
      }
    },
    "v1PermissionDef": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string"
        },
        "side": {
          "$ref": "#/definitions/v1PermissionSide"
        },
        "extra": {
          "type": "object"
        },
        "namespace": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "granted": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "v1PermissionDefGroup": {
      "type": "object",
      "properties": {
        "displayName": {
          "type": "string"
        },
        "side": {
          "$ref": "#/definitions/v1PermissionSide"
        },
        "priority": {
          "type": "integer",
          "format": "int32"
        },
        "def": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PermissionDef"
          }
        },
        "extra": {
          "type": "object"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "v1PermissionSide": {
      "type": "string",
      "enum": [
        "BOTH",
        "HOST_ONLY",
        "TENANT_ONLY"
      ],
      "default": "BOTH"
    },
    "v1Role": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "isPreserved": {
          "type": "boolean"
        },
        "acl": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Permission"
          }
        },
        "defGroups": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1PermissionDefGroup"
          }
        }
      }
    },
    "v1StripeWebhookReply": {
      "type": "object"
    },
    "v1SubscriptionFilter": {
      "type": "object",
      "properties": {
        "id": {
          "$ref": "#/definitions/operationStringFilterOperation"
        },
        "userId": {
          "$ref": "#/definitions/operationStringFilterOperation"
        },
        "provider": {
          "$ref": "#/definitions/operationStringFilterOperation"
        },
        "providerKey": {
          "$ref": "#/definitions/operationStringFilterOperation"
        },
        "and": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SubscriptionFilter"
          }
        },
        "or": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SubscriptionFilter"
          }
        }
      }
    },
    "v1SubscriptionItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "priceId": {
          "type": "string"
        },
        "productId": {
          "type": "string"
        },
        "quantity": {
          "type": "string",
          "format": "int64"
        },
        "priceOwnerId": {
          "type": "string"
        },
        "priceOwnerType": {
          "type": "string"
        },
        "bizPayload": {
          "type": "object"
        }
      }
    },
    "v1SubscriptionItemParams": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "priceId": {
          "type": "string"
        },
        "quantity": {
          "type": "integer",
          "format": "int32"
        },
        "bizPayload": {
          "type": "object"
        }
      }
    },
    "v1SubscriptionProviderInfo": {
      "type": "object",
      "properties": {
        "stripe": {
          "$ref": "#/definitions/v1SubscriptionStripeInfo"
        }
      }
    },
    "v1SubscriptionStripeInfo": {
      "type": "object",
      "properties": {
        "subscription": {
          "$ref": "#/definitions/stripeSubscription"
        }
      }
    },
    "v1UpdateMySubscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "v1UpdateSubscription": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "items": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1SubscriptionItemParams"
          }
        }
      },
      "required": [
        "id"
      ]
    },
    "v1User": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "username": {
          "type": "string",
          "x-nullable": true
        },
        "name": {
          "type": "string",
          "x-nullable": true
        },
        "phone": {
          "type": "string",
          "x-nullable": true
        },
        "email": {
          "type": "string",
          "x-nullable": true
        },
        "birthday": {
          "type": "string",
          "format": "date-time",
          "x-nullable": true
        },
        "gender": {
          "$ref": "#/definitions/v1Gender"
        },
        "roles": {
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/definitions/v1Role"
          }
        },
        "avatar": {
          "$ref": "#/definitions/blobBlobFile"
        }
      }
    }
  }
}
