add InstallmentPlan endpoint - #14
Conversation
|
Up |
| """ | ||
| 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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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 !
There was a problem hiding this comment.
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 !
There was a problem hiding this comment.
Yes, l'appel /v1/installment_plans/{installment_plan_id} renvoie bien le DAO InstallmentPlan quand il est appelé (testé en QA)
There was a problem hiding this comment.
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).
|
UP plz. |
…o feature-installment-plans
|
UP plz |
- 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
Finishing Feature installment plans
Adds the installment plan endpoint (get, create, update)