mirror of https://github.com/vernonkeenan/lib
parent
0220de3b36
commit
4792086677
|
@ -79,9 +79,6 @@ GetClustersOK describes a response with status code 200, with default header val
|
|||
Response with Cluster objects
|
||||
*/
|
||||
type GetClustersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.ClusterResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *GetClustersOK) GetPayload() *members_models.ClusterResponse {
|
|||
|
||||
func (o *GetClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.ClusterResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ GetClustersUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetClustersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *GetClustersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ GetClustersUnprocessableEntity describes a response with status code 422, with d
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetClustersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *GetClustersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -79,9 +79,6 @@ PostClustersOK describes a response with status code 200, with default header va
|
|||
Response with Cluster objects
|
||||
*/
|
||||
type PostClustersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.ClusterResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *PostClustersOK) GetPayload() *members_models.ClusterResponse {
|
|||
|
||||
func (o *PostClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.ClusterResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ PostClustersUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostClustersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *PostClustersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ PostClustersUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostClustersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *PostClustersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -79,9 +79,6 @@ PutClustersOK describes a response with status code 200, with default header val
|
|||
Response with Cluster objects
|
||||
*/
|
||||
type PutClustersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.ClusterResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *PutClustersOK) GetPayload() *members_models.ClusterResponse {
|
|||
|
||||
func (o *PutClustersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.ClusterResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ PutClustersUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutClustersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *PutClustersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutClustersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ PutClustersUnprocessableEntity describes a response with status code 422, with d
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutClustersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *PutClustersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutClustersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ GetDatabasesUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetDatabasesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *GetDatabasesUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ GetDatabasesUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetDatabasesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *GetDatabasesUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ PostDatabasesUnauthorized describes a response with status code 401, with defaul
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostDatabasesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *PostDatabasesUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ PostDatabasesUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostDatabasesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *PostDatabasesUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ PutDatabasesUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutDatabasesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *PutDatabasesUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutDatabasesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ PutDatabasesUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutDatabasesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *PutDatabasesUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutDatabasesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -39,6 +39,7 @@ import (
|
|||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/tickets"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/transactions"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/users"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_client/webhooks"
|
||||
)
|
||||
|
||||
// Default members HTTP client.
|
||||
|
@ -108,6 +109,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Members {
|
|||
cli.Tickets = tickets.New(transport, formats)
|
||||
cli.Transactions = transactions.New(transport, formats)
|
||||
cli.Users = users.New(transport, formats)
|
||||
cli.Webhooks = webhooks.New(transport, formats)
|
||||
return cli
|
||||
}
|
||||
|
||||
|
@ -202,6 +204,8 @@ type Members struct {
|
|||
|
||||
Users users.ClientService
|
||||
|
||||
Webhooks webhooks.ClientService
|
||||
|
||||
Transport runtime.ClientTransport
|
||||
}
|
||||
|
||||
|
@ -233,4 +237,5 @@ func (c *Members) SetTransport(transport runtime.ClientTransport) {
|
|||
c.Tickets.SetTransport(transport)
|
||||
c.Transactions.SetTransport(transport)
|
||||
c.Users.SetTransport(transport)
|
||||
c.Webhooks.SetTransport(transport)
|
||||
}
|
||||
|
|
|
@ -79,9 +79,6 @@ GetTemplatesOK describes a response with status code 200, with default header va
|
|||
Response with Template objects
|
||||
*/
|
||||
type GetTemplatesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.TemplateResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *GetTemplatesOK) GetPayload() *members_models.TemplateResponse {
|
|||
|
||||
func (o *GetTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.TemplateResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ GetTemplatesUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetTemplatesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *GetTemplatesUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetTemplatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ GetTemplatesUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetTemplatesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *GetTemplatesUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetTemplatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -79,9 +79,6 @@ PostTemplatesOK describes a response with status code 200, with default header v
|
|||
Response with Template objects
|
||||
*/
|
||||
type PostTemplatesOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.TemplateResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *PostTemplatesOK) GetPayload() *members_models.TemplateResponse {
|
|||
|
||||
func (o *PostTemplatesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.TemplateResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ PostTemplatesUnauthorized describes a response with status code 401, with defaul
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostTemplatesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *PostTemplatesUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostTemplatesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ PostTemplatesUnprocessableEntity describes a response with status code 422, with
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostTemplatesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *PostTemplatesUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostTemplatesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ GetTenantsUnauthorized describes a response with status code 401, with default h
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetTenantsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *GetTenantsUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ GetTenantsUnprocessableEntity describes a response with status code 422, with de
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetTenantsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *GetTenantsUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ PostTenantsUnauthorized describes a response with status code 401, with default
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostTenantsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *PostTenantsUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ PostTenantsUnprocessableEntity describes a response with status code 422, with d
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostTenantsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *PostTenantsUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -156,9 +156,6 @@ PutTenantsUnauthorized describes a response with status code 401, with default h
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutTenantsUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -206,20 +203,6 @@ func (o *PutTenantsUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutTenantsUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -395,9 +378,6 @@ PutTenantsUnprocessableEntity describes a response with status code 422, with de
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutTenantsUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -445,20 +425,6 @@ func (o *PutTenantsUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutTenantsUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -72,6 +72,12 @@ type GetUsersParams struct {
|
|||
*/
|
||||
Auth0UserID *string
|
||||
|
||||
/* ContactID.
|
||||
|
||||
Internal Contact ID (links to Account)
|
||||
*/
|
||||
ContactID *string
|
||||
|
||||
/* Email.
|
||||
|
||||
Email address
|
||||
|
@ -94,6 +100,12 @@ type GetUsersParams struct {
|
|||
*/
|
||||
Offset *int64
|
||||
|
||||
/* UserID.
|
||||
|
||||
Internal User ID
|
||||
*/
|
||||
UserID *string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
|
@ -158,6 +170,17 @@ func (o *GetUsersParams) SetAuth0UserID(auth0UserID *string) {
|
|||
o.Auth0UserID = auth0UserID
|
||||
}
|
||||
|
||||
// WithContactID adds the contactID to the get users params
|
||||
func (o *GetUsersParams) WithContactID(contactID *string) *GetUsersParams {
|
||||
o.SetContactID(contactID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContactID adds the contactId to the get users params
|
||||
func (o *GetUsersParams) SetContactID(contactID *string) {
|
||||
o.ContactID = contactID
|
||||
}
|
||||
|
||||
// WithEmail adds the email to the get users params
|
||||
func (o *GetUsersParams) WithEmail(email *string) *GetUsersParams {
|
||||
o.SetEmail(email)
|
||||
|
@ -191,6 +214,17 @@ func (o *GetUsersParams) SetOffset(offset *int64) {
|
|||
o.Offset = offset
|
||||
}
|
||||
|
||||
// WithUserID adds the userID to the get users params
|
||||
func (o *GetUsersParams) WithUserID(userID *string) *GetUsersParams {
|
||||
o.SetUserID(userID)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetUserID adds the userId to the get users params
|
||||
func (o *GetUsersParams) SetUserID(userID *string) {
|
||||
o.UserID = userID
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
|
@ -216,6 +250,23 @@ func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi
|
|||
}
|
||||
}
|
||||
|
||||
if o.ContactID != nil {
|
||||
|
||||
// query param contactId
|
||||
var qrContactID string
|
||||
|
||||
if o.ContactID != nil {
|
||||
qrContactID = *o.ContactID
|
||||
}
|
||||
qContactID := qrContactID
|
||||
if qContactID != "" {
|
||||
|
||||
if err := r.SetQueryParam("contactId", qContactID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if o.Email != nil {
|
||||
|
||||
// query param email
|
||||
|
@ -267,6 +318,23 @@ func (o *GetUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Regi
|
|||
}
|
||||
}
|
||||
|
||||
if o.UserID != nil {
|
||||
|
||||
// query param userId
|
||||
var qrUserID string
|
||||
|
||||
if o.UserID != nil {
|
||||
qrUserID = *o.UserID
|
||||
}
|
||||
qUserID := qrUserID
|
||||
if qUserID != "" {
|
||||
|
||||
if err := r.SetQueryParam("userId", qUserID); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
|
|
|
@ -79,9 +79,6 @@ GetUsersOK describes a response with status code 200, with default header values
|
|||
Response with User objects
|
||||
*/
|
||||
type GetUsersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.UserResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *GetUsersOK) GetPayload() *members_models.UserResponse {
|
|||
|
||||
func (o *GetUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.UserResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ GetUsersUnauthorized describes a response with status code 401, with default hea
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetUsersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *GetUsersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ GetUsersUnprocessableEntity describes a response with status code 422, with defa
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetUsersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *GetUsersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *GetUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// NewPostUsersOnboardParams creates a new PostUsersOnboardParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostUsersOnboardParams() *PostUsersOnboardParams {
|
||||
return &PostUsersOnboardParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardParamsWithTimeout creates a new PostUsersOnboardParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostUsersOnboardParamsWithTimeout(timeout time.Duration) *PostUsersOnboardParams {
|
||||
return &PostUsersOnboardParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardParamsWithContext creates a new PostUsersOnboardParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostUsersOnboardParamsWithContext(ctx context.Context) *PostUsersOnboardParams {
|
||||
return &PostUsersOnboardParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardParamsWithHTTPClient creates a new PostUsersOnboardParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostUsersOnboardParamsWithHTTPClient(client *http.Client) *PostUsersOnboardParams {
|
||||
return &PostUsersOnboardParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post users onboard operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostUsersOnboardParams struct {
|
||||
|
||||
/* UserRequest.
|
||||
|
||||
An array of User records
|
||||
*/
|
||||
UserRequest *members_models.UserRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post users onboard params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUsersOnboardParams) WithDefaults() *PostUsersOnboardParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post users onboard params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUsersOnboardParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) WithTimeout(timeout time.Duration) *PostUsersOnboardParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) WithContext(ctx context.Context) *PostUsersOnboardParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) WithHTTPClient(client *http.Client) *PostUsersOnboardParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithUserRequest adds the userRequest to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) WithUserRequest(userRequest *members_models.UserRequest) *PostUsersOnboardParams {
|
||||
o.SetUserRequest(userRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetUserRequest adds the userRequest to the post users onboard params
|
||||
func (o *PostUsersOnboardParams) SetUserRequest(userRequest *members_models.UserRequest) {
|
||||
o.UserRequest = userRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostUsersOnboardParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.UserRequest != nil {
|
||||
if err := r.SetBodyParam(o.UserRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,504 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// PostUsersOnboardReader is a Reader for the PostUsersOnboard structure.
|
||||
type PostUsersOnboardReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostUsersOnboardReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostUsersOnboardOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostUsersOnboardUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostUsersOnboardForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostUsersOnboardNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostUsersOnboardUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostUsersOnboardInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardOK creates a PostUsersOnboardOK with default headers values
|
||||
func NewPostUsersOnboardOK() *PostUsersOnboardOK {
|
||||
return &PostUsersOnboardOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with User objects
|
||||
*/
|
||||
type PostUsersOnboardOK struct {
|
||||
Payload *members_models.UserResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard o k response has a 2xx status code
|
||||
func (o *PostUsersOnboardOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard o k response has a 3xx status code
|
||||
func (o *PostUsersOnboardOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard o k response has a 4xx status code
|
||||
func (o *PostUsersOnboardOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard o k response has a 5xx status code
|
||||
func (o *PostUsersOnboardOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard o k response a status code equal to that given
|
||||
func (o *PostUsersOnboardOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard o k response
|
||||
func (o *PostUsersOnboardOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardOK) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardOK) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardOK) GetPayload() *members_models.UserResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.UserResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardUnauthorized creates a PostUsersOnboardUnauthorized with default headers values
|
||||
func NewPostUsersOnboardUnauthorized() *PostUsersOnboardUnauthorized {
|
||||
return &PostUsersOnboardUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostUsersOnboardUnauthorized struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard unauthorized response has a 2xx status code
|
||||
func (o *PostUsersOnboardUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard unauthorized response has a 3xx status code
|
||||
func (o *PostUsersOnboardUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard unauthorized response has a 4xx status code
|
||||
func (o *PostUsersOnboardUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard unauthorized response has a 5xx status code
|
||||
func (o *PostUsersOnboardUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard unauthorized response a status code equal to that given
|
||||
func (o *PostUsersOnboardUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard unauthorized response
|
||||
func (o *PostUsersOnboardUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnauthorized) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardForbidden creates a PostUsersOnboardForbidden with default headers values
|
||||
func NewPostUsersOnboardForbidden() *PostUsersOnboardForbidden {
|
||||
return &PostUsersOnboardForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostUsersOnboardForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard forbidden response has a 2xx status code
|
||||
func (o *PostUsersOnboardForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard forbidden response has a 3xx status code
|
||||
func (o *PostUsersOnboardForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard forbidden response has a 4xx status code
|
||||
func (o *PostUsersOnboardForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard forbidden response has a 5xx status code
|
||||
func (o *PostUsersOnboardForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard forbidden response a status code equal to that given
|
||||
func (o *PostUsersOnboardForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard forbidden response
|
||||
func (o *PostUsersOnboardForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardForbidden) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardNotFound creates a PostUsersOnboardNotFound with default headers values
|
||||
func NewPostUsersOnboardNotFound() *PostUsersOnboardNotFound {
|
||||
return &PostUsersOnboardNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostUsersOnboardNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard not found response has a 2xx status code
|
||||
func (o *PostUsersOnboardNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard not found response has a 3xx status code
|
||||
func (o *PostUsersOnboardNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard not found response has a 4xx status code
|
||||
func (o *PostUsersOnboardNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard not found response has a 5xx status code
|
||||
func (o *PostUsersOnboardNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard not found response a status code equal to that given
|
||||
func (o *PostUsersOnboardNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard not found response
|
||||
func (o *PostUsersOnboardNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardNotFound) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardUnprocessableEntity creates a PostUsersOnboardUnprocessableEntity with default headers values
|
||||
func NewPostUsersOnboardUnprocessableEntity() *PostUsersOnboardUnprocessableEntity {
|
||||
return &PostUsersOnboardUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostUsersOnboardUnprocessableEntity struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard unprocessable entity response has a 2xx status code
|
||||
func (o *PostUsersOnboardUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard unprocessable entity response has a 3xx status code
|
||||
func (o *PostUsersOnboardUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard unprocessable entity response has a 4xx status code
|
||||
func (o *PostUsersOnboardUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard unprocessable entity response has a 5xx status code
|
||||
func (o *PostUsersOnboardUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard unprocessable entity response a status code equal to that given
|
||||
func (o *PostUsersOnboardUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard unprocessable entity response
|
||||
func (o *PostUsersOnboardUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnprocessableEntity) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersOnboardInternalServerError creates a PostUsersOnboardInternalServerError with default headers values
|
||||
func NewPostUsersOnboardInternalServerError() *PostUsersOnboardInternalServerError {
|
||||
return &PostUsersOnboardInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboardInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostUsersOnboardInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users onboard internal server error response has a 2xx status code
|
||||
func (o *PostUsersOnboardInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users onboard internal server error response has a 3xx status code
|
||||
func (o *PostUsersOnboardInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users onboard internal server error response has a 4xx status code
|
||||
func (o *PostUsersOnboardInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users onboard internal server error response has a 5xx status code
|
||||
func (o *PostUsersOnboardInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users onboard internal server error response a status code equal to that given
|
||||
func (o *PostUsersOnboardInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users onboard internal server error response
|
||||
func (o *PostUsersOnboardInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /users/onboard][%d] postUsersOnboardInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardInternalServerError) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOnboardInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -79,9 +79,6 @@ PostUsersOK describes a response with status code 200, with default header value
|
|||
Response with User objects
|
||||
*/
|
||||
type PostUsersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.UserResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *PostUsersOK) GetPayload() *members_models.UserResponse {
|
|||
|
||||
func (o *PostUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.UserResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ PostUsersUnauthorized describes a response with status code 401, with default he
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostUsersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *PostUsersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ PostUsersUnprocessableEntity describes a response with status code 422, with def
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostUsersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *PostUsersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PostUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -79,9 +79,6 @@ PutUsersOK describes a response with status code 200, with default header values
|
|||
Response with User objects
|
||||
*/
|
||||
type PutUsersOK struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.UserResponse
|
||||
}
|
||||
|
||||
|
@ -129,20 +126,6 @@ func (o *PutUsersOK) GetPayload() *members_models.UserResponse {
|
|||
|
||||
func (o *PutUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.UserResponse)
|
||||
|
||||
// response payload
|
||||
|
@ -164,9 +147,6 @@ PutUsersUnauthorized describes a response with status code 401, with default hea
|
|||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PutUsersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -214,20 +194,6 @@ func (o *PutUsersUnauthorized) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
@ -403,9 +369,6 @@ PutUsersUnprocessableEntity describes a response with status code 422, with defa
|
|||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PutUsersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
CacheControl string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
|
@ -453,20 +416,6 @@ func (o *PutUsersUnprocessableEntity) GetPayload() *members_models.Error {
|
|||
|
||||
func (o *PutUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
// hydrates response header Cache-Control
|
||||
hdrCacheControl := response.GetHeader("Cache-Control")
|
||||
|
||||
if hdrCacheControl != "" {
|
||||
o.CacheControl = hdrCacheControl
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
|
|
|
@ -38,6 +38,8 @@ type ClientService interface {
|
|||
|
||||
PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUsersOK, error)
|
||||
|
||||
PostUsersOnboard(params *PostUsersOnboardParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUsersOnboardOK, error)
|
||||
|
||||
PutUsers(params *PutUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PutUsersOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
|
@ -125,6 +127,47 @@ func (a *Client) PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthI
|
|||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOnboard asyncs onboard new users
|
||||
|
||||
Async onboard new users
|
||||
*/
|
||||
func (a *Client) PostUsersOnboard(params *PostUsersOnboardParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUsersOnboardOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostUsersOnboardParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postUsersOnboard",
|
||||
Method: "POST",
|
||||
PathPattern: "/users/onboard",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostUsersOnboardReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostUsersOnboardOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postUsersOnboard: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
/*
|
||||
PutUsers updates existing users
|
||||
|
||||
|
|
|
@ -0,0 +1,157 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// NewPostWebhooksClerkParams creates a new PostWebhooksClerkParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostWebhooksClerkParams() *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithTimeout creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostWebhooksClerkParamsWithTimeout(timeout time.Duration) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithContext creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostWebhooksClerkParamsWithContext(ctx context.Context) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkParamsWithHTTPClient creates a new PostWebhooksClerkParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostWebhooksClerkParamsWithHTTPClient(client *http.Client) *PostWebhooksClerkParams {
|
||||
return &PostWebhooksClerkParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post webhooks clerk operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostWebhooksClerkParams struct {
|
||||
|
||||
/* WebhookclerkRequest.
|
||||
|
||||
An array of new WebhookClerk records
|
||||
*/
|
||||
WebhookclerkRequest *members_models.WebhookClerkRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post webhooks clerk params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostWebhooksClerkParams) WithDefaults() *PostWebhooksClerkParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post webhooks clerk params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostWebhooksClerkParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithTimeout(timeout time.Duration) *PostWebhooksClerkParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithContext(ctx context.Context) *PostWebhooksClerkParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithHTTPClient(client *http.Client) *PostWebhooksClerkParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithWebhookclerkRequest adds the webhookclerkRequest to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) WithWebhookclerkRequest(webhookclerkRequest *members_models.WebhookClerkRequest) *PostWebhooksClerkParams {
|
||||
o.SetWebhookclerkRequest(webhookclerkRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetWebhookclerkRequest adds the webhookclerkRequest to the post webhooks clerk params
|
||||
func (o *PostWebhooksClerkParams) SetWebhookclerkRequest(webhookclerkRequest *members_models.WebhookClerkRequest) {
|
||||
o.WebhookclerkRequest = webhookclerkRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostWebhooksClerkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.WebhookclerkRequest != nil {
|
||||
if err := r.SetBodyParam(o.WebhookclerkRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,504 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/members/members_models"
|
||||
)
|
||||
|
||||
// PostWebhooksClerkReader is a Reader for the PostWebhooksClerk structure.
|
||||
type PostWebhooksClerkReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostWebhooksClerkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 201:
|
||||
result := NewPostWebhooksClerkCreated()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostWebhooksClerkUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostWebhooksClerkForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostWebhooksClerkNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostWebhooksClerkUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostWebhooksClerkInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkCreated creates a PostWebhooksClerkCreated with default headers values
|
||||
func NewPostWebhooksClerkCreated() *PostWebhooksClerkCreated {
|
||||
return &PostWebhooksClerkCreated{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkCreated describes a response with status code 201, with default header values.
|
||||
|
||||
WebhookClerk Response Object
|
||||
*/
|
||||
type PostWebhooksClerkCreated struct {
|
||||
Payload *members_models.WebhookClerkResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk created response has a 2xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk created response has a 3xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk created response has a 4xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk created response has a 5xx status code
|
||||
func (o *PostWebhooksClerkCreated) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk created response a status code equal to that given
|
||||
func (o *PostWebhooksClerkCreated) IsCode(code int) bool {
|
||||
return code == 201
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk created response
|
||||
func (o *PostWebhooksClerkCreated) Code() int {
|
||||
return 201
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkCreated %+v", 201, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkCreated %+v", 201, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) GetPayload() *members_models.WebhookClerkResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkCreated) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.WebhookClerkResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkUnauthorized creates a PostWebhooksClerkUnauthorized with default headers values
|
||||
func NewPostWebhooksClerkUnauthorized() *PostWebhooksClerkUnauthorized {
|
||||
return &PostWebhooksClerkUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access Unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostWebhooksClerkUnauthorized struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk unauthorized response has a 2xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk unauthorized response has a 3xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk unauthorized response has a 4xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk unauthorized response has a 5xx status code
|
||||
func (o *PostWebhooksClerkUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk unauthorized response a status code equal to that given
|
||||
func (o *PostWebhooksClerkUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk unauthorized response
|
||||
func (o *PostWebhooksClerkUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkForbidden creates a PostWebhooksClerkForbidden with default headers values
|
||||
func NewPostWebhooksClerkForbidden() *PostWebhooksClerkForbidden {
|
||||
return &PostWebhooksClerkForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostWebhooksClerkForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk forbidden response has a 2xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk forbidden response has a 3xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk forbidden response has a 4xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk forbidden response has a 5xx status code
|
||||
func (o *PostWebhooksClerkForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk forbidden response a status code equal to that given
|
||||
func (o *PostWebhooksClerkForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk forbidden response
|
||||
func (o *PostWebhooksClerkForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkNotFound creates a PostWebhooksClerkNotFound with default headers values
|
||||
func NewPostWebhooksClerkNotFound() *PostWebhooksClerkNotFound {
|
||||
return &PostWebhooksClerkNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostWebhooksClerkNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk not found response has a 2xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk not found response has a 3xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk not found response has a 4xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk not found response has a 5xx status code
|
||||
func (o *PostWebhooksClerkNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk not found response a status code equal to that given
|
||||
func (o *PostWebhooksClerkNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk not found response
|
||||
func (o *PostWebhooksClerkNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkUnprocessableEntity creates a PostWebhooksClerkUnprocessableEntity with default headers values
|
||||
func NewPostWebhooksClerkUnprocessableEntity() *PostWebhooksClerkUnprocessableEntity {
|
||||
return &PostWebhooksClerkUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostWebhooksClerkUnprocessableEntity struct {
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk unprocessable entity response has a 2xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk unprocessable entity response has a 3xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk unprocessable entity response has a 4xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk unprocessable entity response has a 5xx status code
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk unprocessable entity response a status code equal to that given
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk unprocessable entity response
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostWebhooksClerkInternalServerError creates a PostWebhooksClerkInternalServerError with default headers values
|
||||
func NewPostWebhooksClerkInternalServerError() *PostWebhooksClerkInternalServerError {
|
||||
return &PostWebhooksClerkInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerkInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostWebhooksClerkInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *members_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post webhooks clerk internal server error response has a 2xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post webhooks clerk internal server error response has a 3xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post webhooks clerk internal server error response has a 4xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post webhooks clerk internal server error response has a 5xx status code
|
||||
func (o *PostWebhooksClerkInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post webhooks clerk internal server error response a status code equal to that given
|
||||
func (o *PostWebhooksClerkInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post webhooks clerk internal server error response
|
||||
func (o *PostWebhooksClerkInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /webhooks/clerk][%d] postWebhooksClerkInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) GetPayload() *members_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostWebhooksClerkInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(members_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,85 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package webhooks
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new webhooks API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for webhooks API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
PostWebhooksClerk(params *PostWebhooksClerkParams, opts ...ClientOption) (*PostWebhooksClerkCreated, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
PostWebhooksClerk clerks webhook
|
||||
|
||||
Clerk webhook
|
||||
*/
|
||||
func (a *Client) PostWebhooksClerk(params *PostWebhooksClerkParams, opts ...ClientOption) (*PostWebhooksClerkCreated, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostWebhooksClerkParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postWebhooksClerk",
|
||||
Method: "POST",
|
||||
PathPattern: "/webhooks/clerk",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostWebhooksClerkReader{formats: a.formats},
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostWebhooksClerkCreated)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postWebhooksClerk: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,270 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package members_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// ClerkUser Clerk user object
|
||||
//
|
||||
// swagger:model ClerkUser
|
||||
type ClerkUser struct {
|
||||
|
||||
// If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
|
||||
// You must provide the backup codes in plain format or the corresponding bcrypt digest.
|
||||
BackupCodes []string `json:"backup_codes"`
|
||||
|
||||
// A custom date/time denoting _when_ the user signed up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`).
|
||||
CreatedAt string `json:"created_at,omitempty"`
|
||||
|
||||
// Email addresses to add to the user.
|
||||
// Must be unique across your instance.
|
||||
// The first email address will be set as the user's primary email address.
|
||||
EmailAddress []string `json:"email_address"`
|
||||
|
||||
// The ID of the user as used in your external systems or your previous authentication solution.
|
||||
// Must be unique across your instance.
|
||||
ExternalID string `json:"external_id,omitempty"`
|
||||
|
||||
// The first name to assign to the user
|
||||
FirstName string `json:"first_name,omitempty"`
|
||||
|
||||
// The last name to assign to the user
|
||||
LastName string `json:"last_name,omitempty"`
|
||||
|
||||
// The plaintext password to give the user.
|
||||
// Must be at least 8 characters long, and can not be in any list of hacked passwords.
|
||||
Password string `json:"password,omitempty"`
|
||||
|
||||
// In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
|
||||
// The digests should be generated with one of the supported algorithms.
|
||||
// The hashing algorithm can be specified using the `password_hasher` property.
|
||||
PasswordDigest string `json:"password_digest,omitempty"`
|
||||
|
||||
// The hashing algorithm that was used to generate the password digest.
|
||||
// The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), md5, pbkdf2_sha256, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/) and 2 [argon2](https://argon2.online/) variants, argon2i and argon2id.
|
||||
// Each of the above expects the incoming digest to be of a particular format.
|
||||
//
|
||||
// More specifically:
|
||||
//
|
||||
// **bcrypt:** The digest should be of the following form:
|
||||
//
|
||||
// `$<algorithm version>$<cost>$<salt & hash>`
|
||||
//
|
||||
// **md5:** The digest should follow the regular form e.g.:
|
||||
//
|
||||
// `5f4dcc3b5aa765d61d8327deb882cf99`
|
||||
//
|
||||
// **pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:
|
||||
//
|
||||
// `pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
//
|
||||
// Note: Both the salt and the hash are expected to be base64-encoded.
|
||||
//
|
||||
// **pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):
|
||||
//
|
||||
// `pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
//
|
||||
// Note: The salt is expected to be un-encoded, the hash is expected base64-encoded.
|
||||
//
|
||||
// **pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:
|
||||
// 1. uses sha1 instead of sha256
|
||||
// 2. accepts the hash as a hex-encoded string
|
||||
//
|
||||
// The format is the following:
|
||||
//
|
||||
// `pbkdf2_sha1$<iterations>$<salt>$<hash-as-hex-string>`
|
||||
//
|
||||
//
|
||||
// **scrypt_firebase:** The Firebase-specific variant of scrypt.
|
||||
// The value is expected to have 6 segments separated by the $ character and include the following information:
|
||||
//
|
||||
// _hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.
|
||||
// _salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.
|
||||
// _signer key:_ The base64 encoded signer key.
|
||||
// _salt separator:_ The base64 encoded salt separator.
|
||||
// _rounds:_ The number of rounds the algorithm needs to run.
|
||||
// _memory cost:_ The cost of the algorithm run
|
||||
//
|
||||
// The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.
|
||||
// The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.
|
||||
//
|
||||
// Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:
|
||||
//
|
||||
// `<hash>$<salt>$<signer key>$<salt separator>$<rounds>$<memory cost>`
|
||||
//
|
||||
// **argon2i:** Algorithms in the argon2 family generate digests that encode the following information:
|
||||
//
|
||||
// _version (v):_ The argon version, version 19 is assumed
|
||||
// _memory (m):_ The memory used by the algorithm (in kibibytes)
|
||||
// _iterations (t):_ The number of iterations to perform
|
||||
// _parallelism (p):_ The number of threads to use
|
||||
//
|
||||
// Parts are demarcated by the `$` character, with the first part identifying the algorithm variant.
|
||||
// The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).
|
||||
// The final part is the actual digest.
|
||||
//
|
||||
// `$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`
|
||||
//
|
||||
// **argon2id:** See the previous algorithm for an explanation of the formatting.
|
||||
//
|
||||
// For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:
|
||||
//
|
||||
// `$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`
|
||||
//
|
||||
// If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).
|
||||
// Enum: [bcrypt md5 pbkdf2_sha256 pbkdf2_sha256_django pbkdf2_sha1 scrypt_firebase argon2i argon2id]
|
||||
PasswordHasher string `json:"password_hasher,omitempty"`
|
||||
|
||||
// Phone numbers to add to the user.
|
||||
// Must be unique across your instance.
|
||||
// The first phone number will be set as the user's primary phone number.
|
||||
PhoneNumber []string `json:"phone_number"`
|
||||
|
||||
// Metadata saved on the user, that is only visible to your Backend API
|
||||
PrivateMetadata interface{} `json:"private_metadata,omitempty"`
|
||||
|
||||
// Metadata saved on the user, that is visible to both your Frontend and Backend APIs
|
||||
PublicMetadata interface{} `json:"public_metadata,omitempty"`
|
||||
|
||||
// When set to `true` all password checks are skipped.
|
||||
// It is recommended to use this method only when migrating plaintext passwords to Clerk.
|
||||
// Upon migration the user base should be prompted to pick stronger password.
|
||||
SkipPasswordChecks bool `json:"skip_password_checks,omitempty"`
|
||||
|
||||
// When set to `true`, `password` is not required anymore when creating the user and can be omitted.
|
||||
// This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
|
||||
// Please note that you cannot use this flag if password is the only way for a user to sign into your instance.
|
||||
SkipPasswordRequirement bool `json:"skip_password_requirement,omitempty"`
|
||||
|
||||
// In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
|
||||
// Please note that currently the supported options are:
|
||||
// * Period: 30 seconds
|
||||
// * Code length: 6 digits
|
||||
// * Algorithm: SHA1
|
||||
TotpSecret string `json:"totp_secret,omitempty"`
|
||||
|
||||
// Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
|
||||
// Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
|
||||
UnsafeMetadata interface{} `json:"unsafe_metadata,omitempty"`
|
||||
|
||||
// The username to give to the user.
|
||||
// It must be unique across your instance.
|
||||
Username string `json:"username,omitempty"`
|
||||
|
||||
// Web3 wallets to add to the user.
|
||||
// Must be unique across your instance.
|
||||
// The first wallet will be set as the user's primary wallet.
|
||||
Web3Wallet []string `json:"web3_wallet"`
|
||||
}
|
||||
|
||||
// Validate validates this clerk user
|
||||
func (m *ClerkUser) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validatePasswordHasher(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var clerkUserTypePasswordHasherPropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["bcrypt","md5","pbkdf2_sha256","pbkdf2_sha256_django","pbkdf2_sha1","scrypt_firebase","argon2i","argon2id"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
clerkUserTypePasswordHasherPropEnum = append(clerkUserTypePasswordHasherPropEnum, v)
|
||||
}
|
||||
}
|
||||
|
||||
const (
|
||||
|
||||
// ClerkUserPasswordHasherBcrypt captures enum value "bcrypt"
|
||||
ClerkUserPasswordHasherBcrypt string = "bcrypt"
|
||||
|
||||
// ClerkUserPasswordHasherMd5 captures enum value "md5"
|
||||
ClerkUserPasswordHasherMd5 string = "md5"
|
||||
|
||||
// ClerkUserPasswordHasherPbkdf2Sha256 captures enum value "pbkdf2_sha256"
|
||||
ClerkUserPasswordHasherPbkdf2Sha256 string = "pbkdf2_sha256"
|
||||
|
||||
// ClerkUserPasswordHasherPbkdf2Sha256Django captures enum value "pbkdf2_sha256_django"
|
||||
ClerkUserPasswordHasherPbkdf2Sha256Django string = "pbkdf2_sha256_django"
|
||||
|
||||
// ClerkUserPasswordHasherPbkdf2Sha1 captures enum value "pbkdf2_sha1"
|
||||
ClerkUserPasswordHasherPbkdf2Sha1 string = "pbkdf2_sha1"
|
||||
|
||||
// ClerkUserPasswordHasherScryptFirebase captures enum value "scrypt_firebase"
|
||||
ClerkUserPasswordHasherScryptFirebase string = "scrypt_firebase"
|
||||
|
||||
// ClerkUserPasswordHasherArgon2i captures enum value "argon2i"
|
||||
ClerkUserPasswordHasherArgon2i string = "argon2i"
|
||||
|
||||
// ClerkUserPasswordHasherArgon2id captures enum value "argon2id"
|
||||
ClerkUserPasswordHasherArgon2id string = "argon2id"
|
||||
)
|
||||
|
||||
// prop value enum
|
||||
func (m *ClerkUser) validatePasswordHasherEnum(path, location string, value string) error {
|
||||
if err := validate.EnumCase(path, location, value, clerkUserTypePasswordHasherPropEnum, true); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ClerkUser) validatePasswordHasher(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.PasswordHasher) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
// value enum
|
||||
if err := m.validatePasswordHasherEnum("password_hasher", "body", m.PasswordHasher); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this clerk user based on context it is used
|
||||
func (m *ClerkUser) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *ClerkUser) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *ClerkUser) UnmarshalBinary(b []byte) error {
|
||||
var res ClerkUser
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -170,6 +170,9 @@ type User struct {
|
|||
// The time day starts
|
||||
StartOfDay string `json:"StartOfDay,omitempty"`
|
||||
|
||||
// Onboarding Status
|
||||
Status string `json:"Status,omitempty"`
|
||||
|
||||
// Account
|
||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package members_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// WebhookClerkRequest Clerk webhook object
|
||||
//
|
||||
// swagger:model WebhookClerkRequest
|
||||
type WebhookClerkRequest struct {
|
||||
|
||||
// data
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
|
||||
// object
|
||||
Object string `json:"object,omitempty"`
|
||||
|
||||
// Clerk Name
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this webhook clerk request
|
||||
func (m *WebhookClerkRequest) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this webhook clerk request based on context it is used
|
||||
func (m *WebhookClerkRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *WebhookClerkRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *WebhookClerkRequest) UnmarshalBinary(b []byte) error {
|
||||
var res WebhookClerkRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package members_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// WebhookClerkResponse Clerk webhook object
|
||||
//
|
||||
// swagger:model WebhookClerkResponse
|
||||
type WebhookClerkResponse struct {
|
||||
|
||||
// data
|
||||
Data interface{} `json:"data,omitempty"`
|
||||
|
||||
// object
|
||||
Object string `json:"object,omitempty"`
|
||||
|
||||
// Clerk Name
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this webhook clerk response
|
||||
func (m *WebhookClerkResponse) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this webhook clerk response based on context it is used
|
||||
func (m *WebhookClerkResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *WebhookClerkResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *WebhookClerkResponse) UnmarshalBinary(b []byte) error {
|
||||
var res WebhookClerkResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -71,6 +71,12 @@ type GetCompaniesParams struct {
|
|||
*/
|
||||
CompanyID *string
|
||||
|
||||
/* Slug.
|
||||
|
||||
The slug of the item to retrieve
|
||||
*/
|
||||
Slug *string
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
|
@ -135,6 +141,17 @@ func (o *GetCompaniesParams) SetCompanyID(companyID *string) {
|
|||
o.CompanyID = companyID
|
||||
}
|
||||
|
||||
// WithSlug adds the slug to the get companies params
|
||||
func (o *GetCompaniesParams) WithSlug(slug *string) *GetCompaniesParams {
|
||||
o.SetSlug(slug)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetSlug adds the slug to the get companies params
|
||||
func (o *GetCompaniesParams) SetSlug(slug *string) {
|
||||
o.Slug = slug
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
|
@ -160,6 +177,23 @@ func (o *GetCompaniesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.
|
|||
}
|
||||
}
|
||||
|
||||
if o.Slug != nil {
|
||||
|
||||
// query param slug
|
||||
var qrSlug string
|
||||
|
||||
if o.Slug != nil {
|
||||
qrSlug = *o.Slug
|
||||
}
|
||||
qSlug := qrSlug
|
||||
if qSlug != "" {
|
||||
|
||||
if err := r.SetQueryParam("slug", qSlug); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_categories
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// New creates a new company categories API client.
|
||||
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService {
|
||||
return &Client{transport: transport, formats: formats}
|
||||
}
|
||||
|
||||
/*
|
||||
Client for company categories API
|
||||
*/
|
||||
type Client struct {
|
||||
transport runtime.ClientTransport
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ClientOption is the option for Client methods
|
||||
type ClientOption func(*runtime.ClientOperation)
|
||||
|
||||
// ClientService is the interface for Client methods
|
||||
type ClientService interface {
|
||||
GetCompanyCategories(params *GetCompanyCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyCategoriesOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategories gets a list of company categories
|
||||
|
||||
Return all or a single company category fully hydrated object
|
||||
*/
|
||||
func (a *Client) GetCompanyCategories(params *GetCompanyCategoriesParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetCompanyCategoriesOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewGetCompanyCategoriesParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "getCompanyCategories",
|
||||
Method: "GET",
|
||||
PathPattern: "/companycategories",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &GetCompanyCategoriesReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
}
|
||||
for _, opt := range opts {
|
||||
opt(op)
|
||||
}
|
||||
|
||||
result, err := a.transport.Submit(op)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*GetCompanyCategoriesOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for getCompanyCategories: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
// SetTransport changes the transport on the client
|
||||
func (a *Client) SetTransport(transport runtime.ClientTransport) {
|
||||
a.transport = transport
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_categories
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
)
|
||||
|
||||
// NewGetCompanyCategoriesParams creates a new GetCompanyCategoriesParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewGetCompanyCategoriesParams() *GetCompanyCategoriesParams {
|
||||
return &GetCompanyCategoriesParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesParamsWithTimeout creates a new GetCompanyCategoriesParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewGetCompanyCategoriesParamsWithTimeout(timeout time.Duration) *GetCompanyCategoriesParams {
|
||||
return &GetCompanyCategoriesParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesParamsWithContext creates a new GetCompanyCategoriesParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewGetCompanyCategoriesParamsWithContext(ctx context.Context) *GetCompanyCategoriesParams {
|
||||
return &GetCompanyCategoriesParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesParamsWithHTTPClient creates a new GetCompanyCategoriesParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewGetCompanyCategoriesParamsWithHTTPClient(client *http.Client) *GetCompanyCategoriesParams {
|
||||
return &GetCompanyCategoriesParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the get company categories operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type GetCompanyCategoriesParams struct {
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the get company categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyCategoriesParams) WithDefaults() *GetCompanyCategoriesParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the get company categories params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *GetCompanyCategoriesParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) WithTimeout(timeout time.Duration) *GetCompanyCategoriesParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) WithContext(ctx context.Context) *GetCompanyCategoriesParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) WithHTTPClient(client *http.Client) *GetCompanyCategoriesParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the get company categories params
|
||||
func (o *GetCompanyCategoriesParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *GetCompanyCategoriesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,522 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package company_categories
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_models"
|
||||
)
|
||||
|
||||
// GetCompanyCategoriesReader is a Reader for the GetCompanyCategories structure.
|
||||
type GetCompanyCategoriesReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *GetCompanyCategoriesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewGetCompanyCategoriesOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewGetCompanyCategoriesUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewGetCompanyCategoriesForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewGetCompanyCategoriesNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewGetCompanyCategoriesUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewGetCompanyCategoriesInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesOK creates a GetCompanyCategoriesOK with default headers values
|
||||
func NewGetCompanyCategoriesOK() *GetCompanyCategoriesOK {
|
||||
return &GetCompanyCategoriesOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesOK describes a response with status code 200, with default header values.
|
||||
|
||||
The SalesforceDevops.net CompanyCategory Object
|
||||
*/
|
||||
type GetCompanyCategoriesOK struct {
|
||||
Payload *research_models.CompanyCategoryResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories o k response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories o k response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories o k response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories o k response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories o k response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories o k response
|
||||
func (o *GetCompanyCategoriesOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesOK) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesOK) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesOK) GetPayload() *research_models.CompanyCategoryResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(research_models.CompanyCategoryResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesUnauthorized creates a GetCompanyCategoriesUnauthorized with default headers values
|
||||
func NewGetCompanyCategoriesUnauthorized() *GetCompanyCategoriesUnauthorized {
|
||||
return &GetCompanyCategoriesUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type GetCompanyCategoriesUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories unauthorized response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories unauthorized response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories unauthorized response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories unauthorized response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories unauthorized response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories unauthorized response
|
||||
func (o *GetCompanyCategoriesUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnauthorized) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnauthorized) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesForbidden creates a GetCompanyCategoriesForbidden with default headers values
|
||||
func NewGetCompanyCategoriesForbidden() *GetCompanyCategoriesForbidden {
|
||||
return &GetCompanyCategoriesForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type GetCompanyCategoriesForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories forbidden response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories forbidden response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories forbidden response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories forbidden response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories forbidden response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories forbidden response
|
||||
func (o *GetCompanyCategoriesForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesForbidden) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesForbidden) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesForbidden) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesNotFound creates a GetCompanyCategoriesNotFound with default headers values
|
||||
func NewGetCompanyCategoriesNotFound() *GetCompanyCategoriesNotFound {
|
||||
return &GetCompanyCategoriesNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type GetCompanyCategoriesNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories not found response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories not found response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories not found response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories not found response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories not found response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories not found response
|
||||
func (o *GetCompanyCategoriesNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesNotFound) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesNotFound) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesNotFound) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesUnprocessableEntity creates a GetCompanyCategoriesUnprocessableEntity with default headers values
|
||||
func NewGetCompanyCategoriesUnprocessableEntity() *GetCompanyCategoriesUnprocessableEntity {
|
||||
return &GetCompanyCategoriesUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type GetCompanyCategoriesUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories unprocessable entity response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories unprocessable entity response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories unprocessable entity response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories unprocessable entity response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories unprocessable entity response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories unprocessable entity response
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewGetCompanyCategoriesInternalServerError creates a GetCompanyCategoriesInternalServerError with default headers values
|
||||
func NewGetCompanyCategoriesInternalServerError() *GetCompanyCategoriesInternalServerError {
|
||||
return &GetCompanyCategoriesInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
GetCompanyCategoriesInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type GetCompanyCategoriesInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *research_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this get company categories internal server error response has a 2xx status code
|
||||
func (o *GetCompanyCategoriesInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this get company categories internal server error response has a 3xx status code
|
||||
func (o *GetCompanyCategoriesInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this get company categories internal server error response has a 4xx status code
|
||||
func (o *GetCompanyCategoriesInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this get company categories internal server error response has a 5xx status code
|
||||
func (o *GetCompanyCategoriesInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this get company categories internal server error response a status code equal to that given
|
||||
func (o *GetCompanyCategoriesInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the get company categories internal server error response
|
||||
func (o *GetCompanyCategoriesInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesInternalServerError) String() string {
|
||||
return fmt.Sprintf("[GET /companycategories][%d] getCompanyCategoriesInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesInternalServerError) GetPayload() *research_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *GetCompanyCategoriesInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(research_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -14,6 +14,7 @@ import (
|
|||
httptransport "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_categories"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/company_products"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/factors"
|
||||
"code.tnxs.net/vernonkeenan/lib/api/research/research_client/financial_statements"
|
||||
|
@ -66,6 +67,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *Research {
|
|||
|
||||
cli := new(Research)
|
||||
cli.Transport = transport
|
||||
cli.CompanyCategories = company_categories.New(transport, formats)
|
||||
cli.CompanyProducts = company_products.New(transport, formats)
|
||||
cli.Factors = factors.New(transport, formats)
|
||||
cli.FinancialStatements = financial_statements.New(transport, formats)
|
||||
|
@ -118,6 +120,8 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
|
|||
|
||||
// Research is a client for research
|
||||
type Research struct {
|
||||
CompanyCategories company_categories.ClientService
|
||||
|
||||
CompanyProducts company_products.ClientService
|
||||
|
||||
Factors factors.ClientService
|
||||
|
@ -140,6 +144,7 @@ type Research struct {
|
|||
// SetTransport changes the transport on the client and all its subresources
|
||||
func (c *Research) SetTransport(transport runtime.ClientTransport) {
|
||||
c.Transport = transport
|
||||
c.CompanyCategories.SetTransport(transport)
|
||||
c.CompanyProducts.SetTransport(transport)
|
||||
c.Factors.SetTransport(transport)
|
||||
c.FinancialStatements.SetTransport(transport)
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// CompanyCategory company category
|
||||
//
|
||||
// swagger:model CompanyCategory
|
||||
type CompanyCategory struct {
|
||||
|
||||
// The Type of Cloud Company
|
||||
CloudType string `json:"CloudType,omitempty"`
|
||||
|
||||
// The number of companies
|
||||
Count float64 `json:"Count,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company category
|
||||
func (m *CompanyCategory) Validate(formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this company category based on context it is used
|
||||
func (m *CompanyCategory) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyCategory) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyCategory) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyCategory
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,166 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package research_models
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// CompanyCategoryResponse An array of CompanyCategory objects produced in response to a request
|
||||
//
|
||||
// swagger:model CompanyCategoryResponse
|
||||
type CompanyCategoryResponse struct {
|
||||
|
||||
// data
|
||||
Data []*CompanyCategory `json:"Data"`
|
||||
|
||||
// meta
|
||||
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||
}
|
||||
|
||||
// Validate validates this company category response
|
||||
func (m *CompanyCategoryResponse) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validateMeta(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyCategoryResponse) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyCategoryResponse) validateMeta(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Meta) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validate this company category response based on the context it is used
|
||||
func (m *CompanyCategoryResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyCategoryResponse) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *CompanyCategoryResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Meta != nil {
|
||||
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Meta")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Meta")
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *CompanyCategoryResponse) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *CompanyCategoryResponse) UnmarshalBinary(b []byte) error {
|
||||
var res CompanyCategoryResponse
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostUserParams creates a new PostUserParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostUserParams() *PostUserParams {
|
||||
return &PostUserParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUserParamsWithTimeout creates a new PostUserParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostUserParamsWithTimeout(timeout time.Duration) *PostUserParams {
|
||||
return &PostUserParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUserParamsWithContext creates a new PostUserParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostUserParamsWithContext(ctx context.Context) *PostUserParams {
|
||||
return &PostUserParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUserParamsWithHTTPClient creates a new PostUserParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostUserParamsWithHTTPClient(client *http.Client) *PostUserParams {
|
||||
return &PostUserParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post user operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostUserParams struct {
|
||||
|
||||
/* UserRequest.
|
||||
|
||||
A single new user record
|
||||
*/
|
||||
UserRequest *sfgate_models.UserRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post user params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUserParams) WithDefaults() *PostUserParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post user params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUserParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post user params
|
||||
func (o *PostUserParams) WithTimeout(timeout time.Duration) *PostUserParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post user params
|
||||
func (o *PostUserParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post user params
|
||||
func (o *PostUserParams) WithContext(ctx context.Context) *PostUserParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post user params
|
||||
func (o *PostUserParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post user params
|
||||
func (o *PostUserParams) WithHTTPClient(client *http.Client) *PostUserParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post user params
|
||||
func (o *PostUserParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithUserRequest adds the userRequest to the post user params
|
||||
func (o *PostUserParams) WithUserRequest(userRequest *sfgate_models.UserRequest) *PostUserParams {
|
||||
o.SetUserRequest(userRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetUserRequest adds the userRequest to the post user params
|
||||
func (o *PostUserParams) SetUserRequest(userRequest *sfgate_models.UserRequest) {
|
||||
o.UserRequest = userRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostUserParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.UserRequest != nil {
|
||||
if err := r.SetBodyParam(o.UserRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -1,522 +0,0 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostUserReader is a Reader for the PostUser structure.
|
||||
type PostUserReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostUserReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostUserOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostUserUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostUserForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostUserNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostUserUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostUserInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUserOK creates a PostUserOK with default headers values
|
||||
func NewPostUserOK() *PostUserOK {
|
||||
return &PostUserOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response from Salesforce
|
||||
*/
|
||||
type PostUserOK struct {
|
||||
Payload *sfgate_models.SalesforcePostResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user o k response has a 2xx status code
|
||||
func (o *PostUserOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user o k response has a 3xx status code
|
||||
func (o *PostUserOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user o k response has a 4xx status code
|
||||
func (o *PostUserOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user o k response has a 5xx status code
|
||||
func (o *PostUserOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user o k response a status code equal to that given
|
||||
func (o *PostUserOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user o k response
|
||||
func (o *PostUserOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PostUserOK) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserOK) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserOK) GetPayload() *sfgate_models.SalesforcePostResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.SalesforcePostResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUserUnauthorized creates a PostUserUnauthorized with default headers values
|
||||
func NewPostUserUnauthorized() *PostUserUnauthorized {
|
||||
return &PostUserUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostUserUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user unauthorized response has a 2xx status code
|
||||
func (o *PostUserUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user unauthorized response has a 3xx status code
|
||||
func (o *PostUserUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user unauthorized response has a 4xx status code
|
||||
func (o *PostUserUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user unauthorized response has a 5xx status code
|
||||
func (o *PostUserUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user unauthorized response a status code equal to that given
|
||||
func (o *PostUserUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user unauthorized response
|
||||
func (o *PostUserUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostUserUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUserForbidden creates a PostUserForbidden with default headers values
|
||||
func NewPostUserForbidden() *PostUserForbidden {
|
||||
return &PostUserForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostUserForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user forbidden response has a 2xx status code
|
||||
func (o *PostUserForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user forbidden response has a 3xx status code
|
||||
func (o *PostUserForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user forbidden response has a 4xx status code
|
||||
func (o *PostUserForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user forbidden response has a 5xx status code
|
||||
func (o *PostUserForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user forbidden response a status code equal to that given
|
||||
func (o *PostUserForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user forbidden response
|
||||
func (o *PostUserForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostUserForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUserNotFound creates a PostUserNotFound with default headers values
|
||||
func NewPostUserNotFound() *PostUserNotFound {
|
||||
return &PostUserNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostUserNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user not found response has a 2xx status code
|
||||
func (o *PostUserNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user not found response has a 3xx status code
|
||||
func (o *PostUserNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user not found response has a 4xx status code
|
||||
func (o *PostUserNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user not found response has a 5xx status code
|
||||
func (o *PostUserNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user not found response a status code equal to that given
|
||||
func (o *PostUserNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user not found response
|
||||
func (o *PostUserNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostUserNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUserUnprocessableEntity creates a PostUserUnprocessableEntity with default headers values
|
||||
func NewPostUserUnprocessableEntity() *PostUserUnprocessableEntity {
|
||||
return &PostUserUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostUserUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user unprocessable entity response has a 2xx status code
|
||||
func (o *PostUserUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user unprocessable entity response has a 3xx status code
|
||||
func (o *PostUserUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user unprocessable entity response has a 4xx status code
|
||||
func (o *PostUserUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user unprocessable entity response has a 5xx status code
|
||||
func (o *PostUserUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user unprocessable entity response a status code equal to that given
|
||||
func (o *PostUserUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user unprocessable entity response
|
||||
func (o *PostUserUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostUserUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUserInternalServerError creates a PostUserInternalServerError with default headers values
|
||||
func NewPostUserInternalServerError() *PostUserInternalServerError {
|
||||
return &PostUserInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUserInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostUserInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post user internal server error response has a 2xx status code
|
||||
func (o *PostUserInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post user internal server error response has a 3xx status code
|
||||
func (o *PostUserInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post user internal server error response has a 4xx status code
|
||||
func (o *PostUserInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post user internal server error response has a 5xx status code
|
||||
func (o *PostUserInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post user internal server error response a status code equal to that given
|
||||
func (o *PostUserInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post user internal server error response
|
||||
func (o *PostUserInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostUserInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUserInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUserInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUserInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,157 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/runtime"
|
||||
cr "github.com/go-openapi/runtime/client"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// NewPostUsersParams creates a new PostUsersParams object,
|
||||
// with the default timeout for this client.
|
||||
//
|
||||
// Default values are not hydrated, since defaults are normally applied by the API server side.
|
||||
//
|
||||
// To enforce default values in parameter, use SetDefaults or WithDefaults.
|
||||
func NewPostUsersParams() *PostUsersParams {
|
||||
return &PostUsersParams{
|
||||
timeout: cr.DefaultTimeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersParamsWithTimeout creates a new PostUsersParams object
|
||||
// with the ability to set a timeout on a request.
|
||||
func NewPostUsersParamsWithTimeout(timeout time.Duration) *PostUsersParams {
|
||||
return &PostUsersParams{
|
||||
timeout: timeout,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersParamsWithContext creates a new PostUsersParams object
|
||||
// with the ability to set a context for a request.
|
||||
func NewPostUsersParamsWithContext(ctx context.Context) *PostUsersParams {
|
||||
return &PostUsersParams{
|
||||
Context: ctx,
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersParamsWithHTTPClient creates a new PostUsersParams object
|
||||
// with the ability to set a custom HTTPClient for a request.
|
||||
func NewPostUsersParamsWithHTTPClient(client *http.Client) *PostUsersParams {
|
||||
return &PostUsersParams{
|
||||
HTTPClient: client,
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersParams contains all the parameters to send to the API endpoint
|
||||
|
||||
for the post users operation.
|
||||
|
||||
Typically these are written to a http.Request.
|
||||
*/
|
||||
type PostUsersParams struct {
|
||||
|
||||
/* UserRequest.
|
||||
|
||||
A single new user record
|
||||
*/
|
||||
UserRequest *sfgate_models.UserRequest
|
||||
|
||||
timeout time.Duration
|
||||
Context context.Context
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
// WithDefaults hydrates default values in the post users params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUsersParams) WithDefaults() *PostUsersParams {
|
||||
o.SetDefaults()
|
||||
return o
|
||||
}
|
||||
|
||||
// SetDefaults hydrates default values in the post users params (not the query body).
|
||||
//
|
||||
// All values with no default are reset to their zero value.
|
||||
func (o *PostUsersParams) SetDefaults() {
|
||||
// no default values defined for this parameter
|
||||
}
|
||||
|
||||
// WithTimeout adds the timeout to the post users params
|
||||
func (o *PostUsersParams) WithTimeout(timeout time.Duration) *PostUsersParams {
|
||||
o.SetTimeout(timeout)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetTimeout adds the timeout to the post users params
|
||||
func (o *PostUsersParams) SetTimeout(timeout time.Duration) {
|
||||
o.timeout = timeout
|
||||
}
|
||||
|
||||
// WithContext adds the context to the post users params
|
||||
func (o *PostUsersParams) WithContext(ctx context.Context) *PostUsersParams {
|
||||
o.SetContext(ctx)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetContext adds the context to the post users params
|
||||
func (o *PostUsersParams) SetContext(ctx context.Context) {
|
||||
o.Context = ctx
|
||||
}
|
||||
|
||||
// WithHTTPClient adds the HTTPClient to the post users params
|
||||
func (o *PostUsersParams) WithHTTPClient(client *http.Client) *PostUsersParams {
|
||||
o.SetHTTPClient(client)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetHTTPClient adds the HTTPClient to the post users params
|
||||
func (o *PostUsersParams) SetHTTPClient(client *http.Client) {
|
||||
o.HTTPClient = client
|
||||
}
|
||||
|
||||
// WithUserRequest adds the userRequest to the post users params
|
||||
func (o *PostUsersParams) WithUserRequest(userRequest *sfgate_models.UserRequest) *PostUsersParams {
|
||||
o.SetUserRequest(userRequest)
|
||||
return o
|
||||
}
|
||||
|
||||
// SetUserRequest adds the userRequest to the post users params
|
||||
func (o *PostUsersParams) SetUserRequest(userRequest *sfgate_models.UserRequest) {
|
||||
o.UserRequest = userRequest
|
||||
}
|
||||
|
||||
// WriteToRequest writes these params to a swagger request
|
||||
func (o *PostUsersParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
|
||||
|
||||
if err := r.SetTimeout(o.timeout); err != nil {
|
||||
return err
|
||||
}
|
||||
var res []error
|
||||
if o.UserRequest != nil {
|
||||
if err := r.SetBodyParam(o.UserRequest); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
|
@ -0,0 +1,522 @@
|
|||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
// (c) 2012-2020 by Taxnexus, Inc.
|
||||
// All rights reserved worldwide.
|
||||
// Proprietary product; unlicensed use is not allowed
|
||||
|
||||
package users
|
||||
|
||||
// This file was generated by the swagger tool.
|
||||
// Editing this file might prove futile when you re-run the swagger generate command
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"github.com/go-openapi/runtime"
|
||||
"github.com/go-openapi/strfmt"
|
||||
|
||||
"code.tnxs.net/vernonkeenan/lib/api/sfgate/sfgate_models"
|
||||
)
|
||||
|
||||
// PostUsersReader is a Reader for the PostUsers structure.
|
||||
type PostUsersReader struct {
|
||||
formats strfmt.Registry
|
||||
}
|
||||
|
||||
// ReadResponse reads a server response into the received o.
|
||||
func (o *PostUsersReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
||||
switch response.Code() {
|
||||
case 200:
|
||||
result := NewPostUsersOK()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return result, nil
|
||||
case 401:
|
||||
result := NewPostUsersUnauthorized()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 403:
|
||||
result := NewPostUsersForbidden()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 404:
|
||||
result := NewPostUsersNotFound()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 422:
|
||||
result := NewPostUsersUnprocessableEntity()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
case 500:
|
||||
result := NewPostUsersInternalServerError()
|
||||
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return nil, result
|
||||
default:
|
||||
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
||||
}
|
||||
}
|
||||
|
||||
// NewPostUsersOK creates a PostUsersOK with default headers values
|
||||
func NewPostUsersOK() *PostUsersOK {
|
||||
return &PostUsersOK{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersOK describes a response with status code 200, with default header values.
|
||||
|
||||
Response with User objects
|
||||
*/
|
||||
type PostUsersOK struct {
|
||||
Payload *sfgate_models.UserResponse
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users o k response has a 2xx status code
|
||||
func (o *PostUsersOK) IsSuccess() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users o k response has a 3xx status code
|
||||
func (o *PostUsersOK) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users o k response has a 4xx status code
|
||||
func (o *PostUsersOK) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users o k response has a 5xx status code
|
||||
func (o *PostUsersOK) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users o k response a status code equal to that given
|
||||
func (o *PostUsersOK) IsCode(code int) bool {
|
||||
return code == 200
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users o k response
|
||||
func (o *PostUsersOK) Code() int {
|
||||
return 200
|
||||
}
|
||||
|
||||
func (o *PostUsersOK) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOK) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersOK %+v", 200, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersOK) GetPayload() *sfgate_models.UserResponse {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
o.Payload = new(sfgate_models.UserResponse)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersUnauthorized creates a PostUsersUnauthorized with default headers values
|
||||
func NewPostUsersUnauthorized() *PostUsersUnauthorized {
|
||||
return &PostUsersUnauthorized{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersUnauthorized describes a response with status code 401, with default header values.
|
||||
|
||||
Access unauthorized, invalid API-KEY was used
|
||||
*/
|
||||
type PostUsersUnauthorized struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users unauthorized response has a 2xx status code
|
||||
func (o *PostUsersUnauthorized) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users unauthorized response has a 3xx status code
|
||||
func (o *PostUsersUnauthorized) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users unauthorized response has a 4xx status code
|
||||
func (o *PostUsersUnauthorized) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users unauthorized response has a 5xx status code
|
||||
func (o *PostUsersUnauthorized) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users unauthorized response a status code equal to that given
|
||||
func (o *PostUsersUnauthorized) IsCode(code int) bool {
|
||||
return code == 401
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users unauthorized response
|
||||
func (o *PostUsersUnauthorized) Code() int {
|
||||
return 401
|
||||
}
|
||||
|
||||
func (o *PostUsersUnauthorized) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersUnauthorized) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersUnauthorized %+v", 401, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersUnauthorized) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersForbidden creates a PostUsersForbidden with default headers values
|
||||
func NewPostUsersForbidden() *PostUsersForbidden {
|
||||
return &PostUsersForbidden{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersForbidden describes a response with status code 403, with default header values.
|
||||
|
||||
Access forbidden, account lacks access
|
||||
*/
|
||||
type PostUsersForbidden struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users forbidden response has a 2xx status code
|
||||
func (o *PostUsersForbidden) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users forbidden response has a 3xx status code
|
||||
func (o *PostUsersForbidden) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users forbidden response has a 4xx status code
|
||||
func (o *PostUsersForbidden) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users forbidden response has a 5xx status code
|
||||
func (o *PostUsersForbidden) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users forbidden response a status code equal to that given
|
||||
func (o *PostUsersForbidden) IsCode(code int) bool {
|
||||
return code == 403
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users forbidden response
|
||||
func (o *PostUsersForbidden) Code() int {
|
||||
return 403
|
||||
}
|
||||
|
||||
func (o *PostUsersForbidden) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersForbidden) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersForbidden %+v", 403, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersForbidden) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersNotFound creates a PostUsersNotFound with default headers values
|
||||
func NewPostUsersNotFound() *PostUsersNotFound {
|
||||
return &PostUsersNotFound{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersNotFound describes a response with status code 404, with default header values.
|
||||
|
||||
Resource was not found
|
||||
*/
|
||||
type PostUsersNotFound struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users not found response has a 2xx status code
|
||||
func (o *PostUsersNotFound) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users not found response has a 3xx status code
|
||||
func (o *PostUsersNotFound) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users not found response has a 4xx status code
|
||||
func (o *PostUsersNotFound) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users not found response has a 5xx status code
|
||||
func (o *PostUsersNotFound) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users not found response a status code equal to that given
|
||||
func (o *PostUsersNotFound) IsCode(code int) bool {
|
||||
return code == 404
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users not found response
|
||||
func (o *PostUsersNotFound) Code() int {
|
||||
return 404
|
||||
}
|
||||
|
||||
func (o *PostUsersNotFound) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersNotFound) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersNotFound %+v", 404, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersNotFound) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersUnprocessableEntity creates a PostUsersUnprocessableEntity with default headers values
|
||||
func NewPostUsersUnprocessableEntity() *PostUsersUnprocessableEntity {
|
||||
return &PostUsersUnprocessableEntity{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersUnprocessableEntity describes a response with status code 422, with default header values.
|
||||
|
||||
Unprocessable Entity, likely a bad parameter
|
||||
*/
|
||||
type PostUsersUnprocessableEntity struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users unprocessable entity response has a 2xx status code
|
||||
func (o *PostUsersUnprocessableEntity) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users unprocessable entity response has a 3xx status code
|
||||
func (o *PostUsersUnprocessableEntity) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users unprocessable entity response has a 4xx status code
|
||||
func (o *PostUsersUnprocessableEntity) IsClientError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users unprocessable entity response has a 5xx status code
|
||||
func (o *PostUsersUnprocessableEntity) IsServerError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users unprocessable entity response a status code equal to that given
|
||||
func (o *PostUsersUnprocessableEntity) IsCode(code int) bool {
|
||||
return code == 422
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users unprocessable entity response
|
||||
func (o *PostUsersUnprocessableEntity) Code() int {
|
||||
return 422
|
||||
}
|
||||
|
||||
func (o *PostUsersUnprocessableEntity) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersUnprocessableEntity) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersUnprocessableEntity %+v", 422, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersUnprocessableEntity) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersUnprocessableEntity) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewPostUsersInternalServerError creates a PostUsersInternalServerError with default headers values
|
||||
func NewPostUsersInternalServerError() *PostUsersInternalServerError {
|
||||
return &PostUsersInternalServerError{}
|
||||
}
|
||||
|
||||
/*
|
||||
PostUsersInternalServerError describes a response with status code 500, with default header values.
|
||||
|
||||
Server Internal Error
|
||||
*/
|
||||
type PostUsersInternalServerError struct {
|
||||
AccessControlAllowOrigin string
|
||||
|
||||
Payload *sfgate_models.Error
|
||||
}
|
||||
|
||||
// IsSuccess returns true when this post users internal server error response has a 2xx status code
|
||||
func (o *PostUsersInternalServerError) IsSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsRedirect returns true when this post users internal server error response has a 3xx status code
|
||||
func (o *PostUsersInternalServerError) IsRedirect() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsClientError returns true when this post users internal server error response has a 4xx status code
|
||||
func (o *PostUsersInternalServerError) IsClientError() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsServerError returns true when this post users internal server error response has a 5xx status code
|
||||
func (o *PostUsersInternalServerError) IsServerError() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// IsCode returns true when this post users internal server error response a status code equal to that given
|
||||
func (o *PostUsersInternalServerError) IsCode(code int) bool {
|
||||
return code == 500
|
||||
}
|
||||
|
||||
// Code gets the status code for the post users internal server error response
|
||||
func (o *PostUsersInternalServerError) Code() int {
|
||||
return 500
|
||||
}
|
||||
|
||||
func (o *PostUsersInternalServerError) Error() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersInternalServerError) String() string {
|
||||
return fmt.Sprintf("[POST /users][%d] postUsersInternalServerError %+v", 500, o.Payload)
|
||||
}
|
||||
|
||||
func (o *PostUsersInternalServerError) GetPayload() *sfgate_models.Error {
|
||||
return o.Payload
|
||||
}
|
||||
|
||||
func (o *PostUsersInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
||||
|
||||
// hydrates response header Access-Control-Allow-Origin
|
||||
hdrAccessControlAllowOrigin := response.GetHeader("Access-Control-Allow-Origin")
|
||||
|
||||
if hdrAccessControlAllowOrigin != "" {
|
||||
o.AccessControlAllowOrigin = hdrAccessControlAllowOrigin
|
||||
}
|
||||
|
||||
o.Payload = new(sfgate_models.Error)
|
||||
|
||||
// response payload
|
||||
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
|
@ -36,7 +36,7 @@ type ClientOption func(*runtime.ClientOperation)
|
|||
type ClientService interface {
|
||||
GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*GetUsersOK, error)
|
||||
|
||||
PostUser(params *PostUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUserOK, error)
|
||||
PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUsersOK, error)
|
||||
|
||||
SetTransport(transport runtime.ClientTransport)
|
||||
}
|
||||
|
@ -83,24 +83,24 @@ func (a *Client) GetUsers(params *GetUsersParams, authInfo runtime.ClientAuthInf
|
|||
}
|
||||
|
||||
/*
|
||||
PostUser creates new salesforce user
|
||||
PostUsers creates new salesforce user
|
||||
|
||||
Create a user record in Salesforce
|
||||
Create user recorda in Salesforce
|
||||
*/
|
||||
func (a *Client) PostUser(params *PostUserParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUserOK, error) {
|
||||
func (a *Client) PostUsers(params *PostUsersParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*PostUsersOK, error) {
|
||||
// TODO: Validate the params before sending
|
||||
if params == nil {
|
||||
params = NewPostUserParams()
|
||||
params = NewPostUsersParams()
|
||||
}
|
||||
op := &runtime.ClientOperation{
|
||||
ID: "postUser",
|
||||
ID: "postUsers",
|
||||
Method: "POST",
|
||||
PathPattern: "/users",
|
||||
ProducesMediaTypes: []string{"application/json"},
|
||||
ConsumesMediaTypes: []string{"application/json"},
|
||||
Schemes: []string{"http"},
|
||||
Params: params,
|
||||
Reader: &PostUserReader{formats: a.formats},
|
||||
Reader: &PostUsersReader{formats: a.formats},
|
||||
AuthInfo: authInfo,
|
||||
Context: params.Context,
|
||||
Client: params.HTTPClient,
|
||||
|
@ -113,13 +113,13 @@ func (a *Client) PostUser(params *PostUserParams, authInfo runtime.ClientAuthInf
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
success, ok := result.(*PostUserOK)
|
||||
success, ok := result.(*PostUsersOK)
|
||||
if ok {
|
||||
return success, nil
|
||||
}
|
||||
// unexpected success response
|
||||
// safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue
|
||||
msg := fmt.Sprintf("unexpected success response for postUser: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
msg := fmt.Sprintf("unexpected success response for postUsers: API contract not enforced by server. Client expected to get an error, but got: %T", result)
|
||||
panic(msg)
|
||||
}
|
||||
|
||||
|
|
|
@ -11,50 +11,27 @@ package sfgate_models
|
|||
|
||||
import (
|
||||
"context"
|
||||
"strconv"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
)
|
||||
|
||||
// UserRequest user request
|
||||
// UserRequest An array of User Objects to post
|
||||
//
|
||||
// swagger:model UserRequest
|
||||
type UserRequest struct {
|
||||
|
||||
// API key
|
||||
APIKey string `json:"APIKey,omitempty"`
|
||||
|
||||
// address
|
||||
Address *Address `json:"Address,omitempty"`
|
||||
|
||||
// email
|
||||
Email string `json:"Email,omitempty"`
|
||||
|
||||
// environment
|
||||
Environment string `json:"Environment,omitempty"`
|
||||
|
||||
// first name
|
||||
FirstName string `json:"FirstName,omitempty"`
|
||||
|
||||
// ID
|
||||
ID string `json:"ID,omitempty"`
|
||||
|
||||
// last name
|
||||
LastName string `json:"LastName,omitempty"`
|
||||
|
||||
// taxnexus account
|
||||
TaxnexusAccount string `json:"TaxnexusAccount,omitempty"`
|
||||
|
||||
// title
|
||||
Title string `json:"Title,omitempty"`
|
||||
// data
|
||||
Data []*User `json:"data"`
|
||||
}
|
||||
|
||||
// Validate validates this user request
|
||||
func (m *UserRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateAddress(formats); err != nil {
|
||||
if err := m.validateData(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -64,20 +41,27 @@ func (m *UserRequest) Validate(formats strfmt.Registry) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *UserRequest) validateAddress(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Address) { // not required
|
||||
func (m *UserRequest) validateData(formats strfmt.Registry) error {
|
||||
if swag.IsZero(m.Data) { // not required
|
||||
return nil
|
||||
}
|
||||
|
||||
if m.Address != nil {
|
||||
if err := m.Address.Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Address")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
}
|
||||
return err
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
if swag.IsZero(m.Data[i]) { // not required
|
||||
continue
|
||||
}
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].Validate(formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -87,7 +71,7 @@ func (m *UserRequest) validateAddress(formats strfmt.Registry) error {
|
|||
func (m *UserRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.contextValidateAddress(ctx, formats); err != nil {
|
||||
if err := m.contextValidateData(ctx, formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
|
@ -97,17 +81,21 @@ func (m *UserRequest) ContextValidate(ctx context.Context, formats strfmt.Regist
|
|||
return nil
|
||||
}
|
||||
|
||||
func (m *UserRequest) contextValidateAddress(ctx context.Context, formats strfmt.Registry) error {
|
||||
func (m *UserRequest) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
|
||||
|
||||
if m.Address != nil {
|
||||
if err := m.Address.ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("Address")
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("Address")
|
||||
for i := 0; i < len(m.Data); i++ {
|
||||
|
||||
if m.Data[i] != nil {
|
||||
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
|
||||
if ve, ok := err.(*errors.Validation); ok {
|
||||
return ve.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||
return ce.ValidateName("data" + "." + strconv.Itoa(i))
|
||||
}
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -146,6 +146,9 @@ User:
|
|||
StartOfDay:
|
||||
description: The time day starts
|
||||
type: string
|
||||
Status:
|
||||
description: Status
|
||||
type: string
|
||||
TaxnexusAccount:
|
||||
description: Taxnexus Account
|
||||
type: string
|
||||
|
|
|
@ -207,6 +207,13 @@ parameters:
|
|||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/UserRequest"
|
||||
WebhookClerkRequest:
|
||||
description: An array of new WebhookClerk records
|
||||
in: body
|
||||
name: webhookclerkRequest
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/WebhookClerkRequest"
|
||||
activeQuery:
|
||||
description: Retrieve active records only?
|
||||
in: query
|
||||
|
@ -219,6 +226,18 @@ parameters:
|
|||
name: auth0UserId
|
||||
required: false
|
||||
type: string
|
||||
userIdQuery:
|
||||
description: Internal User ID
|
||||
in: query
|
||||
name: userId
|
||||
required: false
|
||||
type: string
|
||||
contactIdQuery:
|
||||
description: Internal Contact ID (links to Account)
|
||||
in: query
|
||||
name: contactId
|
||||
required: false
|
||||
type: string
|
||||
databaseIdQuery:
|
||||
description: Record Id of a Database
|
||||
in: query
|
||||
|
@ -278,56 +297,26 @@ responses:
|
|||
$ref: "#/definitions/Error"
|
||||
AttendeeResponse:
|
||||
description: Attendee Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/AttendeeResponse"
|
||||
CertificateResponse:
|
||||
description: Certificate Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CertificateResponse"
|
||||
ClusterResponse:
|
||||
description: Response with Cluster objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ClusterResponse"
|
||||
CourseLessonResponse:
|
||||
description: CourseLesson Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseLessonResponse"
|
||||
CourseResponse:
|
||||
description: Course Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseResponse"
|
||||
CourseSectionResponse:
|
||||
description: CourseSection Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseSectionResponse"
|
||||
DatabaseResponse:
|
||||
|
@ -339,74 +328,34 @@ responses:
|
|||
$ref: "#/definitions/DatabaseResponse"
|
||||
EnrollmentResponse:
|
||||
description: Enrollment Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EnrollmentResponse"
|
||||
EventCategoryAssignmentResponse:
|
||||
description: EventCategoryAssignment Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventCategoryAssignmentResponse"
|
||||
EventCategoryResponse:
|
||||
description: EventCategory Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventCategoryResponse"
|
||||
EventResponse:
|
||||
description: Event Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventResponse"
|
||||
FavoriteResponse:
|
||||
description: Favorite Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/FavoriteResponse"
|
||||
InvoiceResponse:
|
||||
description: Invoice Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/InvoiceResponse"
|
||||
IssuedCertificateResponse:
|
||||
description: IssuedCertificate Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/IssuedCertificateResponse"
|
||||
LessonProgressResponse:
|
||||
description: LessonProgress Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/LessonProgressResponse"
|
||||
NotFound:
|
||||
|
@ -418,47 +367,22 @@ responses:
|
|||
$ref: "#/definitions/Error"
|
||||
OrderResponse:
|
||||
description: Order Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/OrderResponse"
|
||||
PaymentMethodResponse:
|
||||
description: PaymentMethod Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/PaymentMethodResponse"
|
||||
ResearchProjectCompanyResponse:
|
||||
description: ResearchProjectCompany Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectCompanyResponse"
|
||||
ResearchProjectResponse:
|
||||
description: ResearchProject Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectResponse"
|
||||
ResearchProjectTopicResponse:
|
||||
description: ResearchProjectTopic Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectTopicResponse"
|
||||
ServerError:
|
||||
|
@ -477,58 +401,32 @@ responses:
|
|||
$ref: "#/definitions/TenantResponse"
|
||||
TemplateResponse:
|
||||
description: Response with Template objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TemplateResponse"
|
||||
TicketResponse:
|
||||
description: Ticket Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TicketResponse"
|
||||
TransactionResponse:
|
||||
description: Transaction Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TransactionResponse"
|
||||
Unauthorized:
|
||||
description: Access Unauthorized, invalid API-KEY was used
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
UnprocessableEntity:
|
||||
description: Unprocessable Entity, likely a bad parameter
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
UserResponse:
|
||||
description: Response with User objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/UserResponse"
|
||||
WebhookClerkResponse:
|
||||
description: WebhookClerk Response Object
|
||||
schema:
|
||||
$ref: "#/definitions/WebhookClerkResponse"
|
||||
paths:
|
||||
/attendees:
|
||||
delete:
|
||||
|
@ -1658,6 +1556,52 @@ paths:
|
|||
summary: Update an existing Transaction
|
||||
tags:
|
||||
- Transactions
|
||||
/users/onboard:
|
||||
post:
|
||||
description: Async onboard new users
|
||||
operationId: postUsersOnboard
|
||||
parameters:
|
||||
- $ref: "#/parameters/UserRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/UserResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Async onboard new users
|
||||
tags:
|
||||
- Users
|
||||
/webhooks/clerk:
|
||||
post:
|
||||
description: Clerk webhook
|
||||
operationId: postWebhooksClerk
|
||||
parameters:
|
||||
- $ref: "#/parameters/WebhookClerkRequest"
|
||||
responses:
|
||||
"201":
|
||||
$ref: "#/responses/WebhookClerkResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
summary: Clerk webhook
|
||||
tags:
|
||||
- Webhooks
|
||||
/users:
|
||||
get:
|
||||
description: Return a list of User records from the datastore
|
||||
|
@ -1667,6 +1611,8 @@ paths:
|
|||
- $ref: "#/parameters/offsetQuery"
|
||||
- $ref: "#/parameters/emailQuery"
|
||||
- $ref: "#/parameters/auth0UserIdQuery"
|
||||
- $ref: "#/parameters/userIdQuery"
|
||||
- $ref: "#/parameters/contactIdQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/UserResponse"
|
||||
|
@ -3149,6 +3095,9 @@ definitions:
|
|||
StartOfDay:
|
||||
description: The time day starts
|
||||
type: string
|
||||
Status:
|
||||
description: Onboarding Status
|
||||
type: string
|
||||
TaxnexusAccount:
|
||||
description: Account
|
||||
type: string
|
||||
|
@ -3239,3 +3188,208 @@ definitions:
|
|||
description: Username
|
||||
type: string
|
||||
type: object
|
||||
WebhookClerkRequest:
|
||||
description: Clerk webhook object
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
type:
|
||||
description: Clerk Name
|
||||
type: string
|
||||
data:
|
||||
type: object
|
||||
type: object
|
||||
ClerkUser:
|
||||
description: Clerk user object
|
||||
type: object
|
||||
properties:
|
||||
external_id:
|
||||
type: string
|
||||
description: |-
|
||||
The ID of the user as used in your external systems or your previous authentication solution.
|
||||
Must be unique across your instance.
|
||||
first_name:
|
||||
type: string
|
||||
description: The first name to assign to the user
|
||||
last_name:
|
||||
type: string
|
||||
description: The last name to assign to the user
|
||||
email_address:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Email addresses to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first email address will be set as the user's primary email address.
|
||||
phone_number:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Phone numbers to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first phone number will be set as the user's primary phone number.
|
||||
web3_wallet:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Web3 wallets to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first wallet will be set as the user's primary wallet.
|
||||
username:
|
||||
type: string
|
||||
description: |-
|
||||
The username to give to the user.
|
||||
It must be unique across your instance.
|
||||
password:
|
||||
type: string
|
||||
description: |-
|
||||
The plaintext password to give the user.
|
||||
Must be at least 8 characters long, and can not be in any list of hacked passwords.
|
||||
password_digest:
|
||||
type: string
|
||||
description: |-
|
||||
In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
|
||||
The digests should be generated with one of the supported algorithms.
|
||||
The hashing algorithm can be specified using the `password_hasher` property.
|
||||
password_hasher:
|
||||
type: string
|
||||
description: |-
|
||||
The hashing algorithm that was used to generate the password digest.
|
||||
The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), md5, pbkdf2_sha256, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/) and 2 [argon2](https://argon2.online/) variants, argon2i and argon2id.
|
||||
Each of the above expects the incoming digest to be of a particular format.
|
||||
|
||||
More specifically:
|
||||
|
||||
**bcrypt:** The digest should be of the following form:
|
||||
|
||||
`$<algorithm version>$<cost>$<salt & hash>`
|
||||
|
||||
**md5:** The digest should follow the regular form e.g.:
|
||||
|
||||
`5f4dcc3b5aa765d61d8327deb882cf99`
|
||||
|
||||
**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:
|
||||
|
||||
`pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
|
||||
Note: Both the salt and the hash are expected to be base64-encoded.
|
||||
|
||||
**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):
|
||||
|
||||
`pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
|
||||
Note: The salt is expected to be un-encoded, the hash is expected base64-encoded.
|
||||
|
||||
**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:
|
||||
1. uses sha1 instead of sha256
|
||||
2. accepts the hash as a hex-encoded string
|
||||
|
||||
The format is the following:
|
||||
|
||||
`pbkdf2_sha1$<iterations>$<salt>$<hash-as-hex-string>`
|
||||
|
||||
|
||||
**scrypt_firebase:** The Firebase-specific variant of scrypt.
|
||||
The value is expected to have 6 segments separated by the $ character and include the following information:
|
||||
|
||||
_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.
|
||||
_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.
|
||||
_signer key:_ The base64 encoded signer key.
|
||||
_salt separator:_ The base64 encoded salt separator.
|
||||
_rounds:_ The number of rounds the algorithm needs to run.
|
||||
_memory cost:_ The cost of the algorithm run
|
||||
|
||||
The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.
|
||||
The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.
|
||||
|
||||
Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:
|
||||
|
||||
`<hash>$<salt>$<signer key>$<salt separator>$<rounds>$<memory cost>`
|
||||
|
||||
**argon2i:** Algorithms in the argon2 family generate digests that encode the following information:
|
||||
|
||||
_version (v):_ The argon version, version 19 is assumed
|
||||
_memory (m):_ The memory used by the algorithm (in kibibytes)
|
||||
_iterations (t):_ The number of iterations to perform
|
||||
_parallelism (p):_ The number of threads to use
|
||||
|
||||
Parts are demarcated by the `$` character, with the first part identifying the algorithm variant.
|
||||
The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).
|
||||
The final part is the actual digest.
|
||||
|
||||
`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`
|
||||
|
||||
**argon2id:** See the previous algorithm for an explanation of the formatting.
|
||||
|
||||
For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:
|
||||
|
||||
`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`
|
||||
|
||||
If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).
|
||||
enum:
|
||||
- bcrypt
|
||||
- md5
|
||||
- pbkdf2_sha256
|
||||
- pbkdf2_sha256_django
|
||||
- pbkdf2_sha1
|
||||
- scrypt_firebase
|
||||
- argon2i
|
||||
- argon2id
|
||||
skip_password_checks:
|
||||
type: boolean
|
||||
description: |-
|
||||
When set to `true` all password checks are skipped.
|
||||
It is recommended to use this method only when migrating plaintext passwords to Clerk.
|
||||
Upon migration the user base should be prompted to pick stronger password.
|
||||
skip_password_requirement:
|
||||
type: boolean
|
||||
description: |-
|
||||
When set to `true`, `password` is not required anymore when creating the user and can be omitted.
|
||||
This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
|
||||
Please note that you cannot use this flag if password is the only way for a user to sign into your instance.
|
||||
totp_secret:
|
||||
type: string
|
||||
description: |-
|
||||
In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
|
||||
Please note that currently the supported options are:
|
||||
* Period: 30 seconds
|
||||
* Code length: 6 digits
|
||||
* Algorithm: SHA1
|
||||
backup_codes:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
|
||||
You must provide the backup codes in plain format or the corresponding bcrypt digest.
|
||||
public_metadata:
|
||||
type: object
|
||||
description: Metadata saved on the user, that is visible to both
|
||||
your Frontend and Backend APIs
|
||||
private_metadata:
|
||||
type: object
|
||||
description: Metadata saved on the user, that is only visible to
|
||||
your Backend API
|
||||
unsafe_metadata:
|
||||
type: object
|
||||
description: |-
|
||||
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
|
||||
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
|
||||
created_at:
|
||||
type: string
|
||||
description: A custom date/time denoting _when_ the user signed
|
||||
up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`).
|
||||
WebhookClerkResponse:
|
||||
description: Clerk webhook object
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
type:
|
||||
description: Clerk Name
|
||||
type: string
|
||||
data:
|
||||
type: object
|
||||
type: object
|
||||
|
|
|
@ -22,12 +22,12 @@ consumes:
|
|||
produces:
|
||||
- "application/json"
|
||||
parameters:
|
||||
activeQuery:
|
||||
description: Only retrieve active records?
|
||||
slugQuery:
|
||||
description: The slug of the item to retrieve
|
||||
in: query
|
||||
name: active
|
||||
name: slug
|
||||
required: false
|
||||
type: boolean
|
||||
type: string
|
||||
CompanyIdQuery:
|
||||
description: Record Id of an Company
|
||||
in: query
|
||||
|
@ -102,6 +102,7 @@ paths:
|
|||
operationId: getCompanies
|
||||
parameters:
|
||||
- $ref: "#/parameters/CompanyIdQuery"
|
||||
- $ref: "#/parameters/slugQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/CompanyResponse"
|
||||
|
|
|
@ -284,8 +284,34 @@ responses:
|
|||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
CompanyCategoryResponse:
|
||||
description: The SalesforceDevops.net CompanyCategory Object
|
||||
schema:
|
||||
$ref: "#/definitions/CompanyCategoryResponse"
|
||||
|
||||
paths:
|
||||
/companycategories:
|
||||
get:
|
||||
description: Return all or a single company category fully hydrated object
|
||||
operationId: getCompanyCategories
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/CompanyCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of company categories
|
||||
tags:
|
||||
- CompanyCategories
|
||||
/companyproducts:
|
||||
delete:
|
||||
description: Delete CompanyProduct record
|
||||
|
@ -1519,3 +1545,22 @@ definitions:
|
|||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
CompanyCategory:
|
||||
properties:
|
||||
CloudType:
|
||||
description: The Type of Cloud Company
|
||||
type: string
|
||||
Count:
|
||||
description: The number of companies
|
||||
type: number
|
||||
type: object
|
||||
CompanyCategoryResponse:
|
||||
description: An array of CompanyCategory objects produced in response to a request
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "#/definitions/CompanyCategory"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
|
|
|
@ -1380,13 +1380,13 @@ paths:
|
|||
tags:
|
||||
- Users
|
||||
post:
|
||||
description: Create a user record in Salesforce
|
||||
operationId: postUser
|
||||
description: Create user recorda in Salesforce
|
||||
operationId: postUsers
|
||||
parameters:
|
||||
- $ref: "#/parameters/newUserRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/SalesforcePostResponse"
|
||||
$ref: "#/responses/UserResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
|
@ -3125,25 +3125,12 @@ definitions:
|
|||
type: string
|
||||
type: object
|
||||
UserRequest:
|
||||
description: An array of User Objects to post
|
||||
properties:
|
||||
APIKey:
|
||||
type: string
|
||||
Address:
|
||||
$ref: "#/definitions/Address"
|
||||
Email:
|
||||
type: string
|
||||
Environment:
|
||||
type: string
|
||||
FirstName:
|
||||
type: string
|
||||
ID:
|
||||
type: string
|
||||
LastName:
|
||||
type: string
|
||||
TaxnexusAccount:
|
||||
type: string
|
||||
Title:
|
||||
type: string
|
||||
data:
|
||||
items:
|
||||
$ref: "#/definitions/User"
|
||||
type: array
|
||||
type: object
|
||||
UserResponse:
|
||||
description: An array of Print-Ready ingest Objects
|
||||
|
|
|
@ -207,6 +207,13 @@ parameters:
|
|||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/UserRequest"
|
||||
WebhookClerkRequest:
|
||||
description: An array of new WebhookClerk records
|
||||
in: body
|
||||
name: webhookclerkRequest
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/WebhookClerkRequest"
|
||||
activeQuery:
|
||||
description: Retrieve active records only?
|
||||
in: query
|
||||
|
@ -219,6 +226,18 @@ parameters:
|
|||
name: auth0UserId
|
||||
required: false
|
||||
type: string
|
||||
userIdQuery:
|
||||
description: Internal User ID
|
||||
in: query
|
||||
name: userId
|
||||
required: false
|
||||
type: string
|
||||
contactIdQuery:
|
||||
description: Internal Contact ID (links to Account)
|
||||
in: query
|
||||
name: contactId
|
||||
required: false
|
||||
type: string
|
||||
databaseIdQuery:
|
||||
description: Record Id of a Database
|
||||
in: query
|
||||
|
@ -278,56 +297,26 @@ responses:
|
|||
$ref: "#/definitions/Error"
|
||||
AttendeeResponse:
|
||||
description: Attendee Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/AttendeeResponse"
|
||||
CertificateResponse:
|
||||
description: Certificate Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CertificateResponse"
|
||||
ClusterResponse:
|
||||
description: Response with Cluster objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ClusterResponse"
|
||||
CourseLessonResponse:
|
||||
description: CourseLesson Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseLessonResponse"
|
||||
CourseResponse:
|
||||
description: Course Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseResponse"
|
||||
CourseSectionResponse:
|
||||
description: CourseSection Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/CourseSectionResponse"
|
||||
DatabaseResponse:
|
||||
|
@ -339,74 +328,34 @@ responses:
|
|||
$ref: "#/definitions/DatabaseResponse"
|
||||
EnrollmentResponse:
|
||||
description: Enrollment Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EnrollmentResponse"
|
||||
EventCategoryAssignmentResponse:
|
||||
description: EventCategoryAssignment Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventCategoryAssignmentResponse"
|
||||
EventCategoryResponse:
|
||||
description: EventCategory Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventCategoryResponse"
|
||||
EventResponse:
|
||||
description: Event Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/EventResponse"
|
||||
FavoriteResponse:
|
||||
description: Favorite Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/FavoriteResponse"
|
||||
InvoiceResponse:
|
||||
description: Invoice Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/InvoiceResponse"
|
||||
IssuedCertificateResponse:
|
||||
description: IssuedCertificate Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/IssuedCertificateResponse"
|
||||
LessonProgressResponse:
|
||||
description: LessonProgress Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/LessonProgressResponse"
|
||||
NotFound:
|
||||
|
@ -418,47 +367,22 @@ responses:
|
|||
$ref: "#/definitions/Error"
|
||||
OrderResponse:
|
||||
description: Order Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/OrderResponse"
|
||||
PaymentMethodResponse:
|
||||
description: PaymentMethod Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/PaymentMethodResponse"
|
||||
ResearchProjectCompanyResponse:
|
||||
description: ResearchProjectCompany Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectCompanyResponse"
|
||||
ResearchProjectResponse:
|
||||
description: ResearchProject Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectResponse"
|
||||
ResearchProjectTopicResponse:
|
||||
description: ResearchProjectTopic Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/ResearchProjectTopicResponse"
|
||||
ServerError:
|
||||
|
@ -477,58 +401,32 @@ responses:
|
|||
$ref: "#/definitions/TenantResponse"
|
||||
TemplateResponse:
|
||||
description: Response with Template objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TemplateResponse"
|
||||
TicketResponse:
|
||||
description: Ticket Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TicketResponse"
|
||||
TransactionResponse:
|
||||
description: Transaction Response Object
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/TransactionResponse"
|
||||
Unauthorized:
|
||||
description: Access Unauthorized, invalid API-KEY was used
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
UnprocessableEntity:
|
||||
description: Unprocessable Entity, likely a bad parameter
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
UserResponse:
|
||||
description: Response with User objects
|
||||
headers:
|
||||
Access-Control-Allow-Origin:
|
||||
type: string
|
||||
Cache-Control:
|
||||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/UserResponse"
|
||||
WebhookClerkResponse:
|
||||
description: WebhookClerk Response Object
|
||||
schema:
|
||||
$ref: "#/definitions/WebhookClerkResponse"
|
||||
paths:
|
||||
/attendees:
|
||||
delete:
|
||||
|
@ -1658,6 +1556,52 @@ paths:
|
|||
summary: Update an existing Transaction
|
||||
tags:
|
||||
- Transactions
|
||||
/users/onboard:
|
||||
post:
|
||||
description: Async onboard new users
|
||||
operationId: postUsersOnboard
|
||||
parameters:
|
||||
- $ref: "#/parameters/UserRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/UserResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Async onboard new users
|
||||
tags:
|
||||
- Users
|
||||
/webhooks/clerk:
|
||||
post:
|
||||
description: Clerk webhook
|
||||
operationId: postWebhooksClerk
|
||||
parameters:
|
||||
- $ref: "#/parameters/WebhookClerkRequest"
|
||||
responses:
|
||||
"201":
|
||||
$ref: "#/responses/WebhookClerkResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
summary: Clerk webhook
|
||||
tags:
|
||||
- Webhooks
|
||||
/users:
|
||||
get:
|
||||
description: Return a list of User records from the datastore
|
||||
|
@ -1667,6 +1611,8 @@ paths:
|
|||
- $ref: "#/parameters/offsetQuery"
|
||||
- $ref: "#/parameters/emailQuery"
|
||||
- $ref: "#/parameters/auth0UserIdQuery"
|
||||
- $ref: "#/parameters/userIdQuery"
|
||||
- $ref: "#/parameters/contactIdQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/UserResponse"
|
||||
|
@ -3149,6 +3095,9 @@ definitions:
|
|||
StartOfDay:
|
||||
description: The time day starts
|
||||
type: string
|
||||
Status:
|
||||
description: Onboarding Status
|
||||
type: string
|
||||
TaxnexusAccount:
|
||||
description: Account
|
||||
type: string
|
||||
|
@ -3239,3 +3188,208 @@ definitions:
|
|||
description: Username
|
||||
type: string
|
||||
type: object
|
||||
WebhookClerkRequest:
|
||||
description: Clerk webhook object
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
type:
|
||||
description: Clerk Name
|
||||
type: string
|
||||
data:
|
||||
type: object
|
||||
type: object
|
||||
ClerkUser:
|
||||
description: Clerk user object
|
||||
type: object
|
||||
properties:
|
||||
external_id:
|
||||
type: string
|
||||
description: |-
|
||||
The ID of the user as used in your external systems or your previous authentication solution.
|
||||
Must be unique across your instance.
|
||||
first_name:
|
||||
type: string
|
||||
description: The first name to assign to the user
|
||||
last_name:
|
||||
type: string
|
||||
description: The last name to assign to the user
|
||||
email_address:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Email addresses to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first email address will be set as the user's primary email address.
|
||||
phone_number:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Phone numbers to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first phone number will be set as the user's primary phone number.
|
||||
web3_wallet:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
Web3 wallets to add to the user.
|
||||
Must be unique across your instance.
|
||||
The first wallet will be set as the user's primary wallet.
|
||||
username:
|
||||
type: string
|
||||
description: |-
|
||||
The username to give to the user.
|
||||
It must be unique across your instance.
|
||||
password:
|
||||
type: string
|
||||
description: |-
|
||||
The plaintext password to give the user.
|
||||
Must be at least 8 characters long, and can not be in any list of hacked passwords.
|
||||
password_digest:
|
||||
type: string
|
||||
description: |-
|
||||
In case you already have the password digests and not the passwords, you can use them for the newly created user via this property.
|
||||
The digests should be generated with one of the supported algorithms.
|
||||
The hashing algorithm can be specified using the `password_hasher` property.
|
||||
password_hasher:
|
||||
type: string
|
||||
description: |-
|
||||
The hashing algorithm that was used to generate the password digest.
|
||||
The algorithms we support at the moment are [bcrypt](https://en.wikipedia.org/wiki/Bcrypt), md5, pbkdf2_sha256, [pbkdf2_sha256_django](https://docs.djangoproject.com/en/4.0/topics/auth/passwords/), [scrypt_firebase](https://firebaseopensource.com/projects/firebase/scrypt/) and 2 [argon2](https://argon2.online/) variants, argon2i and argon2id.
|
||||
Each of the above expects the incoming digest to be of a particular format.
|
||||
|
||||
More specifically:
|
||||
|
||||
**bcrypt:** The digest should be of the following form:
|
||||
|
||||
`$<algorithm version>$<cost>$<salt & hash>`
|
||||
|
||||
**md5:** The digest should follow the regular form e.g.:
|
||||
|
||||
`5f4dcc3b5aa765d61d8327deb882cf99`
|
||||
|
||||
**pbkdf2_sha256:** This is the PBKDF2 algorithm using the SHA256 hashing function. The format should be as follows:
|
||||
|
||||
`pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
|
||||
Note: Both the salt and the hash are expected to be base64-encoded.
|
||||
|
||||
**pbkdf2_sha256_django:** This is the Django-specific variant of PBKDF2 and the digest should have the following format (as exported from Django):
|
||||
|
||||
`pbkdf2_sha256$<iterations>$<salt>$<hash>`
|
||||
|
||||
Note: The salt is expected to be un-encoded, the hash is expected base64-encoded.
|
||||
|
||||
**pbkdf2_sha1:** This is similar to pkbdf2_sha256_django, but with two differences:
|
||||
1. uses sha1 instead of sha256
|
||||
2. accepts the hash as a hex-encoded string
|
||||
|
||||
The format is the following:
|
||||
|
||||
`pbkdf2_sha1$<iterations>$<salt>$<hash-as-hex-string>`
|
||||
|
||||
|
||||
**scrypt_firebase:** The Firebase-specific variant of scrypt.
|
||||
The value is expected to have 6 segments separated by the $ character and include the following information:
|
||||
|
||||
_hash:_ The actual Base64 hash. This can be retrieved when exporting the user from Firebase.
|
||||
_salt:_ The salt used to generate the above hash. Again, this is given when exporting the user.
|
||||
_signer key:_ The base64 encoded signer key.
|
||||
_salt separator:_ The base64 encoded salt separator.
|
||||
_rounds:_ The number of rounds the algorithm needs to run.
|
||||
_memory cost:_ The cost of the algorithm run
|
||||
|
||||
The first 2 (hash and salt) are per user and can be retrieved when exporting the user from Firebase.
|
||||
The other 4 values (signer key, salt separator, rounds and memory cost) are project-wide settings and can be retrieved from the project's password hash parameters.
|
||||
|
||||
Once you have all these, you can combine it in the following format and send this as the digest in order for Clerk to accept it:
|
||||
|
||||
`<hash>$<salt>$<signer key>$<salt separator>$<rounds>$<memory cost>`
|
||||
|
||||
**argon2i:** Algorithms in the argon2 family generate digests that encode the following information:
|
||||
|
||||
_version (v):_ The argon version, version 19 is assumed
|
||||
_memory (m):_ The memory used by the algorithm (in kibibytes)
|
||||
_iterations (t):_ The number of iterations to perform
|
||||
_parallelism (p):_ The number of threads to use
|
||||
|
||||
Parts are demarcated by the `$` character, with the first part identifying the algorithm variant.
|
||||
The middle part is a comma-separated list of the encoding options (memory, iterations, parallelism).
|
||||
The final part is the actual digest.
|
||||
|
||||
`$argon2i$v=19$m=4096,t=3,p=1$4t6CL3P7YiHBtwESXawI8Hm20zJj4cs7/4/G3c187e0$m7RQFczcKr5bIR0IIxbpO2P0tyrLjf3eUW3M3QSwnLc`
|
||||
|
||||
**argon2id:** See the previous algorithm for an explanation of the formatting.
|
||||
|
||||
For the argon2id case, the value of the algorithm in the first part of the digest is `argon2id`:
|
||||
|
||||
`$argon2id$v=19$m=64,t=4,p=8$Z2liZXJyaXNo$iGXEpMBTDYQ8G/71tF0qGjxRHEmR3gpGULcE93zUJVU`
|
||||
|
||||
If you need support for any particular hashing algorithm, [please let us know](https://clerk.com/support).
|
||||
enum:
|
||||
- bcrypt
|
||||
- md5
|
||||
- pbkdf2_sha256
|
||||
- pbkdf2_sha256_django
|
||||
- pbkdf2_sha1
|
||||
- scrypt_firebase
|
||||
- argon2i
|
||||
- argon2id
|
||||
skip_password_checks:
|
||||
type: boolean
|
||||
description: |-
|
||||
When set to `true` all password checks are skipped.
|
||||
It is recommended to use this method only when migrating plaintext passwords to Clerk.
|
||||
Upon migration the user base should be prompted to pick stronger password.
|
||||
skip_password_requirement:
|
||||
type: boolean
|
||||
description: |-
|
||||
When set to `true`, `password` is not required anymore when creating the user and can be omitted.
|
||||
This is useful when you are trying to create a user that doesn't have a password, in an instance that is using passwords.
|
||||
Please note that you cannot use this flag if password is the only way for a user to sign into your instance.
|
||||
totp_secret:
|
||||
type: string
|
||||
description: |-
|
||||
In case TOTP is configured on the instance, you can provide the secret to enable it on the newly created user without the need to reset it.
|
||||
Please note that currently the supported options are:
|
||||
* Period: 30 seconds
|
||||
* Code length: 6 digits
|
||||
* Algorithm: SHA1
|
||||
backup_codes:
|
||||
type: array
|
||||
items:
|
||||
type: string
|
||||
description: |-
|
||||
If Backup Codes are configured on the instance, you can provide them to enable it on the newly created user without the need to reset them.
|
||||
You must provide the backup codes in plain format or the corresponding bcrypt digest.
|
||||
public_metadata:
|
||||
type: object
|
||||
description: Metadata saved on the user, that is visible to both
|
||||
your Frontend and Backend APIs
|
||||
private_metadata:
|
||||
type: object
|
||||
description: Metadata saved on the user, that is only visible to
|
||||
your Backend API
|
||||
unsafe_metadata:
|
||||
type: object
|
||||
description: |-
|
||||
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
|
||||
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
|
||||
created_at:
|
||||
type: string
|
||||
description: A custom date/time denoting _when_ the user signed
|
||||
up to the application, specified in RFC3339 format (e.g. `2012-10-20T07:15:20.902Z`).
|
||||
WebhookClerkResponse:
|
||||
description: Clerk webhook object
|
||||
properties:
|
||||
object:
|
||||
type: string
|
||||
type:
|
||||
description: Clerk Name
|
||||
type: string
|
||||
data:
|
||||
type: object
|
||||
type: object
|
||||
|
|
|
@ -22,12 +22,12 @@ consumes:
|
|||
produces:
|
||||
- "application/json"
|
||||
parameters:
|
||||
activeQuery:
|
||||
description: Only retrieve active records?
|
||||
slugQuery:
|
||||
description: The slug of the item to retrieve
|
||||
in: query
|
||||
name: active
|
||||
name: slug
|
||||
required: false
|
||||
type: boolean
|
||||
type: string
|
||||
CompanyIdQuery:
|
||||
description: Record Id of an Company
|
||||
in: query
|
||||
|
@ -102,6 +102,7 @@ paths:
|
|||
operationId: getCompanies
|
||||
parameters:
|
||||
- $ref: "#/parameters/CompanyIdQuery"
|
||||
- $ref: "#/parameters/slugQuery"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/CompanyResponse"
|
||||
|
|
|
@ -284,8 +284,34 @@ responses:
|
|||
type: string
|
||||
schema:
|
||||
$ref: "#/definitions/Error"
|
||||
CompanyCategoryResponse:
|
||||
description: The SalesforceDevops.net CompanyCategory Object
|
||||
schema:
|
||||
$ref: "#/definitions/CompanyCategoryResponse"
|
||||
|
||||
paths:
|
||||
/companycategories:
|
||||
get:
|
||||
description: Return all or a single company category fully hydrated object
|
||||
operationId: getCompanyCategories
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/CompanyCategoryResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/responses/AccessForbidden"
|
||||
"404":
|
||||
$ref: "#/responses/NotFound"
|
||||
"422":
|
||||
$ref: "#/responses/UnprocessableEntity"
|
||||
"500":
|
||||
$ref: "#/responses/ServerError"
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
summary: Get a list of company categories
|
||||
tags:
|
||||
- CompanyCategories
|
||||
/companyproducts:
|
||||
delete:
|
||||
description: Delete CompanyProduct record
|
||||
|
@ -1519,3 +1545,22 @@ definitions:
|
|||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
CompanyCategory:
|
||||
properties:
|
||||
CloudType:
|
||||
description: The Type of Cloud Company
|
||||
type: string
|
||||
Count:
|
||||
description: The number of companies
|
||||
type: number
|
||||
type: object
|
||||
CompanyCategoryResponse:
|
||||
description: An array of CompanyCategory objects produced in response to a request
|
||||
properties:
|
||||
Data:
|
||||
items:
|
||||
$ref: "#/definitions/CompanyCategory"
|
||||
type: array
|
||||
Meta:
|
||||
$ref: "#/definitions/ResponseMeta"
|
||||
type: object
|
||||
|
|
|
@ -1380,13 +1380,13 @@ paths:
|
|||
tags:
|
||||
- Users
|
||||
post:
|
||||
description: Create a user record in Salesforce
|
||||
operationId: postUser
|
||||
description: Create user recorda in Salesforce
|
||||
operationId: postUsers
|
||||
parameters:
|
||||
- $ref: "#/parameters/newUserRequest"
|
||||
responses:
|
||||
"200":
|
||||
$ref: "#/responses/SalesforcePostResponse"
|
||||
$ref: "#/responses/UserResponse"
|
||||
"401":
|
||||
$ref: "#/responses/Unauthorized"
|
||||
"403":
|
||||
|
@ -3125,25 +3125,12 @@ definitions:
|
|||
type: string
|
||||
type: object
|
||||
UserRequest:
|
||||
description: An array of User Objects to post
|
||||
properties:
|
||||
APIKey:
|
||||
type: string
|
||||
Address:
|
||||
$ref: "#/definitions/Address"
|
||||
Email:
|
||||
type: string
|
||||
Environment:
|
||||
type: string
|
||||
FirstName:
|
||||
type: string
|
||||
ID:
|
||||
type: string
|
||||
LastName:
|
||||
type: string
|
||||
TaxnexusAccount:
|
||||
type: string
|
||||
Title:
|
||||
type: string
|
||||
data:
|
||||
items:
|
||||
$ref: "#/definitions/User"
|
||||
type: array
|
||||
type: object
|
||||
UserResponse:
|
||||
description: An array of Print-Ready ingest Objects
|
||||
|
|
Loading…
Reference in New Issue