def update_by_key(
     self, key: str, version: int, actions: List[types.PaymentUpdateAction]
 ) -> types.Payment:
     update_action = types.PaymentUpdate(version=version, actions=actions)
     return self._client._post(
         f"payments/key={key}",
         {},
         update_action,
         schemas.PaymentUpdateSchema,
         schemas.PaymentSchema,
     )
Ejemplo n.º 2
0
 def update_by_key(
     self,
     key: str,
     version: int,
     actions: List[types.PaymentUpdateAction],
     *,
     force_update: bool = False,
 ) -> types.Payment:
     update_action = types.PaymentUpdate(version=version, actions=actions)
     return self._client._post(
         endpoint=f"payments/key={key}",
         params={},
         data_object=update_action,
         request_schema_cls=schemas.PaymentUpdateSchema,
         response_schema_cls=schemas.PaymentSchema,
         force_update=force_update,
     )
Ejemplo n.º 3
0
 def post_load(self, data, **kwargs):
     return types.PaymentUpdate(**data)