{"action":"created","issue":{"url":"https://api.github.com/repos/apaleo/api/issues/227","repository_url":"https://api.github.com/repos/apaleo/api","labels_url":"https://api.github.com/repos/apaleo/api/issues/227/labels{/name}","comments_url":"https://api.github.com/repos/apaleo/api/issues/227/comments","events_url":"https://api.github.com/repos/apaleo/api/issues/227/events","html_url":"https://github.com/apaleo/api/issues/227","id":511236965,"node_id":"MDU6SXNzdWU1MTEyMzY5NjU=","number":227,"title":"Send a rate for a specific date","user":{"login":"remywrevcontrol","id":56626532,"node_id":"MDQ6VXNlcjU2NjI2NTMy","avatar_url":"https://avatars0.githubusercontent.com/u/56626532?v=4","gravatar_id":"","url":"https://api.github.com/users/remywrevcontrol","html_url":"https://github.com/remywrevcontrol","followers_url":"https://api.github.com/users/remywrevcontrol/followers","following_url":"https://api.github.com/users/remywrevcontrol/following{/other_user}","gists_url":"https://api.github.com/users/remywrevcontrol/gists{/gist_id}","starred_url":"https://api.github.com/users/remywrevcontrol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remywrevcontrol/subscriptions","organizations_url":"https://api.github.com/users/remywrevcontrol/orgs","repos_url":"https://api.github.com/users/remywrevcontrol/repos","events_url":"https://api.github.com/users/remywrevcontrol/events{/privacy}","received_events_url":"https://api.github.com/users/remywrevcontrol/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-10-23T10:41:51Z","updated_at":"2019-10-24T08:16:07Z","closed_at":null,"author_association":"NONE","body":"## Question\r\n\r\nIf we send a rate for a specific date and rate plan, do we need to send the rate for that with a timeslice? Also, if we are only updating the minLOS restrictions, do we need to send ALL rate data every time?\r\n\r\n## Background\r\n\r\nWe only send rates for a (arrival) date. Since the rate plan already defines the used timeslice check-in check-out time for that rate plan, there should be no reason to send the timeslice each time.\r\nIf we have to do that, that would mean that for every rate we send, we need to fetch the rateplan first to get the timeslice. That would mean extra (unnecessary IMHO) calls to the Apaleo API.\r\n"},"comment":{"url":"https://api.github.com/repos/apaleo/api/issues/comments/545802411","html_url":"https://github.com/apaleo/api/issues/227#issuecomment-545802411","issue_url":"https://api.github.com/repos/apaleo/api/issues/227","id":545802411,"node_id":"MDEyOklzc3VlQ29tbWVudDU0NTgwMjQxMQ==","user":{"login":"bennetone","id":25197867,"node_id":"MDQ6VXNlcjI1MTk3ODY3","avatar_url":"https://avatars3.githubusercontent.com/u/25197867?v=4","gravatar_id":"","url":"https://api.github.com/users/bennetone","html_url":"https://github.com/bennetone","followers_url":"https://api.github.com/users/bennetone/followers","following_url":"https://api.github.com/users/bennetone/following{/other_user}","gists_url":"https://api.github.com/users/bennetone/gists{/gist_id}","starred_url":"https://api.github.com/users/bennetone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennetone/subscriptions","organizations_url":"https://api.github.com/users/bennetone/orgs","repos_url":"https://api.github.com/users/bennetone/repos","events_url":"https://api.github.com/users/bennetone/events{/privacy}","received_events_url":"https://api.github.com/users/bennetone/received_events","type":"User","site_admin":false},"created_at":"2019-10-24T08:16:07Z","updated_at":"2019-10-24T08:16:07Z","author_association":"CONTRIBUTOR","body":"Dear @remywrevcontrol \r\n\r\nthe PATCH operations are applied in order and the last one wins. The `from` parameter in the PATCH specification is only used for the copy operation, for all other operations it is not used.\r\n\r\nWhen you are using PATCH rates, then you can do the same changes for all rates within the specified time range for the specified rate plans. By specifying the weekdays you can define the changes should only be done for specific weekdays.\r\n\r\nIf you want to set different prices and restrictions for different dates the best option is to use the PUT rates API. Here the flow is as described in the guide. Load all rates for a specific rate plan (especially as you should not calculate the from and to for each rate yourself), do your modifications and send the result back. You would have to do this per rate plan:\r\n![image](https://user-images.githubusercontent.com/25197867/67466057-b406d100-f646-11e9-9ba1-6163cc17f788.png)\r\n\r\nPlease be aware that PUT is an idempotent operation and will overwrite the rates completely with the data you send.\r\n"}}
{"actor":{"display_login":"bennetone"}}