mpp / apicil-client-bundle
Symfony ApiCil Bundle
Installs: 9 307
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=8.0
- ext-json: *
- eightpoints/guzzle-bundle: ^8.0
- symfony/dependency-injection: ^4.0 | ^5.0 | ^6.0
- symfony/framework-bundle: ^4.0 | ^5.0 | ^6.0
- symfony/options-resolver: ^4.0 | ^5.0 | ^6.0
- symfony/property-info: ^4.0 | ^5.0 | ^6.0
- symfony/serializer: ^4.4.35 | ^5.3.12 | ^6.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/property-access: ^4.0 | ^5.0 | ^6.0
- symfony/yaml: ^4.0 | ^5.0 | ^6.0
- dev-master
- v3.3.1
- v3.3.0
- v3.2.4
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.13
- v3.1.12
- v3.1.11
- v3.1.10
- 3.1.9
- 3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.1.5
- v2.1.4
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.2
- v2.0.1
- v2.0.0
- v1.3.1
- v1.3.0
- v1.2.11
- v1.2.10
- v1.2.9
- v1.2.8
- v1.2.7
- v1.2.6
- v1.2.5
- v1.2.4
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.1
- v1.1.0
- v1.0.0
- dev-fix-error-code-null
- dev-feat-get-documents-arbitrage
- dev-fix-contract-type
- dev-fix-dual-type-for-contract-id
- dev-fix-contrat-id-resolver
- dev-strign-contract-type
- dev-feat-add-new-contract-status-update-for-convention
- dev-feat-add-new-contract-status
- dev-fix-type-garantie-detail-option-vp
- dev-feat/add-contract-status-constant
- dev-fix/document-metadata-dto
- dev-fix/required-pourcentage
- dev-fix/get-contratc
- dev-separated-populate-method
- dev-fix/request-and-populate
- dev-nullable-tauxDerogatoire
- dev-symfony-6
- dev-fix/deprecations
- dev-feat/update-contrat
- dev-feature/add-list-project-method
- dev-fix/taux-derogatoire
- dev-fix/eligible
- dev-fix/update-payment
- dev-fix/allow-null
- dev-mpp-CU-k79bux
- dev-fix/minor-bugs
- dev-fix/payment
- dev-correct-origine-fonds
- dev-const-projet
- dev-feat/dto-options-resolver
This package is auto-updated.
Last update: 2025-03-18 08:14:48 UTC
README
Installation
To install this bundle, simply run the following command:
$ composer require mpp/apicil-client-bundle
Configuration
First create a guzzle client:
// config/packages/eight_point_guzzle.yaml eight_points_guzzle: clients: my_apicil_client: base_url: '%env(APICIL_BASE_URL)%' options: auth: - '%env(APICIL_USERNAME)%' - '%env(APICIL_PASSWORD)%' my_apicil_sign_client: base_url: '%env(APICIL_BASE_URL)%' options: auth: - '%env(APICIL_SIGN_USERNAME)%' - '%env(APICIL_SIGN_PASSWORD)%'
Then configure this client to be used by the bundle:
// config/packages/mpp_apicil_client.yaml mpp_apicil_client: http_client: 'eight_points_guzzle.client.my_apicil_client' sign_http_client: 'eight_points_guzzle.client.my_apicil_sign_client'
Make sure to have enabled the serializer & property info component in symfony configuration (for serialization/deserialization):
// config/packages/framework.yaml framework: serializer: enabled: true property_info: enabled: true
Clients
Here is the mapping of client for each specification name
How to use ?
How to get a specific client domain ?
Here is a sample controller on how to get a specific client domain:
<?php namespace App\Controller; use Mpp\ApicilClientBundle\Client\ApicilClientDomainRegistryInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class ExampleController extends AbstractController { public function exampleAction(ApicilClientDomainRegistryInterface $apicilClientRegistry) { // Here are the three different available methods on how to retrieve a client domain by its alias (choose the one you prefer) $myClient = $apicilClientRegistry->get('client_domain_alias'); // or $myClient = $apicilClientRegistry->getClientDomainAlias(); // Execute operations from the retrieved client domain // ... } }
How to use each clients ?
You'll find an exemple of usage of each client below
- [WIP] ApicilAccClient (acc)
- [WIP] ApicilArbitrationClient (arbitration)
- ApicilTradingAccountClient (trading_account)
- [WIP] ApicilContractClient (contract)
- [WIP] ApicilCollectiveContractClient (collective_contract)
- [WIP] ApicilReferentialClient (referential)
- [WIP] ApicilProductClient (product)
- [WIP] ApicilFinancialProfileClient (financial_profile)
- [WIP] ApicilKycContactInformationClient (kyc_contact_information)
- [WIP] ApicilKycIbanClient (kyc_iban)
- [WIP] ApicilPreconizationClient (preconization)
- [WIP] ApicilManagementClient (management)
- [WIP] ApicilPartialRepurchaseClient (partial_repurchase)
- [WIP] ApicilTotalRepurchaseClient (total_repurchase)
- ApicilProjectClient (project)
- [WIP] ApicilPaymentClient (payment)
Tests
Update the environment variables in phpunit.xml.dist:
<!-- ... --> <php> <!-- ... --> <env name="APP_ENV" value="test" /> <env name="APICIL_BASE_URL" value="APICIL_BASE_URL" /> <env name="APICIL_USERNAME" value="USEERNAME" /> <env name="APICIL_PASSWORD" value="PASSWORD" /> <!-- ... --> </php> <!-- ... -->
Then, use the following commands if you want to run the tests suite
$ make composer-install # once
$ make phpunit
TODO
- Create missing model/dto classes used in clients
- CourtierDto
- DonneesReferencesActifDto
- FraisEncoursDto
- PeriodiciteDto
- ResultatDeCreationResource
- SituationCompteDto
- ProfilFinancierActeDto
- ProfilFinancierConsultationDto
- ProfilFinancierDto
- ProfilFinancierQuestionDto
- RepartitionDto
- ChangementCoordonneesDto
- ErreurCodeFonctionnelDto
- IbanDto
- RachatPartielDtoDeConsultation
- EmailPropositionDto
- RecuperationVersementSuppression
- SuppressionOptionDto
- ModeGestionDto
- QuestionSupportStructureDto
- EmailPropositionSouscriptionDto
- ListDocumentDto
- CompteTitreDto
- ContratProfilGestionDto
- RecuperationContratProfileGestionDto
- TrClasseActifDto
- BasePreconisationDto
- TrProfilAllocationAutoriseDto
- Add unit tests
- ApicilAccClient
- ApicilArbitrationClient
- ApicilTradingAccountClient
- ApicilContractClient
- ApicilCollectiveContractClient
- ApicilReferentialClient
- ApicilProductClient
- ApicilFinancialProfileClient
- ApicilKycContactInformationClient
- ApicilKycIbanClient
- ApicilPreconizationClient
- ApicilManagementClient
- ApicilPartialRepurchaseClient
- ApicilTotalRepurchaseClient
- ApicilProjectClient
- ApicilPaymentClient
- Update documetation
- Add client exemple usage for all routes in documentation
- Enhance how options are resolved (ex: how file related fields are handled => add Trait ?)