Skip to content

Commit

Permalink
Configure WooShippingLabelPrintingRestClient.fetchShippingLabelPrinti…
Browse files Browse the repository at this point in the history
…ng parameters
  • Loading branch information
ThomazFB committed Dec 13, 2024
1 parent 64dfcd4 commit 2ee8b22
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ class WooShippingLabelPrintingRestClient @Inject constructor(
private val wooNetwork: WooNetwork
) {
suspend fun fetchShippingLabelPrinting(
site: SiteModel
site: SiteModel,
labelIds: List<Long>,
paperSize: String
): WooPayload<PrintingResponse> {
val URL = "/wcshipping/v1/label/print"

return wooNetwork.executeGetGsonRequest(
site = site,
path = URL,
params = mapOf(
"label_ids" to labelIds.joinToString { "$it," },
"paper_size" to paperSize
),
clazz = PrintingResponse::class.java,
).toWooPayload()
}
Expand Down

0 comments on commit 2ee8b22

Please sign in to comment.