Skip to content

Commit

Permalink
Merge pull request #49 from mon-petit-placement/feat-get-documents-ar…
Browse files Browse the repository at this point in the history
…bitrage

feat: rename getDocuments fonction for arbitration client to have the…
  • Loading branch information
Celine68 authored Nov 22, 2024
2 parents b60a190 + a6e8580 commit 1cd9102
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 119 deletions.
6 changes: 3 additions & 3 deletions Client/ApicilArbitrationClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Mpp\ApicilClientBundle\Client;

use Mpp\ApicilClientBundle\Model\ActeDocumentDto;
use Mpp\ApicilClientBundle\Model\ActeRetourCreationDto;
use Mpp\ApicilClientBundle\Model\ArbitrageDto;
use Mpp\ApicilClientBundle\Model\ArbitrageDtoDeConsultation;
Expand All @@ -17,7 +18,6 @@
use Mpp\ApicilClientBundle\Model\TelephoneDto;
use Mpp\ApicilClientBundle\OptionsResolver\ApicilAccClientOptionResolver;
use Mpp\ApicilClientBundle\OptionsResolver\ApicilArbitrationClientOptionResolver;
use Mpp\ApicilClientBundle\OptionsResolver\ApicilReferentialClientOptionsResolver;
use Symfony\Component\HttpFoundation\File\File;

class ApicilArbitrationClient extends AbstractApicilClientDomain implements ApicilArbitrationClientInterface
Expand Down Expand Up @@ -132,9 +132,9 @@ public function getDocument(int $id, int $documentId): RecuperationActeDocSousCa
/**
* {@inheritdoc}
*/
public function getDocumentTypes(int $id): array
public function getDocuments(int $id): array
{
return $this->requestAndPopulate(sprintf('%s[]', RecuperationActeDocSousCategorieDto::class), 'GET', sprintf('/%s/documents', $id));
return $this->requestAndPopulate(sprintf('%s[]', ActeDocumentDto::class), 'GET', sprintf('/%s/documents', $id)) ?? [];
}

/**
Expand Down
11 changes: 6 additions & 5 deletions Client/ApicilArbitrationClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Mpp\ApicilClientBundle\Client;

use Mpp\ApicilClientBundle\Model\ActeDocumentDto;
use Mpp\ApicilClientBundle\Model\ActeRetourCreationDto;
use Mpp\ApicilClientBundle\Model\ArbitrageDto;
use Mpp\ApicilClientBundle\Model\ArbitrageDtoDeConsultation;
Expand Down Expand Up @@ -129,15 +130,15 @@ public function getBulletin(int $id): File;
public function getDocument(int $id, int $documentId): RecuperationActeDocSousCategorieDto;

/**
* Retrieve the list of document types open for uploading for arbitration.
* Retrieve arbitrage request documents.
*
* @method getDocumentTypes
* @method getDocuments
*
* @param int $id
* @param int $id
*
* @return array<RecuperationActeDocSousCategorieDto>
* @return array<ActeDocumentDto>
*/
public function getDocumentTypes(int $id): array;
public function getDocuments(int $id): array;

/**
* Retrieve arbitration email proposal.
Expand Down
2 changes: 1 addition & 1 deletion Client/ApicilPartialRepurchaseClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function getDocumentById(int $id, int $documentId): File;
*
* @param int $id
*
* @return array
* @return array<ActeDocumentDto>
*/
public function getDocuments(int $id): array;

Expand Down
1 change: 0 additions & 1 deletion Client/ApicilPaymentClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Mpp\ApicilClientBundle\Model\DtoDeLaSuppressionDeLOption;
use Mpp\ApicilClientBundle\Model\DtoEligibilite;
use Mpp\ApicilClientBundle\Model\EmailPropositionActeDto;
use Mpp\ApicilClientBundle\Model\EmailPropositionDto;
use Mpp\ApicilClientBundle\Model\ListeDesSupports;
use Mpp\ApicilClientBundle\Model\ModeleDeVersementLibre;
use Mpp\ApicilClientBundle\Model\MontantVCDto;
Expand Down
8 changes: 4 additions & 4 deletions Model/ArbitrageDtoDeConsultation.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,19 +235,19 @@ public function setModeCible(?bool $modeCible): self
/**
* @return array|null
*/
public function getPorteFeuilleCible(): ?array
public function getPortefeuilleCible(): ?array
{
return $this->portefeuilleCible;
}

