diff options
author | Wim <wim@42.be> | 2021-05-30 00:25:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-30 00:25:30 +0200 |
commit | 4091b6f6b4fe01876f8720332675f9c69be39541 (patch) | |
tree | 07a1f2b2eeba6fb680b5edc19d2d38ec81243c0a /vendor/github.com/Rhymen/go-whatsapp/contact.go | |
parent | 766f35554e16ee5462370be714ef29b71745d478 (diff) | |
download | matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.tar.gz matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.tar.bz2 matterbridge-msglm-4091b6f6b4fe01876f8720332675f9c69be39541.zip |
Update vendor (#1498)
Diffstat (limited to 'vendor/github.com/Rhymen/go-whatsapp/contact.go')
-rw-r--r-- | vendor/github.com/Rhymen/go-whatsapp/contact.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/vendor/github.com/Rhymen/go-whatsapp/contact.go b/vendor/github.com/Rhymen/go-whatsapp/contact.go index e17f724f..67140723 100644 --- a/vendor/github.com/Rhymen/go-whatsapp/contact.go +++ b/vendor/github.com/Rhymen/go-whatsapp/contact.go @@ -286,3 +286,37 @@ func (wac *Conn) handleBlockContact(action, jid string) (<-chan string, error) { return wac.writeBinary(n, contact, ignore, tag) } + +// Search product details on order +func (wac *Conn) SearchProductDetails(id, orderId, token string) (<-chan string, error) { + data := []interface{}{"query", "order", map[string]string{ + "id": id, + "orderId": orderId, + "imageHeight": strconv.Itoa(80), + "imageWidth": strconv.Itoa(80), + "token": token, + }} + return wac.writeJson(data) +} + +// Order search and get product catalog reh +func (wac *Conn) SearchOrder(catalogWid, stanzaId string) (<-chan string, error) { + data := []interface{}{"query", "bizCatalog", map[string]string{ + "catalogWid": catalogWid, + "limit": strconv.Itoa(10), + "height": strconv.Itoa(100), + "width": strconv.Itoa(100), + "stanza_id": stanzaId, + "type": "get_product_catalog_reh", + }} + return wac.writeJson(data) +} + +// Company details for Whatsapp Business +func (wac *Conn) BusinessProfile(wid string) (<-chan string, error) { + query := map[string]string{ + "wid": wid, + } + data := []interface{}{"query", "businessProfile", []map[string]string{query}} + return wac.writeJson(data) +} |