Skip to content

add InstallmentPlan endpoint - #14

Merged
calops merged 7 commits into
masterfrom
installement-plans-endpoint
Dec 29, 2021
Merged

add InstallmentPlan endpoint#14
calops merged 7 commits into
masterfrom
installement-plans-endpoint

Conversation

@fricha05

Copy link
Copy Markdown

Adds the installment plan endpoint (get, create, update)

@Dixeat Dixeat assigned pierre-pg and calops and unassigned Dixeat May 11, 2021
@Dixeat

Dixeat commented May 17, 2021

Copy link
Copy Markdown
Contributor

Up

@pierre-pg pierre-pg removed their assignment May 17, 2021
Comment thread payplug/resources.py Outdated
Comment thread payplug/resources.py Outdated
Comment on lines +402 to +422
"""
Create an InstallmentPlan

:param data: the data to create the installment plan
"""
def create(self, **data):
return payplug.InstallmentPlans.create_installment_plan_endpoint(data)

"""
Update an InstallmentPlan

:param data: the data needed to update the installment plan
"""
def update(self, **data):
return payplug.InstallmentPlans.update_installment_plan_endpoint(self, data)

"""
Get an InstallmentPlan
"""
def get(self):
return payplug.InstallmentPlans.get_installment_plan_endpoint(self) No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sauf erreur de ma part, les payplug.InstallmentPlans.xxx appelés ici n'existent pas.

Par ailleurs, je pense qu'ici on a seulement besoin d'une méthode get_consistent_resource (et peut-être un update, à voir avec les autres ressources).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok je vois ce qu'il fallait faire, j'avais mal compris le principe de consistent resource et je m'étais trompé sur la manière de l'implémenter. Le prochain commit devrait corriger ça !

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merci !

As-tu testé ces ajouts de bout-en-bout ? (Avec de véritables calls api sur notre environnement de prod ou de QA.) Et si non, peux-tu effectuer de tels tests ? Merci !

@fricha05 fricha05 Jun 2, 2021

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, l'appel /v1/installment_plans/{installment_plan_id} renvoie bien le DAO InstallmentPlan quand il est appelé (testé en QA)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super merci !

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

J'ai l'impression que cette PR n'ajoute que le GET... je me trompe ?

Il faudrait pouvoir faire tout ce qui est listé ici https://docs.payplug.com/api/apiref.html#installment-plans- (et gérer les notifications).

@Dixeat

Dixeat commented May 28, 2021

Copy link
Copy Markdown
Contributor

UP plz.

@pierre-pg
pierre-pg requested a review from calops June 8, 2021 08:53
Comment thread payplug/__init__.py Outdated
@fricha05

Copy link
Copy Markdown
Author

UP plz

Comment thread payplug/test/test_init/test_dao_installment_plans.py Outdated
PhilDL and others added 3 commits August 31, 2021 09:22
- Fix object name "intallment_plan"
- Refactor mapper InstallmentPlan data to have APIResource object like Payment
- Adding Schedule APIResource and initializer to map list to list of Schedule(s)
- Add tests notifications treat
- Fix tests to use new APIResource objects
- Bump version
@calops
calops merged commit 529a7ad into master Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants