You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am implementing a provider for another API in which reservations are created using the ISBN-number of the book, and not the provider id. When ding_reservation calls the create function, it passes the provider id along. I cannot seem to load the TingEntity object when i only have the provider id.
The provider id the function receives looks like this; XXXXXXXX, but the id i need for calling ding_entity_load looks like this; XXXXXX-basis:XXXXXXXX where basis could be something else for different types of data.
I suggest that the create reservation function is passed the DingReservationReservable or TingEntity object as well as the provider id.
The text was updated successfully, but these errors were encountered:
It seems odd to me that a provider API does not use the provider id for invoking other operations on entities. If that is the case for all operations I would consider using the ISBN as the provider ID throughout the provider implementation and not any other ID exposed by the provider.
If we are to alter the API then passing a provider ID or a DingReservationReservableEntity instance which would contain the entity and provider id would be fine by me.
I am not quite sure how the provider defines the provider id for an entity. As far as i can see, the provider id is just the localId field of a TingEntity (see ting_ting_object_load in profiles/ding2/modules/ting/ting.module) as received from Ting.
How about using hook_entity_load to set localId after loading the entity?
I think that passing a reservable is a better option, but I would like to get the opinion of other core developers before I recommend you to submit a pull request for such a change.
I am implementing a provider for another API in which reservations are created using the ISBN-number of the book, and not the provider id. When ding_reservation calls the create function, it passes the provider id along. I cannot seem to load the TingEntity object when i only have the provider id.
The provider id the function receives looks like this;
XXXXXXXX
, but the id i need for calling ding_entity_load looks like this;XXXXXX-basis:XXXXXXXX
wherebasis
could be something else for different types of data.I suggest that the create reservation function is passed the DingReservationReservable or TingEntity object as well as the provider id.
The text was updated successfully, but these errors were encountered: