Updated

app/use_cases/accounts/apps/chatwoots / sync_inboxes.rb

A
13 lines of codes
1 methods
9.9 complexity/method
2 churn
9.85 complexity
0 duplications
class Accounts::Apps::Chatwoots::SyncInboxes
  1. Accounts::Apps::Chatwoots::SyncInboxes has no descriptive comment
def self.call(chatwoot) inboxes_request = Faraday.get( "#{chatwoot.chatwoot_endpoint_url}/api/v1/accounts/#{chatwoot.chatwoot_account_id}/inboxes", {}, chatwoot.request_headers ) chatwoot.update(inboxes: JSON.parse(inboxes_request.body)['payload']) return true end end