13016 lines
342 KiB
TypeScript
13016 lines
342 KiB
TypeScript
/* eslint-disable */
|
|
/* tslint:disable */
|
|
// @ts-nocheck
|
|
/*
|
|
* ---------------------------------------------------------------
|
|
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
|
* ## ##
|
|
* ## AUTHOR: acacode ##
|
|
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
|
|
* ---------------------------------------------------------------
|
|
*/
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsBrandsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsBrandsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3ProductsBrandsListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "default" */
|
|
export enum IDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsBrandsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IDisplayEnum1 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsBrandsUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsBrandsPartialUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IDisplayEnum2 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsBrandsBatchUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsBrandsBatchPartialUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3CouponsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3CouponsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3CouponsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "fixed_cart" */
|
|
export enum IDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3CouponsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IDiscountTypeEnum1 {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV3CouponsUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV3CouponsPartialUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IDiscountTypeEnum2 {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV3CouponsBatchUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
export enum IV3CouponsBatchPartialUpdateParamsDiscountTypeEnum {
|
|
Percent = "percent",
|
|
FixedCart = "fixed_cart",
|
|
FixedProduct = "fixed_product",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3CustomersDownloadsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3CustomersListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3CustomersListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3CustomersListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
RegisteredDate = "registered_date",
|
|
}
|
|
|
|
/** @default "customer" */
|
|
export enum IV3CustomersListParamsRoleEnum {
|
|
All = "all",
|
|
Administrator = "administrator",
|
|
Editor = "editor",
|
|
Author = "author",
|
|
Contributor = "contributor",
|
|
Subscriber = "subscriber",
|
|
Customer = "customer",
|
|
ShopManager = "shop_manager",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3CustomersDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3OrdersNotesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV3OrdersNotesListParamsTypeEnum {
|
|
Any = "any",
|
|
Customer = "customer",
|
|
Internal = "internal",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3OrdersDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3OrdersRefundsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3OrdersRefundsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3OrdersRefundsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3OrdersListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3OrdersListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3OrdersListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "pending" */
|
|
export enum IStatusEnum {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
/** @default "RUB" */
|
|
export enum ICurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3OrdersDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum1 {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum ICurrencyEnum1 {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV3OrdersUpdateParamsStatusEnum {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV3OrdersUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV3OrdersPartialUpdateParamsStatusEnum {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV3OrdersPartialUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IStatusEnum2 {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum ICurrencyEnum2 {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV3OrdersBatchUpdateParamsStatusEnum {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV3OrdersBatchUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
export enum IV3OrdersBatchPartialUpdateParamsStatusEnum {
|
|
AutoDraft = "auto-draft",
|
|
Pending = "pending",
|
|
Processing = "processing",
|
|
OnHold = "on-hold",
|
|
Completed = "completed",
|
|
Cancelled = "cancelled",
|
|
Refunded = "refunded",
|
|
Failed = "failed",
|
|
CheckoutDraft = "checkout-draft",
|
|
}
|
|
|
|
export enum IV3OrdersBatchPartialUpdateParamsCurrencyEnum {
|
|
AED = "AED",
|
|
AFN = "AFN",
|
|
ALL = "ALL",
|
|
AMD = "AMD",
|
|
ANG = "ANG",
|
|
AOA = "AOA",
|
|
ARS = "ARS",
|
|
AUD = "AUD",
|
|
AWG = "AWG",
|
|
AZN = "AZN",
|
|
BAM = "BAM",
|
|
BBD = "BBD",
|
|
BDT = "BDT",
|
|
BGN = "BGN",
|
|
BHD = "BHD",
|
|
BIF = "BIF",
|
|
BMD = "BMD",
|
|
BND = "BND",
|
|
BOB = "BOB",
|
|
BRL = "BRL",
|
|
BSD = "BSD",
|
|
BTC = "BTC",
|
|
BTN = "BTN",
|
|
BWP = "BWP",
|
|
BYR = "BYR",
|
|
BYN = "BYN",
|
|
BZD = "BZD",
|
|
CAD = "CAD",
|
|
CDF = "CDF",
|
|
CHF = "CHF",
|
|
CLP = "CLP",
|
|
CNY = "CNY",
|
|
COP = "COP",
|
|
CRC = "CRC",
|
|
CUC = "CUC",
|
|
CUP = "CUP",
|
|
CVE = "CVE",
|
|
CZK = "CZK",
|
|
DJF = "DJF",
|
|
DKK = "DKK",
|
|
DOP = "DOP",
|
|
DZD = "DZD",
|
|
EGP = "EGP",
|
|
ERN = "ERN",
|
|
ETB = "ETB",
|
|
EUR = "EUR",
|
|
FJD = "FJD",
|
|
FKP = "FKP",
|
|
GBP = "GBP",
|
|
GEL = "GEL",
|
|
GGP = "GGP",
|
|
GHS = "GHS",
|
|
GIP = "GIP",
|
|
GMD = "GMD",
|
|
GNF = "GNF",
|
|
GTQ = "GTQ",
|
|
GYD = "GYD",
|
|
HKD = "HKD",
|
|
HNL = "HNL",
|
|
HRK = "HRK",
|
|
HTG = "HTG",
|
|
HUF = "HUF",
|
|
IDR = "IDR",
|
|
ILS = "ILS",
|
|
IMP = "IMP",
|
|
INR = "INR",
|
|
IQD = "IQD",
|
|
IRR = "IRR",
|
|
IRT = "IRT",
|
|
ISK = "ISK",
|
|
JEP = "JEP",
|
|
JMD = "JMD",
|
|
JOD = "JOD",
|
|
JPY = "JPY",
|
|
KES = "KES",
|
|
KGS = "KGS",
|
|
KHR = "KHR",
|
|
KMF = "KMF",
|
|
KPW = "KPW",
|
|
KRW = "KRW",
|
|
KWD = "KWD",
|
|
KYD = "KYD",
|
|
KZT = "KZT",
|
|
LAK = "LAK",
|
|
LBP = "LBP",
|
|
LKR = "LKR",
|
|
LRD = "LRD",
|
|
LSL = "LSL",
|
|
LYD = "LYD",
|
|
MAD = "MAD",
|
|
MDL = "MDL",
|
|
MGA = "MGA",
|
|
MKD = "MKD",
|
|
MMK = "MMK",
|
|
MNT = "MNT",
|
|
MOP = "MOP",
|
|
MRU = "MRU",
|
|
MUR = "MUR",
|
|
MVR = "MVR",
|
|
MWK = "MWK",
|
|
MXN = "MXN",
|
|
MYR = "MYR",
|
|
MZN = "MZN",
|
|
NAD = "NAD",
|
|
NGN = "NGN",
|
|
NIO = "NIO",
|
|
NOK = "NOK",
|
|
NPR = "NPR",
|
|
NZD = "NZD",
|
|
OMR = "OMR",
|
|
PAB = "PAB",
|
|
PEN = "PEN",
|
|
PGK = "PGK",
|
|
PHP = "PHP",
|
|
PKR = "PKR",
|
|
PLN = "PLN",
|
|
PRB = "PRB",
|
|
PYG = "PYG",
|
|
QAR = "QAR",
|
|
RON = "RON",
|
|
RSD = "RSD",
|
|
RUB = "RUB",
|
|
RWF = "RWF",
|
|
SAR = "SAR",
|
|
SBD = "SBD",
|
|
SCR = "SCR",
|
|
SDG = "SDG",
|
|
SEK = "SEK",
|
|
SGD = "SGD",
|
|
SHP = "SHP",
|
|
SLL = "SLL",
|
|
SOS = "SOS",
|
|
SRD = "SRD",
|
|
SSP = "SSP",
|
|
STN = "STN",
|
|
SYP = "SYP",
|
|
SZL = "SZL",
|
|
THB = "THB",
|
|
TJS = "TJS",
|
|
TMT = "TMT",
|
|
TND = "TND",
|
|
TOP = "TOP",
|
|
TRY = "TRY",
|
|
TTD = "TTD",
|
|
TWD = "TWD",
|
|
TZS = "TZS",
|
|
UAH = "UAH",
|
|
UGX = "UGX",
|
|
USD = "USD",
|
|
UYU = "UYU",
|
|
UZS = "UZS",
|
|
VEF = "VEF",
|
|
VES = "VES",
|
|
VND = "VND",
|
|
VUV = "VUV",
|
|
WST = "WST",
|
|
XAF = "XAF",
|
|
XCD = "XCD",
|
|
XOF = "XOF",
|
|
XPF = "XPF",
|
|
YER = "YER",
|
|
ZAR = "ZAR",
|
|
ZMW = "ZMW",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsAttributesTermsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsAttributesTermsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3ProductsAttributesTermsListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsAttributesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsAttributesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "select" */
|
|
export enum ITypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
/** @default "menu_order" */
|
|
export enum IOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsAttributesDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum ITypeEnum1 {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IOrderByEnum1 {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesUpdate2ParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesUpdate2ParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesPartialUpdate2ParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesPartialUpdate2ParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum ITypeEnum2 {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IOrderByEnum2 {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesBatchUpdateParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesBatchUpdateParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesBatchPartialUpdateParamsTypeEnum {
|
|
Select = "select",
|
|
}
|
|
|
|
export enum IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum {
|
|
MenuOrder = "menu_order",
|
|
Name = "name",
|
|
NameNum = "name_num",
|
|
Id = "id",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsCategoriesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsCategoriesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3ProductsCategoriesListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "default" */
|
|
export enum IDisplayEnum3 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsCategoriesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IDisplayEnum4 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsCategoriesUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsCategoriesPartialUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IDisplayEnum5 {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsCategoriesBatchUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
export enum IV3ProductsCategoriesBatchPartialUpdateParamsDisplayEnum {
|
|
Default = "default",
|
|
Products = "products",
|
|
Subcategories = "subcategories",
|
|
Both = "both",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsCustomFieldsNamesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsReviewsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3ProductsReviewsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date_gmt" */
|
|
export enum IV3ProductsReviewsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
DateGmt = "date_gmt",
|
|
Id = "id",
|
|
Include = "include",
|
|
Product = "product",
|
|
}
|
|
|
|
/** @default "approved" */
|
|
export enum IV3ProductsReviewsListParamsStatusEnum {
|
|
All = "all",
|
|
Hold = "hold",
|
|
Approved = "approved",
|
|
Spam = "spam",
|
|
Trash = "trash",
|
|
}
|
|
|
|
/** @default "approved" */
|
|
export enum IStatusEnum3 {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsReviewsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum4 {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
export enum IV3ProductsReviewsUpdateParamsStatusEnum {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
export enum IV3ProductsReviewsPartialUpdateParamsStatusEnum {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
export enum IStatusEnum5 {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
export enum IV3ProductsReviewsBatchUpdateParamsStatusEnum {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
export enum IV3ProductsReviewsBatchPartialUpdateParamsStatusEnum {
|
|
Approved = "approved",
|
|
Hold = "hold",
|
|
Spam = "spam",
|
|
Unspam = "unspam",
|
|
Trash = "trash",
|
|
Untrash = "untrash",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsShippingClassesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsShippingClassesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3ProductsShippingClassesListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsShippingClassesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsTagsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3ProductsTagsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "name" */
|
|
export enum IV3ProductsTagsListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Include = "include",
|
|
Name = "name",
|
|
Slug = "slug",
|
|
TermGroup = "term_group",
|
|
Description = "description",
|
|
Count = "count",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsTagsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3ProductsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3ProductsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
Popularity = "popularity",
|
|
Rating = "rating",
|
|
PostIn = "post__in",
|
|
Price = "price",
|
|
Sales = "sales",
|
|
MenuOrder = "menu_order",
|
|
Random = "random",
|
|
Popularity1 = "popularity",
|
|
Rating2 = "rating",
|
|
MenuOrder3 = "menu_order",
|
|
Price4 = "price",
|
|
Popularity5 = "popularity",
|
|
Rating6 = "rating",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV3ProductsListParamsStatusEnum {
|
|
Any = "any",
|
|
Future = "future",
|
|
Trash = "trash",
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsListParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV3ProductsListParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
/** @default "simple" */
|
|
export enum ITypeEnum3 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
/** @default "publish" */
|
|
export enum IStatusEnum6 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
/** @default "visible" */
|
|
export enum ICatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
/** @default "taxable" */
|
|
export enum ITaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
/** @default "instock" */
|
|
export enum IStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
/** @default "no" */
|
|
export enum IBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum ITypeEnum4 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IStatusEnum7 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum ICatalogVisibilityEnum1 {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum ITaxStatusEnum1 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IStockStatusEnum1 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IBackordersEnum1 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum ITypeEnum5 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IStatusEnum8 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum ICatalogVisibilityEnum2 {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum ITaxStatusEnum2 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IStockStatusEnum2 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IBackordersEnum2 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsBatchUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsBatchPartialUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsSuggestedProductsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3ProductsSuggestedProductsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3ProductsSuggestedProductsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
Popularity = "popularity",
|
|
Rating = "rating",
|
|
PostIn = "post__in",
|
|
Price = "price",
|
|
Sales = "sales",
|
|
MenuOrder = "menu_order",
|
|
Random = "random",
|
|
Popularity1 = "popularity",
|
|
Rating2 = "rating",
|
|
MenuOrder3 = "menu_order",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV3ProductsSuggestedProductsListParamsStatusEnum {
|
|
Any = "any",
|
|
Future = "future",
|
|
Trash = "trash",
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsSuggestedProductsListParamsTypeEnum {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum ITypeEnum6 {
|
|
Simple = "simple",
|
|
Grouped = "grouped",
|
|
External = "external",
|
|
Variable = "variable",
|
|
}
|
|
|
|
export enum IStatusEnum9 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
Future = "future",
|
|
AutoDraft = "auto-draft",
|
|
Trash = "trash",
|
|
}
|
|
|
|
export enum ICatalogVisibilityEnum3 {
|
|
Visible = "visible",
|
|
Catalog = "catalog",
|
|
Search = "search",
|
|
Hidden = "hidden",
|
|
}
|
|
|
|
export enum ITaxStatusEnum3 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IStockStatusEnum3 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IBackordersEnum3 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsVariationsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3ProductsVariationsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3ProductsVariationsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
MenuOrder = "menu_order",
|
|
}
|
|
|
|
/** @default "any" */
|
|
export enum IV3ProductsVariationsListParamsStatusEnum {
|
|
Any = "any",
|
|
Future = "future",
|
|
Trash = "trash",
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsListParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
/** @default "publish" */
|
|
export enum IStatusEnum10 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
/** @default "taxable" */
|
|
export enum ITaxStatusEnum4 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
/** @default "instock" */
|
|
export enum IStockStatusEnum4 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
/** @default "no" */
|
|
export enum IBackordersEnum4 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ProductsDetail2ParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum11 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum ITaxStatusEnum5 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IStockStatusEnum5 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IBackordersEnum5 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsUpdate2ParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsUpdate2ParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsUpdate2ParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsUpdate2ParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdate2ParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdate2ParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdate2ParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsPartialUpdate2ParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IStatusEnum12 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum ITaxStatusEnum6 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IStockStatusEnum6 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IBackordersEnum6 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchPartialUpdateParamsStatusEnum {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchPartialUpdateParamsTaxStatusEnum {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchPartialUpdateParamsStockStatusEnum {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
export enum IV3ProductsVariationsBatchPartialUpdateParamsBackordersEnum {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "publish" */
|
|
export enum IStatusEnum13 {
|
|
Draft = "draft",
|
|
Pending = "pending",
|
|
Private = "private",
|
|
Publish = "publish",
|
|
}
|
|
|
|
/** @default "taxable" */
|
|
export enum ITaxStatusEnum7 {
|
|
Taxable = "taxable",
|
|
Shipping = "shipping",
|
|
None = "none",
|
|
}
|
|
|
|
/** @default "instock" */
|
|
export enum IStockStatusEnum7 {
|
|
Instock = "instock",
|
|
Outofstock = "outofstock",
|
|
Onbackorder = "onbackorder",
|
|
}
|
|
|
|
/** @default "no" */
|
|
export enum IBackordersEnum7 {
|
|
No = "no",
|
|
Notify = "notify",
|
|
Yes = "yes",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3RefundsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3RefundsListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3RefundsListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Include = "include",
|
|
Title = "title",
|
|
Slug = "slug",
|
|
Modified = "modified",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsSalesListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
export enum IV3ReportsSalesListParamsPeriodEnum {
|
|
Week = "week",
|
|
Month = "month",
|
|
LastMonth = "last_month",
|
|
Year = "year",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsTopSellersListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
export enum IV3ReportsTopSellersListParamsPeriodEnum {
|
|
Week = "week",
|
|
Month = "month",
|
|
LastMonth = "last_month",
|
|
Year = "year",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsOrdersTotalsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsProductsTotalsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsCustomersTotalsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsCouponsTotalsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsReviewsTotalsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ReportsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
export enum ITypeEnum7 {
|
|
Postcode = "postcode",
|
|
State = "state",
|
|
Country = "country",
|
|
Continent = "continent",
|
|
}
|
|
|
|
export enum IV3ShippingZonesLocationsUpdateParamsTypeEnum {
|
|
Postcode = "postcode",
|
|
State = "state",
|
|
Country = "country",
|
|
Continent = "continent",
|
|
}
|
|
|
|
export enum IV3ShippingZonesLocationsPartialUpdateParamsTypeEnum {
|
|
Postcode = "postcode",
|
|
State = "state",
|
|
Country = "country",
|
|
Continent = "continent",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3TaxesClassesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3TaxesListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "asc" */
|
|
export enum IV3TaxesListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "order" */
|
|
export enum IV3TaxesListParamsOrderbyEnum {
|
|
Id = "id",
|
|
Order = "order",
|
|
Priority = "priority",
|
|
}
|
|
|
|
export enum IV3TaxesListParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "standard" */
|
|
export enum IClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3TaxesDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IClassEnum1 {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV3TaxesUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV3TaxesPartialUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IClassEnum2 {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV3TaxesBatchUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
export enum IV3TaxesBatchPartialUpdateParamsClassEnum {
|
|
Standard = "standard",
|
|
ReducedRate = "reduced-rate",
|
|
ZeroRate = "zero-rate",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3WebhooksListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "desc" */
|
|
export enum IV3WebhooksListParamsOrderEnum {
|
|
Asc = "asc",
|
|
Desc = "desc",
|
|
}
|
|
|
|
/** @default "date" */
|
|
export enum IV3WebhooksListParamsOrderbyEnum {
|
|
Date = "date",
|
|
Id = "id",
|
|
Title = "title",
|
|
}
|
|
|
|
/** @default "all" */
|
|
export enum IV3WebhooksListParamsStatusEnum {
|
|
All = "all",
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "active" */
|
|
export enum IStatusEnum14 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3WebhooksDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum IStatusEnum15 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV3WebhooksUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV3WebhooksPartialUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IStatusEnum16 {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV3WebhooksBatchUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
export enum IV3WebhooksBatchPartialUpdateParamsStatusEnum {
|
|
Active = "active",
|
|
Paused = "paused",
|
|
Disabled = "disabled",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3SystemStatusListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3SystemStatusToolsListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ShippingMethodsListParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3ShippingMethodsDetailParamsContextEnum {
|
|
View = "view",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3PaymentGatewaysListParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
/** @default "view" */
|
|
export enum IV3PaymentGatewaysDetailParamsContextEnum {
|
|
View = "view",
|
|
Edit = "edit",
|
|
}
|
|
|
|
export enum ITemplateIdEnum {
|
|
NewOrder = "new_order",
|
|
CancelledOrder = "cancelled_order",
|
|
CustomerCancelledOrder = "customer_cancelled_order",
|
|
FailedOrder = "failed_order",
|
|
CustomerFailedOrder = "customer_failed_order",
|
|
CustomerOnHoldOrder = "customer_on_hold_order",
|
|
CustomerProcessingOrder = "customer_processing_order",
|
|
CustomerCompletedOrder = "customer_completed_order",
|
|
CustomerRefundedOrder = "customer_refunded_order",
|
|
CustomerInvoice = "customer_invoice",
|
|
CustomerNote = "customer_note",
|
|
CustomerResetPassword = "customer_reset_password",
|
|
CustomerNewAccount = "customer_new_account",
|
|
CustomerPosCompletedOrder = "customer_pos_completed_order",
|
|
CustomerPosRefundedOrder = "customer_pos_refunded_order",
|
|
}
|
|
|
|
export type QueryParamsType = Record<string | number, any>;
|
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
|
|
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
/** set parameter to `true` for call `securityWorker` for this request */
|
|
secure?: boolean;
|
|
/** request path */
|
|
path: string;
|
|
/** content type of request body */
|
|
type?: ContentType;
|
|
/** query params */
|
|
query?: QueryParamsType;
|
|
/** format of response (i.e. response.json() -> format: "json") */
|
|
format?: ResponseFormat;
|
|
/** request body */
|
|
body?: unknown;
|
|
/** base url */
|
|
baseUrl?: string;
|
|
/** request cancellation token */
|
|
cancelToken?: CancelToken;
|
|
}
|
|
|
|
export type RequestParams = Omit<
|
|
FullRequestParams,
|
|
"body" | "method" | "query" | "path"
|
|
>;
|
|
|
|
export interface ApiConfig<SecurityDataType = unknown> {
|
|
baseUrl?: string;
|
|
baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
|
|
securityWorker?: (
|
|
securityData: SecurityDataType | null,
|
|
) => Promise<RequestParams | void> | RequestParams | void;
|
|
customFetch?: typeof fetch;
|
|
}
|
|
|
|
export interface HttpResponse<D extends unknown, E extends unknown = unknown>
|
|
extends Response {
|
|
data: D;
|
|
error: E;
|
|
}
|
|
|
|
type CancelToken = Symbol | string | number;
|
|
|
|
export enum ContentType {
|
|
Json = "application/json",
|
|
JsonApi = "application/vnd.api+json",
|
|
FormData = "multipart/form-data",
|
|
UrlEncoded = "application/x-www-form-urlencoded",
|
|
Text = "text/plain",
|
|
}
|
|
|
|
export class HttpClient<SecurityDataType = unknown> {
|
|
public baseUrl: string = "https://wp.koptilnya.xyz/wp-json";
|
|
private securityData: SecurityDataType | null = null;
|
|
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
|
private abortControllers = new Map<CancelToken, AbortController>();
|
|
private customFetch = (...fetchParams: Parameters<typeof fetch>) =>
|
|
fetch(...fetchParams);
|
|
|
|
private baseApiParams: RequestParams = {
|
|
credentials: "same-origin",
|
|
headers: {},
|
|
redirect: "follow",
|
|
referrerPolicy: "no-referrer",
|
|
};
|
|
|
|
constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
|
|
Object.assign(this, apiConfig);
|
|
}
|
|
|
|
public setSecurityData = (data: SecurityDataType | null) => {
|
|
this.securityData = data;
|
|
};
|
|
|
|
protected encodeQueryParam(key: string, value: any) {
|
|
const encodedKey = encodeURIComponent(key);
|
|
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
}
|
|
|
|
protected addQueryParam(query: QueryParamsType, key: string) {
|
|
return this.encodeQueryParam(key, query[key]);
|
|
}
|
|
|
|
protected addArrayQueryParam(query: QueryParamsType, key: string) {
|
|
const value = query[key];
|
|
return value.map((v: any) => this.encodeQueryParam(key, v)).join("&");
|
|
}
|
|
|
|
protected toQueryString(rawQuery?: QueryParamsType): string {
|
|
const query = rawQuery || {};
|
|
const keys = Object.keys(query).filter(
|
|
(key) => "undefined" !== typeof query[key],
|
|
);
|
|
return keys
|
|
.map((key) =>
|
|
Array.isArray(query[key])
|
|
? this.addArrayQueryParam(query, key)
|
|
: this.addQueryParam(query, key),
|
|
)
|
|
.join("&");
|
|
}
|
|
|
|
protected addQueryParams(rawQuery?: QueryParamsType): string {
|
|
const queryString = this.toQueryString(rawQuery);
|
|
return queryString ? `?${queryString}` : "";
|
|
}
|
|
|
|
private contentFormatters: Record<ContentType, (input: any) => any> = {
|
|
[ContentType.Json]: (input: any) =>
|
|
input !== null && (typeof input === "object" || typeof input === "string")
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.JsonApi]: (input: any) =>
|
|
input !== null && (typeof input === "object" || typeof input === "string")
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.Text]: (input: any) =>
|
|
input !== null && typeof input !== "string"
|
|
? JSON.stringify(input)
|
|
: input,
|
|
[ContentType.FormData]: (input: any) =>
|
|
Object.keys(input || {}).reduce((formData, key) => {
|
|
const property = input[key];
|
|
formData.append(
|
|
key,
|
|
property instanceof Blob
|
|
? property
|
|
: typeof property === "object" && property !== null
|
|
? JSON.stringify(property)
|
|
: `${property}`,
|
|
);
|
|
return formData;
|
|
}, new FormData()),
|
|
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
|
|
};
|
|
|
|
protected mergeRequestParams(
|
|
params1: RequestParams,
|
|
params2?: RequestParams,
|
|
): RequestParams {
|
|
return {
|
|
...this.baseApiParams,
|
|
...params1,
|
|
...(params2 || {}),
|
|
headers: {
|
|
...(this.baseApiParams.headers || {}),
|
|
...(params1.headers || {}),
|
|
...((params2 && params2.headers) || {}),
|
|
},
|
|
};
|
|
}
|
|
|
|
protected createAbortSignal = (
|
|
cancelToken: CancelToken,
|
|
): AbortSignal | undefined => {
|
|
if (this.abortControllers.has(cancelToken)) {
|
|
const abortController = this.abortControllers.get(cancelToken);
|
|
if (abortController) {
|
|
return abortController.signal;
|
|
}
|
|
return void 0;
|
|
}
|
|
|
|
const abortController = new AbortController();
|
|
this.abortControllers.set(cancelToken, abortController);
|
|
return abortController.signal;
|
|
};
|
|
|
|
public abortRequest = (cancelToken: CancelToken) => {
|
|
const abortController = this.abortControllers.get(cancelToken);
|
|
|
|
if (abortController) {
|
|
abortController.abort();
|
|
this.abortControllers.delete(cancelToken);
|
|
}
|
|
};
|
|
|
|
public request = async <T = any, E = any>({
|
|
body,
|
|
secure,
|
|
path,
|
|
type,
|
|
query,
|
|
format,
|
|
baseUrl,
|
|
cancelToken,
|
|
...params
|
|
}: FullRequestParams): Promise<HttpResponse<T, E>> => {
|
|
const secureParams =
|
|
((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
|
this.securityWorker &&
|
|
(await this.securityWorker(this.securityData))) ||
|
|
{};
|
|
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
const queryString = query && this.toQueryString(query);
|
|
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
const responseFormat = format || requestParams.format;
|
|
|
|
return this.customFetch(
|
|
`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
|
|
{
|
|
...requestParams,
|
|
headers: {
|
|
...(requestParams.headers || {}),
|
|
...(type && type !== ContentType.FormData
|
|
? { "Content-Type": type }
|
|
: {}),
|
|
},
|
|
signal:
|
|
(cancelToken
|
|
? this.createAbortSignal(cancelToken)
|
|
: requestParams.signal) || null,
|
|
body:
|
|
typeof body === "undefined" || body === null
|
|
? null
|
|
: payloadFormatter(body),
|
|
},
|
|
).then(async (response) => {
|
|
const r = response.clone() as HttpResponse<T, E>;
|
|
r.data = null as unknown as T;
|
|
r.error = null as unknown as E;
|
|
|
|
const data = !responseFormat
|
|
? r
|
|
: await response[responseFormat]()
|
|
.then((data) => {
|
|
if (r.ok) {
|
|
r.data = data;
|
|
} else {
|
|
r.error = data;
|
|
}
|
|
return r;
|
|
})
|
|
.catch((e) => {
|
|
r.error = e;
|
|
return r;
|
|
});
|
|
|
|
if (cancelToken) {
|
|
this.abortControllers.delete(cancelToken);
|
|
}
|
|
|
|
if (!response.ok) throw data;
|
|
return data;
|
|
});
|
|
};
|
|
}
|
|
|
|
/**
|
|
* @title Paxton API
|
|
* @version 6.8.2
|
|
* @baseUrl https://wp.koptilnya.xyz/wp-json
|
|
* @contact <wraker6@gmail.com>
|
|
*/
|
|
export class Api<
|
|
SecurityDataType extends unknown,
|
|
> extends HttpClient<SecurityDataType> {
|
|
wc = {
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceFeaturedList
|
|
* @request GET:/wc/v3/marketplace/featured
|
|
* @secure
|
|
*/
|
|
v3MarketplaceFeaturedList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/featured`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceRefreshCreate
|
|
* @request POST:/wc/v3/marketplace/refresh
|
|
* @secure
|
|
*/
|
|
v3MarketplaceRefreshCreate: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/refresh`,
|
|
method: "POST",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsList
|
|
* @request GET:/wc/v3/marketplace/subscriptions
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsConnectCreate
|
|
* @request POST:/wc/v3/marketplace/subscriptions/connect
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsConnectCreate: (
|
|
data: {
|
|
product_key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions/connect`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsActivatePluginCreate
|
|
* @request POST:/wc/v3/marketplace/subscriptions/activate-plugin
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsActivatePluginCreate: (
|
|
data: {
|
|
product_key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions/activate-plugin`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsDisconnectCreate
|
|
* @request POST:/wc/v3/marketplace/subscriptions/disconnect
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsDisconnectCreate: (
|
|
data: {
|
|
product_key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions/disconnect`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsActivateCreate
|
|
* @request POST:/wc/v3/marketplace/subscriptions/activate
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsActivateCreate: (
|
|
data: {
|
|
product_key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions/activate`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceSubscriptionsInstallUrlList
|
|
* @request GET:/wc/v3/marketplace/subscriptions/install-url
|
|
* @secure
|
|
*/
|
|
v3MarketplaceSubscriptionsInstallUrlList: (
|
|
query: {
|
|
product_key: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/subscriptions/install-url`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags marketplace
|
|
* @name V3MarketplaceCreateOrderCreate
|
|
* @request POST:/wc/v3/marketplace/create-order
|
|
* @secure
|
|
*/
|
|
v3MarketplaceCreateOrderCreate: (
|
|
data: {
|
|
product_id: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/marketplace/create-order`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsList
|
|
* @request GET:/wc/v3/products/brands
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsBrandsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsBrandsListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV3ProductsBrandsListParamsOrderbyEnum[];
|
|
/** Whether to hide resources not assigned to any products. */
|
|
hide_empty?: boolean;
|
|
/**
|
|
* Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/**
|
|
* Limit result set to resources assigned to a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/** Limit result set to resources with a specific slug. */
|
|
slug?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsCreate
|
|
* @request POST:/wc/v3/products/brands
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsCreate: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsDetail
|
|
* @request GET:/wc/v3/products/brands/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsBrandsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsCreate2
|
|
* @request POST:/wc/v3/products/brands/{id}
|
|
* @originalName v3ProductsBrandsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum1[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsUpdate
|
|
* @request PUT:/wc/v3/products/brands/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsBrandsUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsPartialUpdate
|
|
* @request PATCH:/wc/v3/products/brands/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsBrandsPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsDelete
|
|
* @request DELETE:/wc/v3/products/brands/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsBatchCreate
|
|
* @request POST:/wc/v3/products/brands/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsBatchCreate: (
|
|
data: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum2[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsBatchUpdate
|
|
* @request PUT:/wc/v3/products/brands/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsBatchUpdate: (
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsBrandsBatchUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBrandsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/brands/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBrandsBatchPartialUpdate: (
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsBrandsBatchPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/brands/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsList
|
|
* @request GET:/wc/v3/coupons
|
|
* @secure
|
|
*/
|
|
v3CouponsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3CouponsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3CouponsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3CouponsListParamsOrderbyEnum[];
|
|
/** Limit result set to resources with a specific code. */
|
|
code?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsCreate
|
|
* @request POST:/wc/v3/coupons
|
|
* @secure
|
|
*/
|
|
v3CouponsCreate: (
|
|
data: {
|
|
/** Coupon code. */
|
|
code: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IDiscountTypeEnum[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: null;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: null;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsDetail
|
|
* @request GET:/wc/v3/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v3CouponsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3CouponsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsCreate2
|
|
* @request POST:/wc/v3/coupons/{id}
|
|
* @originalName v3CouponsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3CouponsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IDiscountTypeEnum1[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: null;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: null;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsUpdate
|
|
* @request PUT:/wc/v3/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v3CouponsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IV3CouponsUpdateParamsDiscountTypeEnum[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: any;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: any;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsPartialUpdate
|
|
* @request PATCH:/wc/v3/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v3CouponsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IV3CouponsPartialUpdateParamsDiscountTypeEnum[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: any;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: any;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsDelete
|
|
* @request DELETE:/wc/v3/coupons/{id}
|
|
* @secure
|
|
*/
|
|
v3CouponsDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsBatchCreate
|
|
* @request POST:/wc/v3/coupons/batch
|
|
* @secure
|
|
*/
|
|
v3CouponsBatchCreate: (
|
|
data: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IDiscountTypeEnum2[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: null;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: null;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsBatchUpdate
|
|
* @request PUT:/wc/v3/coupons/batch
|
|
* @secure
|
|
*/
|
|
v3CouponsBatchUpdate: (
|
|
query?: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IV3CouponsBatchUpdateParamsDiscountTypeEnum[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: any;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: any;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags coupons
|
|
* @name V3CouponsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/coupons/batch
|
|
* @secure
|
|
*/
|
|
v3CouponsBatchPartialUpdate: (
|
|
query?: {
|
|
/** Coupon code. */
|
|
code?: string;
|
|
/** The amount of discount. Should always be numeric, even if setting a percentage. */
|
|
amount?: string;
|
|
/** The status of the coupon. Should always be draft, published, or pending review */
|
|
status?: string;
|
|
/** Determines the type of discount that will be applied. */
|
|
discount_type?: IV3CouponsBatchPartialUpdateParamsDiscountTypeEnum[];
|
|
/** Coupon description. */
|
|
description?: string;
|
|
/** The date the coupon expires, in the site's timezone. */
|
|
date_expires?: any;
|
|
/** The date the coupon expires, as GMT. */
|
|
date_expires_gmt?: any;
|
|
/** If true, the coupon can only be used individually. Other applied coupons will be removed from the cart. */
|
|
individual_use?: boolean;
|
|
/** List of product IDs the coupon can be used on. */
|
|
product_ids?: number[];
|
|
/** List of product IDs the coupon cannot be used on. */
|
|
excluded_product_ids?: number[];
|
|
/**
|
|
* How many times the coupon can be used in total.
|
|
* @format int64
|
|
*/
|
|
usage_limit?: number;
|
|
/**
|
|
* How many times the coupon can be used per customer.
|
|
* @format int64
|
|
*/
|
|
usage_limit_per_user?: number;
|
|
/**
|
|
* Max number of items in the cart the coupon can be applied to.
|
|
* @format int64
|
|
*/
|
|
limit_usage_to_x_items?: number;
|
|
/** If true and if the free shipping method requires a coupon, this coupon will enable free shipping. */
|
|
free_shipping?: boolean;
|
|
/** List of category IDs the coupon applies to. */
|
|
product_categories?: number[];
|
|
/** List of category IDs the coupon does not apply to. */
|
|
excluded_product_categories?: number[];
|
|
/** If true, this coupon will not be applied to items that have sale prices. */
|
|
exclude_sale_items?: boolean;
|
|
/** Minimum order amount that needs to be in the cart before coupon applies. */
|
|
minimum_amount?: string;
|
|
/** Maximum order amount allowed when using the coupon. */
|
|
maximum_amount?: string;
|
|
/** List of email addresses that can use this coupon. */
|
|
email_restrictions?: string[];
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/coupons/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersDownloadsList
|
|
* @request GET:/wc/v3/customers/{customer_id}/downloads
|
|
* @secure
|
|
*/
|
|
v3CustomersDownloadsList: (
|
|
customerId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3CustomersDownloadsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${customerId}/downloads`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersList
|
|
* @request GET:/wc/v3/customers
|
|
* @secure
|
|
*/
|
|
v3CustomersList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3CustomersListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific IDs. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3CustomersListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3CustomersListParamsOrderbyEnum[];
|
|
/**
|
|
* Limit result set to resources with a specific email.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Limit result set to resources with a specific role. */
|
|
role?: IV3CustomersListParamsRoleEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersCreate
|
|
* @request POST:/wc/v3/customers
|
|
* @secure
|
|
*/
|
|
v3CustomersCreate: (
|
|
data: {
|
|
/** New user email address. */
|
|
email: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** New user username. */
|
|
username?: string;
|
|
/** New user password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersDetail
|
|
* @request GET:/wc/v3/customers/{id}
|
|
* @secure
|
|
*/
|
|
v3CustomersDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3CustomersDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersCreate2
|
|
* @request POST:/wc/v3/customers/{id}
|
|
* @originalName v3CustomersCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3CustomersCreate2: (
|
|
id: number,
|
|
data: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersUpdate
|
|
* @request PUT:/wc/v3/customers/{id}
|
|
* @secure
|
|
*/
|
|
v3CustomersUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersPartialUpdate
|
|
* @request PATCH:/wc/v3/customers/{id}
|
|
* @secure
|
|
*/
|
|
v3CustomersPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersDelete
|
|
* @request DELETE:/wc/v3/customers/{id}
|
|
* @secure
|
|
*/
|
|
v3CustomersDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
/**
|
|
* ID to reassign posts to.
|
|
* @format int64
|
|
*/
|
|
reassign?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersBatchCreate
|
|
* @request POST:/wc/v3/customers/batch
|
|
* @secure
|
|
*/
|
|
v3CustomersBatchCreate: (
|
|
data: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersBatchUpdate
|
|
* @request PUT:/wc/v3/customers/batch
|
|
* @secure
|
|
*/
|
|
v3CustomersBatchUpdate: (
|
|
query?: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags customers
|
|
* @name V3CustomersBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/customers/batch
|
|
* @secure
|
|
*/
|
|
v3CustomersBatchPartialUpdate: (
|
|
query?: {
|
|
/**
|
|
* The email address for the customer.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Customer first name. */
|
|
first_name?: string;
|
|
/** Customer last name. */
|
|
last_name?: string;
|
|
/** Customer login name. */
|
|
username?: string;
|
|
/** Customer password. */
|
|
password?: string;
|
|
/** List of billing address data. */
|
|
billing?: string;
|
|
/** List of shipping address data. */
|
|
shipping?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/customers/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags layout-templates
|
|
* @name V3LayoutTemplatesList
|
|
* @request GET:/wc/v3/layout-templates
|
|
* @secure
|
|
*/
|
|
v3LayoutTemplatesList: (
|
|
query?: {
|
|
/** Area to get templates for. */
|
|
area?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/layout-templates`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags layout-templates
|
|
* @name V3LayoutTemplatesDetail
|
|
* @request GET:/wc/v3/layout-templates/{id}
|
|
* @secure
|
|
*/
|
|
v3LayoutTemplatesDetail: (id: string, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/layout-templates/${id}`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersNotesList
|
|
* @request GET:/wc/v3/orders/{order_id}/notes
|
|
* @secure
|
|
*/
|
|
v3OrdersNotesList: (
|
|
orderId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3OrdersNotesListParamsContextEnum[];
|
|
/** Limit result to customers or internal notes. */
|
|
type?: IV3OrdersNotesListParamsTypeEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}/notes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersNotesCreate
|
|
* @request POST:/wc/v3/orders/{order_id}/notes
|
|
* @secure
|
|
*/
|
|
v3OrdersNotesCreate: (
|
|
orderId: number,
|
|
data: {
|
|
/** Order note content. */
|
|
note: string;
|
|
/** If true, the note will be shown to customers and they will be notified. If false, the note will be for admin reference only. */
|
|
customer_note?: boolean;
|
|
/** If true, this note will be attributed to the current user. If false, the note will be attributed to the system. */
|
|
added_by_user?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}/notes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersDetail
|
|
* @request GET:/wc/v3/orders/{order_id}
|
|
* @secure
|
|
*/
|
|
v3OrdersDetail: (
|
|
orderId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3OrdersDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersDelete
|
|
* @request DELETE:/wc/v3/orders/{order_id}
|
|
* @secure
|
|
*/
|
|
v3OrdersDelete: (
|
|
orderId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersRefundsList
|
|
* @request GET:/wc/v3/orders/{order_id}/refunds
|
|
* @secure
|
|
*/
|
|
v3OrdersRefundsList: (
|
|
orderId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3OrdersRefundsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3OrdersRefundsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3OrdersRefundsListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/**
|
|
* Number of decimal points to use in each resource.
|
|
* @format int64
|
|
*/
|
|
dp?: number;
|
|
/** Only show meta which is meant to be displayed for an order. */
|
|
order_item_display_meta?: boolean;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}/refunds`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersRefundsCreate
|
|
* @request POST:/wc/v3/orders/{order_id}/refunds
|
|
* @secure
|
|
*/
|
|
v3OrdersRefundsCreate: (
|
|
orderId: number,
|
|
data: {
|
|
/** Refund amount. */
|
|
amount?: string;
|
|
/** Reason for refund. */
|
|
reason?: string;
|
|
/**
|
|
* User ID of user who created the refund.
|
|
* @format int64
|
|
*/
|
|
refunded_by?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** When true, the payment gateway API is used to generate the refund. */
|
|
api_refund?: boolean;
|
|
/** When true, refunded items are restocked. */
|
|
api_restock?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${orderId}/refunds`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersList
|
|
* @request GET:/wc/v3/orders
|
|
* @secure
|
|
*/
|
|
v3OrdersList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3OrdersListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3OrdersListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3OrdersListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/** Limit result set to orders which have specific statuses. */
|
|
status?: string[];
|
|
/**
|
|
* Limit result set to orders assigned a specific customer.
|
|
* @format int64
|
|
*/
|
|
customer?: number;
|
|
/**
|
|
* Limit result set to orders assigned a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/**
|
|
* Number of decimal points to use in each resource.
|
|
* @format int64
|
|
*/
|
|
dp?: number;
|
|
/** Only show meta which is meant to be displayed for an order. */
|
|
order_item_display_meta?: boolean;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
/** Limit result set to orders created via specific sources (e.g. checkout, admin). */
|
|
created_via?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersCreate
|
|
* @request POST:/wc/v3/orders
|
|
* @secure
|
|
*/
|
|
v3OrdersCreate: (
|
|
data: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IStatusEnum[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: ICurrencyEnum[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.Json,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersDetail2
|
|
* @request GET:/wc/v3/orders/{id}
|
|
* @originalName v3OrdersDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3OrdersDetail2: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3OrdersDetail2ParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersCreate2
|
|
* @request POST:/wc/v3/orders/{id}
|
|
* @originalName v3OrdersCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3OrdersCreate2: (
|
|
id: number,
|
|
data: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IStatusEnum1[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: ICurrencyEnum1[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersUpdate
|
|
* @request PUT:/wc/v3/orders/{id}
|
|
* @secure
|
|
*/
|
|
v3OrdersUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IV3OrdersUpdateParamsStatusEnum[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: IV3OrdersUpdateParamsCurrencyEnum[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersPartialUpdate
|
|
* @request PATCH:/wc/v3/orders/{id}
|
|
* @secure
|
|
*/
|
|
v3OrdersPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IV3OrdersPartialUpdateParamsStatusEnum[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: IV3OrdersPartialUpdateParamsCurrencyEnum[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersDelete2
|
|
* @request DELETE:/wc/v3/orders/{id}
|
|
* @originalName v3OrdersDelete
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3OrdersDelete2: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersBatchCreate
|
|
* @request POST:/wc/v3/orders/batch
|
|
* @secure
|
|
*/
|
|
v3OrdersBatchCreate: (
|
|
data: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IStatusEnum2[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: ICurrencyEnum2[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersBatchUpdate
|
|
* @request PUT:/wc/v3/orders/batch
|
|
* @secure
|
|
*/
|
|
v3OrdersBatchUpdate: (
|
|
query?: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IV3OrdersBatchUpdateParamsStatusEnum[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: IV3OrdersBatchUpdateParamsCurrencyEnum[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/orders/batch
|
|
* @secure
|
|
*/
|
|
v3OrdersBatchPartialUpdate: (
|
|
query?: {
|
|
/**
|
|
* Parent order ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Shows where the order was created. */
|
|
created_via?: string;
|
|
/** Order status. */
|
|
status?: IV3OrdersBatchPartialUpdateParamsStatusEnum[];
|
|
/** Currency the order was created with, in ISO format. */
|
|
currency?: IV3OrdersBatchPartialUpdateParamsCurrencyEnum[];
|
|
/**
|
|
* User ID who owns the order. 0 for guests.
|
|
* @format int64
|
|
*/
|
|
customer_id?: number;
|
|
/** Note left by customer during checkout. */
|
|
customer_note?: string;
|
|
/** Billing address. */
|
|
billing?: string;
|
|
/** Shipping address. */
|
|
shipping?: string;
|
|
/** Payment method ID. */
|
|
payment_method?: string;
|
|
/** Payment method title. */
|
|
payment_method_title?: string;
|
|
/** Unique transaction ID. */
|
|
transaction_id?: string;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
/** Line items data. */
|
|
line_items?: object[];
|
|
/** Shipping lines data. */
|
|
shipping_lines?: object[];
|
|
/** Fee lines data. */
|
|
fee_lines?: object[];
|
|
/** Coupons line data. */
|
|
coupon_lines?: object[];
|
|
/** Define if the order is paid. It will set the status to processing and reduce stock items. */
|
|
set_paid?: boolean;
|
|
/** Set the action as manual so that the order note registers as "added by user". */
|
|
manual_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesTermsList
|
|
* @request GET:/wc/v3/products/attributes/{attribute_id}/terms
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesTermsList: (
|
|
attributeId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsAttributesTermsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsAttributesTermsListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV3ProductsAttributesTermsListParamsOrderbyEnum[];
|
|
/** Whether to hide resources not assigned to any products. */
|
|
hide_empty?: boolean;
|
|
/**
|
|
* Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/**
|
|
* Limit result set to resources assigned to a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/** Limit result set to resources with a specific slug. */
|
|
slug?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}/terms`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesTermsCreate
|
|
* @request POST:/wc/v3/products/attributes/{attribute_id}/terms
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesTermsCreate: (
|
|
attributeId: number,
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}/terms`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesDetail
|
|
* @request GET:/wc/v3/products/attributes/{attribute_id}
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesDetail: (
|
|
attributeId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsAttributesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesCreate
|
|
* @request POST:/wc/v3/products/attributes/{attribute_id}
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesCreate: (
|
|
attributeId: number,
|
|
data: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesUpdate
|
|
* @request PUT:/wc/v3/products/attributes/{attribute_id}
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesUpdate: (
|
|
attributeId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesPartialUpdate
|
|
* @request PATCH:/wc/v3/products/attributes/{attribute_id}
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesPartialUpdate: (
|
|
attributeId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesDelete
|
|
* @request DELETE:/wc/v3/products/attributes/{attribute_id}
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesDelete: (
|
|
attributeId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the resource.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesTermsBatchCreate
|
|
* @request POST:/wc/v3/products/attributes/{attribute_id}/terms/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesTermsBatchCreate: (
|
|
attributeId: number,
|
|
data: {
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}/terms/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesTermsBatchUpdate
|
|
* @request PUT:/wc/v3/products/attributes/{attribute_id}/terms/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesTermsBatchUpdate: (
|
|
attributeId: number,
|
|
query?: {
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}/terms/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesTermsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/attributes/{attribute_id}/terms/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesTermsBatchPartialUpdate: (
|
|
attributeId: number,
|
|
query?: {
|
|
/** Term name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${attributeId}/terms/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesList
|
|
* @request GET:/wc/v3/products/attributes
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsAttributesListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesCreate2
|
|
* @request POST:/wc/v3/products/attributes
|
|
* @originalName v3ProductsAttributesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesCreate2: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: ITypeEnum[];
|
|
/** Default sort order. */
|
|
order_by?: IOrderByEnum[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesDetail2
|
|
* @request GET:/wc/v3/products/attributes/{id}
|
|
* @originalName v3ProductsAttributesDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesDetail2: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsAttributesDetail2ParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesCreate3
|
|
* @request POST:/wc/v3/products/attributes/{id}
|
|
* @originalName v3ProductsAttributesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesCreate3: (
|
|
id: number,
|
|
data: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: ITypeEnum1[];
|
|
/** Default sort order. */
|
|
order_by?: IOrderByEnum1[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesUpdate2
|
|
* @request PUT:/wc/v3/products/attributes/{id}
|
|
* @originalName v3ProductsAttributesUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesUpdate2: (
|
|
id: number,
|
|
query?: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: IV3ProductsAttributesUpdate2ParamsTypeEnum[];
|
|
/** Default sort order. */
|
|
order_by?: IV3ProductsAttributesUpdate2ParamsOrderByEnum[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesPartialUpdate2
|
|
* @request PATCH:/wc/v3/products/attributes/{id}
|
|
* @originalName v3ProductsAttributesPartialUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesPartialUpdate2: (
|
|
id: number,
|
|
query?: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: IV3ProductsAttributesPartialUpdate2ParamsTypeEnum[];
|
|
/** Default sort order. */
|
|
order_by?: IV3ProductsAttributesPartialUpdate2ParamsOrderByEnum[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesDelete2
|
|
* @request DELETE:/wc/v3/products/attributes/{id}
|
|
* @originalName v3ProductsAttributesDelete
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesDelete2: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesBatchCreate
|
|
* @request POST:/wc/v3/products/attributes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesBatchCreate: (
|
|
data: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: ITypeEnum2[];
|
|
/** Default sort order. */
|
|
order_by?: IOrderByEnum2[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesBatchUpdate
|
|
* @request PUT:/wc/v3/products/attributes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesBatchUpdate: (
|
|
query?: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: IV3ProductsAttributesBatchUpdateParamsTypeEnum[];
|
|
/** Default sort order. */
|
|
order_by?: IV3ProductsAttributesBatchUpdateParamsOrderByEnum[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsAttributesBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/attributes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsAttributesBatchPartialUpdate: (
|
|
query?: {
|
|
/** Attribute name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** Type of attribute. */
|
|
type?: IV3ProductsAttributesBatchPartialUpdateParamsTypeEnum[];
|
|
/** Default sort order. */
|
|
order_by?: IV3ProductsAttributesBatchPartialUpdateParamsOrderByEnum[];
|
|
/** Enable/Disable attribute archives. */
|
|
has_archives?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/attributes/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesList
|
|
* @request GET:/wc/v3/products/categories
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsCategoriesListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsCategoriesListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV3ProductsCategoriesListParamsOrderbyEnum[];
|
|
/** Whether to hide resources not assigned to any products. */
|
|
hide_empty?: boolean;
|
|
/**
|
|
* Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/**
|
|
* Limit result set to resources assigned to a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/** Limit result set to resources with a specific slug. */
|
|
slug?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesCreate
|
|
* @request POST:/wc/v3/products/categories
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesCreate: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum3[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesDetail
|
|
* @request GET:/wc/v3/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsCategoriesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesCreate2
|
|
* @request POST:/wc/v3/products/categories/{id}
|
|
* @originalName v3ProductsCategoriesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum4[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesUpdate
|
|
* @request PUT:/wc/v3/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsCategoriesUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesPartialUpdate
|
|
* @request PATCH:/wc/v3/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsCategoriesPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesDelete
|
|
* @request DELETE:/wc/v3/products/categories/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesBatchCreate
|
|
* @request POST:/wc/v3/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesBatchCreate: (
|
|
data: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IDisplayEnum5[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesBatchUpdate
|
|
* @request PUT:/wc/v3/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesBatchUpdate: (
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsCategoriesBatchUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCategoriesBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/categories/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsCategoriesBatchPartialUpdate: (
|
|
query?: {
|
|
/** Category name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/**
|
|
* The ID for the parent of the resource.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
/** Category archive display type. */
|
|
display?: IV3ProductsCategoriesBatchPartialUpdateParamsDisplayEnum[];
|
|
/** Image data. */
|
|
image?: string;
|
|
/**
|
|
* Menu order, used to custom sort the resource.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/categories/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCustomFieldsNamesList
|
|
* @request GET:/wc/v3/products/custom-fields/names
|
|
* @secure
|
|
*/
|
|
v3ProductsCustomFieldsNamesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: string;
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Order sort items ascending or descending. */
|
|
order?: IV3ProductsCustomFieldsNamesListParamsOrderEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/custom-fields/names`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsList
|
|
* @request GET:/wc/v3/products/reviews
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsReviewsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to reviews published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific IDs. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsReviewsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3ProductsReviewsListParamsOrderbyEnum[];
|
|
/** Limit result set to reviews assigned to specific user IDs. */
|
|
reviewer?: number[];
|
|
/** Ensure result set excludes reviews assigned to specific user IDs. */
|
|
reviewer_exclude?: number[];
|
|
/**
|
|
* Limit result set to that from a specific author email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** Limit result set to reviews assigned to specific product IDs. */
|
|
product?: number[];
|
|
/** Limit result set to reviews assigned a specific status. */
|
|
status?: IV3ProductsReviewsListParamsStatusEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsCreate
|
|
* @request POST:/wc/v3/products/reviews
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsCreate: (
|
|
data: {
|
|
/**
|
|
* Unique identifier for the product.
|
|
* @format int64
|
|
*/
|
|
product_id: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IStatusEnum3[];
|
|
/** Name of the reviewer. */
|
|
reviewer: string;
|
|
/** Email of the reviewer. */
|
|
reviewer_email: string;
|
|
/** Review content. */
|
|
review: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsDetail
|
|
* @request GET:/wc/v3/products/reviews/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsReviewsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsCreate2
|
|
* @request POST:/wc/v3/products/reviews/{id}
|
|
* @originalName v3ProductsReviewsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IStatusEnum4[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsUpdate
|
|
* @request PUT:/wc/v3/products/reviews/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IV3ProductsReviewsUpdateParamsStatusEnum[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsPartialUpdate
|
|
* @request PATCH:/wc/v3/products/reviews/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IV3ProductsReviewsPartialUpdateParamsStatusEnum[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsDelete
|
|
* @request DELETE:/wc/v3/products/reviews/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsBatchCreate
|
|
* @request POST:/wc/v3/products/reviews/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsBatchCreate: (
|
|
data: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IStatusEnum5[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsBatchUpdate
|
|
* @request PUT:/wc/v3/products/reviews/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsBatchUpdate: (
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IV3ProductsReviewsBatchUpdateParamsStatusEnum[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsReviewsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/reviews/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsReviewsBatchPartialUpdate: (
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the product that the review belongs to.
|
|
* @format int64
|
|
*/
|
|
product_id?: number;
|
|
/** Product name. */
|
|
product_name?: string;
|
|
/** Status of the review. */
|
|
status?: IV3ProductsReviewsBatchPartialUpdateParamsStatusEnum[];
|
|
/** Reviewer name. */
|
|
reviewer?: string;
|
|
/**
|
|
* Reviewer email.
|
|
* @format email
|
|
*/
|
|
reviewer_email?: string;
|
|
/** The content of the review. */
|
|
review?: string;
|
|
/**
|
|
* Review rating (0 to 5).
|
|
* @format int64
|
|
*/
|
|
rating?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/reviews/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesList
|
|
* @request GET:/wc/v3/products/shipping_classes
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsShippingClassesListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsShippingClassesListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV3ProductsShippingClassesListParamsOrderbyEnum[];
|
|
/** Whether to hide resources not assigned to any products. */
|
|
hide_empty?: boolean;
|
|
/**
|
|
* Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/**
|
|
* Limit result set to resources assigned to a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/** Limit result set to resources with a specific slug. */
|
|
slug?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesCreate
|
|
* @request POST:/wc/v3/products/shipping_classes
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesCreate: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesDetail
|
|
* @request GET:/wc/v3/products/shipping_classes/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsShippingClassesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesCreate2
|
|
* @request POST:/wc/v3/products/shipping_classes/{id}
|
|
* @originalName v3ProductsShippingClassesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesUpdate
|
|
* @request PUT:/wc/v3/products/shipping_classes/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesPartialUpdate
|
|
* @request PATCH:/wc/v3/products/shipping_classes/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesDelete
|
|
* @request DELETE:/wc/v3/products/shipping_classes/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesBatchCreate
|
|
* @request POST:/wc/v3/products/shipping_classes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesBatchCreate: (
|
|
data: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesBatchUpdate
|
|
* @request PUT:/wc/v3/products/shipping_classes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesBatchUpdate: (
|
|
query?: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/shipping_classes/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesBatchPartialUpdate: (
|
|
query?: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsShippingClassesSlugSuggestionList
|
|
* @request GET:/wc/v3/products/shipping_classes/slug-suggestion
|
|
* @secure
|
|
*/
|
|
v3ProductsShippingClassesSlugSuggestionList: (
|
|
query?: {
|
|
/** Shipping class name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/shipping_classes/slug-suggestion`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsList
|
|
* @request GET:/wc/v3/products/tags
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsTagsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsTagsListParamsOrderEnum[];
|
|
/** Sort collection by resource attribute. */
|
|
orderby?: IV3ProductsTagsListParamsOrderbyEnum[];
|
|
/** Whether to hide resources not assigned to any products. */
|
|
hide_empty?: boolean;
|
|
/**
|
|
* Limit result set to resources assigned to a specific parent. Applies to hierarchical taxonomies only.
|
|
* @format int64
|
|
*/
|
|
parent?: number;
|
|
/**
|
|
* Limit result set to resources assigned to a specific product.
|
|
* @format int64
|
|
*/
|
|
product?: number;
|
|
/** Limit result set to resources with a specific slug. */
|
|
slug?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsCreate
|
|
* @request POST:/wc/v3/products/tags
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsCreate: (
|
|
data: {
|
|
/** Name for the resource. */
|
|
name: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsDetail
|
|
* @request GET:/wc/v3/products/tags/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsTagsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsCreate2
|
|
* @request POST:/wc/v3/products/tags/{id}
|
|
* @originalName v3ProductsTagsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsUpdate
|
|
* @request PUT:/wc/v3/products/tags/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsPartialUpdate
|
|
* @request PATCH:/wc/v3/products/tags/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsDelete
|
|
* @request DELETE:/wc/v3/products/tags/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsBatchCreate
|
|
* @request POST:/wc/v3/products/tags/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsBatchCreate: (
|
|
data: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsBatchUpdate
|
|
* @request PUT:/wc/v3/products/tags/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsBatchUpdate: (
|
|
query?: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsTagsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/tags/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsTagsBatchPartialUpdate: (
|
|
query?: {
|
|
/** Tag name. */
|
|
name?: string;
|
|
/** An alphanumeric identifier for the resource unique to its type. */
|
|
slug?: string;
|
|
/** HTML description of the resource. */
|
|
description?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/tags/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsList
|
|
* @request GET:/wc/v3/products
|
|
* @secure
|
|
*/
|
|
v3ProductsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3ProductsListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/** Limit result set to products assigned a specific brand ID. */
|
|
brand?: string;
|
|
/** Limit result set to products with a specific slug. */
|
|
slug?: string;
|
|
/** Limit result set to products assigned a specific status. */
|
|
status?: IV3ProductsListParamsStatusEnum[];
|
|
/** Limit result set to products assigned a specific type. */
|
|
type?: IV3ProductsListParamsTypeEnum[];
|
|
/** Limit result set to products with specific SKU(s). Use commas to separate. */
|
|
sku?: string;
|
|
/** Limit result set to featured products. */
|
|
featured?: boolean;
|
|
/** Limit result set to products assigned a specific category ID. */
|
|
category?: string;
|
|
/** Limit result set to products assigned a specific tag ID. */
|
|
tag?: string;
|
|
/** Limit result set to products assigned a specific shipping class ID. */
|
|
shipping_class?: string;
|
|
/** Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug. */
|
|
attribute?: string;
|
|
/** Limit result set to products with a specific attribute term ID (required an assigned attribute). */
|
|
attribute_term?: string;
|
|
/** Limit result set to products on sale. */
|
|
on_sale?: boolean;
|
|
/** Limit result set to products based on a minimum price. */
|
|
min_price?: string;
|
|
/** Limit result set to products based on a maximum price. */
|
|
max_price?: string;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
/** Limit result set to products with specified stock status. */
|
|
stock_status?: IV3ProductsListParamsStockStatusEnum[];
|
|
/** Limit results to those with a SKU that partial matches a string. This argument takes precedence over 'sku'. */
|
|
search_sku?: string;
|
|
/** Limit results to those with a name or SKU that partial matches a string. This argument takes precedence over 'search', 'sku' and 'search_sku'. */
|
|
search_name_or_sku?: string;
|
|
/** Limit result set to products with any of the statuses. */
|
|
include_status?: string[];
|
|
/** Exclude products with any of the statuses from result set. */
|
|
exclude_status?: string[];
|
|
/** Limit result set to products with any of the types. */
|
|
include_types?: string[];
|
|
/** Exclude products with any of the types from result set. */
|
|
exclude_types?: string[];
|
|
/** Limit result set to downloadable products. */
|
|
downloadable?: boolean;
|
|
/** Limit result set to virtual products. */
|
|
virtual?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCreate
|
|
* @request POST:/wc/v3/products
|
|
* @secure
|
|
*/
|
|
v3ProductsCreate: (
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: null;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: null;
|
|
/** Product type. */
|
|
type?: ITypeEnum3[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum6[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsDetail
|
|
* @request GET:/wc/v3/products/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCreate2
|
|
* @request POST:/wc/v3/products/{id}
|
|
* @originalName v3ProductsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: null;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: null;
|
|
/** Product type. */
|
|
type?: ITypeEnum4[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum7[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum1[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum1[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum1[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum1[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsUpdate
|
|
* @request PUT:/wc/v3/products/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: any;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: any;
|
|
/** Product type. */
|
|
type?: IV3ProductsUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV3ProductsUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV3ProductsUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsPartialUpdate
|
|
* @request PATCH:/wc/v3/products/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: any;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: any;
|
|
/** Product type. */
|
|
type?: IV3ProductsPartialUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV3ProductsPartialUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV3ProductsPartialUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsPartialUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsPartialUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsPartialUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsDelete
|
|
* @request DELETE:/wc/v3/products/{id}
|
|
* @secure
|
|
*/
|
|
v3ProductsDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBatchCreate
|
|
* @request POST:/wc/v3/products/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBatchCreate: (
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: null;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: null;
|
|
/** Product type. */
|
|
type?: ITypeEnum5[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum8[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum2[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum2[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum2[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum2[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBatchUpdate
|
|
* @request PUT:/wc/v3/products/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBatchUpdate: (
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: any;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: any;
|
|
/** Product type. */
|
|
type?: IV3ProductsBatchUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV3ProductsBatchUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV3ProductsBatchUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsBatchUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsBatchUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsBatchUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsBatchPartialUpdate: (
|
|
query?: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: any;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: any;
|
|
/** Product type. */
|
|
type?: IV3ProductsBatchPartialUpdateParamsTypeEnum[];
|
|
/** Product status (post status). */
|
|
status?: IV3ProductsBatchPartialUpdateParamsStatusEnum[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: IV3ProductsBatchPartialUpdateParamsCatalogVisibilityEnum[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsBatchPartialUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsBatchPartialUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsBatchPartialUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsSuggestedProductsList
|
|
* @request GET:/wc/v3/products/suggested-products
|
|
* @secure
|
|
*/
|
|
v3ProductsSuggestedProductsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsSuggestedProductsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsSuggestedProductsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3ProductsSuggestedProductsListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/** Limit result set to products assigned a specific brand ID. */
|
|
brand?: string;
|
|
/** Limit result set to products with a specific slug. */
|
|
slug?: string;
|
|
/** Limit result set to products assigned a specific status. */
|
|
status?: IV3ProductsSuggestedProductsListParamsStatusEnum[];
|
|
/** Limit result set to products assigned a specific type. */
|
|
type?: IV3ProductsSuggestedProductsListParamsTypeEnum[];
|
|
/** Limit result set to products with specific SKU(s). Use commas to separate. */
|
|
sku?: string;
|
|
/** Limit result set to featured products. */
|
|
featured?: boolean;
|
|
/** Limit result set to products assigned a specific category ID. */
|
|
category?: string;
|
|
/** Limit result set to products assigned a specific tag ID. */
|
|
tag?: string;
|
|
/** Limit result set to products assigned a specific shipping class ID. */
|
|
shipping_class?: string;
|
|
/** Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug. */
|
|
attribute?: string;
|
|
/** Limit result set to products with a specific attribute term ID (required an assigned attribute). */
|
|
attribute_term?: string;
|
|
/** Limit result set to products in stock or out of stock. */
|
|
in_stock?: boolean;
|
|
/** Limit result set to products on sale. */
|
|
on_sale?: boolean;
|
|
/** Limit result set to products based on a minimum price. */
|
|
min_price?: string;
|
|
/** Limit result set to products based on a maximum price. */
|
|
max_price?: string;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
/** Limit result set to specific product categorie ids. */
|
|
categories?: number[];
|
|
/** Limit result set to specific product tag ids. */
|
|
tags?: number[];
|
|
/**
|
|
* Limit result set to specific amount of suggested products.
|
|
* @format int64
|
|
*/
|
|
limit?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/suggested-products`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsDuplicateCreate
|
|
* @request POST:/wc/v3/products/{id}/duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsDuplicateCreate: (
|
|
id: number,
|
|
data: {
|
|
/** Product name. */
|
|
name?: string;
|
|
/** Product slug. */
|
|
slug?: string;
|
|
/** The date the product was created, in the site's timezone. */
|
|
date_created?: null;
|
|
/** The date the product was created, as GMT. */
|
|
date_created_gmt?: null;
|
|
/** Product type. */
|
|
type?: ITypeEnum6[];
|
|
/** Product status (post status). */
|
|
status?: IStatusEnum9[];
|
|
/** Featured product. */
|
|
featured?: boolean;
|
|
/** Catalog visibility. */
|
|
catalog_visibility?: ICatalogVisibilityEnum3[];
|
|
/** Product description. */
|
|
description?: string;
|
|
/** Product short description. */
|
|
short_description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Product regular price. */
|
|
regular_price?: string;
|
|
/** Product sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** If the product is virtual. */
|
|
virtual?: boolean;
|
|
/** If the product is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/**
|
|
* Product external URL. Only for external products.
|
|
* @format uri
|
|
*/
|
|
external_url?: string;
|
|
/** Product external button text. Only for external products. */
|
|
button_text?: string;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum3[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at product level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum3[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum3[];
|
|
/** Low Stock amount for the product. */
|
|
low_stock_amount?: number;
|
|
/** Allow one item to be bought in a single order. */
|
|
sold_individually?: boolean;
|
|
/** Product weight (kg). */
|
|
weight?: string;
|
|
/** Product dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Allow reviews. */
|
|
reviews_allowed?: boolean;
|
|
/** Post password. */
|
|
post_password?: string;
|
|
/** List of up-sell products IDs. */
|
|
upsell_ids?: number[];
|
|
/** List of cross-sell products IDs. */
|
|
cross_sell_ids?: number[];
|
|
/**
|
|
* Product parent ID.
|
|
* @format int64
|
|
*/
|
|
parent_id?: number;
|
|
/** Optional note to send the customer after purchase. */
|
|
purchase_note?: string;
|
|
/** List of categories. */
|
|
categories?: object[];
|
|
/** List of brands. */
|
|
brands?: object[];
|
|
/** List of tags. */
|
|
tags?: object[];
|
|
/** List of images. */
|
|
images?: object[];
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/** Defaults variation attributes. */
|
|
default_attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${id}/duplicate`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsList
|
|
* @request GET:/wc/v3/products/{product_id}/variations
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsList: (
|
|
productId: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsVariationsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3ProductsVariationsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3ProductsVariationsListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/** Limit result set to products with a specific slug. */
|
|
slug?: string;
|
|
/** Limit result set to products assigned a specific status. */
|
|
status?: IV3ProductsVariationsListParamsStatusEnum[];
|
|
/** Limit result set to products with specific SKU(s). Use commas to separate. */
|
|
sku?: string;
|
|
/** Limit result set to products on sale. */
|
|
on_sale?: boolean;
|
|
/** Limit result set to products based on a minimum price. */
|
|
min_price?: string;
|
|
/** Limit result set to products based on a maximum price. */
|
|
max_price?: string;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
/** Limit result set to products with specified stock status. */
|
|
stock_status?: IV3ProductsVariationsListParamsStockStatusEnum[];
|
|
/** Limit result set to products with or without price. */
|
|
has_price?: boolean;
|
|
/** Limit result set to products with specified attributes. */
|
|
attributes?: object[];
|
|
/** Limit result set to virtual product variations. */
|
|
virtual?: boolean;
|
|
/** Limit result set to downloadable product variations. */
|
|
downloadable?: boolean;
|
|
/** Limit result set to product variations with any of the statuses. */
|
|
include_status?: string[];
|
|
/** Exclude product variations with any of the statuses from result set. */
|
|
exclude_status?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsCreate
|
|
* @request POST:/wc/v3/products/{product_id}/variations
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsCreate: (
|
|
productId: number,
|
|
data: {
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** Variation status. */
|
|
status?: IStatusEnum10[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum4[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum4[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum4[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsDetail2
|
|
* @request GET:/wc/v3/products/{product_id}
|
|
* @originalName v3ProductsDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsDetail2: (
|
|
productId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the variation.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ProductsDetail2ParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsCreate3
|
|
* @request POST:/wc/v3/products/{product_id}
|
|
* @originalName v3ProductsCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsCreate3: (
|
|
productId: number,
|
|
data: {
|
|
/**
|
|
* Unique identifier for the variation.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** Variation status. */
|
|
status?: IStatusEnum11[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum5[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum5[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum5[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsUpdate2
|
|
* @request PUT:/wc/v3/products/{product_id}
|
|
* @originalName v3ProductsUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsUpdate2: (
|
|
productId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the variation.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** Variation status. */
|
|
status?: IV3ProductsUpdate2ParamsStatusEnum[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsUpdate2ParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsUpdate2ParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsUpdate2ParamsBackordersEnum[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsPartialUpdate2
|
|
* @request PATCH:/wc/v3/products/{product_id}
|
|
* @originalName v3ProductsPartialUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsPartialUpdate2: (
|
|
productId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the variation.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** Variation status. */
|
|
status?: IV3ProductsPartialUpdate2ParamsStatusEnum[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsPartialUpdate2ParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsPartialUpdate2ParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsPartialUpdate2ParamsBackordersEnum[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsDelete2
|
|
* @request DELETE:/wc/v3/products/{product_id}
|
|
* @originalName v3ProductsDelete
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ProductsDelete2: (
|
|
productId: number,
|
|
query?: {
|
|
/**
|
|
* Unique identifier for the variation.
|
|
* @format int64
|
|
*/
|
|
id?: number;
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsBatchCreate
|
|
* @request POST:/wc/v3/products/{product_id}/variations/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsBatchCreate: (
|
|
productId: number,
|
|
data: {
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** Variation status. */
|
|
status?: IStatusEnum12[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum6[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum6[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum6[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsBatchUpdate
|
|
* @request PUT:/wc/v3/products/{product_id}/variations/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsBatchUpdate: (
|
|
productId: number,
|
|
query?: {
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** Variation status. */
|
|
status?: IV3ProductsVariationsBatchUpdateParamsStatusEnum[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsVariationsBatchUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsVariationsBatchUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsVariationsBatchUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/products/{product_id}/variations/batch
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsBatchPartialUpdate: (
|
|
productId: number,
|
|
query?: {
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: any;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: any;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: any;
|
|
/** Variation status. */
|
|
status?: IV3ProductsVariationsBatchPartialUpdateParamsStatusEnum[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: IV3ProductsVariationsBatchPartialUpdateParamsTaxStatusEnum[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IV3ProductsVariationsBatchPartialUpdateParamsStockStatusEnum[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IV3ProductsVariationsBatchPartialUpdateParamsBackordersEnum[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags products
|
|
* @name V3ProductsVariationsGenerateCreate
|
|
* @request POST:/wc/v3/products/{product_id}/variations/generate
|
|
* @secure
|
|
*/
|
|
v3ProductsVariationsGenerateCreate: (
|
|
productId: number,
|
|
data: {
|
|
/** Deletes unused variations. */
|
|
delete?: boolean;
|
|
/** Default values for generated variations. */
|
|
default_values?: string;
|
|
/** Variation description. */
|
|
description?: string;
|
|
/** Stock Keeping Unit. */
|
|
sku?: string;
|
|
/** GTIN, UPC, EAN or ISBN. */
|
|
global_unique_id?: string;
|
|
/** Variation regular price. */
|
|
regular_price?: string;
|
|
/** Variation sale price. */
|
|
sale_price?: string;
|
|
/** Start date of sale price, in the site's timezone. */
|
|
date_on_sale_from?: null;
|
|
/** Start date of sale price, as GMT. */
|
|
date_on_sale_from_gmt?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to?: null;
|
|
/** End date of sale price, in the site's timezone. */
|
|
date_on_sale_to_gmt?: null;
|
|
/** Variation status. */
|
|
status?: IStatusEnum13[];
|
|
/** If the variation is virtual. */
|
|
virtual?: boolean;
|
|
/** If the variation is downloadable. */
|
|
downloadable?: boolean;
|
|
/** List of downloadable files. */
|
|
downloads?: object[];
|
|
/**
|
|
* Number of times downloadable files can be downloaded after purchase.
|
|
* @format int64
|
|
*/
|
|
download_limit?: number;
|
|
/**
|
|
* Number of days until access to downloadable files expires.
|
|
* @format int64
|
|
*/
|
|
download_expiry?: number;
|
|
/** Tax status. */
|
|
tax_status?: ITaxStatusEnum7[];
|
|
/** Tax class. */
|
|
tax_class?: string;
|
|
/** Stock management at variation level. */
|
|
manage_stock?: boolean;
|
|
/**
|
|
* Stock quantity.
|
|
* @format int64
|
|
*/
|
|
stock_quantity?: number;
|
|
/** Controls the stock status of the product. */
|
|
stock_status?: IStockStatusEnum7[];
|
|
/** If managing stock, this controls if backorders are allowed. */
|
|
backorders?: IBackordersEnum7[];
|
|
/** Low Stock amount for the variation. */
|
|
low_stock_amount?: number;
|
|
/** Variation weight (kg). */
|
|
weight?: string;
|
|
/** Variation dimensions. */
|
|
dimensions?: string;
|
|
/** Shipping class slug. */
|
|
shipping_class?: string;
|
|
/** Variation image data. */
|
|
image?: string;
|
|
/** List of attributes. */
|
|
attributes?: object[];
|
|
/**
|
|
* Menu order, used to custom sort products.
|
|
* @format int64
|
|
*/
|
|
menu_order?: number;
|
|
/** Meta data. */
|
|
meta_data?: object[];
|
|
woo_variation_gallery_images?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/products/${productId}/variations/generate`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags refunds
|
|
* @name V3RefundsList
|
|
* @request GET:/wc/v3/refunds
|
|
* @secure
|
|
*/
|
|
v3RefundsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3RefundsListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Limit response to resources modified after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_after?: string;
|
|
/**
|
|
* Limit response to resources modified before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
modified_before?: string;
|
|
/** Whether to consider GMT post dates when limiting response by published or modified date. */
|
|
dates_are_gmt?: boolean;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3RefundsListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3RefundsListParamsOrderbyEnum[];
|
|
/** Limit result set to those of particular parent IDs. */
|
|
parent?: number[];
|
|
/** Limit result set to all items except those of a particular parent ID. */
|
|
parent_exclude?: number[];
|
|
/**
|
|
* Number of decimal points to use in each resource.
|
|
* @format int64
|
|
*/
|
|
dp?: number;
|
|
/** Only show meta which is meant to be displayed for an order. */
|
|
order_item_display_meta?: boolean;
|
|
/** Limit meta_data to specific keys. */
|
|
include_meta?: string[];
|
|
/** Ensure meta_data excludes specific keys. */
|
|
exclude_meta?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/refunds`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsSalesList
|
|
* @request GET:/wc/v3/reports/sales
|
|
* @secure
|
|
*/
|
|
v3ReportsSalesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsSalesListParamsContextEnum[];
|
|
/** Report period. */
|
|
period?: IV3ReportsSalesListParamsPeriodEnum[];
|
|
/**
|
|
* Return sales for a specific start date, the date need to be in the YYYY-MM-DD format.
|
|
* @format date
|
|
*/
|
|
date_min?: string;
|
|
/**
|
|
* Return sales for a specific end date, the date need to be in the YYYY-MM-DD format.
|
|
* @format date
|
|
*/
|
|
date_max?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/sales`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsTopSellersList
|
|
* @request GET:/wc/v3/reports/top_sellers
|
|
* @secure
|
|
*/
|
|
v3ReportsTopSellersList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsTopSellersListParamsContextEnum[];
|
|
/** Report period. */
|
|
period?: IV3ReportsTopSellersListParamsPeriodEnum[];
|
|
/**
|
|
* Return sales for a specific start date, the date need to be in the YYYY-MM-DD format.
|
|
* @format date
|
|
*/
|
|
date_min?: string;
|
|
/**
|
|
* Return sales for a specific end date, the date need to be in the YYYY-MM-DD format.
|
|
* @format date
|
|
*/
|
|
date_max?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/top_sellers`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsOrdersTotalsList
|
|
* @request GET:/wc/v3/reports/orders/totals
|
|
* @secure
|
|
*/
|
|
v3ReportsOrdersTotalsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsOrdersTotalsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/orders/totals`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsProductsTotalsList
|
|
* @request GET:/wc/v3/reports/products/totals
|
|
* @secure
|
|
*/
|
|
v3ReportsProductsTotalsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsProductsTotalsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/products/totals`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsCustomersTotalsList
|
|
* @request GET:/wc/v3/reports/customers/totals
|
|
* @secure
|
|
*/
|
|
v3ReportsCustomersTotalsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsCustomersTotalsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/customers/totals`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsCouponsTotalsList
|
|
* @request GET:/wc/v3/reports/coupons/totals
|
|
* @secure
|
|
*/
|
|
v3ReportsCouponsTotalsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsCouponsTotalsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/coupons/totals`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsReviewsTotalsList
|
|
* @request GET:/wc/v3/reports/reviews/totals
|
|
* @secure
|
|
*/
|
|
v3ReportsReviewsTotalsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsReviewsTotalsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports/reviews/totals`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags reports
|
|
* @name V3ReportsList
|
|
* @request GET:/wc/v3/reports
|
|
* @secure
|
|
*/
|
|
v3ReportsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ReportsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/reports`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsList
|
|
* @request GET:/wc/v3/settings
|
|
* @secure
|
|
*/
|
|
v3SettingsList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchCreate
|
|
* @request POST:/wc/v3/settings/batch
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchCreate: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/batch`,
|
|
method: "POST",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchUpdate
|
|
* @request PUT:/wc/v3/settings/batch
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchUpdate: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/batch`,
|
|
method: "PUT",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/settings/batch
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchPartialUpdate: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/batch`,
|
|
method: "PATCH",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsDetail
|
|
* @request GET:/wc/v3/settings/{group_id}
|
|
* @secure
|
|
*/
|
|
v3SettingsDetail: (
|
|
groupId: string,
|
|
query?: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Unique identifier for the resource. */
|
|
id?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsCreate
|
|
* @request POST:/wc/v3/settings/{group_id}
|
|
* @secure
|
|
*/
|
|
v3SettingsCreate: (
|
|
groupId: string,
|
|
data: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Unique identifier for the resource. */
|
|
id?: string;
|
|
/** Setting value. */
|
|
value?: null;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsUpdate
|
|
* @request PUT:/wc/v3/settings/{group_id}
|
|
* @secure
|
|
*/
|
|
v3SettingsUpdate: (
|
|
groupId: string,
|
|
query?: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Unique identifier for the resource. */
|
|
id?: string;
|
|
/** Setting value. */
|
|
value?: any;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsPartialUpdate
|
|
* @request PATCH:/wc/v3/settings/{group_id}
|
|
* @secure
|
|
*/
|
|
v3SettingsPartialUpdate: (
|
|
groupId: string,
|
|
query?: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Unique identifier for the resource. */
|
|
id?: string;
|
|
/** Setting value. */
|
|
value?: any;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchCreate2
|
|
* @request POST:/wc/v3/settings/{group_id}/batch
|
|
* @originalName v3SettingsBatchCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchCreate2: (
|
|
groupId: string,
|
|
data: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Setting value. */
|
|
value?: null;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchUpdate2
|
|
* @request PUT:/wc/v3/settings/{group_id}/batch
|
|
* @originalName v3SettingsBatchUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchUpdate2: (
|
|
groupId: string,
|
|
query?: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Setting value. */
|
|
value?: any;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags settings
|
|
* @name V3SettingsBatchPartialUpdate2
|
|
* @request PATCH:/wc/v3/settings/{group_id}/batch
|
|
* @originalName v3SettingsBatchPartialUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3SettingsBatchPartialUpdate2: (
|
|
groupId: string,
|
|
query?: {
|
|
/** Settings group ID. */
|
|
group?: string;
|
|
/** Setting value. */
|
|
value?: any;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/settings/${groupId}/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesList
|
|
* @request GET:/wc/v3/shipping/zones
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesCreate
|
|
* @request POST:/wc/v3/shipping/zones
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesCreate: (
|
|
data: {
|
|
/** Shipping zone name. */
|
|
name: string;
|
|
/**
|
|
* Shipping zone order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesDetail
|
|
* @request GET:/wc/v3/shipping/zones/{id}
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesDetail: (id: number, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesCreate2
|
|
* @request POST:/wc/v3/shipping/zones/{id}
|
|
* @originalName v3ShippingZonesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Shipping zone name. */
|
|
name?: string;
|
|
/**
|
|
* Shipping zone order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesUpdate
|
|
* @request PUT:/wc/v3/shipping/zones/{id}
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping zone name. */
|
|
name?: string;
|
|
/**
|
|
* Shipping zone order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesPartialUpdate
|
|
* @request PATCH:/wc/v3/shipping/zones/{id}
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping zone name. */
|
|
name?: string;
|
|
/**
|
|
* Shipping zone order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesDelete
|
|
* @request DELETE:/wc/v3/shipping/zones/{id}
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesLocationsList
|
|
* @request GET:/wc/v3/shipping/zones/{id}/locations
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesLocationsList: (id: number, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}/locations`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesLocationsCreate
|
|
* @request POST:/wc/v3/shipping/zones/{id}/locations
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesLocationsCreate: (
|
|
id: number,
|
|
data: {
|
|
/** Shipping zone location code. */
|
|
code?: string;
|
|
/** Shipping zone location type. */
|
|
type?: ITypeEnum7[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}/locations`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesLocationsUpdate
|
|
* @request PUT:/wc/v3/shipping/zones/{id}/locations
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesLocationsUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping zone location code. */
|
|
code?: string;
|
|
/** Shipping zone location type. */
|
|
type?: IV3ShippingZonesLocationsUpdateParamsTypeEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}/locations`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesLocationsPartialUpdate
|
|
* @request PATCH:/wc/v3/shipping/zones/{id}/locations
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesLocationsPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Shipping zone location code. */
|
|
code?: string;
|
|
/** Shipping zone location type. */
|
|
type?: IV3ShippingZonesLocationsPartialUpdateParamsTypeEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${id}/locations`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesMethodsList
|
|
* @request GET:/wc/v3/shipping/zones/{zone_id}/methods
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesMethodsList: (zoneId: number, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}/methods`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesMethodsCreate
|
|
* @request POST:/wc/v3/shipping/zones/{zone_id}/methods
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesMethodsCreate: (
|
|
zoneId: number,
|
|
data: {
|
|
/**
|
|
* Shipping method sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Shipping method enabled status. */
|
|
enabled?: boolean;
|
|
/** Shipping method settings. */
|
|
settings?: string;
|
|
/** Shipping method ID. */
|
|
method_id: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}/methods`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesDetail2
|
|
* @request GET:/wc/v3/shipping/zones/{zone_id}
|
|
* @originalName v3ShippingZonesDetail
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesDetail2: (
|
|
zoneId: number,
|
|
query?: {
|
|
/**
|
|
* Unique ID for the instance.
|
|
* @format int64
|
|
*/
|
|
instance_id?: number;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesCreate3
|
|
* @request POST:/wc/v3/shipping/zones/{zone_id}
|
|
* @originalName v3ShippingZonesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesCreate3: (
|
|
zoneId: number,
|
|
data: {
|
|
/**
|
|
* Unique ID for the instance.
|
|
* @format int64
|
|
*/
|
|
instance_id?: number;
|
|
/**
|
|
* Shipping method sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Shipping method enabled status. */
|
|
enabled?: boolean;
|
|
/** Shipping method settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesUpdate2
|
|
* @request PUT:/wc/v3/shipping/zones/{zone_id}
|
|
* @originalName v3ShippingZonesUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesUpdate2: (
|
|
zoneId: number,
|
|
query?: {
|
|
/**
|
|
* Unique ID for the instance.
|
|
* @format int64
|
|
*/
|
|
instance_id?: number;
|
|
/**
|
|
* Shipping method sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Shipping method enabled status. */
|
|
enabled?: boolean;
|
|
/** Shipping method settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesPartialUpdate2
|
|
* @request PATCH:/wc/v3/shipping/zones/{zone_id}
|
|
* @originalName v3ShippingZonesPartialUpdate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesPartialUpdate2: (
|
|
zoneId: number,
|
|
query?: {
|
|
/**
|
|
* Unique ID for the instance.
|
|
* @format int64
|
|
*/
|
|
instance_id?: number;
|
|
/**
|
|
* Shipping method sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Shipping method enabled status. */
|
|
enabled?: boolean;
|
|
/** Shipping method settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping
|
|
* @name V3ShippingZonesDelete2
|
|
* @request DELETE:/wc/v3/shipping/zones/{zone_id}
|
|
* @originalName v3ShippingZonesDelete
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3ShippingZonesDelete2: (
|
|
zoneId: number,
|
|
query?: {
|
|
/**
|
|
* Unique ID for the instance.
|
|
* @format int64
|
|
*/
|
|
instance_id?: number;
|
|
/** Whether to bypass trash and force deletion. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping/zones/${zoneId}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesClassesList
|
|
* @request GET:/wc/v3/taxes/classes
|
|
* @secure
|
|
*/
|
|
v3TaxesClassesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3TaxesClassesListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/classes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesClassesCreate
|
|
* @request POST:/wc/v3/taxes/classes
|
|
* @secure
|
|
*/
|
|
v3TaxesClassesCreate: (
|
|
data: {
|
|
/** Tax class name. */
|
|
name: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/classes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesClassesDetail
|
|
* @request GET:/wc/v3/taxes/classes/{slug}
|
|
* @secure
|
|
*/
|
|
v3TaxesClassesDetail: (slug: string, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/classes/${slug}`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesClassesDelete
|
|
* @request DELETE:/wc/v3/taxes/classes/{slug}
|
|
* @secure
|
|
*/
|
|
v3TaxesClassesDelete: (
|
|
slug: string,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/classes/${slug}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesList
|
|
* @request GET:/wc/v3/taxes
|
|
* @secure
|
|
*/
|
|
v3TaxesList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3TaxesListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3TaxesListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3TaxesListParamsOrderbyEnum[];
|
|
/** Sort by tax class. */
|
|
class?: IV3TaxesListParamsClassEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesCreate
|
|
* @request POST:/wc/v3/taxes
|
|
* @secure
|
|
*/
|
|
v3TaxesCreate: (
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesDetail
|
|
* @request GET:/wc/v3/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v3TaxesDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3TaxesDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesCreate2
|
|
* @request POST:/wc/v3/taxes/{id}
|
|
* @originalName v3TaxesCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3TaxesCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum1[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesUpdate
|
|
* @request PUT:/wc/v3/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v3TaxesUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV3TaxesUpdateParamsClassEnum[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesPartialUpdate
|
|
* @request PATCH:/wc/v3/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v3TaxesPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV3TaxesPartialUpdateParamsClassEnum[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesDelete
|
|
* @request DELETE:/wc/v3/taxes/{id}
|
|
* @secure
|
|
*/
|
|
v3TaxesDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesBatchCreate
|
|
* @request POST:/wc/v3/taxes/batch
|
|
* @secure
|
|
*/
|
|
v3TaxesBatchCreate: (
|
|
data: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IClassEnum2[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesBatchUpdate
|
|
* @request PUT:/wc/v3/taxes/batch
|
|
* @secure
|
|
*/
|
|
v3TaxesBatchUpdate: (
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV3TaxesBatchUpdateParamsClassEnum[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags taxes
|
|
* @name V3TaxesBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/taxes/batch
|
|
* @secure
|
|
*/
|
|
v3TaxesBatchPartialUpdate: (
|
|
query?: {
|
|
/** Country ISO 3166 code. */
|
|
country?: string;
|
|
/** State code. */
|
|
state?: string;
|
|
/** Postcode/ZIP, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'postcodes' should be used instead. */
|
|
postcode?: string;
|
|
/** City name, it doesn't support multiple values. Deprecated as of WooCommerce 5.3, 'cities' should be used instead. */
|
|
city?: string;
|
|
/** Tax rate. */
|
|
rate?: string;
|
|
/** Tax rate name. */
|
|
name?: string;
|
|
/**
|
|
* Tax priority.
|
|
* @format int64
|
|
*/
|
|
priority?: number;
|
|
/** Whether or not this is a compound rate. */
|
|
compound?: boolean;
|
|
/** Whether or not this tax rate also gets applied to shipping. */
|
|
shipping?: boolean;
|
|
/**
|
|
* Indicates the order that will appear in queries.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Tax class. */
|
|
class?: IV3TaxesBatchPartialUpdateParamsClassEnum[];
|
|
/** List of postcodes / ZIPs. Introduced in WooCommerce 5.3. */
|
|
postcodes?: string[];
|
|
/** List of city names. Introduced in WooCommerce 5.3. */
|
|
cities?: string[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/taxes/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksList
|
|
* @request GET:/wc/v3/webhooks
|
|
* @secure
|
|
*/
|
|
v3WebhooksList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3WebhooksListParamsContextEnum[];
|
|
/**
|
|
* Current page of the collection.
|
|
* @format int64
|
|
* @min 1
|
|
*/
|
|
page?: number;
|
|
/**
|
|
* Maximum number of items to be returned in result set.
|
|
* @format int64
|
|
* @min 1
|
|
* @max 100
|
|
*/
|
|
per_page?: number;
|
|
/** Limit results to those matching a string. */
|
|
search?: string;
|
|
/**
|
|
* Limit response to resources published after a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Limit response to resources published before a given ISO8601 compliant date.
|
|
* @format date-time
|
|
*/
|
|
before?: string;
|
|
/** Ensure result set excludes specific IDs. */
|
|
exclude?: number[];
|
|
/** Limit result set to specific ids. */
|
|
include?: number[];
|
|
/**
|
|
* Offset the result set by a specific number of items.
|
|
* @format int64
|
|
*/
|
|
offset?: number;
|
|
/** Order sort attribute ascending or descending. */
|
|
order?: IV3WebhooksListParamsOrderEnum[];
|
|
/** Sort collection by object attribute. */
|
|
orderby?: IV3WebhooksListParamsOrderbyEnum[];
|
|
/** Limit result set to webhooks assigned a specific status. */
|
|
status?: IV3WebhooksListParamsStatusEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksCreate
|
|
* @request POST:/wc/v3/webhooks
|
|
* @secure
|
|
*/
|
|
v3WebhooksCreate: (
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum14[];
|
|
/** Webhook topic. */
|
|
topic: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
/** Webhook delivery URL. */
|
|
delivery_url: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksDetail
|
|
* @request GET:/wc/v3/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v3WebhooksDetail: (
|
|
id: number,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3WebhooksDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksCreate2
|
|
* @request POST:/wc/v3/webhooks/{id}
|
|
* @originalName v3WebhooksCreate
|
|
* @duplicate
|
|
* @secure
|
|
*/
|
|
v3WebhooksCreate2: (
|
|
id: number,
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum15[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksUpdate
|
|
* @request PUT:/wc/v3/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v3WebhooksUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV3WebhooksUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksPartialUpdate
|
|
* @request PATCH:/wc/v3/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v3WebhooksPartialUpdate: (
|
|
id: number,
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV3WebhooksPartialUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksDelete
|
|
* @request DELETE:/wc/v3/webhooks/{id}
|
|
* @secure
|
|
*/
|
|
v3WebhooksDelete: (
|
|
id: number,
|
|
query?: {
|
|
/** Required to be true, as resource does not support trashing. */
|
|
force?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/${id}`,
|
|
method: "DELETE",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksBatchCreate
|
|
* @request POST:/wc/v3/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v3WebhooksBatchCreate: (
|
|
data: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IStatusEnum16[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/batch`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksBatchUpdate
|
|
* @request PUT:/wc/v3/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v3WebhooksBatchUpdate: (
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV3WebhooksBatchUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/batch`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags webhooks
|
|
* @name V3WebhooksBatchPartialUpdate
|
|
* @request PATCH:/wc/v3/webhooks/batch
|
|
* @secure
|
|
*/
|
|
v3WebhooksBatchPartialUpdate: (
|
|
query?: {
|
|
/** A friendly name for the webhook. */
|
|
name?: string;
|
|
/** Webhook status. */
|
|
status?: IV3WebhooksBatchPartialUpdateParamsStatusEnum[];
|
|
/** Webhook topic. */
|
|
topic?: string;
|
|
/** Secret key used to generate a hash of the delivered webhook and provided in the request headers. This will default to a MD5 hash from the current user's ID|username if not provided. */
|
|
secret?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/webhooks/batch`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusList
|
|
* @request GET:/wc/v3/system_status
|
|
* @secure
|
|
*/
|
|
v3SystemStatusList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3SystemStatusListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusToolsList
|
|
* @request GET:/wc/v3/system_status/tools
|
|
* @secure
|
|
*/
|
|
v3SystemStatusToolsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3SystemStatusToolsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status/tools`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusToolsDetail
|
|
* @request GET:/wc/v3/system_status/tools/{id}
|
|
* @secure
|
|
*/
|
|
v3SystemStatusToolsDetail: (id: string, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status/tools/${id}`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusToolsCreate
|
|
* @request POST:/wc/v3/system_status/tools/{id}
|
|
* @secure
|
|
*/
|
|
v3SystemStatusToolsCreate: (
|
|
id: string,
|
|
data: {
|
|
/** Tool name. */
|
|
name?: string;
|
|
/** What running the tool will do. */
|
|
action?: string;
|
|
/** Tool description. */
|
|
description?: string;
|
|
/** Did the tool run successfully? */
|
|
success?: boolean;
|
|
/** Tool return message. */
|
|
message?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status/tools/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusToolsUpdate
|
|
* @request PUT:/wc/v3/system_status/tools/{id}
|
|
* @secure
|
|
*/
|
|
v3SystemStatusToolsUpdate: (
|
|
id: string,
|
|
query?: {
|
|
/** Tool name. */
|
|
name?: string;
|
|
/** What running the tool will do. */
|
|
action?: string;
|
|
/** Tool description. */
|
|
description?: string;
|
|
/** Did the tool run successfully? */
|
|
success?: boolean;
|
|
/** Tool return message. */
|
|
message?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status/tools/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags system_status
|
|
* @name V3SystemStatusToolsPartialUpdate
|
|
* @request PATCH:/wc/v3/system_status/tools/{id}
|
|
* @secure
|
|
*/
|
|
v3SystemStatusToolsPartialUpdate: (
|
|
id: string,
|
|
query?: {
|
|
/** Tool name. */
|
|
name?: string;
|
|
/** What running the tool will do. */
|
|
action?: string;
|
|
/** Tool description. */
|
|
description?: string;
|
|
/** Did the tool run successfully? */
|
|
success?: boolean;
|
|
/** Tool return message. */
|
|
message?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/system_status/tools/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping_methods
|
|
* @name V3ShippingMethodsList
|
|
* @request GET:/wc/v3/shipping_methods
|
|
* @secure
|
|
*/
|
|
v3ShippingMethodsList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ShippingMethodsListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping_methods`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags shipping_methods
|
|
* @name V3ShippingMethodsDetail
|
|
* @request GET:/wc/v3/shipping_methods/{id}
|
|
* @secure
|
|
*/
|
|
v3ShippingMethodsDetail: (
|
|
id: string,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3ShippingMethodsDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/shipping_methods/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags payment_gateways
|
|
* @name V3PaymentGatewaysList
|
|
* @request GET:/wc/v3/payment_gateways
|
|
* @secure
|
|
*/
|
|
v3PaymentGatewaysList: (
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3PaymentGatewaysListParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/payment_gateways`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags payment_gateways
|
|
* @name V3PaymentGatewaysDetail
|
|
* @request GET:/wc/v3/payment_gateways/{id}
|
|
* @secure
|
|
*/
|
|
v3PaymentGatewaysDetail: (
|
|
id: string,
|
|
query?: {
|
|
/** Scope under which the request is made; determines fields present in response. */
|
|
context?: IV3PaymentGatewaysDetailParamsContextEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/payment_gateways/${id}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags payment_gateways
|
|
* @name V3PaymentGatewaysCreate
|
|
* @request POST:/wc/v3/payment_gateways/{id}
|
|
* @secure
|
|
*/
|
|
v3PaymentGatewaysCreate: (
|
|
id: string,
|
|
data: {
|
|
/** Payment gateway title on checkout. */
|
|
title?: string;
|
|
/** Payment gateway description on checkout. */
|
|
description?: string;
|
|
/**
|
|
* Payment gateway sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Payment gateway enabled status. */
|
|
enabled?: boolean;
|
|
/** Payment gateway settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/payment_gateways/${id}`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags payment_gateways
|
|
* @name V3PaymentGatewaysUpdate
|
|
* @request PUT:/wc/v3/payment_gateways/{id}
|
|
* @secure
|
|
*/
|
|
v3PaymentGatewaysUpdate: (
|
|
id: string,
|
|
query?: {
|
|
/** Payment gateway title on checkout. */
|
|
title?: string;
|
|
/** Payment gateway description on checkout. */
|
|
description?: string;
|
|
/**
|
|
* Payment gateway sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Payment gateway enabled status. */
|
|
enabled?: boolean;
|
|
/** Payment gateway settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/payment_gateways/${id}`,
|
|
method: "PUT",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags payment_gateways
|
|
* @name V3PaymentGatewaysPartialUpdate
|
|
* @request PATCH:/wc/v3/payment_gateways/{id}
|
|
* @secure
|
|
*/
|
|
v3PaymentGatewaysPartialUpdate: (
|
|
id: string,
|
|
query?: {
|
|
/** Payment gateway title on checkout. */
|
|
title?: string;
|
|
/** Payment gateway description on checkout. */
|
|
description?: string;
|
|
/**
|
|
* Payment gateway sort order.
|
|
* @format int64
|
|
*/
|
|
order?: number;
|
|
/** Payment gateway enabled status. */
|
|
enabled?: boolean;
|
|
/** Payment gateway settings. */
|
|
settings?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/payment_gateways/${id}`,
|
|
method: "PATCH",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataList
|
|
* @request GET:/wc/v3/data
|
|
* @secure
|
|
*/
|
|
v3DataList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataContinentsList
|
|
* @request GET:/wc/v3/data/continents
|
|
* @secure
|
|
*/
|
|
v3DataContinentsList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/continents`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataContinentsDetail
|
|
* @request GET:/wc/v3/data/continents/{location}
|
|
* @secure
|
|
*/
|
|
v3DataContinentsDetail: (
|
|
location: string,
|
|
query?: {
|
|
/** 2 character continent code. */
|
|
continent?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/continents/${location}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataCountriesList
|
|
* @request GET:/wc/v3/data/countries
|
|
* @secure
|
|
*/
|
|
v3DataCountriesList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/countries`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataCountriesDetail
|
|
* @request GET:/wc/v3/data/countries/{location}
|
|
* @secure
|
|
*/
|
|
v3DataCountriesDetail: (location: string, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/countries/${location}`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataCurrenciesList
|
|
* @request GET:/wc/v3/data/currencies
|
|
* @secure
|
|
*/
|
|
v3DataCurrenciesList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/currencies`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataCurrenciesCurrentList
|
|
* @request GET:/wc/v3/data/currencies/current
|
|
* @secure
|
|
*/
|
|
v3DataCurrenciesCurrentList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/currencies/current`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags data
|
|
* @name V3DataCurrenciesDetail
|
|
* @request GET:/wc/v3/data/currencies/{currency}
|
|
* @secure
|
|
*/
|
|
v3DataCurrenciesDetail: (
|
|
currency: string,
|
|
query?: {
|
|
/** ISO4217 currency code. */
|
|
location?: string;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/data/currencies/${currency}`,
|
|
method: "GET",
|
|
query: query,
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersReceiptCreate
|
|
* @request POST:/wc/v3/orders/{id}/receipt
|
|
* @secure
|
|
*/
|
|
v3OrdersReceiptCreate: (
|
|
id: number,
|
|
data: {
|
|
/** Expiration date formatted as yyyy-mm-dd. */
|
|
expiration_date?: string;
|
|
/**
|
|
* Number of days to be added to the current date to get the expiration date.
|
|
* @format int64
|
|
*/
|
|
expiration_days?: number;
|
|
/** True to force the creation of a new receipt even if one already exists and has not expired yet. */
|
|
force_new?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}/receipt`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersReceiptList
|
|
* @request GET:/wc/v3/orders/{id}/receipt
|
|
* @secure
|
|
*/
|
|
v3OrdersReceiptList: (id: number, params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}/receipt`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersActionsEmailTemplatesList
|
|
* @request GET:/wc/v3/orders/{id}/actions/email_templates
|
|
* @secure
|
|
*/
|
|
v3OrdersActionsEmailTemplatesList: (
|
|
id: number,
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}/actions/email_templates`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersActionsSendEmailCreate
|
|
* @request POST:/wc/v3/orders/{id}/actions/send_email
|
|
* @secure
|
|
*/
|
|
v3OrdersActionsSendEmailCreate: (
|
|
id: number,
|
|
data: {
|
|
/**
|
|
* Email address to send the order details to.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Whether to update the billing email of the order, even if it already has one. */
|
|
force_email_update?: boolean;
|
|
/** The ID of the template to use for sending the email. */
|
|
template_id: ITemplateIdEnum[];
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}/actions/send_email`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersActionsSendOrderDetailsCreate
|
|
* @request POST:/wc/v3/orders/{id}/actions/send_order_details
|
|
* @secure
|
|
*/
|
|
v3OrdersActionsSendOrderDetailsCreate: (
|
|
id: number,
|
|
data: {
|
|
/**
|
|
* Email address to send the order details to.
|
|
* @format email
|
|
*/
|
|
email?: string;
|
|
/** Whether to update the billing email of the order, even if it already has one. */
|
|
force_email_update?: boolean;
|
|
},
|
|
params: RequestParams = {},
|
|
) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/${id}/actions/send_order_details`,
|
|
method: "POST",
|
|
body: data,
|
|
secure: true,
|
|
type: ContentType.FormData,
|
|
...params,
|
|
}),
|
|
|
|
/**
|
|
* No description
|
|
*
|
|
* @tags orders
|
|
* @name V3OrdersStatusesList
|
|
* @request GET:/wc/v3/orders/statuses
|
|
* @secure
|
|
*/
|
|
v3OrdersStatusesList: (params: RequestParams = {}) =>
|
|
this.request<void, void>({
|
|
path: `/wc/v3/orders/statuses`,
|
|
method: "GET",
|
|
secure: true,
|
|
type: ContentType.UrlEncoded,
|
|
...params,
|
|
}),
|
|
};
|
|
}
|