Tarifftimepass

The tarifftimepass object

Attributes
Id: int required, autogenerated, unique
The unique identifier for this tarifftimepass
PassesIncluded: int required
PassRenewalTime: Nexudus.Coworking.Core.Enums.eTimeSpanWeekMonth optional
TariffId: Id required
TimePassId: Id required
UniqueId: Guid required, autogenerated, unique
The globally unique identifier for this tarifftimepass
SystemId: string optional api-only
User defined data about this tarifftimepass. This property can only be seen and updated using the API.

Json Structure Example


{
  "Id": 1234567,
  "PassesIncluded": ,
  "PassRenewalTime": 1,
  "TariffId": 12345678,
  "TimePassId": 12345678,
  "UniqueId": "28c9a3c6-02b8-451c-8ec3-f07ebdcbf4ab",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Find a TariffTimePass

This endpoint allows you to GET a list of tarifftimepasses based on one or more filter querystring parameters.

GET https://spaces.nexudus.com/api/billing/tarifftimepasses?...

πŸ”’ Requires role "TariffTimePass-List"

Pagination querystring parameters
Lets control how many records to return at a time and their order.
page integer optional
?page=1
size integer optional default=25
Sets the maximum number of records to return each page of results.
?size=25
orderby string optional default=Id
Sets the property to use when ordering the results of the search.
?orderby=Id
dir 'ascending' or 'descending' optional default=SortDirection.Ascending
Sets the direction to use when ordering the records.
?sort=ascending

Search querystring parameters
Lets you search tarifftimepass records based on their different properties.
Id number
?Id=12345678
TariffTimePass_PassesIncluded int
?TariffTimePass_PassesIncluded=...
TariffTimePass_PassRenewalTime Nexudus.Coworking.Core.Enums.eTimeSpanWeekMonth
?TariffTimePass_PassRenewalTime=...
TariffTimePass_Tariff Tariff
?TariffTimePass_Tariff=...
TariffTimePass_TimePass TimePass
?TariffTimePass_TimePass=...
TariffTimePass_TariffName string
?TariffTimePass_TariffName=...
TariffTimePass_TimePassName string
?TariffTimePass_TimePassName=...

Range search querystring parameters
Lets you search tarifftimepass records based on a range of date or numeric values.
To_TariffTimePass_CreatedOn date
?To_TariffTimePass_CreatedOn=2010-01-01T20:32
From_TariffTimePass_CreatedOn date
?From_TariffTimePass_CreatedOn=2010-01-01T20:32
To_TariffTimePass_UpdatedOn date
?To_TariffTimePass_UpdatedOn=2010-01-01T20:32
From_TariffTimePass_UpdatedOn date
?From_TariffTimePass_UpdatedOn=2010-01-01T20:32
To_TariffTimePass_PassesIncluded number
?To_TariffTimePass_PassesIncluded=0
From_TariffTimePass_PassesIncluded number
?From_TariffTimePass_PassesIncluded=10

Example request

GET https://spaces.nexudus.com/api/billing/tarifftimepasses?TariffTimePass_Name=...
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Tariff": ,
        "TimePass": ,
        "PassesIncluded": ,
        "PassRenewalTime": 1,
        "TariffTimePassTariffName": "...",
        "TariffTimePassTimePassName": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "0bd53ad4-415b-4903-81b5-15ea9c95dda5",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 25,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 60,
    "TotalPages": 3
}


Find TariffTimePasses by IDs

Gets one or more tarifftimepass records based on their Id.
GET https://spaces.nexudus.com/api/billing/tarifftimepasses?TariffTimePass_Id=[:id1,:id2,...]

πŸ”’ Requires role "TariffTimePass-List"

Querystring parameters
TariffTimePass_Id: array requried
?TariffTimePass_Id=[12345678,87654651]

Example request

GET https://spaces.nexudus.com/api/billing/tarifftimepasses?TariffTimePass_Id=[1234567,9876541]
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
    "Records": [{
        "Id": 1234567,
        "Tariff": ,
        "TimePass": ,
        "PassesIncluded": ,
        "PassRenewalTime": 1,
        "TariffTimePassTariffName": "...",
        "TariffTimePassTimePassName": "...",
        "CreatedOn": "2018-07-03T06:23:01Z",
        "UpdatedOn": "2020-01-01T21:57:21Z",
        "UpdatedBy": "System",
        "UniqueId": "583606f4-0708-4a7c-9144-3212d304002f",
        "SystemId": "{ metadata: { id: 887766, processed: true } }"
    }],
    "CurrentPageSize": 25,
    "CurrentPage": 1,
    "CurrentOrderField": "Id",
    "CurrentSortDirection": 1,
    "FirstItem": 1,
    "HasNextPage": true,
    "HasPreviousPage": false,
    "LastItem": 1,
    "PageNumber": 1,
    "PageSize": 25,
    "TotalItems": 1,
    "TotalPages": 1
}


Get single TariffTimePass by Id

Gets one tarifftimepass record by its Id.
GET https://spaces.nexudus.com/api/billing/tarifftimepasses/:Id

πŸ”’ Requires role "TariffTimePass-Read"

URL parameters
Id: number requried

Example request

GET https://spaces.nexudus.com/api/billing/tarifftimepasses/1234567
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example response


