You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 4, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: plugins/woocommerce/src/main/kotlin/org/wordpress/android/fluxc/network/rest/wpcom/wc/customer/CustomerRestClient.kt
+22Lines changed: 22 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -115,6 +115,28 @@ class CustomerRestClient @Inject constructor(private val wooNetwork: WooNetwork)
115
115
return response.toWooPayload()
116
116
}
117
117
118
+
/**
119
+
* Makes a PUT call to `/wc/v3/customers/[remoteCustomerId]` to update a customer
120
+
*
121
+
* @param [remoteCustomerId] Unique server id of the customer to update
122
+
*/
123
+
suspendfunupdateCustomer(
124
+
site:SiteModel,
125
+
remoteCustomerId:Long,
126
+
customer:CustomerDTO
127
+
): WooPayload<CustomerDTO> {
128
+
val url =WOOCOMMERCE.customers.id(remoteCustomerId).pathV3
129
+
130
+
val response = wooNetwork.executePutGsonRequest(
131
+
site = site,
132
+
path = url,
133
+
body = customer.toMap(),
134
+
clazz =CustomerDTO::class.java
135
+
)
136
+
137
+
return response.toWooPayload()
138
+
}
139
+
118
140
/**
119
141
* Makes a GET call to `wc-analytics/reports/customers` to fetch customers
0 commit comments