add api composition_familiale

This commit is contained in:
simon lehericey 2021-09-17 20:42:02 +02:00
parent ceb09c5967
commit a7651e3772

View file

@ -2,6 +2,7 @@ class APIParticulier::API
include APIParticulier::Error
INTROSPECT_RESOURCE_NAME = "introspect"
COMPOSITION_FAMILIALE_RESOURCE_NAME = "v2/composition-familiale"
TIMEOUT = 20
@ -13,6 +14,12 @@ class APIParticulier::API
get(INTROSPECT_RESOURCE_NAME)['scopes']
end
def composition_familiale(numero_allocataire, code_postal)
get(COMPOSITION_FAMILIALE_RESOURCE_NAME,
numeroAllocataire: numero_allocataire,
codePostal: code_postal)
end
private
def get(resource_name, params = {})