{
  "Id": 1234567,
  "PassesIncluded": ,
  "PassRenewalTime": 1,
  "TariffId": 12345678,
  "TimePassId": 12345678,
  "CreatedOn": "2018-07-03T06:23:01Z",
  "UpdatedOn": "2020-01-01T21:57:21Z",
  "UpdatedBy": "System",
  "UniqueId": "21c5a42d-ca5d-49ca-b5d3-988827106e3f",
  "SystemId": "{ metadata: { id: 887766, processed: true } }"
}


Create new TariffTimePass

Creates a new tarifftimepass.
POST https://spaces.nexudus.com/api/billing/tarifftimepasses

πŸ”’ Requires role "TariffTimePass-Create"

Body parameters
TariffId: number required
TimePassId: number required
PassesIncluded: int required
PassRenewalTime: Nexudus.Coworking.Core.Enums.eTimeSpanWeekMonth optional

Example request

POST https://spaces.nexudus.com/api/billing/tarifftimepasses
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "TariffId": 12345678,
    "TimePassId": 12345678,
    "PassesIncluded": ,
    "PassRenewalTime": 1, //(check Enumerated values section below)
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully created.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Update TariffTimePass

Updates an existing tarifftimepass.
PUT https://spaces.nexudus.com/api/billing/tarifftimepasses

PUT requests require ALL record properties to be submitted with every request. Any missing properties will be cleared or set to false.

πŸ”’ Requires role "TariffTimePass-Edit"

Body parameters
Id: number required
The unique Id of the tarifftimepass to update.
TariffId: number cleared if missing
TimePassId: number cleared if missing
PassesIncluded: int cleared if missing
PassRenewalTime: Nexudus.Coworking.Core.Enums.eTimeSpanWeekMonth cleared if missing

Example request

PUT https://spaces.nexudus.com/api/billing/tarifftimepasses
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
    "Id": 12345678,
    "TariffId": 12345678,
    "TimePassId": 12345678,
    "PassesIncluded": ,
    "PassRenewalTime": 1, //(check Enumerated values section below)
}


Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "Record 'Name of the record' has been succesfully updated.",
    "Value": {
        "Id": 12354678
    }
}


Example invalid response


{
    "Status": 500,
    "Message": "Name: may not be null or empty",
    "Value": null,
    "WasSuccessful": false,
    "Errors": [
        {
            "AttemptedValue": null,
            "Message": "may not be null or empty",
            "PropertyName": "Name"
        },
    ]
}


Delete TariffTimePass

Deletes an existing tarifftimepass by its Id.
DELETE https://spaces.nexudus.com/api/billing/tarifftimepasses/:Id

πŸ”’ Requires role "TariffTimePass-Delete"

URL parameters
Id: number required
The unique Id of the tarifftimepass to update.

Example request

DELETE https://spaces.nexudus.com/api/billing/tarifftimepasses/12345678
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


{
    "Status": 200,
    "WasSuccessful": true,
    "Message": "The record was deleted successfully.",
    "Value": null,
    "OpenInDialog": false,
    "RedirectURL": null,
    "JavaScript": null,
    "Errors": null
}


Commands

Commands allow to perform actions against one or more tarifftimepass records. Some commands accept only one record while others can run an action for a number of records at the same time. Each command has metadata with information about how it can be used and the amount of records, if any, it needs to run.

Get Commands

Get all commands available to run for tarifftimepass records.
GET https://spaces.nexudus.com/api/billing/tarifftimepasses/commands

Example request

GET https://spaces.nexudus.com/api/billing/tarifftimepasses/commands
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

Example valid response


[
	{
		"Key": "COMMAND_KEY_1",
		"Name": "Command 1 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": false,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": false,
		"NeedsEntitiesToRun": true,
		"Order": 2,
		"RequiresParameters": []
	},
	{
		"Key": "COMMAND_KEY_2",
		"Name": "Command 2 english description",
		"AppliesOnlyToMultipleEntities": false,
		"DisplayInDropdown": true,
		"DisplayInDropdownV2": true,
		"AppliesOnlyToOneEntity": true,
		"AppliesOnlyToTwoEntities": false,
		"DisplayInGrid": true,
		"NeedsEntitiesToRun": true,
		"Order": 10,
		"RequiresParameters": 
		[
			{
				"Name": "Parameter 1 description",
				"Type": "string",
			},
			{
				"Name": "Parameter 2 description",
				"Type": "Boolean",
			}
		]
	},
	...
]


Run Command

Runs a command based on its Key and one or more tarifftimepass record IDs.
POST https://spaces.nexudus.com/api/billing/tarifftimepasses/runacommand
πŸ”’ Requires role "TariffTimePass-Edit"

Example request

POST https://spaces.nexudus.com/api/billing/tarifftimepasses/runcommand
Content-Type: application/json
Authentication: Basic ZXhhbXBsZUBuZXh1ZHVzLmNvbTpFeGFtcGxlMTIzNA==

{
	"Ids":[1329961649],
	"Parameters": 
	[
		{ 
			"Type": "string"
			"Value":987654321
		},
		{
			"Type": "Boolean",
			"Value":true
		},
		...
	],
	"Key":"COMMAND_KEY_2"
}


Example valid response


{
	"Errors": null
	"JavaScript": null
	"Message": "Result description"
	"OpenInDialog": false
	"OpenInWindow": false
	"RedirectURL": null
	"Status": 200
	"UpdatedBy": "email@example.net"
	"UpdatedOn: "2020-06-04T11:40:20Z"
	"Value: {Id: 12345678}
	"WasSuccessful: true
}


Enumerated values

PassRenewalTime

GET /api/utils/enums?name=eTimeSpanWeekMonth

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Please sign in to leave a comment.