{"action":"opened","issue":{"url":"https://api.github.com/repos/solidusio/solidus_avatax/issues/7","labels_url":"https://api.github.com/repos/solidusio/solidus_avatax/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/solidusio/solidus_avatax/issues/7/comments","events_url":"https://api.github.com/repos/solidusio/solidus_avatax/issues/7/events","html_url":"https://github.com/solidusio/solidus_avatax/issues/7","id":100104539,"number":7,"title":"Rename \"generate\" methods","user":{"login":"jordan-brough","id":23050,"avatar_url":"https://avatars.githubusercontent.com/u/23050?v=3","gravatar_id":"","url":"https://api.github.com/users/jordan-brough","html_url":"https://github.com/jordan-brough","followers_url":"https://api.github.com/users/jordan-brough/followers","following_url":"https://api.github.com/users/jordan-brough/following{/other_user}","gists_url":"https://api.github.com/users/jordan-brough/gists{/gist_id}","starred_url":"https://api.github.com/users/jordan-brough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordan-brough/subscriptions","organizations_url":"https://api.github.com/users/jordan-brough/orgs","repos_url":"https://api.github.com/users/jordan-brough/repos","events_url":"https://api.github.com/users/jordan-brough/events{/privacy}","received_events_url":"https://api.github.com/users/jordan-brough/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-10T16:09:33Z","updated_at":"2015-08-10T16:09:33Z","closed_at":null,"body":"See discussion [here](https://github.com/solidusio/solidus_avatax/pull/6/files#r36635283).\r\n\r\nIt's surprising that [`SpreeAvatax::SalesInvoice.generate(order)`](https://github.com/solidusio/solidus_avatax/blob/647b1bf749868a8ba9a73c1338cc1c4599805d93/app/models/spree_avatax/sales_invoice.rb#L23) modifies the order, rather than just creating an invoice.  Something like `SpreeAvatax::SalesInvoice.calculate_and_set_taxes(order)` would probably be a better name.\r\n\r\nThere are at least three `generate` methods defined in solidus_avatax right now. We'd probably want to update all of them and deprecate the `generate` name."}}