File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
src/Picqer/Carriers/SendCloud/Persistance Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 1313 */
1414trait Storable
1515{
16- public function save ()
16+ public function save ($ options = [] )
1717 {
1818 if ($ this ->exists ()) {
19- $ this ->fill ($ this ->update ());
19+ $ this ->fill ($ this ->update ($ options ));
2020 } else {
21- $ this ->fill ($ this ->insert ());
21+ $ this ->fill ($ this ->insert ($ options ));
2222 }
2323
2424 return $ this ;
2525 }
2626
27- public function insert ()
27+ public function insert (array $ options = [] )
2828 {
29- return $ this ->connection ()->post ($ this ->url , $ this ->json ());
29+ return $ this ->connection ()->post ($ this ->url , $ this ->json (), $ options );
3030 }
3131
32- public function update ()
32+ public function update (array $ options = [] )
3333 {
34- return $ this ->connection ()->put ($ this ->url . '/ ' . urlencode ($ this ->id ), $ this ->json ());
34+ return $ this ->connection ()->put ($ this ->url . '/ ' . urlencode ($ this ->id ), $ this ->json (), $ options );
3535 }
3636
37- public function delete ()
37+ public function delete (array $ options = [] )
3838 {
39- return $ this ->connection ()->delete ($ this ->url . '/ ' . urlencode ($ this ->id ));
39+ return $ this ->connection ()->delete ($ this ->url . '/ ' . urlencode ($ this ->id ), $ options );
4040 }
41- }
41+ }
You can’t perform that action at this time.
0 commit comments