|
- import { Dictionary } from "@types";
- import { APICommonResponse, ApiId, HttpMethod, makeParam, request } from "api";
- import { getUrl } from "./url";
-
- // -------Email変更手続き開始---------------
- export type StartChangeEmailRequest = {
- new_email: string;
- };
- export const startChangeEmail = async (param: StartChangeEmailRequest) => {
- const sendData = makeParam(param);
- const res = await request({
- url: getUrl(ApiId.START_CHANGE_EMAIL),
- method: HttpMethod.POST,
- data: sendData,
- });
- return res;
- };
-
- // -------Email変更手続き認証---------------
- export type VerifyChangeEmailRequest = {
- token: string;
- };
- export const verifyChangeEmail = async (param: VerifyChangeEmailRequest) => {
- const sendData = makeParam(param);
- const res = await request({
- url: getUrl(ApiId.VERIFY_CHANGE_EMAIL),
- method: HttpMethod.POST,
- data: sendData,
- });
- return res;
- };
-
- // -------利用者情報変更申請---------------
- export type UpdateCustomerInfoOrderParam = {
- name: string;
- name_kana: string;
- zip_code: string;
- address: string;
- phone_no: string;
- memo?: string;
- };
- export const orderCustomerInfoUpdate = async (
- param: UpdateCustomerInfoOrderParam
- ) => {
- const sendData = makeParam(param);
- const res = await request({
- url: getUrl(ApiId.CUSTOMER_UPDATE_INFO_ORDER),
- method: HttpMethod.POST,
- data: sendData,
- });
- return res;
- };
-
- // -------口座振替登録用パラメータ取得---------------
- export type GetRegisterBankAccountStartParamResponse = {
- data: {
- url: string;
- param: Dictionary;
- };
- } & APICommonResponse;
- export const getRegisterBankAccountStartParam = async () => {
- const res = await request<GetRegisterBankAccountStartParamResponse>({
- url: getUrl(ApiId.CUSTOMER_REGISTER_BANK_ACCOUNT_START_PARAM),
- method: HttpMethod.GET,
- });
- return res;
- };
-
- // -------クレジットカード利用申請---------------
- export const orderChangePaymentMetodCreditcard = async (param: {}) => {
- const res = await request({
- url: getUrl(ApiId.CUSTOMER_CHANGE_PAYMENT_METHOD_CREDITCARD_ORDER),
- method: HttpMethod.POST,
- });
- return res;
- };
|