getBudget method

Future<GetBudgetResponse> getBudget({
  1. required String budgetId,
  2. required String farmId,
})

Get a budget.

May throw AccessDeniedException. May throw InternalServerErrorException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter budgetId : The budget ID.

Parameter farmId : The farm ID of the farm connected to the budget.

Implementation

Future<GetBudgetResponse> getBudget({
  required String budgetId,
  required String farmId,
}) async {
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/2023-10-12/farms/${Uri.encodeComponent(farmId)}/budgets/${Uri.encodeComponent(budgetId)}',
    exceptionFnMap: _exceptionFns,
  );
  return GetBudgetResponse.fromJson(response);
}