{ "parameters": { "paymentID": { "name": "paymentID", "in": "query", "description": "Unique ID for the record.", "required": true, "type": "integer" }, "orderID": { "name": "orderID", "in": "query", "description": "If provided, restricts the results to the Payments associated with the given orderID.", "required": false, "type": "integer" } }, "paths": { "/payment": { "get": { "summary": "Payment View", "description": "View the details of a Payment record.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/paymentID" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Payment object", "schema": { "$ref": "#/definitions/WrappedFullPayment" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "delete": { "summary": "Payment Delete", "description": "Delete a Payment record.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/paymentID" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Success", "schema": { "$ref": "#/definitions/WrappedFullPayment" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "patch": { "summary": "Payment Edit", "description": "Edits a Payment record.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "name": "payment", "in": "body", "description": "The payment to be edited. The paymentID must be provided.", "required": true, "schema": { "$ref": "#/definitions/FullPayment" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Payment object", "schema": { "$ref": "#/definitions/WrappedFullPayment" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } }, "post": { "summary": "Payment Add", "description": "Adds a Payment record.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "name": "payment", "in": "body", "description": "The payment to be added.", "required": true, "schema": { "$ref": "#/definitions/FullBasePayment" } }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Payment object", "schema": { "$ref": "#/definitions/WrappedFullPayment" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } }, "/payment/list": { "get": { "summary": "Payment List", "description": "View a list of payments.", "tags": [ "Administrative/CRUD Operations" ], "parameters": [ { "$ref": "#/parameters/orderID" }, { "$ref": "../swagger-spec.json#/parameters/itemsPerPage" }, { "$ref": "../swagger-spec.json#/parameters/firstRow" }, { "$ref": "../swagger-spec.json#/parameters/sortByString" }, { "$ref": "../swagger-spec.json#/parameters/sortAscOrDesc" }, { "$ref": "../swagger-spec.json#/parameters/searchString" }, { "$ref": "../swagger-spec.json#/parameters/apiLoginIDParam" }, { "$ref": "../swagger-spec.json#/parameters/apiAuthenticationTokenParam" } ], "responses": { "200": { "description": "Payment List", "schema": { "$ref": "#/definitions/WrappedFullPaymentList" } }, "default": { "description": "Error", "schema": { "$ref": "../swagger-spec.json#/definitions/Error" } } } } } }, "definitions": { "FullBasePayment": { "type": "object", "properties": { "creditCardName": { "type": "string" }, "creditCardType": { "type": "string" }, "creditCardDate": { "type": "string" }, "creditCardNumberDisplay": { "type": "string" }, "processorClassName": { "type": "string" }, "valueFieldLabels": { "type": "string" }, "orderID": { "type": "integer" }, "status": { "type": "string" }, "created": { "type": "string" }, "amount": { "type": "number" }, "paymentProfileID": { "type": "string" }, "value1": { "type": "string" }, "value2": { "type": "string" }, "value3": { "type": "string" }, "value4": { "type": "string" }, "value5": { "type": "string" }, "value6": { "type": "string" }, "value7": { "type": "string" }, "value8": { "type": "string" }, "value9": { "type": "string" }, "extra1": { "type": "string" }, "extra2": { "type": "string" }, "extra3": { "type": "string" } } }, "FullPayment": { "type": "object", "allOf": [ { "properties": { "paymentID": { "type": "integer", "description": "Unique identifier representing a specific payment." } } }, { "$ref": "#/definitions/FullBasePayment" } ] }, "WrappedFullPayment": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "$ref": "#/definitions/FullPayment" } } }, "WrappedFullPaymentList": { "type": "object", "properties": { "success": { "type": "boolean" }, "errors": { "type": "array", "items": { "type": "string" } }, "messages": { "type": "array", "items": { "type": "string" } }, "jsonResult": { "type": "object", "properties": { "itemCollection": { "type": "array", "description": "The list of items being requested that match the criteria, limited to the number of itemsPerPage.", "items": { "$ref": "#/definitions/FullPayment" } }, "itemCount": { "description": "The total number of items matching the criteria. This value may used to compose paging parameters.", "type": "integer" } } } } } } }