Skip to content

Send and receive SMS messages using your Android phone programmatically via a simple HTTP API

Update swagger

Acho Arnold473f511f195d
diff --git a/api/docs/docs.go b/api/docs/docs.go
index 60d623e7..f0a3cc7d 100644
--- a/api/docs/docs.go
+++ b/api/docs/docs.go
@@ -2363,29 +2363,29 @@ const docTemplate = `{
}
}
},
- "/users/subscription/invoices": {
- "get": {
+ "/users/subscription/invoices/{subscriptionInvoiceID}": {
+ "post": {
"security": [
{
"ApiKeyAuth": []
}
],
- "description": "Subscription invoices are generated throughout the lifecycle of a subscription, typically there is one at the time of purchase and then one for each renewal.",
+ "description": "Generates a new invoice PDF file for the given subscription payment with given parameters.",
"consumes": [
"application/json"
],
"produces": [
- "application/json"
+ "application/pdf"
],
"tags": [
"Users"
],
- "summary": "Get the last 10 subscription invoices.",
+ "summary": "Generate a subscription invoice",
"responses": {
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/responses.UserInvoicesResponse"
+ "type": "file"
}
},
"400": {
@@ -2415,29 +2415,29 @@ const docTemplate = `{
}
}
},
- "/users/subscription/invoices/{subscriptionInvoiceID}": {
- "post": {
+ "/users/subscription/payments": {
+ "get": {
"security": [
{
"ApiKeyAuth": []
}
],
- "description": "Generates a new invoice for the given subscription with given parameters.",
+ "description": "Subscription payments are generated throughout the lifecycle of a subscription, typically there is one at the time of purchase and then one for each renewal.",
"consumes": [
"application/json"
],
"produces": [
- "application/pdf"
+ "application/json"
],
"tags": [
"Users"
],
- "summary": "Generate a subscription invoice",
+ "summary": "Get the last 10 subscription payments.",
"responses": {
"200": {
"description": "OK",
"schema": {
- "type": "file"
+ "$ref": "#/definitions/responses.UserSubscriptionPaymentsResponse"
}
},
"400": {
@@ -4318,27 +4318,6 @@ const docTemplate = `{
}
}
},
- "responses.UserInvoicesResponse": {
- "type": "object",
- "required": [
- "data",
- "message",
- "status"
- ],
- "properties": {
- "data": {
- "$ref": "#/definitions/responses.subscriptionInvoicesAPIResponse"
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
"responses.UserResponse": {
"type": "object",
"required": [
@@ -4360,56 +4339,13 @@ const docTemplate = `{
}
}
},
- "responses.WebhookResponse": {
+ "responses.UserSubscriptionPaymentsResponse": {
"type": "object",
"required": [
"data",
"message",
"status"
],
- "properties": {
- "data": {
- "$ref": "#/definitions/entities.Webhook"
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
- "responses.WebhooksResponse": {
- "type": "object",
- "required": [
- "data",
- "message",
- "status"
- ],
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/entities.Webhook"
- }
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
- "responses.subscriptionInvoicesAPIResponse": {
- "type": "object",
- "required": [
- "data"
- ],
"properties": {
"data": {
"type": "array",
@@ -4450,9 +4386,7 @@ const docTemplate = `{
"total",
"total_formatted",
"total_usd",
- "updated_at",
- "user_email",
- "user_name"
+ "updated_at"
],
"properties": {
"billing_reason": {
@@ -4533,12 +4467,6 @@ const docTemplate = `{
},
"updated_at": {
"type": "string"
- },
- "user_email": {
- "type": "string"
- },
- "user_name": {
- "type": "string"
}
}
},
@@ -4550,6 +4478,59 @@ const docTemplate = `{
}
}
}
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
+ }
+ }
+ },
+ "responses.WebhookResponse": {
+ "type": "object",
+ "required": [
+ "data",
+ "message",
+ "status"
+ ],
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/entities.Webhook"
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
+ }
+ }
+ },
+ "responses.WebhooksResponse": {
+ "type": "object",
+ "required": [
+ "data",
+ "message",
+ "status"
+ ],
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/entities.Webhook"
+ }
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
}
}
}
diff --git a/api/docs/swagger.json b/api/docs/swagger.json
index 35e5a245..88c252d1 100644
--- a/api/docs/swagger.json
+++ b/api/docs/swagger.json
@@ -2145,23 +2145,23 @@
}
}
},
- "/users/subscription/invoices": {
- "get": {
+ "/users/subscription/invoices/{subscriptionInvoiceID}": {
+ "post": {
"security": [
{
"ApiKeyAuth": []
}
],
- "description": "Subscription invoices are generated throughout the lifecycle of a subscription, typically there is one at the time of purchase and then one for each renewal.",
+ "description": "Generates a new invoice PDF file for the given subscription payment with given parameters.",
"consumes": ["application/json"],
- "produces": ["application/json"],
+ "produces": ["application/pdf"],
"tags": ["Users"],
- "summary": "Get the last 10 subscription invoices.",
+ "summary": "Generate a subscription invoice",
"responses": {
"200": {
"description": "OK",
"schema": {
- "$ref": "#/definitions/responses.UserInvoicesResponse"
+ "type": "file"
}
},
"400": {
@@ -2191,23 +2191,23 @@
}
}
},
- "/users/subscription/invoices/{subscriptionInvoiceID}": {
- "post": {
+ "/users/subscription/payments": {
+ "get": {
"security": [
{
"ApiKeyAuth": []
}
],
- "description": "Generates a new invoice for the given subscription with given parameters.",
+ "description": "Subscription payments are generated throughout the lifecycle of a subscription, typically there is one at the time of purchase and then one for each renewal.",
"consumes": ["application/json"],
- "produces": ["application/pdf"],
+ "produces": ["application/json"],
"tags": ["Users"],
- "summary": "Generate a subscription invoice",
+ "summary": "Get the last 10 subscription payments.",
"responses": {
"200": {
"description": "OK",
"schema": {
- "type": "file"
+ "$ref": "#/definitions/responses.UserSubscriptionPaymentsResponse"
}
},
"400": {
@@ -3901,23 +3901,6 @@
}
}
},
- "responses.UserInvoicesResponse": {
- "type": "object",
- "required": ["data", "message", "status"],
- "properties": {
- "data": {
- "$ref": "#/definitions/responses.subscriptionInvoicesAPIResponse"
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
"responses.UserResponse": {
"type": "object",
"required": ["data", "message", "status"],
@@ -3935,46 +3918,9 @@
}
}
},
- "responses.WebhookResponse": {
- "type": "object",
- "required": ["data", "message", "status"],
- "properties": {
- "data": {
- "$ref": "#/definitions/entities.Webhook"
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
- "responses.WebhooksResponse": {
+ "responses.UserSubscriptionPaymentsResponse": {
"type": "object",
"required": ["data", "message", "status"],
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/entities.Webhook"
- }
- },
- "message": {
- "type": "string",
- "example": "Request handled successfully"
- },
- "status": {
- "type": "string",
- "example": "success"
- }
- }
- },
- "responses.subscriptionInvoicesAPIResponse": {
- "type": "object",
- "required": ["data"],
"properties": {
"data": {
"type": "array",
@@ -4011,9 +3957,7 @@
"total",
"total_formatted",
"total_usd",
- "updated_at",
- "user_email",
- "user_name"
+ "updated_at"
],
"properties": {
"billing_reason": {
@@ -4094,12 +4038,6 @@
},
"updated_at": {
"type": "string"
- },
- "user_email": {
- "type": "string"
- },
- "user_name": {
- "type": "string"
}
}
},
@@ -4111,6 +4049,51 @@
}
}
}
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
+ }
+ }
+ },
+ "responses.WebhookResponse": {
+ "type": "object",
+ "required": ["data", "message", "status"],
+ "properties": {
+ "data": {
+ "$ref": "#/definitions/entities.Webhook"
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
+ }
+ }
+ },
+ "responses.WebhooksResponse": {
+ "type": "object",
+ "required": ["data", "message", "status"],
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/entities.Webhook"
+ }
+ },
+ "message": {
+ "type": "string",
+ "example": "Request handled successfully"
+ },
+ "status": {
+ "type": "string",
+ "example": "success"
}
}
}
diff --git a/api/docs/swagger.yaml b/api/docs/swagger.yaml
index fdde688c..28274519 100644
--- a/api/docs/swagger.yaml
+++ b/api/docs/swagger.yaml
@@ -1111,21 +1111,6 @@ definitions:
- message
- status
type: object
- responses.UserInvoicesResponse:
- properties:
- data:
- $ref: "#/definitions/responses.subscriptionInvoicesAPIResponse"
- message:
- example: Request handled successfully
- type: string
- status:
- example: success
- type: string
- required:
- - data
- - message
- - status
- type: object
responses.UserResponse:
properties:
data:
@@ -1141,39 +1126,7 @@ definitions:
- message
- status
type: object
- responses.WebhookResponse:
- properties:
- data:
- $ref: "#/definitions/entities.Webhook"
- message:
- example: Request handled successfully
- type: string
- status:
- example: success
- type: string
- required:
- - data
- - message
- - status
- type: object
- responses.WebhooksResponse:
- properties:
- data:
- items:
- $ref: "#/definitions/entities.Webhook"
- type: array
- message:
- example: Request handled successfully
- type: string
- status:
- example: success
- type: string
- required:
- - data
- - message
- - status
- type: object
- responses.subscriptionInvoicesAPIResponse:
+ responses.UserSubscriptionPaymentsResponse:
properties:
data:
items:
@@ -1233,10 +1186,6 @@ definitions:
type: integer
updated_at:
type: string
- user_email:
- type: string
- user_name:
- type: string
required:
- billing_reason
- card_brand
@@ -1265,8 +1214,6 @@ definitions:
- total_formatted
- total_usd
- updated_at
- - user_email
- - user_name
type: object
id:
type: string
@@ -1278,8 +1225,48 @@ definitions:
- type
type: object
type: array
+ message:
+ example: Request handled successfully
+ type: string
+ status:
+ example: success
+ type: string
+ required:
+ - data
+ - message
+ - status
+ type: object
+ responses.WebhookResponse:
+ properties:
+ data:
+ $ref: "#/definitions/entities.Webhook"
+ message:
+ example: Request handled successfully
+ type: string
+ status:
+ example: success
+ type: string
+ required:
+ - data
+ - message
+ - status
+ type: object
+ responses.WebhooksResponse:
+ properties:
+ data:
+ items:
+ $ref: "#/definitions/entities.Webhook"
+ type: array
+ message:
+ example: Request handled successfully
+ type: string
+ status:
+ example: success
+ type: string
required:
- data
+ - message
+ - status
type: object
host: api.httpsms.com
info:
@@ -2936,21 +2923,20 @@ paths:
summary: Currently authenticated user subscription update URL
tags:
- Users
- /users/subscription/invoices:
- get:
+ /users/subscription/invoices/{subscriptionInvoiceID}:
+ post:
consumes:
- application/json
description:
- Subscription invoices are generated throughout the lifecycle of
- a subscription, typically there is one at the time of purchase and then one
- for each renewal.
+ Generates a new invoice PDF file for the given subscription payment
+ with given parameters.
produces:
- - application/json
+ - application/pdf
responses:
"200":
description: OK
schema:
- $ref: "#/definitions/responses.UserInvoicesResponse"
+ type: file
"400":
description: Bad Request
schema:
@@ -2969,21 +2955,24 @@ paths:
$ref: "#/definitions/responses.InternalServerError"
security:
- ApiKeyAuth: []
- summary: Get the last 10 subscription invoices.
+ summary: Generate a subscription invoice
tags:
- Users
- /users/subscription/invoices/{subscriptionInvoiceID}:
- post:
+ /users/subscription/payments:
+ get:
consumes:
- application/json
- description: Generates a new invoice for the given subscription with given parameters.
+ description:
+ Subscription payments are generated throughout the lifecycle of
+ a subscription, typically there is one at the time of purchase and then one
+ for each renewal.
produces:
- - application/pdf
+ - application/json
responses:
"200":
description: OK
schema:
- type: file
+ $ref: "#/definitions/responses.UserSubscriptionPaymentsResponse"
"400":
description: Bad Request
schema:
@@ -3002,7 +2991,7 @@ paths:
$ref: "#/definitions/responses.InternalServerError"
security:
- ApiKeyAuth: []
- summary: Generate a subscription invoice
+ summary: Get the last 10 subscription payments.
tags:
- Users
/webhooks: