mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
feat: Edit Stripe payment settings
This commit is contained in:
@@ -114,3 +114,24 @@ export const useUpdatePaymentMethod = (): UseMutationResult<
|
||||
.then((response) => response.data),
|
||||
);
|
||||
};
|
||||
|
||||
interface GetPaymentMethodResponse {}
|
||||
/**
|
||||
* Retrieves a specific payment method.
|
||||
* @param {number} paymentMethodId - The ID of the payment method.
|
||||
* @returns {UseQueryResult<GetPaymentMethodResponse, Error>}
|
||||
*/
|
||||
export const useGetPaymentMethod = (
|
||||
paymentMethodId: number,
|
||||
): UseQueryResult<GetPaymentMethodResponse, Error> => {
|
||||
const apiRequest = useApiRequest();
|
||||
|
||||
return useQuery<GetPaymentMethodResponse, Error>(
|
||||
['paymentMethod', paymentMethodId],
|
||||
() => apiRequest.get(`/payment-services/${paymentMethodId}`),
|
||||
{
|
||||
select: (data) =>
|
||||
transformToCamelCase(data.data) as GetPaymentMethodResponse,
|
||||
},
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user