Documentation ¶
Overview ¶
提供子账号相关的帐号及角色的查询、授权等信息及操作 auto sdk from taobao ApiMetadata.xml version 20130808 auther: dz7changkong@qq.com
Index ¶
- Constants
- type Department
- type Duty
- type Permission
- type Role
- type SellercenterRoleAddRequest
- func (r *SellercenterRoleAddRequest) GetResponse(accessToken string) (*SellercenterRoleAddResponse, []byte, error)
- func (r *SellercenterRoleAddRequest) SetDescription(value string)
- func (r *SellercenterRoleAddRequest) SetName(value string)
- func (r *SellercenterRoleAddRequest) SetNick(value string)
- func (r *SellercenterRoleAddRequest) SetPermissionCodes(value string)
- type SellercenterRoleAddResponse
- type SellercenterRoleAddResponseResult
- type SellercenterRoleInfoGetRequest
- type SellercenterRoleInfoGetResponse
- type SellercenterRoleInfoGetResponseResult
- type SellercenterRolemembersGetRequest
- type SellercenterRolemembersGetResponse
- type SellercenterRolemembersGetResponseResult
- type SellercenterRolesGetRequest
- type SellercenterRolesGetResponse
- type SellercenterRolesGetResponseResult
- type SellercenterSubuserPermissionsRolesGetRequest
- type SellercenterSubuserPermissionsRolesGetResponse
- type SellercenterSubuserPermissionsRolesGetResponseResult
- type SellercenterSubusersGetRequest
- type SellercenterSubusersGetResponse
- type SellercenterSubusersGetResponseResult
- type SellercenterUserPermissionsGetRequest
- type SellercenterUserPermissionsGetResponse
- type SellercenterUserPermissionsGetResponseResult
- type SubAccountInfo
- type SubUserFullInfo
- type SubUserInfo
- type SubUserPermission
- type SubuserDepartmentAddRequest
- func (r *SubuserDepartmentAddRequest) GetResponse(accessToken string) (*SubuserDepartmentAddResponse, []byte, error)
- func (r *SubuserDepartmentAddRequest) SetDepartmentName(value string)
- func (r *SubuserDepartmentAddRequest) SetParentId(value string)
- func (r *SubuserDepartmentAddRequest) SetUserNick(value string)
- type SubuserDepartmentAddResponse
- type SubuserDepartmentAddResponseResult
- type SubuserDepartmentDeleteRequest
- type SubuserDepartmentDeleteResponse
- type SubuserDepartmentDeleteResponseResult
- type SubuserDepartmentUpdateRequest
- func (r *SubuserDepartmentUpdateRequest) GetResponse(accessToken string) (*SubuserDepartmentUpdateResponse, []byte, error)
- func (r *SubuserDepartmentUpdateRequest) SetDepartmentId(value string)
- func (r *SubuserDepartmentUpdateRequest) SetDepartmentName(value string)
- func (r *SubuserDepartmentUpdateRequest) SetParentId(value string)
- func (r *SubuserDepartmentUpdateRequest) SetUserNick(value string)
- type SubuserDepartmentUpdateResponse
- type SubuserDepartmentUpdateResponseResult
- type SubuserDepartmentsGetRequest
- type SubuserDepartmentsGetResponse
- type SubuserDepartmentsGetResponseResult
- type SubuserDutyAddRequest
- type SubuserDutyAddResponse
- type SubuserDutyAddResponseResult
- type SubuserDutyDeleteRequest
- type SubuserDutyDeleteResponse
- type SubuserDutyDeleteResponseResult
- type SubuserDutyUpdateRequest
- func (r *SubuserDutyUpdateRequest) GetResponse(accessToken string) (*SubuserDutyUpdateResponse, []byte, error)
- func (r *SubuserDutyUpdateRequest) SetDutyId(value string)
- func (r *SubuserDutyUpdateRequest) SetDutyLevel(value string)
- func (r *SubuserDutyUpdateRequest) SetDutyName(value string)
- func (r *SubuserDutyUpdateRequest) SetUserNick(value string)
- type SubuserDutyUpdateResponse
- type SubuserDutyUpdateResponseResult
- type SubuserDutysGetRequest
- type SubuserDutysGetResponse
- type SubuserDutysGetResponseResult
- type SubuserEmployeeAddRequest
- func (r *SubuserEmployeeAddRequest) GetResponse(accessToken string) (*SubuserEmployeeAddResponse, []byte, error)
- func (r *SubuserEmployeeAddRequest) SetDepartmentId(value string)
- func (r *SubuserEmployeeAddRequest) SetDutyId(value string)
- func (r *SubuserEmployeeAddRequest) SetEmployeeName(value string)
- func (r *SubuserEmployeeAddRequest) SetEmployeeNickname(value string)
- func (r *SubuserEmployeeAddRequest) SetEmployeeNum(value string)
- func (r *SubuserEmployeeAddRequest) SetEntryDate(value string)
- func (r *SubuserEmployeeAddRequest) SetIdCardNum(value string)
- func (r *SubuserEmployeeAddRequest) SetLeaderId(value string)
- func (r *SubuserEmployeeAddRequest) SetOfficePhone(value string)
- func (r *SubuserEmployeeAddRequest) SetPersonalEmail(value string)
- func (r *SubuserEmployeeAddRequest) SetPersonalMobile(value string)
- func (r *SubuserEmployeeAddRequest) SetSex(value string)
- func (r *SubuserEmployeeAddRequest) SetSubId(value string)
- func (r *SubuserEmployeeAddRequest) SetWorkLocation(value string)
- type SubuserEmployeeAddResponse
- type SubuserEmployeeAddResponseResult
- type SubuserEmployeeUpdateRequest
- func (r *SubuserEmployeeUpdateRequest) GetResponse(accessToken string) (*SubuserEmployeeUpdateResponse, []byte, error)
- func (r *SubuserEmployeeUpdateRequest) SetDepartmentId(value string)
- func (r *SubuserEmployeeUpdateRequest) SetDutyId(value string)
- func (r *SubuserEmployeeUpdateRequest) SetEmployeeName(value string)
- func (r *SubuserEmployeeUpdateRequest) SetEmployeeNickname(value string)
- func (r *SubuserEmployeeUpdateRequest) SetEmployeeNum(value string)
- func (r *SubuserEmployeeUpdateRequest) SetEmployeeTurnover(value string)
- func (r *SubuserEmployeeUpdateRequest) SetEntryDate(value string)
- func (r *SubuserEmployeeUpdateRequest) SetIdCardNum(value string)
- func (r *SubuserEmployeeUpdateRequest) SetLeaderId(value string)
- func (r *SubuserEmployeeUpdateRequest) SetOfficePhone(value string)
- func (r *SubuserEmployeeUpdateRequest) SetPersonalEmail(value string)
- func (r *SubuserEmployeeUpdateRequest) SetPersonalMobile(value string)
- func (r *SubuserEmployeeUpdateRequest) SetSex(value string)
- func (r *SubuserEmployeeUpdateRequest) SetSubId(value string)
- func (r *SubuserEmployeeUpdateRequest) SetWorkLocation(value string)
- type SubuserEmployeeUpdateResponse
- type SubuserEmployeeUpdateResponseResult
- type SubuserFullinfoGetRequest
- type SubuserFullinfoGetResponse
- type SubuserFullinfoGetResponseResult
- type SubuserInfoUpdateRequest
- func (r *SubuserInfoUpdateRequest) GetResponse(accessToken string) (*SubuserInfoUpdateResponse, []byte, error)
- func (r *SubuserInfoUpdateRequest) SetIsDisableSubaccount(value string)
- func (r *SubuserInfoUpdateRequest) SetIsDispatch(value string)
- func (r *SubuserInfoUpdateRequest) SetSubId(value string)
- type SubuserInfoUpdateResponse
- type SubuserInfoUpdateResponseResult
- type SubusersGetRequest
- type SubusersGetResponse
- type SubusersGetResponseResult
Constants ¶
const VersionNo = "20130808"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct { DepartmentId int `json:"department_id"` DepartmentName string `json:"department_name"` ParentId int `json:"parent_id"` }
部门信息
type Duty ¶
type Duty struct { DutyId int `json:"duty_id"` DutyLevel int `json:"duty_level"` DutyName string `json:"duty_name"` }
子账号职务信息
type Permission ¶
type Permission struct { IsAuthorize int `json:"is_authorize"` ParentCode string `json:"parent_code"` PermissionCode string `json:"permission_code"` PermissionName string `json:"permission_name"` }
权限信息
type Role ¶
type Role struct { CreateTime string `json:"create_time"` Description string `json:"description"` ModifiedTime string `json:"modified_time"` Permissions []*Permission `json:"permissions"` RoleId int `json:"role_id"` RoleName string `json:"role_name"` SellerId int `json:"seller_id"` }
子账号角色
type SellercenterRoleAddRequest ¶
type SellercenterRoleAddRequest struct {
open_taobao.TaobaoMethodRequest
}
给指定的卖家创建新的子账号角色<br/>
如果需要授权的权限点有下级权限点或上级权限点,把该权限点的父权限点和该权限点的所有子权限都一并做赋权操作,并递归处理<br/>例如:权限点列表如下<br/> code=sell 宝贝管理<br/> ---------|code=sm 店铺管理<br/> ---------|---------|code=sm-design 如店铺装修<br/> ---------|---------|---------|code=sm-tbd-visit内店装修入口<br/> ---------|---------|---------|code=sm-tbd-publish内店装修发布<br/> ---------|---------|code=phone 手机淘宝店铺<br/> 调用改接口给code=sm-design店铺装修赋权时,同时会将下列权限点都赋予默认角色<br/> code=sell 宝贝管理<br/> ---------|code=sm 店铺管理<br/> ---------|---------|code=sm-design 如店铺装修<br/> ---------|---------|---------|code=sm-tbd-visit内店装修入口<br/> ---------|---------|---------|code=sm-tbd-publish内店装修发布<br/>
func (*SellercenterRoleAddRequest) GetResponse ¶
func (r *SellercenterRoleAddRequest) GetResponse(accessToken string) (*SellercenterRoleAddResponse, []byte, error)
func (*SellercenterRoleAddRequest) SetDescription ¶
func (r *SellercenterRoleAddRequest) SetDescription(value string)
角色描述
func (*SellercenterRoleAddRequest) SetName ¶
func (r *SellercenterRoleAddRequest) SetName(value string)
角色名
func (*SellercenterRoleAddRequest) SetNick ¶
func (r *SellercenterRoleAddRequest) SetNick(value string)
表示卖家昵称
func (*SellercenterRoleAddRequest) SetPermissionCodes ¶
func (r *SellercenterRoleAddRequest) SetPermissionCodes(value string)
需要授权的权限点permission_code列表,以","分割.其code值可以通过调用taobao.sellercenter.user.permissions.get返回,其中permission.is_authorize=1的权限点可以通过本接口授权给对应角色。
type SellercenterRoleAddResponse ¶
type SellercenterRoleAddResponse struct {
Role *Role `json:"role"`
}
type SellercenterRoleAddResponseResult ¶
type SellercenterRoleAddResponseResult struct {
Response *SellercenterRoleAddResponse `json:"sellercenter_role_add_response"`
}
type SellercenterRoleInfoGetRequest ¶
type SellercenterRoleInfoGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定角色的信息。只能查询属于自己的角色信息 (主账号或者某个主账号的子账号登陆,只能查询属于该主账号的角色信息)
func (*SellercenterRoleInfoGetRequest) GetResponse ¶
func (r *SellercenterRoleInfoGetRequest) GetResponse(accessToken string) (*SellercenterRoleInfoGetResponse, []byte, error)
func (*SellercenterRoleInfoGetRequest) SetRoleId ¶
func (r *SellercenterRoleInfoGetRequest) SetRoleId(value string)
角色id
type SellercenterRoleInfoGetResponse ¶
type SellercenterRoleInfoGetResponse struct {
Role *Role `json:"role"`
}
type SellercenterRoleInfoGetResponseResult ¶
type SellercenterRoleInfoGetResponseResult struct {
Response *SellercenterRoleInfoGetResponse `json:"sellercenter_role_info_get_response"`
}
type SellercenterRolemembersGetRequest ¶
type SellercenterRolemembersGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定卖家的角色下属员工列表,只能获取属于登陆者自己的信息。
func (*SellercenterRolemembersGetRequest) GetResponse ¶
func (r *SellercenterRolemembersGetRequest) GetResponse(accessToken string) (*SellercenterRolemembersGetResponse, []byte, error)
func (*SellercenterRolemembersGetRequest) SetRoleId ¶
func (r *SellercenterRolemembersGetRequest) SetRoleId(value string)
角色id
type SellercenterRolemembersGetResponse ¶
type SellercenterRolemembersGetResponse struct {
Subusers []*SubUserInfo `json:"subusers"`
}
type SellercenterRolemembersGetResponseResult ¶
type SellercenterRolemembersGetResponseResult struct {
Response *SellercenterRolemembersGetResponse `json:"sellercenter_rolemembers_get_response"`
}
type SellercenterRolesGetRequest ¶
type SellercenterRolesGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定卖家的角色列表,只能获取属于登陆者自己的信息。
func (*SellercenterRolesGetRequest) GetResponse ¶
func (r *SellercenterRolesGetRequest) GetResponse(accessToken string) (*SellercenterRolesGetResponse, []byte, error)
func (*SellercenterRolesGetRequest) SetNick ¶
func (r *SellercenterRolesGetRequest) SetNick(value string)
卖家昵称(只允许查询自己的信息:当前登陆者)
type SellercenterRolesGetResponse ¶
type SellercenterRolesGetResponse struct {
Roles []*Role `json:"roles"`
}
type SellercenterRolesGetResponseResult ¶
type SellercenterRolesGetResponseResult struct {
Response *SellercenterRolesGetResponse `json:"sellercenter_roles_get_response"`
}
type SellercenterSubuserPermissionsRolesGetRequest ¶
type SellercenterSubuserPermissionsRolesGetRequest struct {
open_taobao.TaobaoMethodRequest
}
查询指定的子账号的被直接赋予的权限信息和角色信息。<br/>返回对象中包括直接赋予子账号的权限点信息、被赋予的角色以及角色的对应权限点信息。
func (*SellercenterSubuserPermissionsRolesGetRequest) GetResponse ¶
func (r *SellercenterSubuserPermissionsRolesGetRequest) GetResponse(accessToken string) (*SellercenterSubuserPermissionsRolesGetResponse, []byte, error)
func (*SellercenterSubuserPermissionsRolesGetRequest) SetNick ¶
func (r *SellercenterSubuserPermissionsRolesGetRequest) SetNick(value string)
子账号昵称(子账号标识)
type SellercenterSubuserPermissionsRolesGetResponse ¶
type SellercenterSubuserPermissionsRolesGetResponse struct {
SubuserPermission *SubUserPermission `json:"subuser_permission"`
}
type SellercenterSubuserPermissionsRolesGetResponseResult ¶
type SellercenterSubuserPermissionsRolesGetResponseResult struct {
Response *SellercenterSubuserPermissionsRolesGetResponse `json:"sellercenter_subuser_permissions_roles_get_response"`
}
type SellercenterSubusersGetRequest ¶
type SellercenterSubusersGetRequest struct {
open_taobao.TaobaoMethodRequest
}
根据主账号nick查询该账号下所有的子账号列表,只能查询属于自己的账号信息 (主账号以及所属子账号)
func (*SellercenterSubusersGetRequest) GetResponse ¶
func (r *SellercenterSubusersGetRequest) GetResponse(accessToken string) (*SellercenterSubusersGetResponse, []byte, error)
func (*SellercenterSubusersGetRequest) SetNick ¶
func (r *SellercenterSubusersGetRequest) SetNick(value string)
表示卖家昵称
type SellercenterSubusersGetResponse ¶
type SellercenterSubusersGetResponse struct {
Subusers []*SubUserInfo `json:"subusers"`
}
type SellercenterSubusersGetResponseResult ¶
type SellercenterSubusersGetResponseResult struct {
Response *SellercenterSubusersGetResponse `json:"sellercenter_subusers_get_response"`
}
type SellercenterUserPermissionsGetRequest ¶
type SellercenterUserPermissionsGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定用户的权限集合,并不组装成树。如果是主账号,返回所有的权限列表;如果是子账号,返回所有已授权的权限。只能查询属于自己的账号信息 (如果是主账号,则是主账号以及所属子账号,如果是子账号则是对应主账号以及所属子账号)
func (*SellercenterUserPermissionsGetRequest) GetResponse ¶
func (r *SellercenterUserPermissionsGetRequest) GetResponse(accessToken string) (*SellercenterUserPermissionsGetResponse, []byte, error)
func (*SellercenterUserPermissionsGetRequest) SetNick ¶
func (r *SellercenterUserPermissionsGetRequest) SetNick(value string)
用户标识,次入参必须为子账号比如zhangsan:cool。如果只输入主账号zhangsan,将报错。
type SellercenterUserPermissionsGetResponse ¶
type SellercenterUserPermissionsGetResponse struct {
Permissions []*Permission `json:"permissions"`
}
type SellercenterUserPermissionsGetResponseResult ¶
type SellercenterUserPermissionsGetResponseResult struct {
Response *SellercenterUserPermissionsGetResponse `json:"sellercenter_user_permissions_get_response"`
}
type SubAccountInfo ¶
type SubAccountInfo struct { SubDispatchStatus bool `json:"sub_dispatch_status"` SubId int `json:"sub_id"` SubNick string `json:"sub_nick"` SubOwedStatus bool `json:"sub_owed_status"` SubStatus int `json:"sub_status"` UserId int `json:"user_id"` UserNick string `json:"user_nick"` }
子账号基本信息
type SubUserFullInfo ¶
type SubUserFullInfo struct { DepartmentId int `json:"department_id"` DepartmentName string `json:"department_name"` DutyId int `json:"duty_id"` DutyLevel int `json:"duty_level"` DutyName string `json:"duty_name"` EmployeeId int `json:"employee_id"` EmployeeName string `json:"employee_name"` EmployeeNickname string `json:"employee_nickname"` EmployeeNum string `json:"employee_num"` EntryDate string `json:"entry_date"` LeaderId int `json:"leader_id"` OfficePhone string `json:"office_phone"` ParentDepartment int `json:"parent_department"` Sex int `json:"sex"` SubDispatchStatus bool `json:"sub_dispatch_status"` SubId int `json:"sub_id"` SubNick string `json:"sub_nick"` SubOwedStatus bool `json:"sub_owed_status"` SubStatus int `json:"sub_status"` SubuserEmail string `json:"subuser_email"` UserEmail string `json:"user_email"` UserId int `json:"user_id"` UserNick string `json:"user_nick"` WorkLocation string `json:"work_location"` }
子账号详细信息,其中包括账号基本信息、员工信息和部门职务信息
type SubUserInfo ¶
type SubUserInfo struct { FullName string `json:"full_name"` IsOnline int `json:"is_online"` Nick string `json:"nick"` SellerId int `json:"seller_id"` SellerNick string `json:"seller_nick"` Status int `json:"status"` SubId int `json:"sub_id"` }
子账号基本信息
type SubUserPermission ¶
type SubUserPermission struct { Permissions []*Permission `json:"permissions"` Roles []*Role `json:"roles"` }
子账号所拥有的权限对象(直接赋予的权限和通过角色赋予的权限的总和对象)
type SubuserDepartmentAddRequest ¶
type SubuserDepartmentAddRequest struct {
open_taobao.TaobaoMethodRequest
}
根据主账号ID以及部门名称、父部门ID创建新的部门信息(通过主账号登陆只能新建属于该主账号的部门信息)
func (*SubuserDepartmentAddRequest) GetResponse ¶
func (r *SubuserDepartmentAddRequest) GetResponse(accessToken string) (*SubuserDepartmentAddResponse, []byte, error)
func (*SubuserDepartmentAddRequest) SetDepartmentName ¶
func (r *SubuserDepartmentAddRequest) SetDepartmentName(value string)
部门名称
func (*SubuserDepartmentAddRequest) SetParentId ¶
func (r *SubuserDepartmentAddRequest) SetParentId(value string)
父部门ID 如果是最高部门则传入0
func (*SubuserDepartmentAddRequest) SetUserNick ¶
func (r *SubuserDepartmentAddRequest) SetUserNick(value string)
主账号用户名
type SubuserDepartmentAddResponse ¶
type SubuserDepartmentAddResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDepartmentAddResponseResult ¶
type SubuserDepartmentAddResponseResult struct {
Response *SubuserDepartmentAddResponse `json:"subuser_department_add_response"`
}
type SubuserDepartmentDeleteRequest ¶
type SubuserDepartmentDeleteRequest struct {
open_taobao.TaobaoMethodRequest
}
根据主账号Nick和部门ID删除该主账号下的该部门信息,如果待删除部门下有子账号则无法删除该部门(通过主账号登陆只能删除属于该主账号下的部门信息)
func (*SubuserDepartmentDeleteRequest) GetResponse ¶
func (r *SubuserDepartmentDeleteRequest) GetResponse(accessToken string) (*SubuserDepartmentDeleteResponse, []byte, error)
func (*SubuserDepartmentDeleteRequest) SetDepartmentId ¶
func (r *SubuserDepartmentDeleteRequest) SetDepartmentId(value string)
部门ID
func (*SubuserDepartmentDeleteRequest) SetUserNick ¶
func (r *SubuserDepartmentDeleteRequest) SetUserNick(value string)
主账号用户名
type SubuserDepartmentDeleteResponse ¶
type SubuserDepartmentDeleteResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDepartmentDeleteResponseResult ¶
type SubuserDepartmentDeleteResponseResult struct {
Response *SubuserDepartmentDeleteResponse `json:"subuser_department_delete_response"`
}
type SubuserDepartmentUpdateRequest ¶
type SubuserDepartmentUpdateRequest struct {
open_taobao.TaobaoMethodRequest
}
通过指定主账号ID和部门ID来修改该部门的名称或该部门的父部门ID。(通过主账号登陆只能修改属于该主账号的部门信息)
func (*SubuserDepartmentUpdateRequest) GetResponse ¶
func (r *SubuserDepartmentUpdateRequest) GetResponse(accessToken string) (*SubuserDepartmentUpdateResponse, []byte, error)
func (*SubuserDepartmentUpdateRequest) SetDepartmentId ¶
func (r *SubuserDepartmentUpdateRequest) SetDepartmentId(value string)
部门ID
func (*SubuserDepartmentUpdateRequest) SetDepartmentName ¶
func (r *SubuserDepartmentUpdateRequest) SetDepartmentName(value string)
部门名称
func (*SubuserDepartmentUpdateRequest) SetParentId ¶
func (r *SubuserDepartmentUpdateRequest) SetParentId(value string)
父部门ID 如果是最高部门则传入0
func (*SubuserDepartmentUpdateRequest) SetUserNick ¶
func (r *SubuserDepartmentUpdateRequest) SetUserNick(value string)
主账号用户名
type SubuserDepartmentUpdateResponse ¶
type SubuserDepartmentUpdateResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDepartmentUpdateResponseResult ¶
type SubuserDepartmentUpdateResponseResult struct {
Response *SubuserDepartmentUpdateResponse `json:"subuser_department_update_response"`
}
type SubuserDepartmentsGetRequest ¶
type SubuserDepartmentsGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定账户的所有部门列表,其实包括有每个部门的ID、父部门ID、部门名称(通过主账号登陆只能查询属于该主账号下的所有部门信息)。
func (*SubuserDepartmentsGetRequest) GetResponse ¶
func (r *SubuserDepartmentsGetRequest) GetResponse(accessToken string) (*SubuserDepartmentsGetResponse, []byte, error)
func (*SubuserDepartmentsGetRequest) SetUserNick ¶
func (r *SubuserDepartmentsGetRequest) SetUserNick(value string)
主账号用户名
type SubuserDepartmentsGetResponse ¶
type SubuserDepartmentsGetResponse struct {
Departments []*Department `json:"departments"`
}
type SubuserDepartmentsGetResponseResult ¶
type SubuserDepartmentsGetResponseResult struct {
Response *SubuserDepartmentsGetResponse `json:"subuser_departments_get_response"`
}
type SubuserDutyAddRequest ¶
type SubuserDutyAddRequest struct {
open_taobao.TaobaoMethodRequest
}
通过主账号ID来增加指定账户的职务信息,职务信息中包括职务名称以及职务级别(通过主账号登陆只能新建属于该主账号的职务信息)
func (*SubuserDutyAddRequest) GetResponse ¶
func (r *SubuserDutyAddRequest) GetResponse(accessToken string) (*SubuserDutyAddResponse, []byte, error)
func (*SubuserDutyAddRequest) SetDutyLevel ¶
func (r *SubuserDutyAddRequest) SetDutyLevel(value string)
职务级别
func (*SubuserDutyAddRequest) SetDutyName ¶
func (r *SubuserDutyAddRequest) SetDutyName(value string)
职务名称
func (*SubuserDutyAddRequest) SetUserNick ¶
func (r *SubuserDutyAddRequest) SetUserNick(value string)
主账号用户名
type SubuserDutyAddResponse ¶
type SubuserDutyAddResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDutyAddResponseResult ¶
type SubuserDutyAddResponseResult struct {
Response *SubuserDutyAddResponse `json:"subuser_duty_add_response"`
}
type SubuserDutyDeleteRequest ¶
type SubuserDutyDeleteRequest struct {
open_taobao.TaobaoMethodRequest
}
通过主账号ID和职务ID来删除主账号下的该职务信息。使用此职务的员工中职务一栏将变为空(通过主账号登陆只能删除属于该主账号下的职务信息)
func (*SubuserDutyDeleteRequest) GetResponse ¶
func (r *SubuserDutyDeleteRequest) GetResponse(accessToken string) (*SubuserDutyDeleteResponse, []byte, error)
func (*SubuserDutyDeleteRequest) SetDutyId ¶
func (r *SubuserDutyDeleteRequest) SetDutyId(value string)
职务ID
func (*SubuserDutyDeleteRequest) SetUserNick ¶
func (r *SubuserDutyDeleteRequest) SetUserNick(value string)
主账号用户名
type SubuserDutyDeleteResponse ¶
type SubuserDutyDeleteResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDutyDeleteResponseResult ¶
type SubuserDutyDeleteResponseResult struct {
Response *SubuserDutyDeleteResponse `json:"subuser_duty_delete_response"`
}
type SubuserDutyUpdateRequest ¶
type SubuserDutyUpdateRequest struct {
open_taobao.TaobaoMethodRequest
}
通过主账号ID和职务ID来修改该职务信息中的职务名称及职务级别信息(通过主账号登陆只能修改属于该主账号下的职务信息)
func (*SubuserDutyUpdateRequest) GetResponse ¶
func (r *SubuserDutyUpdateRequest) GetResponse(accessToken string) (*SubuserDutyUpdateResponse, []byte, error)
func (*SubuserDutyUpdateRequest) SetDutyId ¶
func (r *SubuserDutyUpdateRequest) SetDutyId(value string)
职务ID
func (*SubuserDutyUpdateRequest) SetDutyLevel ¶
func (r *SubuserDutyUpdateRequest) SetDutyLevel(value string)
职务级别
func (*SubuserDutyUpdateRequest) SetDutyName ¶
func (r *SubuserDutyUpdateRequest) SetDutyName(value string)
职务名称
func (*SubuserDutyUpdateRequest) SetUserNick ¶
func (r *SubuserDutyUpdateRequest) SetUserNick(value string)
主账号用户名
type SubuserDutyUpdateResponse ¶
type SubuserDutyUpdateResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserDutyUpdateResponseResult ¶
type SubuserDutyUpdateResponseResult struct {
Response *SubuserDutyUpdateResponse `json:"subuser_duty_update_response"`
}
type SubuserDutysGetRequest ¶
type SubuserDutysGetRequest struct {
open_taobao.TaobaoMethodRequest
}
通过主账号Nick获取该账户下的所有职务信息,职务信息中包括职务ID、职务名称以及职务等级(通过主账号登陆只能获取属于该主账号下的职务信息)
func (*SubuserDutysGetRequest) GetResponse ¶
func (r *SubuserDutysGetRequest) GetResponse(accessToken string) (*SubuserDutysGetResponse, []byte, error)
func (*SubuserDutysGetRequest) SetUserNick ¶
func (r *SubuserDutysGetRequest) SetUserNick(value string)
主账号用户名
type SubuserDutysGetResponse ¶
type SubuserDutysGetResponse struct {
Dutys []*Duty `json:"dutys"`
}
type SubuserDutysGetResponseResult ¶
type SubuserDutysGetResponseResult struct {
Response *SubuserDutysGetResponse `json:"subuser_dutys_get_response"`
}
type SubuserEmployeeAddRequest ¶
type SubuserEmployeeAddRequest struct {
open_taobao.TaobaoMethodRequest
}
给指定子账号新增一个员工信息(通过主账号登陆只能新建属于该主账号的员工信息)
func (*SubuserEmployeeAddRequest) GetResponse ¶
func (r *SubuserEmployeeAddRequest) GetResponse(accessToken string) (*SubuserEmployeeAddResponse, []byte, error)
func (*SubuserEmployeeAddRequest) SetDepartmentId ¶
func (r *SubuserEmployeeAddRequest) SetDepartmentId(value string)
当前员工所属部门ID
func (*SubuserEmployeeAddRequest) SetDutyId ¶
func (r *SubuserEmployeeAddRequest) SetDutyId(value string)
当前员工担任职务ID
func (*SubuserEmployeeAddRequest) SetEmployeeName ¶
func (r *SubuserEmployeeAddRequest) SetEmployeeName(value string)
员工姓名
func (*SubuserEmployeeAddRequest) SetEmployeeNickname ¶
func (r *SubuserEmployeeAddRequest) SetEmployeeNickname(value string)
员工花名
func (*SubuserEmployeeAddRequest) SetEmployeeNum ¶
func (r *SubuserEmployeeAddRequest) SetEmployeeNum(value string)
员工工号(可以用大小写英文字母和数字)
func (*SubuserEmployeeAddRequest) SetEntryDate ¶
func (r *SubuserEmployeeAddRequest) SetEntryDate(value string)
员工入职时间
func (*SubuserEmployeeAddRequest) SetIdCardNum ¶
func (r *SubuserEmployeeAddRequest) SetIdCardNum(value string)
员工身份证号码
func (*SubuserEmployeeAddRequest) SetLeaderId ¶
func (r *SubuserEmployeeAddRequest) SetLeaderId(value string)
直接上级的员工ID
func (*SubuserEmployeeAddRequest) SetOfficePhone ¶
func (r *SubuserEmployeeAddRequest) SetOfficePhone(value string)
办公电话
func (*SubuserEmployeeAddRequest) SetPersonalEmail ¶
func (r *SubuserEmployeeAddRequest) SetPersonalEmail(value string)
员工私人邮箱
func (*SubuserEmployeeAddRequest) SetPersonalMobile ¶
func (r *SubuserEmployeeAddRequest) SetPersonalMobile(value string)
员工手机号码
func (*SubuserEmployeeAddRequest) SetSex ¶
func (r *SubuserEmployeeAddRequest) SetSex(value string)
员工性别 1:男; 2:女
func (*SubuserEmployeeAddRequest) SetSubId ¶
func (r *SubuserEmployeeAddRequest) SetSubId(value string)
子账号ID
func (*SubuserEmployeeAddRequest) SetWorkLocation ¶
func (r *SubuserEmployeeAddRequest) SetWorkLocation(value string)
工作地点
type SubuserEmployeeAddResponse ¶
type SubuserEmployeeAddResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserEmployeeAddResponseResult ¶
type SubuserEmployeeAddResponseResult struct {
Response *SubuserEmployeeAddResponse `json:"subuser_employee_add_response"`
}
type SubuserEmployeeUpdateRequest ¶
type SubuserEmployeeUpdateRequest struct {
open_taobao.TaobaoMethodRequest
}
修改指定账户子账号的员工信息(通过主账号登陆只能修改属于该主账号下的员工信息)
func (*SubuserEmployeeUpdateRequest) GetResponse ¶
func (r *SubuserEmployeeUpdateRequest) GetResponse(accessToken string) (*SubuserEmployeeUpdateResponse, []byte, error)
func (*SubuserEmployeeUpdateRequest) SetDepartmentId ¶
func (r *SubuserEmployeeUpdateRequest) SetDepartmentId(value string)
当前员工所属部门ID
func (*SubuserEmployeeUpdateRequest) SetDutyId ¶
func (r *SubuserEmployeeUpdateRequest) SetDutyId(value string)
当前员工担任职务ID(若需要将该字段的值置为空,请传入-1)
func (*SubuserEmployeeUpdateRequest) SetEmployeeName ¶
func (r *SubuserEmployeeUpdateRequest) SetEmployeeName(value string)
员工姓名
func (*SubuserEmployeeUpdateRequest) SetEmployeeNickname ¶
func (r *SubuserEmployeeUpdateRequest) SetEmployeeNickname(value string)
员工花名(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetEmployeeNum ¶
func (r *SubuserEmployeeUpdateRequest) SetEmployeeNum(value string)
员工工号(卖家自定义)(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetEmployeeTurnover ¶
func (r *SubuserEmployeeUpdateRequest) SetEmployeeTurnover(value string)
登记员工离职 true:登记员工离职
func (*SubuserEmployeeUpdateRequest) SetEntryDate ¶
func (r *SubuserEmployeeUpdateRequest) SetEntryDate(value string)
员工入职时间(若需要将该字段的值置为空,请传入1900-01-01 00:00:00)
func (*SubuserEmployeeUpdateRequest) SetIdCardNum ¶
func (r *SubuserEmployeeUpdateRequest) SetIdCardNum(value string)
员工身份证号码(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetLeaderId ¶
func (r *SubuserEmployeeUpdateRequest) SetLeaderId(value string)
直接上级的员工ID(若需要将该字段的值置为空,请传入-1)
func (*SubuserEmployeeUpdateRequest) SetOfficePhone ¶
func (r *SubuserEmployeeUpdateRequest) SetOfficePhone(value string)
办公电话(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetPersonalEmail ¶
func (r *SubuserEmployeeUpdateRequest) SetPersonalEmail(value string)
员工私人邮箱(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetPersonalMobile ¶
func (r *SubuserEmployeeUpdateRequest) SetPersonalMobile(value string)
员工手机号码(若需要将该字段的值置为空,请传入“-1”)
func (*SubuserEmployeeUpdateRequest) SetSex ¶
func (r *SubuserEmployeeUpdateRequest) SetSex(value string)
员工性别 1:男; 2:女
func (*SubuserEmployeeUpdateRequest) SetSubId ¶
func (r *SubuserEmployeeUpdateRequest) SetSubId(value string)
子账号ID
func (*SubuserEmployeeUpdateRequest) SetWorkLocation ¶
func (r *SubuserEmployeeUpdateRequest) SetWorkLocation(value string)
杭州大厦(若需要将该字段的值置为空,请传入“-1”)
type SubuserEmployeeUpdateResponse ¶
type SubuserEmployeeUpdateResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserEmployeeUpdateResponseResult ¶
type SubuserEmployeeUpdateResponseResult struct {
Response *SubuserEmployeeUpdateResponse `json:"subuser_employee_update_response"`
}
type SubuserFullinfoGetRequest ¶
type SubuserFullinfoGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取指定账户子账号的详细信息,其中包括子账号的账号信息以及员工、部门、职务信息(只能通过主账号登陆并查询属于该主账号下的某个子账号详细信息)
func (*SubuserFullinfoGetRequest) GetResponse ¶
func (r *SubuserFullinfoGetRequest) GetResponse(accessToken string) (*SubuserFullinfoGetResponse, []byte, error)
func (*SubuserFullinfoGetRequest) SetFields ¶
func (r *SubuserFullinfoGetRequest) SetFields(value string)
传入所需要的参数信息(若不需要获取子账号或主账号的企业邮箱地址,则无需传入该参数;若需要获取子账号或主账号的企业邮箱地址,则需要传入fields;可选参数值为subuser_email和user_email,传入其他参数值均无效;两个参数都需要则以逗号隔开传入即可,例如:subuser_email,user_email)
func (*SubuserFullinfoGetRequest) SetSubId ¶
func (r *SubuserFullinfoGetRequest) SetSubId(value string)
子账号ID(传参中sub_id和sub_nick至少需要其中一个,若sub_id与sub_nick同时传入并且合法,那么sub_nick优先,以sub_nick查询子账号)
func (*SubuserFullinfoGetRequest) SetSubNick ¶
func (r *SubuserFullinfoGetRequest) SetSubNick(value string)
子账号用户名(传参中sub_id和sub_nick至少需要其中一个,若sub_id与sub_nick同时传入并且合法,那么sub_nick优先,以sub_nick查询子账号)
type SubuserFullinfoGetResponse ¶
type SubuserFullinfoGetResponse struct {
SubFullinfo *SubUserFullInfo `json:"sub_fullinfo"`
}
type SubuserFullinfoGetResponseResult ¶
type SubuserFullinfoGetResponseResult struct {
Response *SubuserFullinfoGetResponse `json:"subuser_fullinfo_get_response"`
}
type SubuserInfoUpdateRequest ¶
type SubuserInfoUpdateRequest struct {
open_taobao.TaobaoMethodRequest
}
修改指定账户子账号的基本信息(通过主账号登陆只能修改属于该主账号的子账号基本信息)
func (*SubuserInfoUpdateRequest) GetResponse ¶
func (r *SubuserInfoUpdateRequest) GetResponse(accessToken string) (*SubuserInfoUpdateResponse, []byte, error)
func (*SubuserInfoUpdateRequest) SetIsDisableSubaccount ¶
func (r *SubuserInfoUpdateRequest) SetIsDisableSubaccount(value string)
是否停用子账号 true:表示停用该子账号false:表示开启该子账号
func (*SubuserInfoUpdateRequest) SetIsDispatch ¶
func (r *SubuserInfoUpdateRequest) SetIsDispatch(value string)
子账号是否参与分流 true:参与分流 false:不参与分流
func (*SubuserInfoUpdateRequest) SetSubId ¶
func (r *SubuserInfoUpdateRequest) SetSubId(value string)
子账号ID
type SubuserInfoUpdateResponse ¶
type SubuserInfoUpdateResponse struct {
IsSuccess bool `json:"is_success"`
}
type SubuserInfoUpdateResponseResult ¶
type SubuserInfoUpdateResponseResult struct {
Response *SubuserInfoUpdateResponse `json:"subuser_info_update_response"`
}
type SubusersGetRequest ¶
type SubusersGetRequest struct {
open_taobao.TaobaoMethodRequest
}
获取主账号下的子账号简易账号信息集合。(只能通过主账号登陆并且查询该属于主账号的子账号信息)
func (*SubusersGetRequest) GetResponse ¶
func (r *SubusersGetRequest) GetResponse(accessToken string) (*SubusersGetResponse, []byte, error)
func (*SubusersGetRequest) SetUserNick ¶
func (r *SubusersGetRequest) SetUserNick(value string)
主账号用户名
type SubusersGetResponse ¶
type SubusersGetResponse struct {
Subaccounts []*SubAccountInfo `json:"subaccounts"`
}
type SubusersGetResponseResult ¶
type SubusersGetResponseResult struct {
Response *SubusersGetResponse `json:"subusers_get_response"`
}