File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,8 @@ The custom methods are specific to some resources which may not be available for
343343- Customer ->
344344 - [ search()] ( https://help.shopify.com/api/reference/customer#search )
345345 Search for customers matching supplied query
346+ - [ send_invite($data)] ( https://help.shopify.com/en/api/reference/customers/customer#send_invite )
347+ Sends an account invite to a customer.
346348
347349- Customer -> Address ->
348350 - [ makeDefault()] ( https://help.shopify.com/api/reference/customeraddress#default )
Original file line number Diff line number Diff line change @@ -44,4 +44,20 @@ class Customer extends ShopifyResource
4444 'Metafield ' ,
4545 'Order '
4646 );
47+
48+ /**
49+ * Sends an account invite to a customer.
50+ *
51+ * @param array $customer_invite Customized invite data
52+ *
53+ * @return array
54+ */
55+ public function send_invite ($ customer_invite = array ())
56+ {
57+ if (empty ( $ customer_invite ) ) $ customer_invite = new \stdClass ();
58+ $ url = $ this ->generateUrl (array (), 'send_invite ' );
59+ $ dataArray = $ this ->wrapData ($ customer_invite , 'customer_invite ' );
60+
61+ return $ this ->post ($ dataArray , $ url , false );
62+ }
4763}
You can’t perform that action at this time.
0 commit comments