public function update(string $collectionId, array $codes = []): Response
    {
        $payments = [];

        foreach ($codes as $code) {
            \array_push($payments, \compact('code'));
        }

        return $this->send('PUT', "collections/{$collectionId}/payment_methods", [], $payments);
    }
public function update(string $collectionId, array $codes = []): Response
    {
        $payments = [];

        foreach ($codes as $code) {
            \array_push($payments, \compact('code'));
        }

        return $this->send('PUT', "collections/{$collectionId}/payment_methods", [], $payments);
    }
public function update ( string $ collectionId , array $ codes = [ ] ) : Response { $ payments = [ ] ; foreach ( $ codes as $ code ) { \ array_push ( $ payments , \ compact ( 'code' ) ) ; } return $ this -> send ( 'PUT' , "collections/{$collectionId}/payment_methods" , [ ] , $ payments ) ; }
Update payment methods.

@param  string  $id
@param  array   $codes

@return \Laravie\Codex\Contracts\Response
Update payment methods .