xuyu.iot.payment
v0.0.4
Published
- npm i jquery - npm i identityserver4.microservice.openapis2
Downloads
5
Readme
需要先安装
- npm i jquery
- npm i identityserver4.microservice.openapis2
使用
// 配置接口地址和APPKEY等信息
openapis.init({
token_endpoint: '',
server_endpoint: '',
clientId: '',
client_secret: '',
scope: ''
});
openapis.PaymentService.{methods}
SDK
;(function () {
var sdk = new Object();
sdk.basepath = function()
{
return openapis._settings.server_endpoint + '/payment';
};
/**
* @name 订单 - 列表
* @description <label>Client Scopes:</label><code>iot.paymentservice.order.get</code><label>User Permissions:</label><code>iot.paymentservice.order.get</code>
* @param q.userName 用户昵称
* @param q.cardNo 卡号/接入号
* @param q.status 卡状态
* @param q.tradeNo 订单号
* @param q.typeID Format - int64. 分类ID
* @param q.channel Format - int32. 充值渠道
* @param orderby 排序字段
* @param asc 正序或倒序
* @param skip Format - int32. 跳过的数据条数
* @param take Format - int32. 将获取的数据条数
* @param startTime Format - date-time (as date-time in RFC3339). 开始时间。yyyy-MM-dd
* @param endTime Format - date-time (as date-time in RFC3339). 结束时间。yyyy-MM-dd
*/
sdk.OrderGet = function(q_userName,q_cardNo,q_status,q_tradeNo,q_typeID,q_channel,orderby,asc,skip,take,startTime,endTime,api_version) {
var url = this.basepath() +'/Order';
var params = {};
if (q_userName !== undefined) { params['q.userName'] =q_userName }
if (q_cardNo !== undefined) { params['q.cardNo'] =q_cardNo }
if (q_status !== undefined) { params['q.status'] =q_status }
if (q_tradeNo !== undefined) { params['q.tradeNo'] =q_tradeNo }
if (q_typeID !== undefined) { params['q.typeID'] =q_typeID }
if (q_channel !== undefined) { params['q.channel'] =q_channel }
if (orderby !== undefined) { params['orderby'] =orderby }
if (asc !== undefined) { params['asc'] =asc }
if (skip !== undefined) { params['skip'] =skip }
if (take !== undefined) { params['take'] =take }
if (startTime !== undefined) { params['startTime'] =startTime }
if (endTime !== undefined) { params['endTime'] =endTime }
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
/**
* @name 订单 - 统计
* @description <label>Client Scopes:</label><code>iot.paymentservice.order.statistic</code><label>User Permissions:</label><code>iot.paymentservice.order.statistic</code>
*/
sdk.OrderStatistic = function(api_version) {
var url = this.basepath() +'/Order/Statistic';
var params = {};
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
/**
* @name 订单 - 错误码表
* @description 订单代码对照表
*/
sdk.OrderCodes = function(api_version) {
var url = this.basepath() +'/Order/Codes';
var params = {};
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
/**
* @name 支付网关 - 错误码表
* @description 支付网关代码对照表
*/
sdk.PaymentCodes = function(api_version) {
var url = this.basepath() +'/Payment/Codes';
var params = {};
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
/**
* @name 支付网关 - 创建支付请求
*/
sdk.PaymentPost = function(model,api_version) {
var url = this.basepath() +'/Payment';
var params = {};
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,data:JSON.stringify(model),method:'POST'});
}
/**
* @name 充值套餐 - 列表
* @description 充值套餐 - 列表
* @param q.id Format - int64. 代理商ID
* @param q.category Format - int64. 套餐分类ID
* @param orderby 排序字段
* @param asc 正序或倒序
* @param skip Format - int32. 跳过的数据条数
* @param take Format - int32. 将获取的数据条数
* @param startTime Format - date-time (as date-time in RFC3339). 开始时间。yyyy-MM-dd
* @param endTime Format - date-time (as date-time in RFC3339). 结束时间。yyyy-MM-dd
*/
sdk.ProductGet = function(q_id,q_category,orderby,asc,skip,take,startTime,endTime,api_version) {
var url = this.basepath() +'/Product';
var params = {};
if (q_id !== undefined) { params['q.id'] =q_id }
if (q_category !== undefined) { params['q.category'] =q_category }
if (orderby !== undefined) { params['orderby'] =orderby }
if (asc !== undefined) { params['asc'] =asc }
if (skip !== undefined) { params['skip'] =skip }
if (take !== undefined) { params['take'] =take }
if (startTime !== undefined) { params['startTime'] =startTime }
if (endTime !== undefined) { params['endTime'] =endTime }
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
/**
* @name 充值套餐 - 分类
* @description 充值套餐 - 分类
*/
sdk.ProductCategories = function(api_version) {
var url = this.basepath() +'/Product/Categories';
var params = {};
if (api_version !== undefined) { params['api-version'] =api_version }
if(Object.keys(params).length>0){
url += '?'+ $.param(params)
}
return openapis._request({url:url,method:'GET'});
}
window.openapis.PaymentServiceClient = sdk;
})()