class Wechat::ShakeAround::Registration
Registration
是账号注册管理的封装类。
Public Class Methods
create(access_token, name, phone_number, email, industry_id, qualification_links, apply_reason)
click to toggle source
申请开通功能 mp.weixin.qq.com/wiki/13/025f1d471dc999928340161c631c6635.html#.E7.94.B3.E8.AF.B7.E5.BC.80.E9.80.9A.E5.8A.9F.E8.83.BD 成功提交申请请求后,工作人员会在三个工作日内完成审核。 若审核不通过,可以重新提交申请请求。 若是审核中,请耐心等待工作人员审核,在审核中状态不能再提交申请请求。 industry_id: 3gimg.qq.com/shake_nearby/Qualificationdocuments.html
Return hash format if success: {
data: {}, errcode: 0, errmsg: 'success.'
}
# File lib/wechat/shake_around/registration.rb, line 50 def self.create(access_token, name, phone_number, email, industry_id, qualification_links, apply_reason) assert_present! :access_token, access_token assert_present! :name, name assert_present! :phone_number, phone_number assert_present! :email, email message = post_json "https://api.weixin.qq.com/shakearound/account/register?access_token=#{access_token}", body: { name: name, phone_number: phone_number, email: email, industry_id: industry_id, qualification_cert_urls: qualification_links, apply_reason: apply_reason } message.body end
load(access_token)
click to toggle source
Return hash format if success: {
data: { apply_time: APPLY_TIME, audit_comment: AUDIT_COMMENT, audit_status: AUDIT_STATUS, audit_time: AUDIT_TIME }, errcode: 0, errmsg: 'success.'
}
apply_time: 提交申请的时间戳 apply_comment: 审核备注,包括审核不通过的原因 audit_status: 0:审核未通过、1:审核中、2:审核已通过 audit_time: 确定审核结果的时间戳;若状态为审核中,则该时间值为0
# File lib/wechat/shake_around/registration.rb, line 29 def self.load(access_token) assert_present! :access_token, access_token get_json "https://api.weixin.qq.com/shakearound/account/auditstatus?access_token=#{access_token}" end