File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,25 @@ public function shippingMethods(array $optionalParameters = []): array
5656 return $ this ->request ('get ' , self ::SHIPPING_METHODS_ENDPOINT , $ optionalParameters );
5757 }
5858
59+ public function shippingPrice (
60+ int $ shipingMethodId ,
61+ string $ fromCountry ,
62+ int $ weight ,
63+ string $ weightUnit ,
64+ array $ optionalParameters = []
65+ ): array {
66+ $ parameters = [
67+ 'shipping_method_id ' => $ shipingMethodId ,
68+ 'from_country ' => $ fromCountry ,
69+ 'weight ' => $ weight ,
70+ 'weight_unit ' => $ weightUnit ,
71+ ];
72+
73+ $ parameters = array_merge ($ parameters , $ optionalParameters );
74+
75+ return $ this ->request ('get ' , 'shipping-price ' , $ parameters );
76+ }
77+
5978 public function download (string $ url ): string
6079 {
6180 $ response = Http::withBasicAuth (config ('sendcloud.key ' ), config ('sendcloud.secret ' ))
You can’t perform that action at this time.
0 commit comments