/**
* @param array|null $porteFeuilleCible
* @param array|null $portefeuilleCible
*
* @return self
*/
public function setPorteFeuilleCible(?array $porteFeuilleCible): self
public function setPortefeuilleCible(?array $portefeuilleCible): self
{
$this->portefeuilleCible = $porteFeuilleCible;
$this->portefeuilleCible = $portefeuilleCible;

return $this;
}
Expand Down
105 changes: 0 additions & 105 deletions Model/RachatTotalDto.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Mpp\ApicilClientBundle\Model;

use phpDocumentor\Reflection\Types\Self_;
use Symfony\Component\OptionsResolver\Exception\AccessException;
use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException;
use Symfony\Component\OptionsResolver\Exception\MissingOptionsException;
Expand Down Expand Up @@ -143,14 +142,9 @@ public static function createFromArray(array $options): self

return (new self())
->setContratId($resolvedOptions['contratId'])
->setMontant($resolvedOptions['montant'])
->setModePaiement($resolvedOptions['modePaiement'])
->setDestinationDesFonds($resolvedOptions['destinationDesFonds'])
->setDonneesBancaires($resolvedOptions['donneesBancaires'])
->setModeDesinvestissement($resolvedOptions['modeDesinvestissement'])
->setRepartitionDesinvestissement($resolvedOptions['repartitionDesinvestissement'])
->setTypeRachatPartiel($resolvedOptions['typeRachatPartiel'])
->setTypeRachat($resolvedOptions['typeRachat'])
->setOptionFiscale($resolvedOptions['optionFiscale'])
->setCommentaireClientRachatPrecoce($resolvedOptions['commentaireClientRachatPrecoce'])
->setTypeSignature($resolvedOptions['typeSignature'])
Expand Down Expand Up @@ -197,26 +191,6 @@ public function setDonneesBancaires(?DonneesBancairesDto $donneesBancaires): sel
return $this;
}

/**
* @return string|null
*/
public function getModeDesinvestissement(): ?string
{
return $this->modeDesinvestissement;
}

/**
* @param string|null $modeDesinvestissement
*
* @return self
*/
public function setModeDesinvestissement(?string $modeDesinvestissement): self
{
$this->modeDesinvestissement = $modeDesinvestissement;

return $this;
}

/**
* @return string|null
*/
Expand All @@ -237,85 +211,6 @@ public function setModePaiement(?string $modePaiement): self
return $this;
}

/**
* @return float|null
*/
public function getMontant(): ?float
{
return $this->montant;
}

/**
* @param float|null $montant
*
* @return self
*/
public function setMontant(?float $montant): self
{
$this->montant = $montant;

return $this;
}

/**
* @return array|null
*/
public function getRepartitionDesinvestissement(): ?array
{
return $this->repartitionDesinvestissement;
}

/**
* @param array|null $repartitionDesinvestissement
*
* @return self
*/
public function setRepartitionDesinvestissement(?array $repartitionDesinvestissement): self
{
$this->repartitionDesinvestissement = $repartitionDesinvestissement;

return $this;
}

/**
* @return string|null
*/
public function getTypeRachat(): ?string
{
return $this->typeRachat;
}

/**
* @param string|null $typeRachat
*
* @return self
*/
public function setTypeRachat(?string $typeRachat): self
{
$this->typeRachat = $typeRachat;

return $this;
}

/**
* @return string|null
*/
public function getTypeRachatPartiel(): ?string
{
return $this->typeRachatPartiel;
}

/**
* @param string|null $typeRachatPartiel
*
* @return self
*/
public function setTypeRachatPartiel(?string $typeRachatPartiel): self
{
$this->typeRachatPartiel = $typeRachatPartiel;

return $this;
}

/**
* @return string|null
Expand Down

0 comments on commit 1cd9102

Please sign in to comment.