def streams(self, config: Mapping[str, Any]) -> List[Stream]: authenticator = TokenAuthenticator(config["client_secret"]) args = { "authenticator": authenticator, "account_id": config["account_id"] } return [ BankAccounts(**args), BalanceTransactions(**args), Charges(**args), Coupons(**args), Customers(**args), CustomerBalanceTransactions(**args), Disputes(**args), Events(**args), InvoiceItems(**args), InvoiceLineItems(**args), Invoices(**args), Plans(**args), Payouts(**args), Products(**args), Subscriptions(**args), SubscriptionItems(**args), Refunds(**args), Transfers(**args), ]
def check_connection(self, logger, config) -> Tuple[bool, any]: try: authenticator = TokenAuthenticator(token=config["access_token"]) list( RoutingSettings(authenticator=authenticator).read_records( SyncMode.full_refresh)) return True, None except Exception as error: return False, f"Unable to connect to Zendesk Chat API with the provided credentials - {error}"
def streams(self, config: Mapping[str, Any]) -> List[Stream]: authenticator = TokenAuthenticator(token=config["access_token"]) return [ Agents(authenticator=authenticator), AgentTimelines(authenticator=authenticator, start_date=config["start_date"]), Accounts(authenticator=authenticator), Chats(authenticator=authenticator), Shortcuts(authenticator=authenticator), Triggers(authenticator=authenticator), Bans(authenticator=authenticator), Departments(authenticator=authenticator), Goals(authenticator=authenticator), Skills(authenticator=authenticator), Roles(authenticator=authenticator), RoutingSettings(authenticator=authenticator), ]
def streams(self, config: Mapping[str, Any]) -> List[Stream]: authenticator = TokenAuthenticator(config['client_secret']) return [ BalanceTransactions(authenticator=authenticator), Charges(authenticator=authenticator), Coupons(authenticator=authenticator), Customers(authenticator=authenticator), CustomerBalanceTransactions(authenticator=authenticator), Disputes(authenticator=authenticator), Events(authenticator=authenticator), InvoiceItems(authenticator=authenticator), InvoiceLineItems(authenticator=authenticator), Invoices(authenticator=authenticator), Plans(authenticator=authenticator), Payouts(authenticator=authenticator), Products(authenticator=authenticator), Subscriptions(authenticator=authenticator), SubscriptionItems(authenticator=authenticator), Transfers(authenticator=authenticator) ]