{
	"info": {
		"_postman_id": "ebe61f06-7195-42db-858a-399762838c9e",
		"name": "Coulance",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "24486258"
	},
	"item": [
		{
			"name": "Coulance",
			"item": [
				{
					"name": "8360 - Fare correction of trip",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									"// pm.variables.set('xbot', 'xbotHere');\r",
									"// pm.variables.set('tripId', 'tripIdHere');\r",
									"// pm.variables.set('tripVersion', 'tripVersionHere');\r",
									"// pm.variables.set('legId', 'legIdHere');\r",
									"// pm.variables.set('businessEntityId', 'businessEntityIdHere');\r",
									"// pm.variables.set('amountCorrected', 'amountCorrectedHere');   // For refund, use a negative amount, e.g. '-200'\r",
									"\r",
									"// var moment = require('moment');\r",
									"// pm.variables.set('timestamp', moment().format(\"YYYY-MM-DDTHH:mm:ss[Z]\"));"
								],
								"type": "text/javascript"
							}
						}
					],
					"request": {
						"method": "POST",
						"header": [
							{
								"key": "Idempotence-Key",
								"value": "{{$guid}}",
								"type": "default"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n    \"xbot\": \"{{xbot}}\",\r\n    \"tripId\": {{tripId}},\r\n    \"tripVersion\": {{tripVersion}},\r\n    \"legId\": {{legId}},\r\n    \"businessEntityId\": {{businessEntityId}},\r\n    \"amountCorrected\": {{amountCorrected}},\r\n    \"timestamp\": {{timestamp}},\r\n    \"reason\": \"Refund due to duplicate charge\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{base-url}}/payments/fareCorrections",
							"host": [
								"{{base-url}}"
							],
							"path": [
								"payments",
								"fareCorrections"
							]
						}
					},
					"response": []
				}
			],
			"auth": {
				"type": "oauth2",
				"oauth2": [
					{
						"key": "client_authentication",
						"value": "body",
						"type": "string"
					},
					{
						"key": "clientSecret",
						"value": "{{default-consumer-secret}}",
						"type": "string"
					},
					{
						"key": "clientId",
						"value": "{{default-consumer-key}}",
						"type": "string"
					},
					{
						"key": "accessTokenUrl",
						"value": "{{auth-url}}",
						"type": "string"
					},
					{
						"key": "grant_type",
						"value": "client_credentials",
						"type": "string"
					},
					{
						"key": "tokenName",
						"value": "Bearer Token",
						"type": "string"
					},
					{
						"key": "addTokenTo",
						"value": "header",
						"type": "string"
					}
				]
			},
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				},
				{
					"listen": "test",
					"script": {
						"type": "text/javascript",
						"exec": [
							""
						]
					}
				}
			]
		}
	]
}